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

#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 *pDoc)
 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 SwFormatFlyCntGetFlyCnt () const
 
const SwTOXMarkGetTOXMark () const
 
const SwFormatRefMarkGetRefMark () const
 
const SwFormatINetFormatGetINetFormat () const
 
const SwFormatRubyGetRuby () const
 
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 ( SwFormatFlyCnt rAttr,
sal_Int32  nStart 
)

Definition at line 59 of file atrflyin.cxx.

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

Member Function Documentation

void SwTextFlyCnt::CopyFlyFormat ( SwDoc pDoc)

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 92 of file atrflyin.cxx.

References SwIndex::Assign(), IDocumentLayoutAccess::CopyLayoutFormat(), SwFormat::GetAnchor(), SwNode::GetContentNode(), SwFormat::GetDoc(), SwNodes::GetEndOfExtras(), SwTextAttr::GetFlyCnt(), SwFormatFlyCnt::GetFrameFormat(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetIDocumentUndoRedo(), SwDoc::GetNodes(), SwNodes::GoNext(), SwPosition::nContent, and SwPosition::nNode.

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

Definition at line 46 of file txtflcnt.hxx.

References GetFlyFrame_().

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

Definition at line 51 of file txtflcnt.hxx.

References GetFlyFrame_().

SwFlyInContentFrame * SwTextFlyCnt::GetFlyFrame_ ( const SwFrame pCurrFrame)
private
void SwTextFlyCnt::SetAnchor ( const SwTextNode pNode)

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