LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | List of all members
SwTextFlyCnt Class Referencefinal

#include <txtflcnt.hxx>

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

Public Member Functions

 SwTextFlyCnt (SwFormatFlyCnt &rAttr, sal_Int32 nStart)
 
void SetAnchor (const SwTextNode *pNode)
 SetAnchor() is called by SwTextNode::InsertHint() and sets the anchor position in the SwFlyFrameFormat to the SwPosition of the dummy CH_TXTATR_BREAKWORD. More...
 
SwFlyInContentFrameGetFlyFrame (const SwFrame *pCurrFrame)
 
const SwFlyInContentFrameGetFlyFrame (const SwFrame *pCurrFrame) const
 
void CopyFlyFormat (SwDoc &rDoc)
 An overview of how a new SwTextFlyCnt is created: MakeTextAttr() is called e.g. More...
 
- Public Member Functions inherited from SwTextAttr
void SetStart (sal_Int32 n)
 start position More...
 
sal_Int32 GetStart () const
 
virtual const sal_Int32 * GetEnd () const
 end position More...
 
virtual void SetEnd (sal_Int32)
 
const sal_Int32 * End () const
 
sal_Int32 GetAnyEnd () const
 end (if available), else start More...
 
void SetDontExpand (bool bDontExpand)
 
bool DontExpand () const
 
bool IsLockExpandFlag () const
 
bool IsDontMoveAttr () const
 
bool IsCharFormatAttr () const
 
bool IsOverlapAllowedAttr () const
 
bool IsPriorityAttr () const
 
void SetPriorityAttr (bool bFlag)
 
bool IsDontExpandStartAttr () const
 
bool IsNesting () const
 
bool HasDummyChar () const
 
bool IsFormatIgnoreStart () const
 
bool IsFormatIgnoreEnd () const
 
void SetFormatIgnoreStart (bool bFlag)
 
void SetFormatIgnoreEnd (bool bFlag)
 
bool HasContent () const
 
const SfxPoolItemGetAttr () const
 
SfxPoolItemGetAttr ()
 
sal_uInt16 Which () const
 
bool operator== (const SwTextAttr &) const
 
const SwFormatCharFormatGetCharFormat () const
 
const SwFormatAutoFormatGetAutoFormat () const
 
const SwFormatFieldGetFormatField () const
 
const SwFormatFootnoteGetFootnote () const
 
const SwFormatLineBreakGetLineBreak () const
 
const SwFormatContentControlGetContentControl () const
 
const SwFormatFlyCntGetFlyCnt () const
 
const SwTOXMarkGetTOXMark () const
 
const SwFormatRefMarkGetRefMark () const
 
const SwFormatINetFormatGetINetFormat () const
 
const SwFormatRubyGetRuby () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 

Private Member Functions

SwFlyInContentFrameGetFlyFrame_ (const SwFrame *pCurrFrame)
 GetFlyFrame_() is called during text formatting by SwTextFormatter and searches for the SwFlyFrame for the dummy char of the current SwTextFrame. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SwTextAttr
static void Destroy (SwTextAttr *pToDestroy, SfxItemPool &rPool)
 destroy instance More...
 
- Protected Member Functions inherited from SwTextAttr
 SwTextAttr (SfxPoolItem &rAttr, sal_Int32 nStart)
 
virtual ~SwTextAttr () COVERITY_NOEXCEPT_FALSE
 
void SetLockExpandFlag (bool bFlag)
 
void SetDontMoveAttr (bool bFlag)
 
void SetCharFormatAttr (bool bFlag)
 
void SetOverlapAllowedAttr (bool bFlag)
 
void SetDontExpandStartAttr (bool bFlag)
 
void SetNesting (const bool bFlag)
 
void SetHasDummyChar (const bool bFlag)
 
void SetHasContent (const bool bFlag)
 
- Protected Attributes inherited from SwTextAttr
SwpHintsm_pHints = nullptr
 

Detailed Description

Definition at line 30 of file txtflcnt.hxx.

Constructor & Destructor Documentation

◆ SwTextFlyCnt()

SwTextFlyCnt::SwTextFlyCnt ( SwFormatFlyCnt rAttr,
sal_Int32  nStart 
)

Definition at line 71 of file atrflyin.cxx.

References SwFormatFlyCnt::m_pTextAttr, and SwTextAttr::SetHasDummyChar().

Member Function Documentation

◆ CopyFlyFormat()

void SwTextFlyCnt::CopyFlyFormat ( SwDoc rDoc)

An overview of how a new SwTextFlyCnt is created: MakeTextAttr() is called e.g.

by SwTextNode::CopyText(). The following steps are required to clone: 1) copying the pFormat with content, attributes etc. 2) setting the anchor 3) notification Because not all required information is available at all times, the steps are distributed variously: ad 1) MakeTextAttr() calls DocumentLayoutManager::CopyLayoutFormat() which creates the new SwFlyFrameFormat and copies the content of the fly frame. ad 2) SetAnchor() is called by SwTextNode::InsertHint() and sets the anchor position in the SwFlyFrameFormat to the SwPosition of the dummy CH_TXTATR_BREAKWORD. This cannot be done in MakeTextAttr() because it doesn't know the target text node. ad 3) GetFlyFrame_() is called during text formatting by SwTextFormatter and searches for the SwFlyFrame for the dummy char of the current SwTextFrame. If none is found, a new SwFlyInContentFrame is created. Important: pTextFrame->AppendFly() immediately triggers a reformat of pTextFrame. However, the recursion is blocked by the lock mechanism in SwTextFrame::Format(). The advantage of all this is that it's not necessary to explicitly iterate over all SwTextFrames that depend on the SwTextNode to create the SwFlyInContentFrame - this is done automatically already.

Definition at line 104 of file atrflyin.cxx.

References IDocumentLayoutAccess::CopyLayoutFormat(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwNode::GetContentNode(), SwFormat::GetDoc(), SwNodes::GetEndOfExtras(), SwTextAttr::GetFlyCnt(), SwFormatFlyCnt::GetFrameFormat(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetIDocumentUndoRedo(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwNodes::GoNext(), pos, and SwFormatAnchor::SetAnchor().

◆ GetFlyFrame() [1/2]

SwFlyInContentFrame * SwTextFlyCnt::GetFlyFrame ( const SwFrame pCurrFrame)
inline

Definition at line 46 of file txtflcnt.hxx.

References GetFlyFrame_().

◆ GetFlyFrame() [2/2]

const SwFlyInContentFrame * SwTextFlyCnt::GetFlyFrame ( const SwFrame pCurrFrame) const
inline

Definition at line 51 of file txtflcnt.hxx.

References GetFlyFrame_().

◆ GetFlyFrame_()

SwFlyInContentFrame * SwTextFlyCnt::GetFlyFrame_ ( const SwFrame pCurrFrame)
private

◆ SetAnchor()

void SwTextFlyCnt::SetAnchor ( const SwTextNode pNode)

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