|
LibreOffice Module sw (master) 1
|
#include <txtflcnt.hxx>
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... | |
| SwFlyInContentFrame * | GetFlyFrame (const SwFrame *pCurrFrame) |
| const SwFlyInContentFrame * | GetFlyFrame (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 SfxPoolItem & | GetAttr () const |
| SfxPoolItem & | GetAttr () |
| sal_uInt16 | Which () const |
| bool | operator== (const SwTextAttr &) const |
| const SwFormatCharFormat & | GetCharFormat () const |
| const SwFormatAutoFormat & | GetAutoFormat () const |
| const SwFormatField & | GetFormatField () const |
| const SwFormatFootnote & | GetFootnote () const |
| const SwFormatLineBreak & | GetLineBreak () const |
| const SwFormatContentControl & | GetContentControl () const |
| const SwFormatFlyCnt & | GetFlyCnt () const |
| const SwTOXMark & | GetTOXMark () const |
| const SwFormatRefMark & | GetRefMark () const |
| const SwFormatINetFormat & | GetINetFormat () const |
| const SwFormatRuby & | GetRuby () const |
| virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
Private Member Functions | |
| SwFlyInContentFrame * | GetFlyFrame_ (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 | |
| SwpHints * | m_pHints = nullptr |
Definition at line 30 of file txtflcnt.hxx.
| SwTextFlyCnt::SwTextFlyCnt | ( | SwFormatFlyCnt & | rAttr, |
| sal_Int32 | nStart | ||
| ) |
Definition at line 71 of file atrflyin.cxx.
References SwFormatFlyCnt::m_pTextAttr, and SwTextAttr::SetHasDummyChar().
| 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().
|
inline |
Definition at line 46 of file txtflcnt.hxx.
References GetFlyFrame_().
|
inline |
Definition at line 51 of file txtflcnt.hxx.
References GetFlyFrame_().
|
private |
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.
Definition at line 250 of file atrflyin.cxx.
References SwFrame::AppendFly(), SwContentFrame::FindMaster(), SwFrame::FindPageFrame(), SwIterator< TElementType, TSource, eMode >::First(), SwObjectFormatter::FormatObj(), SwAnchoredObject::GetAnchorFrame(), SwTextAttr::GetFlyCnt(), SwTextFrame::GetFollow(), SwFormatFlyCnt::GetFrameFormat(), SwFrame::IsTextFrame(), SwIterator< TElementType, TSource, eMode >::Next(), SwFlyInContentFrame::RegistFlys(), SwFrame::RemoveFly(), RES_DRAWFRMFMT(), and SwFormat::Which().
Referenced by GetFlyFrame().
| void SwTextFlyCnt::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.
This cannot be done in MakeTextAttr() because it doesn't know the target text node.
Definition at line 138 of file atrflyin.cxx.
References IDocumentLayoutAccess::CopyLayoutFormat(), SwFrameFormat::DelFrames(), IDocumentLayoutAccess::DelLayoutFormat(), SwFrameFormat::FindSdrObject(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorNode(), SwFormatAnchor::GetContentAnchor(), SwNode::GetContentNode(), SwNode::GetDoc(), SwFormat::GetDoc(), SwTextAttr::GetFlyCnt(), SwFormatFlyCnt::GetFrameFormat(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetIDocumentUndoRedo(), SwNode::GetNodes(), SwTextBoxHelper::getOtherTextBoxFormat(), SwTextNode::GetpSwpHints(), SwTextAttr::GetStart(), GetUserCall(), SwNodes::IsDocNodes(), SwpHints::IsInSplitNode(), SwNode::RemoveAnchoredFly(), RES_DRAWFRMFMT(), SwFormatAnchor::SetAnchor(), SwFormat::SetFormatAttr(), SwFormatAnchor::SetType(), and SwFormat::Which().
Referenced by SwTextNode::InsertHint().