LibreOffice Module sw (master) 1
|
#include <objectformattertxtfrm.hxx>
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< SwObjectFormatterTextFrame > | CreateObjFormatter (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 SwFrame & | GetAnchorFrame () override |
Protected Member Functions inherited from SwObjectFormatter | |
SwObjectFormatter (const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction, const bool _bCollectPgNumOfAnchors=false) | |
virtual SwFrame & | GetAnchorFrame ()=0 |
const SwPageFrame & | GetPageFrame () const |
bool | ConsiderWrapOnObjPos () const |
SwLayAction * | GetLayAction () |
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... | |
SwAnchoredObject * | GetCollectedObj (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... | |
SwAnchoredObject * | GetFirstObjWithMovedFwdAnchor (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 | |
SwTextFrame & | mrAnchorTextFrame |
SwTextFrame * | mpMasterAnchorTextFrame |
Additional Inherited Members | |
Static Protected Member Functions inherited from SwObjectFormatter | |
static std::unique_ptr< SwObjectFormatter > | CreateObjFormatter (SwFrame &_rAnchorFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction) |
Definition at line 30 of file objectformattertxtfrm.hxx.
|
private |
Definition at line 66 of file objectformattertxtfrm.cxx.
Referenced by CreateObjFormatter().
|
overridevirtual |
Definition at line 76 of file objectformattertxtfrm.cxx.
|
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().
|
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.
_rAnchoredObj | input parameter - anchored object, for which the condition has to checked. |
_nFromPageNum | input parameter - number of the page, on which the check is performed |
_bAnchoredAtMasterBeforeFormatAnchor | input parameter - boolean indicating, that the given anchored object was anchored at the master frame before the anchor frame has been formatted. |
_noToPageNum | output parameter - number of page frame, the 'anchor' of the returned anchored object is. |
_boInFollow | output 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_rbPageHasFlysAnchoredBelowThis | output parameter - indicates that the page has flys anchored somewhere below the anchor of the passed _rAnchoredObj |
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().
|
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().
|
overridevirtual |
intrinsic method to format a certain floating screen object
#i40147# - add parameter <_bCheckForMovedFwd>
_rAnchoredObj | input parameter - anchored object, which have to be formatted. |
_bCheckForMovedFwd | input 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().
|
overridevirtual |
intrinsic method to format all floating screen objects
Implements SwObjectFormatter.
Definition at line 306 of file objectformattertxtfrm.cxx.
References AtLeastOneObjIsTmpConsiderWrapInfluence(), SwObjectFormatter::ConsiderWrapOnObjPos(), SwFrame::FindPageFrame(), FormatAnchorFrameForCheckMoveFwd(), SwObjectFormatter::FormatObjsAtFrame_(), SwLayouter::FrameMovedFwdByObjPos(), SwFormat::GetDoc(), GetFirstObjWithMovedFwdAnchor(), SwTextFrame::GetFollow(), SwLayoutFrame::GetFormat(), SwFrame::GetIndPrev(), SwObjectFormatter::GetLayAction(), SwTextFrame::GetOffset(), SwAnchoredObject::GetPageFrame(), SwObjectFormatter::GetPageFrame(), SwPageFrame::GetPhyPageNum(), SwAnchoredObject::HasClearedEnvironment(), SwLayouter::InsertMovedFwdFrame(), InvalidateFollowObjs(), SwFrame::InvalidatePos(), InvalidatePrevObjs(), SwFrameAreaDefinition::isFrameAreaDefinitionValid(), mpMasterAnchorTextFrame, mrAnchorTextFrame, SwLayouter::RemoveMovedFwdFrame(), SwLayAction::SetAgain(), and SwAnchoredObject::SetClearedEnvironment().
|
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
_rAnchorTextFrame | input 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().
|
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().
|
overrideprotectedvirtual |
Implements SwObjectFormatter.
Definition at line 111 of file objectformattertxtfrm.cxx.
References mrAnchorTextFrame.
Referenced by AtLeastOneObjIsTmpConsiderWrapInfluence(), and InvalidatePrevObjs().
|
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>
_nWrapInfluenceOnPosition | input parameter - only object with this given wrapping style influence are investigated. |
_nFromPageNum | input parameter - number of page frame, the 'anchor' should be |
_noToPageNum | output parameter - number of page frame, the 'anchor' of the returned anchored object is. |
_boInFollow | output 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 |
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().
|
private |
method to invalidate objects, anchored after the given object at the page frame
_rAnchoredObj | reference 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().
|
private |
method to invalidate objects, anchored previous to given object at the anchor text frame
_rAnchoredObj | reference 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().
|
private |
Definition at line 37 of file objectformattertxtfrm.hxx.
Referenced by DoFormatObjs().
|
private |
Definition at line 34 of file objectformattertxtfrm.hxx.
Referenced by DoFormatObj(), DoFormatObjs(), FormatAnchorFrameForCheckMoveFwd(), and GetAnchorFrame().