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

#include <tocntntanchoredobjectposition.hxx>

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

Public Member Functions

 SwToContentAnchoredObjectPosition (SdrObject &_rDrawObj)
 
virtual ~SwToContentAnchoredObjectPosition () override
 
virtual void CalcPosition () override
 calculate position of object More...
 
const SwLayoutFrame & GetVertPosOrientFrame () const
 frame, at which the vertical position is oriented at More...
 
void CalcOverlap (const SwTextFrame *pAnchorFrameForVertPos, Point &rRelPos, const SwTwips nTopOfAnch)
 In case overlap is not allowed, re-position the current object. More...
 
virtual void CalcPosition ()=0
 

Private Member Functions

virtual bool IsAnchoredToChar () const override
 
virtual const SwFrame * ToCharOrientFrame () const override
 
virtual const SwRect * ToCharRect () const override
 
virtual SwTwips ToCharTopOfLine () const override
 
SwTextFrame & GetAnchorTextFrame () const
 
const SwFrame & GetHoriVirtualAnchor (const SwLayoutFrame &_pProposedFrame) const
 determine frame for horizontal position More...
 

Private Attributes

const SwLayoutFrame * mpVertPosOrientFrame
 
Point maOffsetToFrameAnchorPos
 
bool mbAnchorToChar
 
const SwFrame * mpToCharOrientFrame
 
const SwRect * mpToCharRect
 
SwTwips mnToCharTopOfLine
 

Additional Inherited Members

- Protected Member Functions inherited from objectpositioning::SwAnchoredObjectPosition
 SwAnchoredObjectPosition (SdrObject &_rDrawObj)
 
virtual ~SwAnchoredObjectPosition ()
 
SdrObject & GetObject () const
 
bool IsObjFly () const
 
SwAnchoredObject & GetAnchoredObj () const
 
SwFrame & GetAnchorFrame () const
 
const SwFrameFormat & GetFrameFormat () const
 
bool DoesObjFollowsTextFlow () const
 
virtual bool IsAnchoredToChar () const
 
virtual const SwFrame * ToCharOrientFrame () const
 
virtual const SwRect * ToCharRect () 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 30 of file tocntntanchoredobjectposition.hxx.

Constructor & Destructor Documentation

◆ SwToContentAnchoredObjectPosition()

objectpositioning::SwToContentAnchoredObjectPosition::SwToContentAnchoredObjectPosition ( SdrObject &  _rDrawObj)

Definition at line 50 of file tocntntanchoredobjectposition.cxx.

◆ ~SwToContentAnchoredObjectPosition()

objectpositioning::SwToContentAnchoredObjectPosition::~SwToContentAnchoredObjectPosition ( )
overridevirtual

Definition at line 60 of file tocntntanchoredobjectposition.cxx.

Member Function Documentation

◆ CalcOverlap()

void objectpositioning::SwToContentAnchoredObjectPosition::CalcOverlap ( const SwTextFrame *  pAnchorFrameForVertPos,
Point &  rRelPos,
const SwTwips  nTopOfAnch 
)

◆ CalcPosition()

void objectpositioning::SwToContentAnchoredObjectPosition::CalcPosition ( )
overridevirtual

calculate position of object

Implements objectpositioning::SwAnchoredObjectPosition.

Definition at line 137 of file tocntntanchoredobjectposition.cxx.

References objectpositioning::SwAnchoredObjectPosition::AdjustVertRelPos(), SwRectFnSet::BottomDist(), CalcOverlap(), objectpositioning::SwAnchoredObjectPosition::CalcRelPosX(), SwAnchoredObject::CheckCharRectAndTopOfLine(), objectpositioning::SwAnchoredObjectPosition::DoesObjFollowsTextFlow(), SwAnchoredObject::DynCastFlyFrame(), SwFrame::FindFooterOrHeader(), SwFrame::FindPageFrame(), SwFrame::FindSctFrame(), SwFrame::FindTabFrame(), SwRectFnSet::FnRect(), SwFormat::GetAnchor(), objectpositioning::SwAnchoredObjectPosition::GetAnchoredObj(), objectpositioning::SwAnchoredObjectPosition::GetAnchorFrame(), SwFormatAnchor::GetAnchorId(), GetAnchorTextFrame(), SwRectFnSet::GetBottom(), SwViewOption::getBrowseMode(), SwFormatAnchor::GetContentAnchor(), SwRootFrame::GetCurrShell(), SwTextFrame::GetFollow(), SwFrameAreaDefinition::getFrameArea(), objectpositioning::SwAnchoredObjectPosition::GetFrameFormat(), SwFrameAreaDefinition::getFramePrintArea(), SwFormat::GetFrameSize(), SwPageFrame::GetHeaderFrame(), SwRectFnSet::GetHeight(), SwFormatFrameSize::GetHeightPercent(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), GetHoriVirtualAnchor(), SwFrame::GetIndPrev(), SwAnchoredObject::GetLastCharRect(), SwAnchoredObject::GetLastTopOfLine(), SwFrame::GetLeaf(), SvxLRSpaceItem::GetLeft(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), SwFrame::GetNext(), SwAnchoredObject::GetObjRect(), SwFrame::GetPaintArea(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFlyAtContentFrame::GetPrecede(), SwRectFnSet::GetPrtBottom(), SwRectFnSet::GetPrtTop(), SwFormatVertOrient::GetRelationOrient(), SvxLRSpaceItem::GetRight(), SwFrame::getRootFrame(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), SwRectFnSet::GetTop(), objectpositioning::SwAnchoredObjectPosition::GetTopForObjPos(), SwFrame::GetTopMargin(), SwRectFnSet::GetTopMargin(), SwFormat::GetULSpace(), SwFrame::GetUpper(), SvxULSpaceItem::GetUpper(), objectpositioning::SwAnchoredObjectPosition::GetVertAlignmentValues(), objectpositioning::SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrame(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SwViewShell::GetViewOptions(), SwFrame::Grow(), Height, SwRect::Height(), SwFrame::IsColumnFrame(), SwFrame::IsFooterFrame(), SwFrame::IsFootnoteFrame(), SwFrame::IsInDocBody(), SwFrame::IsInFootnote(), SwFrame::IsInSct(), SwFrame::IsInTab(), SwFrame::IsMoveable(), SwFrame::IsPageFrame(), SwFrame::IsSctFrame(), SwFrame::IsTextFrame(), SwRectFnSet::IsVert(), SwRectFnSet::IsVertL2R(), objectpositioning::lcl_DoesVertPosFits(), SwRect::Left(), SwLayoutFrame::Lower(), MAKEPAGE_APPEND, MAKEPAGE_NONE, MAKEPAGE_NOSECTION, maOffsetToFrameAnchorPos, SwTextFrame::MapModelToViewPos(), mbAnchorToChar, mnToCharTopOfLine, mpToCharOrientFrame, mpToCharRect, mpVertPosOrientFrame, SwPostItHelper::NONE, nTopMargin, SwRectFnSet::Refresh(), SAL_WARN, SwAnchoredObject::SetCurrRelPos(), SwAnchoredObject::SetObjLeft(), SwAnchoredObject::SetObjTop(), SwFormatVertOrient::SetPos(), SwFormatHoriOrient::SetPos(), Point::setX(), Point::setY(), ToCharRect(), ToCharTopOfLine(), SwRect::Top(), Width, SwRect::Width(), Point::X(), Point::Y(), and SwRectFnSet::YDiff().

Referenced by SwFlyAtContentFrame::MakeObjPos(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtPara().

◆ GetAnchorTextFrame()

SwTextFrame & objectpositioning::SwToContentAnchoredObjectPosition::GetAnchorTextFrame ( ) const
private

◆ GetHoriVirtualAnchor()

const SwFrame & objectpositioning::SwToContentAnchoredObjectPosition::GetHoriVirtualAnchor ( const SwLayoutFrame &  _pProposedFrame) const
private

determine frame for horizontal position

Determine frame for horizontal position.

if the given proposed frame is a content frame, the proposed frame is returned. otherwise (given proposed frame is a layout frame), the lower content frames of the proposed frame are checked for the first, that the anchor or a follow of the anchor. If none is found, the proposed frame is returned.

Parameters
_pProposedFrameinput parameter - proposed frame for horizontal position
Returns
constant reference to <SwFrame> object, at which the horizontal position is determined.

Definition at line 1247 of file tocntntanchoredobjectposition.cxx.

References GetAnchorTextFrame(), SwFrame::GetNext(), SwFrame::IsContentFrame(), and SwLayoutFrame::Lower().

Referenced by CalcPosition().

◆ GetVertPosOrientFrame()

const SwLayoutFrame & objectpositioning::SwToContentAnchoredObjectPosition::GetVertPosOrientFrame ( ) const
inline

frame, at which the vertical position is oriented at

Definition at line 83 of file tocntntanchoredobjectposition.hxx.

References mpVertPosOrientFrame.

Referenced by SwFlyAtContentFrame::MakeObjPos(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtPara().

◆ IsAnchoredToChar()

bool objectpositioning::SwToContentAnchoredObjectPosition::IsAnchoredToChar ( ) const
overrideprivatevirtual

Reimplemented from objectpositioning::SwAnchoredObjectPosition.

Definition at line 63 of file tocntntanchoredobjectposition.cxx.

References mbAnchorToChar.

◆ ToCharOrientFrame()

const SwFrame * objectpositioning::SwToContentAnchoredObjectPosition::ToCharOrientFrame ( ) const
overrideprivatevirtual

Reimplemented from objectpositioning::SwAnchoredObjectPosition.

Definition at line 68 of file tocntntanchoredobjectposition.cxx.

References mpToCharOrientFrame.

◆ ToCharRect()

const SwRect * objectpositioning::SwToContentAnchoredObjectPosition::ToCharRect ( ) const
overrideprivatevirtual

Reimplemented from objectpositioning::SwAnchoredObjectPosition.

Definition at line 73 of file tocntntanchoredobjectposition.cxx.

References mpToCharRect.

Referenced by CalcPosition().

◆ ToCharTopOfLine()

SwTwips objectpositioning::SwToContentAnchoredObjectPosition::ToCharTopOfLine ( ) const
overrideprivatevirtual

Reimplemented from objectpositioning::SwAnchoredObjectPosition.

Definition at line 79 of file tocntntanchoredobjectposition.cxx.

References mnToCharTopOfLine.

Referenced by CalcPosition().

Member Data Documentation

◆ maOffsetToFrameAnchorPos

Point objectpositioning::SwToContentAnchoredObjectPosition::maOffsetToFrameAnchorPos
private

Definition at line 38 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition().

◆ mbAnchorToChar

bool objectpositioning::SwToContentAnchoredObjectPosition::mbAnchorToChar
private

Definition at line 41 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition(), and IsAnchoredToChar().

◆ mnToCharTopOfLine

SwTwips objectpositioning::SwToContentAnchoredObjectPosition::mnToCharTopOfLine
private

Definition at line 44 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition(), and ToCharTopOfLine().

◆ mpToCharOrientFrame

const SwFrame* objectpositioning::SwToContentAnchoredObjectPosition::mpToCharOrientFrame
private

Definition at line 42 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition(), and ToCharOrientFrame().

◆ mpToCharRect

const SwRect* objectpositioning::SwToContentAnchoredObjectPosition::mpToCharRect
private

Definition at line 43 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition(), and ToCharRect().

◆ mpVertPosOrientFrame

const SwLayoutFrame* objectpositioning::SwToContentAnchoredObjectPosition::mpVertPosOrientFrame
private

Definition at line 34 of file tocntntanchoredobjectposition.hxx.

Referenced by CalcPosition(), and GetVertPosOrientFrame().


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