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

#include <objectformatter.hxx>

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

Public Member Functions

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

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

Static Protected Member Functions

static std::unique_ptr< SwObjectFormatterCreateObjFormatter (SwFrame &_rAnchorFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction)
 

Private Member Functions

void FormatLayout_ (SwLayoutFrame &_rLayoutFrame)
 helper method for method <FormatObj_(..)> - performs the intrinsic format of the layout of the given layout frame and all its lower layout frames. More...
 
void FormatObjContent (SwAnchoredObject &_rAnchoredObj)
 helper method for method <FormatObj_(..)> - performs the intrinsic format of the content of the given floating screen object. More...
 

Private Attributes

const SwPageFramemrPageFrame
 
const bool mbConsiderWrapOnObjPos
 
SwLayActionmpLayAction
 
std::unique_ptr< SwPageNumAndTypeOfAnchorsmpPgNumAndTypeOfAnchors
 

Detailed Description

Definition at line 39 of file objectformatter.hxx.

Constructor & Destructor Documentation

◆ SwObjectFormatter()

SwObjectFormatter::SwObjectFormatter ( const SwPageFrame _rPageFrame,
SwLayAction _pLayAction,
const bool  _bCollectPgNumOfAnchors = false 
)
protected

Definition at line 104 of file objectformatter.cxx.

References CONSIDER_WRAP_ON_OBJECT_POSITION, and GetFormat().

◆ ~SwObjectFormatter()

SwObjectFormatter::~SwObjectFormatter ( )
virtual

Definition at line 115 of file objectformatter.cxx.

Member Function Documentation

◆ ConsiderWrapOnObjPos()

bool SwObjectFormatter::ConsiderWrapOnObjPos ( ) const
inlineprotected

Definition at line 91 of file objectformatter.hxx.

References mbConsiderWrapOnObjPos.

Referenced by SwObjectFormatterTextFrame::DoFormatObjs().

◆ CountOfCollected()

sal_uInt32 SwObjectFormatter::CountOfCollected ( )
protected

accessor to total number of collected anchored objects

#i28701#

Definition at line 473 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

Referenced by SwObjectFormatterTextFrame::DoFormatObj(), and SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor().

◆ CreateObjFormatter()

std::unique_ptr< SwObjectFormatter > SwObjectFormatter::CreateObjFormatter ( SwFrame _rAnchorFrame,
const SwPageFrame _rPageFrame,
SwLayAction _pLayAction 
)
staticprotected

◆ DoFormatObj()

virtual bool SwObjectFormatter::DoFormatObj ( SwAnchoredObject _rAnchoredObj,
const bool  _bCheckForMovedFwd = false 
)
pure virtual

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.

Implemented in SwObjectFormatterLayFrame, and SwObjectFormatterTextFrame.

Referenced by FormatObjsAtFrame_().

◆ DoFormatObjs()

virtual bool SwObjectFormatter::DoFormatObjs ( )
pure virtual

intrinsic method to format all floating screen objects

Implemented in SwObjectFormatterLayFrame, and SwObjectFormatterTextFrame.

◆ FormatLayout_()

void SwObjectFormatter::FormatLayout_ ( SwLayoutFrame _rLayoutFrame)
private

helper method for method <FormatObj_(..)> - performs the intrinsic format of the layout of the given layout frame and all its lower layout frames.

#i28701# IMPORTANT NOTE: Method corresponds to methods <SwLayAction::FormatLayoutFly(..)> and <SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have to be synchronised.

Definition at line 205 of file objectformatter.cxx.

References SwFrame::Calc(), FormatLayout_(), SwRootFrame::GetCurrShell(), SwFrame::GetNext(), SwViewShell::GetOut(), SwFrame::getRootFrame(), SwFrame::IsLayoutFrame(), and SwLayoutFrame::Lower().

Referenced by FormatLayout_(), and FormatObj_().

◆ FormatObj()

bool SwObjectFormatter::FormatObj ( SwAnchoredObject _rAnchoredObj,
SwFrame _pAnchorFrame = nullptr,
const SwPageFrame _pPageFrame = nullptr 
)
static

method to format a given floating screen object

Definition at line 168 of file objectformatter.cxx.

References SwAnchoredObject::AnchorFrame(), CreateObjFormatter(), SwFrame::FindPageFrame(), and SwAnchoredObject::GetAnchorFrame().

Referenced by SwTextFlyCnt::GetFlyFrame_(), and GetFrameOfModify().

◆ FormatObj_()

void SwObjectFormatter::FormatObj_ ( SwAnchoredObject _rAnchoredObj)
protected

◆ FormatObjContent()

void SwObjectFormatter::FormatObjContent ( SwAnchoredObject _rAnchoredObj)
private

helper method for method <FormatObj_(..)> - performs the intrinsic format of the content of the given floating screen object.

#i28701#

Definition at line 225 of file objectformatter.cxx.

References SwLayoutFrame::ContainsContent(), SwAnchoredObject::DynCastFlyFrame(), SwFrame::FindPageFrame(), FormatObjsAtFrame(), GetLayAction(), SwContentFrame::GetNextContentFrame(), SwFrame::IsTextFrame(), and SwFrame::OptCalc().

Referenced by FormatObj_().

◆ FormatObjsAtFrame()

bool SwObjectFormatter::FormatObjsAtFrame ( SwFrame _rAnchorFrame,
const SwPageFrame _rPageFrame,
SwLayAction _pLayAction = nullptr 
)
static

◆ FormatObjsAtFrame_()

bool SwObjectFormatter::FormatObjsAtFrame_ ( SwTextFrame _pMasterTextFrame = nullptr)
protected

invokes the intrinsic format method for all floating screen objects, anchored at anchor frame on the given page frame

for format of floating screen objects for follow text frames, the 'master' text frame is passed to the method. Thus, the objects, whose anchor character is inside the follow text frame can be formatted.

Parameters
_pMasterTextFrameinput parameter - pointer to 'master' text frame. default value: NULL

#i28701# #i26945# - for format of floating screen objects for follow text frames, the 'master' text frame is passed to the method. Thus, the objects, whose anchor character is inside the follow text frame can be formatted.

Definition at line 352 of file objectformatter.cxx.

References SwAnchoredObject::AnchorFrame(), DoFormatObj(), SwAnchoredObject::FindAnchorCharFrame(), SwFrame::FindBodyFrame(), SwAnchoredObject::FindPageFrameOfAnchor(), SwAnchoredObject::GetAnchorFrame(), GetAnchorFrame(), SwFrame::GetDrawObjs(), i, SwSortedObjs::ListPosOf(), mrPageFrame, size, and SwSortedObjs::size().

Referenced by SwObjectFormatterLayFrame::DoFormatObjs(), and SwObjectFormatterTextFrame::DoFormatObjs().

◆ GetAnchorFrame()

virtual SwFrame & SwObjectFormatter::GetAnchorFrame ( )
protectedpure virtual

◆ GetCollectedObj()

SwAnchoredObject * SwObjectFormatter::GetCollectedObj ( const sal_uInt32  _nIndex)
protected

accessor to collected anchored object

#i28701#

Definition at line 445 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

Referenced by SwObjectFormatterTextFrame::DoFormatObj(), and SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor().

◆ GetLayAction()

SwLayAction * SwObjectFormatter::GetLayAction ( )
inlineprotected

◆ GetPageFrame()

const SwPageFrame & SwObjectFormatter::GetPageFrame ( ) const
inlineprotected

◆ GetPgNumOfCollected()

sal_uInt32 SwObjectFormatter::GetPgNumOfCollected ( const sal_uInt32  _nIndex)
protected

accessor to 'anchor' page number of collected anchored object

#i28701#

Definition at line 454 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

Referenced by SwObjectFormatterTextFrame::DoFormatObj(), and SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor().

◆ IsCollectedAnchoredAtMaster()

bool SwObjectFormatter::IsCollectedAnchoredAtMaster ( const sal_uInt32  _nIndex)
protected

accessor to 'anchor' type of collected anchored object

#i26945#

Definition at line 463 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

Referenced by SwObjectFormatterTextFrame::DoFormatObj(), and SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor().

Member Data Documentation

◆ mbConsiderWrapOnObjPos

const bool SwObjectFormatter::mbConsiderWrapOnObjPos
private

Definition at line 47 of file objectformatter.hxx.

Referenced by ConsiderWrapOnObjPos().

◆ mpLayAction

SwLayAction* SwObjectFormatter::mpLayAction
private

Definition at line 50 of file objectformatter.hxx.

Referenced by FormatObj_(), and GetLayAction().

◆ mpPgNumAndTypeOfAnchors

std::unique_ptr<SwPageNumAndTypeOfAnchors> SwObjectFormatter::mpPgNumAndTypeOfAnchors
private

◆ mrPageFrame

const SwPageFrame& SwObjectFormatter::mrPageFrame
private

Definition at line 43 of file objectformatter.hxx.

Referenced by FormatObjsAtFrame_(), and GetPageFrame().


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