72 ( eVertOrient == text::VertOrientation::CENTER ||
73 eVertOrient == text::VertOrientation::BOTTOM ) &&
77 eVertOrient = text::VertOrientation::TOP;
80 SwTwips nVertOffsetToFrameAnchorPos( 0 );
84 rLR, rUL, nVertOffsetToFrameAnchorPos );
89 SwTwips nAttrRelPosY = nRelPosY - nVertOffsetToFrameAnchorPos;
91 aVert.
GetPos() != nAttrRelPosY )
93 aVert.
SetPos( nAttrRelPosY );
95 const_cast<SwFrameFormat&
>(rFrameFormat).SetFormatAttr( aVert );
106 aRelPos.
setX( nRelPosY );
108 aRelPos.
setX( -nRelPosY - aObjBoundRect.
Width() );
113 aRelPos.
setY( nRelPosY );
125 aRelPos.
Y() + aObjBoundRect.
Height();
126 if ( nAnchorBottom < nBottom )
129 FindBodyCont()->
Grow( nBottom - nAnchorBottom );
154 nWidth, nOffset, bDummy );
166 nRelPosX = nWidth - nObjWidth - aHori.
GetPos();
170 nRelPosX = aHori.
GetPos();
173 else if ( text::HoriOrientation::CENTER == eHoriOrient )
174 nRelPosX = (nWidth / 2) - (nObjWidth / 2);
175 else if ( text::HoriOrientation::RIGHT == eHoriOrient )
176 nRelPosX = nWidth - ( nObjWidth +
185 if ( !bFlyAtFly && nRelPosX < 0 )
196 aRelPos.
setY( nRelPosX );
201 aRelPos.
setX( nRelPosX );
208 SwTwips nAttrRelPosX = nRelPosX - nOffset;
210 aHori.
GetPos() != nAttrRelPosX )
212 aHori.
SetPos( nAttrRelPosX );
214 const_cast<SwFrameFormat&
>(rFrameFormat).SetFormatAttr( aHori );
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long GetRight() const
tools::Long GetLeft() const
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
const SwRect & getFrameArea() const
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
SwRootFrame * getRootFrame()
SwPageFrame * FindPageFrame()
A page of the document layout.
tools::Long GetWidth(const SwRect &rRect) const
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Bottom(const tools::Long nBottom)
void Width(tools::Long nNew)
SwViewShell * GetCurrShell() const
bool getBrowseMode() const
const SwViewOption * GetViewOptions() const
SwAnchoredObject & GetAnchoredObj() const
static void ToggleHoriOrientAndAlign(const bool _bToggleLeftRight, sal_Int16 &_ioeHoriOrient, sal_Int16 &_iopeRelOrient)
toggle given horizontal orientation and relative alignment
void GetHoriAlignmentValues(const SwFrame &_rHoriOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eRelOrient, const bool _bObjWrapThrough, SwTwips &_orAlignAreaWidth, SwTwips &_orAlignAreaOffset, bool &_obAlignedRelToPage) const
determine alignment values for horizontal position of object
const SwFrameFormat & GetFrameFormat() const
SwFrame & GetAnchorFrame() const
SwTwips GetVertRelPos(const SwFrame &_rVertOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eVertOrient, const sal_Int16 _eRelOrient, const SwTwips _nVertPos, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, SwTwips &_roVertOffsetToFrameAnchorPos) const
SwToLayoutAnchoredObjectPosition(SdrObject &_rDrawObj)
virtual void CalcPosition() override
calculate position for object
Point maOffsetToFrameAnchorPos
virtual ~SwToLayoutAnchoredObjectPosition() override