From 6b07a6eedb7260f1cdf375884f1329b72c892828 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sun, 1 Feb 2015 18:44:34 +0100 Subject: Extract SfxUndoManager::dumpAsXml() from sw Change-Id: Ic031b63641e0fd0fbd1524657082188d9ce78fcf --- svl/source/undo/undo.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'svl') 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; -- cgit