LibreOffice Module sw (master) 1
Public Member Functions | Private Attributes | List of all members
objectpositioning::SwToLayoutAnchoredObjectPosition Class Referencefinal

#include <tolayoutanchoredobjectposition.hxx>

Inheritance diagram for objectpositioning::SwToLayoutAnchoredObjectPosition:
[legend]
Collaboration diagram for objectpositioning::SwToLayoutAnchoredObjectPosition:
[legend]

Public Member Functions

 SwToLayoutAnchoredObjectPosition (SdrObject &_rDrawObj)
 
virtual ~SwToLayoutAnchoredObjectPosition () override
 
virtual void CalcPosition () override
 calculate position for object More...
 
const PointGetRelPos () const
 calculated relative position for object More...
 
virtual void CalcPosition ()=0
 

Private Attributes

Point maRelPos
 
Point maOffsetToFrameAnchorPos
 

Additional Inherited Members

- Protected Member Functions inherited from objectpositioning::SwAnchoredObjectPosition
 SwAnchoredObjectPosition (SdrObject &_rDrawObj)
 
virtual ~SwAnchoredObjectPosition ()
 
SdrObjectGetObject () const
 
bool IsObjFly () const
 
SwAnchoredObjectGetAnchoredObj () const
 
SwFrameGetAnchorFrame () const
 
const SwFrameFormatGetFrameFormat () const
 
bool DoesObjFollowsTextFlow () const
 
virtual bool IsAnchoredToChar () const
 
virtual const SwFrameToCharOrientFrame () const
 
virtual const SwRectToCharRect () const
 
virtual SwTwips ToCharTopOfLine () const
 
SwTwips GetTopForObjPos (const SwFrame &_rFrame, const SwRectFn &_fnRect, const bool _bVert) const
 helper method to determine top of a frame for the vertical object positioning More...
 
void GetVertAlignmentValues (const SwFrame &_rVertOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eRelOrient, SwTwips &_orAlignAreaHeight, SwTwips &_orAlignAreaOffset) 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
 
SwTwips AdjustVertRelPos (const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, const SwFrame &rPageAlignLayFrame, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom=true) const
 adjust calculated vertical in order to keep object inside 'page' alignment layout frame. More...
 
SwTwips CalcRelPosX (const SwFrame &_rHoriOrientFrame, const SwEnvironmentOfAnchoredObject &_rEnvOfObj, const SwFormatHoriOrient &_rHoriOrient, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, const bool _bObjWrapThrough, const SwTwips _nRelPosY, SwTwips &_roHoriOffsetToFrameAnchorPos) const
 calculate relative horizontal position More...
 
SwTwips AdjustHoriRelPos (const SwFrame &_rPageAlignLayFrame, const SwTwips _nProposedRelPosX) const
 adjust calculated horizontal in order to keep object inside 'page' alignment layout frame for object type position TO_CNTNT More...
 
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 More...
 
SwTwips AdjustHoriRelPosForDrawAside (const SwFrame &_rHoriOrientFrame, const SwTwips _nProposedRelPosX, const SwTwips _nRelPosY, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, const bool _bEvenPage) const
 adjust calculated horizontal position in order to draw object aside other objects with same positioning More...
 
bool DrawAsideFly (const SwFlyFrame *_pFly, const SwRect &_rObjRect, const SwFrame *_pObjContext, const SwNodeOffset _nObjIndex, const bool _bEvenPage, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient) const
 determine, if object has to draw aside given fly frame More...
 
- Static Protected Member Functions inherited from objectpositioning::SwAnchoredObjectPosition
static void ToggleHoriOrientAndAlign (const bool _bToggleLeftRight, sal_Int16 &_ioeHoriOrient, sal_Int16 &_iopeRelOrient)
 toggle given horizontal orientation and relative alignment More...
 
static bool Minor_ (sal_Int16 _eRelOrient1, sal_Int16 _eRelOrient2, bool _bLeft)
 determine, if object has to draw aside another object More...
 

Detailed Description

Definition at line 25 of file tolayoutanchoredobjectposition.hxx.

Constructor & Destructor Documentation

◆ SwToLayoutAnchoredObjectPosition()

objectpositioning::SwToLayoutAnchoredObjectPosition::SwToLayoutAnchoredObjectPosition ( SdrObject _rDrawObj)

Definition at line 40 of file tolayoutanchoredobjectposition.cxx.

◆ ~SwToLayoutAnchoredObjectPosition()

objectpositioning::SwToLayoutAnchoredObjectPosition::~SwToLayoutAnchoredObjectPosition ( )
overridevirtual

Definition at line 44 of file tolayoutanchoredobjectposition.cxx.

Member Function Documentation

◆ CalcPosition()

void objectpositioning::SwToLayoutAnchoredObjectPosition::CalcPosition ( )
overridevirtual

calculate position for object

calculate position for object position type TO_LAYOUT

Implements objectpositioning::SwAnchoredObjectPosition.

Definition at line 48 of file tolayoutanchoredobjectposition.cxx.

References SwRect::Bottom(), SwFrame::FindPageFrame(), SwFormat::GetAnchor(), objectpositioning::SwAnchoredObjectPosition::GetAnchoredObj(), objectpositioning::SwAnchoredObjectPosition::GetAnchorFrame(), SwFormatAnchor::GetAnchorId(), SwViewOption::getBrowseMode(), SwRootFrame::GetCurrShell(), SwFrameAreaDefinition::getFrameArea(), objectpositioning::SwAnchoredObjectPosition::GetFrameFormat(), objectpositioning::SwAnchoredObjectPosition::GetHoriAlignmentValues(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SvxLRSpaceItem::GetLeft(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SvxLRSpaceItem::GetRight(), SwFrame::getRootFrame(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), SwFormat::GetULSpace(), SvxULSpaceItem::GetUpper(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), objectpositioning::SwAnchoredObjectPosition::GetVertRelPos(), SwViewShell::GetViewOptions(), SwRectFnSet::GetWidth(), SwFrame::Grow(), SwRect::Height(), SwFormatHoriOrient::IsPosToggle(), SwRectFnSet::IsVert(), SwRectFnSet::IsVertL2R(), maOffsetToFrameAnchorPos, maRelPos, SwPostItHelper::NONE, SwFrame::OnRightPage(), SwFormatVertOrient::SetPos(), SwFormatHoriOrient::SetPos(), Point::setX(), Point::setY(), objectpositioning::SwAnchoredObjectPosition::ToggleHoriOrientAndAlign(), SwRect::Top(), SwRect::Width(), and Point::Y().

Referenced by SwFlyFrame::MakeObjPos(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtLayout().

◆ GetRelPos()

const Point & objectpositioning::SwToLayoutAnchoredObjectPosition::GetRelPos ( ) const
inline

calculated relative position for object

Definition at line 46 of file tolayoutanchoredobjectposition.hxx.

References maRelPos.

Referenced by SwFlyFrame::MakeObjPos(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtLayout().

Member Data Documentation

◆ maOffsetToFrameAnchorPos

Point objectpositioning::SwToLayoutAnchoredObjectPosition::maOffsetToFrameAnchorPos
private

Definition at line 34 of file tolayoutanchoredobjectposition.hxx.

Referenced by CalcPosition().

◆ maRelPos

Point objectpositioning::SwToLayoutAnchoredObjectPosition::maRelPos
private

Definition at line 29 of file tolayoutanchoredobjectposition.hxx.

Referenced by CalcPosition(), and GetRelPos().


The documentation for this class was generated from the following files: