33#include <objectformatter.hxx>
37#include <osl/diagnose.h>
41 m_pTextAttr( nullptr ),
42 m_pFormat( pFrameFormat )
48 assert(SfxPoolItem::operator==(rAttr));
61 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwFormatFlyCnt"));
62 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
63 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"text-attr"),
"%p",
m_pTextAttr);
64 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"format"),
"%p",
m_pFormat);
68 (void)xmlTextWriterEndElement(pWriter);
115 if ((RndStdIds::FLY_AT_PAGE != aAnchor.
GetAnchorId()) &&
116 (&rDoc != pFormat->
GetDoc()))
148 std::optional<SwPosition> oPos;
150 pOldNode !=
static_cast<SwNode const *
>(pNode))
159 aAnchor.
SetType( RndStdIds::FLY_AS_CHAR );
170 if( &rDoc != pFormat->
GetDoc() )
185 pFormat->LockModify();
190 oPos->GetNode().AddAnchoredFly(pFormat);
191 pFormat->UnlockModify();
195 assert(!pFormat->IsModifyLocked());
218 pTextBox->LockModify();
223 pTextBox->DelFrames();
226 pTextBox->SetFormatAttr(aTextBoxAnchor);
231 oPos->GetNode().AddAnchoredFly(pTextBox);
232 pTextBox->UnlockModify();
236 pTextBox->MakeFrames();
255 OSL_ENSURE(
false,
"SwTextFlyCnt::GetFlyFrame_: DrawInCnt-under construction!" );
265 while ( pFirst->IsFollow() )
273 if ( pTmp != pCurrFrame )
283 pFrame = aIter.
Next();
virtual SwFrameFormat * CopyLayoutFormat(const SwFrameFormat &rSrc, const SwFormatAnchor &rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames)=0
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
const SwFrame * GetAnchorFrame() const
SwTextFrame * FindMaster() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
general base class for all free-flowing frames
Flys that are anchored as a character in the content.
Base class of the Writer layout elements.
void RemoveFly(SwFlyFrame *pToRemove)
void AppendFly(SwFlyFrame *pNew)
SwPageFrame * FindPageFrame()
Marks a node in the document model.
Base class of the Writer document model elements.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
void RemoveAnchoredFly(SwFrameFormat *)
SwContentNode * GetContentNode()
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
SwContentNode * GoNext(SwNodeIndex *) const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SwFormatFlyCnt & GetFlyCnt() const
sal_Int32 GetStart() const
void SetHasDummyChar(const bool bFlag)
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
void SetAnchor(const SwTextNode *pNode)
SetAnchor() is called by SwTextNode::InsertHint() and sets the anchor position in the SwFlyFrameForma...
void CopyFlyFormat(SwDoc &rDoc)
An overview of how a new SwTextFlyCnt is created: MakeTextAttr() is called e.g.
SwFlyInContentFrame * GetFlyFrame_(const SwFrame *pCurrFrame)
GetFlyFrame_() is called during text formatting by SwTextFormatter and searches for the SwFlyFrame fo...
SwTextFlyCnt(SwFormatFlyCnt &rAttr, sal_Int32 nStart)
Represents the visualization of a paragraph.
SwTextFrame * GetFollow()
SwTextNode is a paragraph in the document model.
SwpHints * GetpSwpHints()
bool IsInSplitNode() const
struct _xmlTextWriter * xmlTextWriterPtr
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
Marks a position in the document model.