LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SwObjectFormatterTextFrame Class Reference

#include <objectformattertxtfrm.hxx>

Inheritance diagram for SwObjectFormatterTextFrame:
[legend]
Collaboration diagram for SwObjectFormatterTextFrame:
[legend]

Public Member Functions

virtual ~SwObjectFormatterTextFrame () override
 
virtual bool DoFormatObj (SwAnchoredObject &_rAnchoredObj, const bool _bCheckForMovedFwd=false) override
 intrinsic method to format a certain floating screen object More...
 
virtual bool DoFormatObjs () override
 intrinsic method to format all floating screen objects More...
 
- Public Member Functions inherited from SwObjectFormatter
virtual ~SwObjectFormatter ()
 
virtual bool DoFormatObj (SwAnchoredObject &_rAnchoredObj, const bool _bCheckForMovedFwd=false)=0
 intrinsic method to format a certain floating screen object More...
 
virtual bool DoFormatObjs ()=0
 intrinsic method to format all floating screen objects More...
 

Static Public Member Functions

static std::unique_ptr< SwObjectFormatterTextFrameCreateObjFormatter (SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction)
 method to create an instance of <SwObjectFormatterTextFrame> is necessary. More...
 
static void FormatAnchorFrameAndItsPrevs (SwTextFrame &_rAnchorTextFrame)
 method to format given anchor text frame and its previous frames More...
 
static bool CheckMovedFwdCondition (SwAnchoredObject &_rAnchoredObj, SwPageFrame const &rFromPageFrame, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32 &_noToPageNum, bool &_boInFollow, bool &o_rbPageHasFlysAnchoredBelowThis)
 method to check the conditions, if 'anchor is moved forward' More...
 
- Static Public Member Functions inherited from SwObjectFormatter
static bool FormatObjsAtFrame (SwFrame &_rAnchorFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction=nullptr)
 method to format all floating screen objects at the given anchor frame More...
 
static bool FormatObj (SwAnchoredObject &_rAnchoredObj, SwFrame *_pAnchorFrame=nullptr, const SwPageFrame *_pPageFrame=nullptr)
 method to format a given floating screen object More...
 

Protected Member Functions

virtual SwFrameGetAnchorFrame () override
 
- Protected Member Functions inherited from SwObjectFormatter
 SwObjectFormatter (const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction, const bool _bCollectPgNumOfAnchors=false)
 
virtual SwFrameGetAnchorFrame ()=0
 
const SwPageFrameGetPageFrame () const
 
bool ConsiderWrapOnObjPos () const
 
SwLayActionGetLayAction ()
 
void FormatObj_ (SwAnchoredObject &_rAnchoredObj)
 performs the intrinsic format of a given floating screen object and its content. More...
 
bool FormatObjsAtFrame_ (SwTextFrame *_pMasterTextFrame=nullptr)
 invokes the intrinsic format method for all floating screen objects, anchored at anchor frame on the given page frame More...
 
SwAnchoredObjectGetCollectedObj (const sal_uInt32 _nIndex)
 accessor to collected anchored object More...
 
sal_uInt32 GetPgNumOfCollected (const sal_uInt32 _nIndex)
 accessor to 'anchor' page number of collected anchored object More...
 
bool IsCollectedAnchoredAtMaster (const sal_uInt32 _nIndex)
 accessor to 'anchor' type of collected anchored object More...
 
sal_uInt32 CountOfCollected ()
 accessor to total number of collected anchored objects More...
 

Private Member Functions

 SwObjectFormatterTextFrame (SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwTextFrame *_pMasterAnchorTextFrame, SwLayAction *_pLayAction)
 
void InvalidatePrevObjs (SwAnchoredObject &_rAnchoredObj)
 method to invalidate objects, anchored previous to given object at the anchor text frame More...
 
void InvalidateFollowObjs (SwAnchoredObject &_rAnchoredObj)
 method to invalidate objects, anchored after the given object at the page frame More...
 
SwAnchoredObjectGetFirstObjWithMovedFwdAnchor (const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32 &_noToPageNum, bool &_boInFollow, bool &o_rbPageHasFlysAnchoredBelowThis)
 method to determine first anchored object, whose 'anchor is moved forward'. More...
 
void FormatAnchorFrameForCheckMoveFwd ()
 method to format the anchor frame for checking of the move forward condition More...
 
bool AtLeastOneObjIsTmpConsiderWrapInfluence ()
 method to determine if at least one anchored object has state <temporarily consider wrapping style influence> set. More...
 

Private Attributes

SwTextFramemrAnchorTextFrame
 
SwTextFramempMasterAnchorTextFrame
 

Additional Inherited Members

- Static Protected Member Functions inherited from SwObjectFormatter
static std::unique_ptr< SwObjectFormatterCreateObjFormatter (SwFrame &_rAnchorFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction)
 

Detailed Description

Definition at line 30 of file objectformattertxtfrm.hxx.

Constructor & Destructor Documentation

◆ SwObjectFormatterTextFrame()

SwObjectFormatterTextFrame::SwObjectFormatterTextFrame ( SwTextFrame _rAnchorTextFrame,
const SwPageFrame _rPageFrame,
SwTextFrame _pMasterAnchorTextFrame,
SwLayAction _pLayAction 
)
private

Definition at line 66 of file objectformattertxtfrm.cxx.

Referenced by CreateObjFormatter().

◆ ~SwObjectFormatterTextFrame()

SwObjectFormatterTextFrame::~SwObjectFormatterTextFrame ( )
overridevirtual

Definition at line 76 of file objectformattertxtfrm.cxx.

Member Function Documentation

◆ AtLeastOneObjIsTmpConsiderWrapInfluence()

bool SwObjectFormatterTextFrame::AtLeastOneObjIsTmpConsiderWrapInfluence ( )
private

method to determine if at least one anchored object has state <temporarily consider wrapping style influence> set.

Definition at line 951 of file objectformattertxtfrm.cxx.

References GetAnchorFrame(), SwFrame::GetDrawObjs(), and SwSortedObjs::size().

Referenced by DoFormatObjs().

◆ CheckMovedFwdCondition()

bool SwObjectFormatterTextFrame::CheckMovedFwdCondition ( SwAnchoredObject _rAnchoredObj,
SwPageFrame const &  rFromPageFrame,
const bool  _bAnchoredAtMasterBeforeFormatAnchor,
sal_uInt32 &  _noToPageNum,
bool &  _boInFollow,
bool &  o_rbPageHasFlysAnchoredBelowThis 
)
static

method to check the conditions, if 'anchor is moved forward'

#i26945# #i43913# - add output parameter <_boInFollow> #i58182# - replace method by a corresponding static method, because it's needed for the iterative positioning algorithm.

Parameters
_rAnchoredObjinput parameter - anchored object, for which the condition has to checked.
_nFromPageNuminput parameter - number of the page, on which the check is performed
_bAnchoredAtMasterBeforeFormatAnchorinput parameter - boolean indicating, that the given anchored object was anchored at the master frame before the anchor frame has been formatted.
_noToPageNumoutput parameter - number of page frame, the 'anchor' of the returned anchored object is.
_boInFollowoutput parameter - boolean, indicating that anchor text frame is currently on the same page, but it's a follow of in a follow row, which will move forward. value only relevant, if method return <true>.
o_rbPageHasFlysAnchoredBelowThisoutput parameter - indicates that the page has flys anchored somewhere below the anchor of the passed _rAnchoredObj
Returns
boolean indicating, if 'anchor is moved forward'

Definition at line 608 of file objectformattertxtfrm.cxx.

References SwFrame::FindColFrame(), FindFrameInBody(), SwFrame::FindNextCnt(), SwFrame::FindPageFrame(), SwAnchoredObject::FindPageFrameOfAnchor(), FindTopLevelRowFrame(), SwFormat::GetAnchor(), SwAnchoredObject::GetAnchorFrameContainingAnchPos(), SwFormatAnchor::GetAnchorId(), SwAnchoredObject::GetFrameFormat(), SwFrame::GetNext(), SwPageFrame::GetPhyPageNum(), SwPageFrame::GetSortedObjs(), SwFrame::IsInFollowFlowRow(), SwFrame::IsInTab(), SwFrame::IsTextFrame(), and SAL_INFO.

Referenced by DoFormatObj(), GetFirstObjWithMovedFwdAnchor(), and SwFlyAtContentFrame::MakeAll().

◆ CreateObjFormatter()

std::unique_ptr< SwObjectFormatterTextFrame > SwObjectFormatterTextFrame::CreateObjFormatter ( SwTextFrame _rAnchorTextFrame,
const SwPageFrame _rPageFrame,
SwLayAction _pLayAction 
)
static

method to create an instance of <SwObjectFormatterTextFrame> is necessary.

Definition at line 80 of file objectformattertxtfrm.cxx.

References SwContentFrame::FindMaster(), SwFrame::GetDrawObjs(), and SwObjectFormatterTextFrame().

Referenced by SwObjectFormatter::CreateObjFormatter().

◆ DoFormatObj()

bool SwObjectFormatterTextFrame::DoFormatObj ( SwAnchoredObject _rAnchoredObj,
const bool  _bCheckForMovedFwd = false 
)
overridevirtual

intrinsic method to format a certain floating screen object

#i40147# - add parameter <_bCheckForMovedFwd>

Parameters
_rAnchoredObjinput parameter - anchored object, which have to be formatted.
_bCheckForMovedFwdinput parameter - boolean indicating, that after a successful format of the anchored object the anchor frame has to be checked, if it would moved forward due to the positioning of the anchored object. default value: false value only considered, if wrapping style influence has to be considered for the positioning of the anchored object.

Implements SwObjectFormatter.

Definition at line 117 of file objectformattertxtfrm.cxx.

References CheckMovedFwdCondition(), SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos(), SwObjectFormatter::CountOfCollected(), SwFrame::FindPageFrame(), FormatAnchorFrameForCheckMoveFwd(), SwObjectFormatter::FormatObj_(), SwLayouter::FrameMovedFwdByObjPos(), SwAnchoredObject::GetAnchorFrame(), SwObjectFormatter::GetCollectedObj(), SwFormat::GetDoc(), SwTextFrame::GetFollow(), SwFormat::GetFollowTextFlow(), SwLayoutFrame::GetFormat(), SwAnchoredObject::GetFrameFormat(), SwFrame::GetIndPrev(), SwObjectFormatter::GetLayAction(), SwTextFrame::GetOffset(), SwAnchoredObject::GetPageFrame(), SwObjectFormatter::GetPageFrame(), SwObjectFormatter::GetPgNumOfCollected(), SwPageFrame::GetPhyPageNum(), SfxBoolItem::GetValue(), SwFormat::GetWrapInfluenceOnObjPos(), SwAnchoredObject::HasClearedEnvironment(), SwLayouter::InsertMovedFwdFrame(), InvalidateFollowObjs(), SwFrame::InvalidatePos(), InvalidatePrevObjs(), SwObjectFormatter::IsCollectedAnchoredAtMaster(), SwAnchoredObject::IsFormatPossible(), SwFrame::IsInFly(), mrAnchorTextFrame, SwAnchoredObject::PositionLocked(), SwLayouter::RemoveMovedFwdFrame(), SwAnchoredObject::RestartLayoutProcess(), SwAnchoredObject::SetClearedEnvironment(), and SwAnchoredObject::SetRestartLayoutProcess().

◆ DoFormatObjs()

bool SwObjectFormatterTextFrame::DoFormatObjs ( )
overridevirtual

◆ FormatAnchorFrameAndItsPrevs()

void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs ( SwTextFrame _rAnchorTextFrame)
static

method to format given anchor text frame and its previous frames

#i56300# Usage: Needed to check, if the anchor text frame is moved forward due to the positioning and wrapping of its anchored objects, and to format the frames, which have become invalid due to the anchored object formatting in the iterative object positioning algorithm

Parameters
_rAnchorTextFrameinput parameter - reference to anchor text frame, which has to be formatted including its previous frames of the page.

#i56300# Usage: Needed to check, if the anchor text frame is moved forward due to the positioning and wrapping of its anchored objects, and to format the frames, which have become invalid due to the anchored object formatting in the iterative object positioning algorithm

Definition at line 823 of file objectformattertxtfrm.cxx.

References SwFrame::Calc(), SwFrame::FindColFrame(), SwRootFrame::GetCurrShell(), SwFrame::GetLower(), SwFrame::GetNext(), SwViewShell::GetOut(), SwFrame::getRootFrame(), SwFrame::GetUpper(), SwFrame::IsColumnFrame(), SwFrame::IsInTab(), SwFrame::IsLayoutFrame(), SwFrame::IsSctFrame(), lcl_FormatContentOfLayoutFrame(), and SAL_INFO_IF.

Referenced by FormatAnchorFrameForCheckMoveFwd(), and SwFlyAtContentFrame::MakeAll().

◆ FormatAnchorFrameForCheckMoveFwd()

void SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd ( )
private

method to format the anchor frame for checking of the move forward condition

#i40141#

Definition at line 943 of file objectformattertxtfrm.cxx.

References FormatAnchorFrameAndItsPrevs(), and mrAnchorTextFrame.

Referenced by DoFormatObj(), and DoFormatObjs().

◆ GetAnchorFrame()

SwFrame & SwObjectFormatterTextFrame::GetAnchorFrame ( )
overrideprotectedvirtual

◆ GetFirstObjWithMovedFwdAnchor()

SwAnchoredObject * SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor ( const sal_Int16  _nWrapInfluenceOnPosition,
sal_uInt32 &  _noToPageNum,
bool &  _boInFollow,
bool &  o_rbPageHasFlysAnchoredBelowThis 
)
private

method to determine first anchored object, whose 'anchor is moved forward'.

'anchor (of an object) is moved forward', if the anchor frame respectively the anchor character of the object isn't on the proposed page frame. Instead its on a following page

#i26945# - For at-character anchored objects, it has also to be checked, if the anchor character is in a follow text frame, which would move to the next page.

#i43913# - add output parameter <_boInFollow>

Parameters
_nWrapInfluenceOnPositioninput parameter - only object with this given wrapping style influence are investigated.
_nFromPageNuminput parameter - number of page frame, the 'anchor' should be
_noToPageNumoutput parameter - number of page frame, the 'anchor' of the returned anchored object is.
_boInFollowoutput parameter - boolean, indicating that anchor text frame is currently on the same page, but it's a follow of in a follow row, which will move forward. value only relevant, if method returns an anchored object
Returns
SwAnchoredObject* anchored object with a 'moved forward anchor'. If NULL, no such anchored object is found.

Definition at line 531 of file objectformattertxtfrm.cxx.

References CheckMovedFwdCondition(), SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos(), SwObjectFormatter::CountOfCollected(), SwObjectFormatter::GetCollectedObj(), SwAnchoredObject::GetFrameFormat(), SwObjectFormatter::GetPageFrame(), SwObjectFormatter::GetPgNumOfCollected(), SwFormat::GetWrapInfluenceOnObjPos(), i, and SwObjectFormatter::IsCollectedAnchoredAtMaster().

Referenced by DoFormatObjs().

◆ InvalidateFollowObjs()

void SwObjectFormatterTextFrame::InvalidateFollowObjs ( SwAnchoredObject _rAnchoredObj)
private

method to invalidate objects, anchored after the given object at the page frame

Parameters
_rAnchoredObjreference to anchored object - objects, anchored after this one will be invalidated.

Definition at line 515 of file objectformattertxtfrm.cxx.

References SwObjectFormatter::GetPageFrame(), SwPageFrame::GetSortedObjs(), i, SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence(), SwSortedObjs::ListPosOf(), and size.

Referenced by DoFormatObj(), and DoFormatObjs().

◆ InvalidatePrevObjs()

void SwObjectFormatterTextFrame::InvalidatePrevObjs ( SwAnchoredObject _rAnchoredObj)
private

method to invalidate objects, anchored previous to given object at the anchor text frame

Parameters
_rAnchoredObjreference to anchored object - objects, anchored previous to this one will be invalidated.

Definition at line 482 of file objectformattertxtfrm.cxx.

References GetAnchorFrame(), SwFrame::GetDrawObjs(), SwAnchoredObject::GetFrameFormat(), SwFormat::GetWrapInfluenceOnObjPos(), i, SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence(), and SwSortedObjs::ListPosOf().

Referenced by DoFormatObj(), and DoFormatObjs().

Member Data Documentation

◆ mpMasterAnchorTextFrame

SwTextFrame* SwObjectFormatterTextFrame::mpMasterAnchorTextFrame
private

Definition at line 37 of file objectformattertxtfrm.hxx.

Referenced by DoFormatObjs().

◆ mrAnchorTextFrame

SwTextFrame& SwObjectFormatterTextFrame::mrAnchorTextFrame
private

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