100 if (!((RndStdIds::FLY_AT_PARA == rAnchor.
GetAnchorId()) ||
101 (RndStdIds::FLY_AT_CHAR == rAnchor.
GetAnchorId()) ||
102 (RndStdIds::FLY_AT_FLY == rAnchor.
GetAnchorId()) ||
103 (RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId())))
107 sal_Int32 nContentPos = 0;
109 if (RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId())
115 OSL_ENSURE( pTextNd,
"No text node found!" );
123 SwIndex aIdx( pTextNd, nContentPos );
127 else if (RndStdIds::FLY_AT_CHAR == rAnchor.
GetAnchorId())
138 if (!((RndStdIds::FLY_AT_PARA == rAnchor.
GetAnchorId()) ||
139 (RndStdIds::FLY_AT_CHAR == rAnchor.
GetAnchorId()) ||
140 (RndStdIds::FLY_AT_FLY == rAnchor.
GetAnchorId()) ||
141 (RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId())))
144 const sal_Int32 nContentPos = rAnchor.
GetPageNum();
151 if ((RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId()) ||
156 aTmp.SetAnchor( &aPos );
160 if (RndStdIds::FLY_AS_CHAR == nAnchorId)
163 OSL_ENSURE( pTextNd,
"no Text Node" );
165 pTextNd->
InsertItem( aFormat, nContentPos, nContentPos );
180 for( sal_uInt16
n = 1;
n <
m_nSize; ++
n, ++pTmp )
196 pObj->SetUserCall(
nullptr);
205 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
224 OSL_ENSURE(pDrawFrameFormat,
225 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object");
226 if (pDrawFrameFormat)
271 OSL_ENSURE(pDrawFrameFormat,
272 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object");
273 if (pDrawFrameFormat)
288 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
319 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
327 for( sal_uInt16
n = 1;
n <
m_nSize; ++
n, ++pTmp )
365 OSL_ENSURE(pDrawFrameFormat,
366 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object");
367 if (pDrawFrameFormat)
387 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
399 OSL_ENSURE(pDrawFrameFormat,
400 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
401 if (pDrawFrameFormat)
410 rSave.
pObj =
nullptr;
429 OSL_ENSURE( pDrawContact,
430 "<SwUndoDrawUnGroupConnectToLayout::Undo(..)> -- missing SwDrawContact instance" );
488 pContact->
Changed_( *pObj, SdrUserCallType::Inserted,
nullptr );
495 OSL_ENSURE(pDrawFrameFormat,
496 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object");
497 if (pDrawFrameFormat)
520 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
538 rFlyFormats.
erase( std::find( rFlyFormats.
begin(), rFlyFormats.
end(), pFormat ));
545 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwUndoDrawDelete"));
550 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwUndoGroupObjImpl"));
551 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"),
552 BAD_CAST(OString::number(
i).getStr()));
556 xmlTextWriterStartElement(pWriter, BAD_CAST(
"pFormat"));
558 xmlTextWriterEndElement(pWriter);
560 xmlTextWriterEndElement(pWriter);
563 xmlTextWriterEndElement(pWriter);
std::unique_ptr< SdrMarkList > m_pMarkList
virtual ~SwUndoDrawUnGroupConnectToLayout() override
void SetSelections(SwFrameFormat *const pSelFormat, SdrMarkList *const pMarkList)
size_t GetMarkCount() const
Marks a position in the document model.
std::unique_ptr< SdrMarkList > m_pMarkList
void AddObj(sal_uInt16 nPos, SwDrawFrameFormat *, SdrObject *)
size_t GetObjCount() const
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(57)
void AddFormatAndObj(SwDrawFrameFormat *pDrawFrameFormat, SdrObject *pDrawObject)
void dumpAsXml(xmlTextWriterPtr pWriter) const override
IDocumentUndoRedo & GetIDocumentUndoRedo()
static void lcl_SaveAnchor(SwFrameFormat *pFormat, sal_uLong &rNodePos)
const SwFrameFormats * GetSpzFrameFormats() const
std::unique_ptr< SwUndoGroupObjImpl[]> m_pObjArray
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
void SetGroupFormat(SwDrawFrameFormat *)
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void RedoImpl(::sw::UndoRedoContext &) override
sal_uLong GetIndex() const
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwUndoDrawGroup(sal_uInt16 nCnt, const SwDoc &rDoc)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SdrObject * GetMarkedSdrObj() const
struct _xmlTextWriter * xmlTextWriterPtr
virtual void AppendUndo(std::unique_ptr< SwUndo > pUndo)=0
Add new Undo action.
virtual void RedoImpl(::sw::UndoRedoContext &) override
std::vector< std::pair< SwDrawFrameFormat *, SdrObject * > > m_aDrawFormatsAndObjs
void AddObj(SwDrawFrameFormat *, const SdrMark &)
SwIndex & Assign(SwIndexReg *, sal_Int32)
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwContentNode * GetContentNode()
const SdrMarkList & GetMarkedObjectList() const
static void lcl_RestoreAnchor(SwFrameFormat *pFormat, sal_uLong nNodePos)
Marks a character position inside a document model node.
virtual ~SwUndoDrawUnGroup() override
std::unique_ptr< SwUndoGroupObjImpl[]> m_pObjArray
void AddDrawUndo(std::unique_ptr< SdrUndoAction >)
Marks a node in the document model.
virtual SdrObjList * GetSubList() const override
void SetUserCall(SdrObjUserCall *pUser)
virtual ~SwUndoDrawDelete() override
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
virtual void RedoImpl(::sw::UndoRedoContext &) override
void EraseText(const SwIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
virtual const tools::Rectangle & GetLastBoundRect() const
SwTextNode is a paragraph in the document model.
virtual ~SwUndoDrawGroup() override
void AddObj(sal_uInt16 nPos, SwDrawFrameFormat *)
SwUndoDrawUnGroupConnectToLayout(const SwDoc &rDoc)
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual OUString GetComment() const override
Returns textual comment for this undo object.
sal_Int32 GetIndex() const
SwDrawFrameFormat * pFormat
std::unique_ptr< SwUndoGroupObjImpl[]> m_pObjArray
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual ~SwSdrUndo() override
virtual void CallSwClientNotify(const SfxHint &rHint) const override
std::unique_ptr< SdrUndoAction > m_pSdrUndo
SwUndoDrawDelete(sal_uInt16 nCnt, const SwDoc &rDoc)
SdrObjUserCall * GetUserCall() const
SwUndoDrawUnGroup(SdrObjGroup *, const SwDoc &rDoc)
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwSdrUndo(std::unique_ptr< SdrUndoAction >, const SdrMarkList *pMarkList, const SwDoc &rDoc)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
const SwFormatFlyCnt & GetFlyCnt() const