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 ( const SwPageFrame _rPageFrame,
SwLayAction _pLayAction,
const bool  _bCollectPgNumOfAnchors = false 
)
protected

Definition at line 105 of file objectformatter.cxx.

References CONSIDER_WRAP_ON_OBJECT_POSITION.

SwObjectFormatter::~SwObjectFormatter ( )
virtual

Definition at line 116 of file objectformatter.cxx.

Member Function Documentation

bool SwObjectFormatter::ConsiderWrapOnObjPos ( ) const
inlineprotected

Definition at line 91 of file objectformatter.hxx.

References mbConsiderWrapOnObjPos.

Referenced by SwObjectFormatterTextFrame::DoFormatObjs().

sal_uInt32 SwObjectFormatter::CountOfCollected ( )
protected

accessor to total number of collected anchored objects

#i28701#

Definition at line 475 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

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

std::unique_ptr< SwObjectFormatter > SwObjectFormatter::CreateObjFormatter ( SwFrame _rAnchorFrame,
const SwPageFrame _rPageFrame,
SwLayAction _pLayAction 
)
staticprotected
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 SwObjectFormatterTextFrame, and SwObjectFormatterLayFrame.

Referenced by FormatObjsAtFrame_().

virtual bool SwObjectFormatter::DoFormatObjs ( )
pure virtual

intrinsic method to format all floating screen objects

Implemented in SwObjectFormatterTextFrame, and SwObjectFormatterLayFrame.

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 206 of file objectformatter.cxx.

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

Referenced by FormatObj_().

bool SwObjectFormatter::FormatObj ( SwAnchoredObject _rAnchoredObj,
SwFrame _pAnchorFrame = nullptr,
const SwPageFrame _pPageFrame = nullptr 
)
static
void SwObjectFormatter::FormatObj_ ( SwAnchoredObject _rAnchoredObj)
protected
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 226 of file objectformatter.cxx.

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

Referenced by FormatObj_().

bool SwObjectFormatter::FormatObjsAtFrame ( SwFrame _rAnchorFrame,
const SwPageFrame _rPageFrame,
SwLayAction _pLayAction = nullptr 
)
static
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 354 of file objectformatter.cxx.

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

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

virtual SwFrame& SwObjectFormatter::GetAnchorFrame ( )
protectedpure virtual
SwAnchoredObject * SwObjectFormatter::GetCollectedObj ( const sal_uInt32  _nIndex)
protected

accessor to collected anchored object

#i28701#

Definition at line 447 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

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

SwLayAction* SwObjectFormatter::GetLayAction ( )
inlineprotected
const SwPageFrame& SwObjectFormatter::GetPageFrame ( ) const
inlineprotected
sal_uInt32 SwObjectFormatter::GetPgNumOfCollected ( const sal_uInt32  _nIndex)
protected

accessor to 'anchor' page number of collected anchored object

#i28701#

Definition at line 456 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

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

bool SwObjectFormatter::IsCollectedAnchoredAtMaster ( const sal_uInt32  _nIndex)
protected

accessor to 'anchor' type of collected anchored object

#i26945#

Definition at line 465 of file objectformatter.cxx.

References mpPgNumAndTypeOfAnchors.

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

Member Data Documentation

const bool SwObjectFormatter::mbConsiderWrapOnObjPos
private

Definition at line 47 of file objectformatter.hxx.

Referenced by ConsiderWrapOnObjPos().

SwLayAction* SwObjectFormatter::mpLayAction
private

Definition at line 50 of file objectformatter.hxx.

Referenced by FormatObj_(), and GetLayAction().

std::unique_ptr<SwPageNumAndTypeOfAnchors> SwObjectFormatter::mpPgNumAndTypeOfAnchors
private
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: