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

Extract SwNodes::dumpAsXml() from nodedump

Change-Id: Ic94fceef0d4291a02bc3da7bcbeeb2c19670200c
üst 8b68841c
...@@ -330,7 +330,7 @@ public: ...@@ -330,7 +330,7 @@ public:
* Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default) * Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5 * @since 3.5
*/ */
void dumpAsXml( xmlTextWriterPtr writer = NULL ) const; void dumpAsXml( xmlTextWriterPtr pWriter ) const;
}; };
......
...@@ -167,18 +167,6 @@ void SwFldTypes::dumpAsXml( xmlTextWriterPtr w ) const ...@@ -167,18 +167,6 @@ void SwFldTypes::dumpAsXml( xmlTextWriterPtr w ) const
writer.endElement(); writer.endElement();
} }
void SwNodes::dumpAsXml( xmlTextWriterPtr w ) const
{
WriterHelper writer( w );
writer.startElement( "swnodes" );
writer.writeFormatAttribute( "ptr", "%p", this );
for( unsigned int i = 0; i < Count(); ++i )
{
( *this )[ i ]->dumpAsXml( writer );
}
writer.endElement();
}
void SwNode::dumpAsXml( xmlTextWriterPtr w ) const void SwNode::dumpAsXml( xmlTextWriterPtr w ) const
{ {
WriterHelper writer( w ); WriterHelper writer( w );
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <libxml/xmlwriter.h>
#include <node.hxx> #include <node.hxx>
#include <doc.hxx> #include <doc.hxx>
#include <IDocumentUndoRedo.hxx> #include <IDocumentUndoRedo.hxx>
...@@ -2311,4 +2313,12 @@ bool SwNodes::IsDocNodes() const ...@@ -2311,4 +2313,12 @@ bool SwNodes::IsDocNodes() const
return this == &pMyDoc->GetNodes(); return this == &pMyDoc->GetNodes();
} }
void SwNodes::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("swNodes"));
for (sal_uLong i = 0; i < Count(); ++i)
(*this)[i]->dumpAsXml(pWriter);
xmlTextWriterEndElement(pWriter);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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