include/svl/undo.hxx | 2 ++ svl/source/undo/undo.cxx | 11 +++++++++++ sw/source/core/docnode/nodedump.cxx | 13 ------------- sw/source/core/inc/UndoManager.hxx | 2 -- 4 files changed, 13 insertions(+), 15 deletions(-)
New commits: commit 6b07a6eedb7260f1cdf375884f1329b72c892828 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Sun Feb 1 18:44:34 2015 +0100 Extract SfxUndoManager::dumpAsXml() from sw Change-Id: Ic031b63641e0fd0fbd1524657082188d9ce78fcf diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index 2c19238..903bbc8 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 1fcc649..a8f7c1d 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 902c494..c9aa867 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 43c5995..934edc5 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits