summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svl/undo.hxx2
-rw-r--r--svl/source/undo/undo.cxx11
-rw-r--r--sw/source/core/docnode/nodedump.cxx13
-rw-r--r--sw/source/core/inc/UndoManager.hxx2
4 files changed, 13 insertions, 15 deletions
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 2c1923876ab6..903bbc8a61a3 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -368,6 +368,8 @@ public:
*/
void RemoveOldestUndoActions( size_t const i_count );
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
+
protected:
bool UndoWithContext( SfxUndoContext& i_context );
bool RedoWithContext( SfxUndoContext& i_context );
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 1fcc6497ff5f..a8f7c1dbffbc 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -1279,6 +1279,17 @@ void SfxUndoManager::RemoveOldestUndoActions( size_t const i_count )
}
}
+void SfxUndoManager::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("sfxUndoManager"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nUndoActionCount"), BAD_CAST(OString::number(GetUndoActionCount()).getStr()));
+
+ for (size_t i = 0; i < GetUndoActionCount(); ++i)
+ GetUndoAction(i)->dumpAsXml(pWriter);
+
+ xmlTextWriterEndElement(pWriter);
+}
+
struct SfxListUndoAction::Impl
{
sal_uInt16 mnId;
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 902c49469911..c9aa8674726e 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -656,17 +656,4 @@ void SwExtraRedlineTbl::dumpAsXml( xmlTextWriterPtr w ) const
writer.endElement( ); // swextraredlinetbl
}
-void sw::UndoManager::dumpAsXml(xmlTextWriterPtr w)
-{
- WriterHelper writer(w);
-
- writer.startElement("m_pUndoManager");
- writer.writeFormatAttribute("nUndoActionCount", TMP_FORMAT, GetUndoActionCount());
-
- for (size_t i = 0; i < GetUndoActionCount(); ++i)
- GetUndoAction(i)->dumpAsXml(w);
-
- writer.endElement();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 43c59950ddeb..934edc55fd58 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -85,8 +85,6 @@ public:
SwNodes const& GetUndoNodes() const;
SwNodes & GetUndoNodes();
- void dumpAsXml(xmlTextWriterPtr w);
-
private:
IDocumentDrawModelAccess & m_rDrawModelAccess;
IDocumentRedlineAccess & m_rRedlineAccess;