Kaydet (Commit) 6b07a6ee authored tarafından Miklos Vajna's avatar Miklos Vajna

Extract SfxUndoManager::dumpAsXml() from sw

Change-Id: Ic031b63641e0fd0fbd1524657082188d9ce78fcf
üst bfceafa6
......@@ -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 );
......
......@@ -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;
......
......@@ -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: */
......@@ -85,8 +85,6 @@ public:
SwNodes const& GetUndoNodes() const;
SwNodes & GetUndoNodes();
void dumpAsXml(xmlTextWriterPtr w);
private:
IDocumentDrawModelAccess & m_rDrawModelAccess;
IDocumentRedlineAccess & m_rRedlineAccess;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment