summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/untblk.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/untblk.cxx')
-rw-r--r--sw/source/core/undo/untblk.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 2a4b489d1e29..6df02f3f805d 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <libxml/xmlwriter.h>
+
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
@@ -178,6 +180,39 @@ bool SwUndoInserts::IsCreateUndoForNewFly(SwFormatAnchor const& rAnchor,
|| nEndNode == pAnchorPos->nNode.GetIndex());
}
+void SwUndoInserts::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("SwUndoInserts"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s",
+ BAD_CAST(typeid(*this).name()));
+
+ SwUndo::dumpAsXml(pWriter);
+ SwUndoSaveContent::dumpAsXml(pWriter);
+
+ if (m_pFrameFormats)
+ {
+ xmlTextWriterStartElement(pWriter, BAD_CAST("m_pFrameFormats"));
+ for (const auto& pFormat : *m_pFrameFormats)
+ {
+ pFormat->dumpAsXml(pWriter);
+ }
+ xmlTextWriterEndElement(pWriter);
+ }
+
+ if (!m_FlyUndos.empty())
+ {
+ xmlTextWriterStartElement(pWriter, BAD_CAST("m_FlyUndos"));
+ for (const auto& pFly : m_FlyUndos)
+ {
+ pFly->dumpAsXml(pWriter);
+ }
+ xmlTextWriterEndElement(pWriter);
+ }
+
+ xmlTextWriterEndElement(pWriter);
+}
+
SwUndoInserts::~SwUndoInserts()
{
if (m_pUndoNodeIndex) // delete also the section from UndoNodes array