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 ()
 

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, const sal_uInt32 _nFromPageNum, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32 &_noToPageNum, bool &_boInFollow)
 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)
 
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)
 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
 
SwTextFrame *const mpMasterAnchorTextFrame
 

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 ( SwTextFrame _rAnchorTextFrame,
const SwPageFrame _rPageFrame,
SwTextFrame _pMasterAnchorTextFrame,
SwLayAction _pLayAction 
)
private

Definition at line 60 of file objectformattertxtfrm.cxx.

Referenced by CreateObjFormatter().

SwObjectFormatterTextFrame::~SwObjectFormatterTextFrame ( )
overridevirtual

Definition at line 70 of file objectformattertxtfrm.cxx.

Member Function Documentation

bool SwObjectFormatterTextFrame::AtLeastOneObjIsTmpConsiderWrapInfluence ( )
private

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

Definition at line 783 of file objectformattertxtfrm.cxx.

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

Referenced by DoFormatObjs().

bool SwObjectFormatterTextFrame::CheckMovedFwdCondition ( SwAnchoredObject _rAnchoredObj,
const sal_uInt32  _nFromPageNum,
const bool  _bAnchoredAtMasterBeforeFormatAnchor,
sal_uInt32 &  _noToPageNum,
bool &  _boInFollow 
)
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>.
Returns
boolean indicating, if 'anchor is moved forward'

Definition at line 543 of file objectformattertxtfrm.cxx.

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

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

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 74 of file objectformattertxtfrm.cxx.

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

Referenced by SwObjectFormatter::CreateObjFormatter().

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 111 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::GetOfst(), SwObjectFormatter::GetPageFrame(), SwAnchoredObject::GetPageFrame(), SwObjectFormatter::GetPgNumOfCollected(), SwFrame::GetPhyPageNum(), SfxBoolItem::GetValue(), SwFormat::GetWrapInfluenceOnObjPos(), SwAnchoredObject::HasClearedEnvironment(), SwLayouter::InsertMovedFwdFrame(), InvalidateFollowObjs(), SwFrame::InvalidatePos(), InvalidatePrevObjs(), SwObjectFormatter::IsCollectedAnchoredAtMaster(), SwFlowFrame::IsFollow(), SwAnchoredObject::IsFormatPossible(), SwFrame::IsInFly(), mrAnchorTextFrame, SwAnchoredObject::PositionLocked(), SwLayouter::RemoveMovedFwdFrame(), SwAnchoredObject::RestartLayoutProcess(), SwAnchoredObject::SetClearedEnvironment(), and SwAnchoredObject::SetRestartLayoutProcess().

bool SwObjectFormatterTextFrame::DoFormatObjs ( )
overridevirtual
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 683 of file objectformattertxtfrm.cxx.

References SwFrame::Calc(), SwFrame::FindColFrame(), SwRootFrame::GetCurrShell(), SwFrame::GetLower(), SwFrame::GetNext(), SwViewShell::GetOut(), SwFrame::getRootFrame(), SwFrame::GetUpper(), SwFrame::IsCellFrame(), SwFlowFrame::IsFollow(), SwFrame::IsInSct(), SwFrame::IsInTab(), SwFrame::IsLayoutFrame(), SwFrame::IsSctFrame(), lcl_FormatContentOfLayoutFrame(), SwFlowFrame::LockJoin(), and SwFlowFrame::UnlockJoin().

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

void SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd ( )
private

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

#i40141#

Definition at line 775 of file objectformattertxtfrm.cxx.

References FormatAnchorFrameAndItsPrevs(), and mrAnchorTextFrame.

Referenced by DoFormatObj(), and DoFormatObjs().

SwFrame & SwObjectFormatterTextFrame::GetAnchorFrame ( )
overrideprotectedvirtual
SwAnchoredObject * SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor ( const sal_Int16  _nWrapInfluenceOnPosition,
sal_uInt32 &  _noToPageNum,
bool &  _boInFollow 
)
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 503 of file objectformattertxtfrm.cxx.

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

Referenced by DoFormatObjs().

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 487 of file objectformattertxtfrm.cxx.

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

Referenced by DoFormatObj(), and DoFormatObjs().

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 454 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

SwTextFrame* const SwObjectFormatterTextFrame::mpMasterAnchorTextFrame
private

Definition at line 37 of file objectformattertxtfrm.hxx.

Referenced by DoFormatObjs().

SwTextFrame& SwObjectFormatterTextFrame::mrAnchorTextFrame
private

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