summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/itempool.cxx12
-rw-r--r--svl/source/undo/undo.cxx2
2 files changed, 14 insertions, 0 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index a2fd333b0470..3fc63112f6be 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -20,6 +20,7 @@
#include <svl/itempool.hxx>
#include <string.h>
+#include <libxml/xmlwriter.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
@@ -993,4 +994,15 @@ void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion )
const SfxItemPool* SfxItemPool::pStoringPool_ = nullptr;
+void SfxItemPool::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("sfxItemPool"));
+ for (auto const & rArrayPtr : pImpl->maPoolItems)
+ if (rArrayPtr)
+ for (auto const & rItem : *rArrayPtr)
+ if (rItem)
+ rItem->dumpAsXml(pWriter);
+ xmlTextWriterEndElement(pWriter);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index ec847a95b705..b0932c9d8e6d 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -1269,6 +1269,8 @@ void SfxUndoManager::dumpAsXml(xmlTextWriterPtr pWriter) const
if (!pWriter)
{
pWriter = xmlNewTextWriterFilename("undo.xml", 0);
+ xmlTextWriterSetIndent(pWriter,1);
+ xmlTextWriterSetIndentString(pWriter, BAD_CAST(" "));
xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
bOwns = true;
}