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

Factor out OutlinerParaObject::dumpAsXml() from SwDoc::dumpAsXml()

Change-Id: I5e805aa98f643b5a034cdeadb4718af528af022c
üst 90fe751a
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <tools/stream.hxx> #include <tools/stream.hxx>
#include <boost/intrusive_ptr.hpp> #include <boost/intrusive_ptr.hpp>
#include <libxml/xmlwriter.h>
/** /**
* This is the guts of OutlinerParaObject, refcounted and shared among * This is the guts of OutlinerParaObject, refcounted and shared among
...@@ -278,4 +279,12 @@ void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewN ...@@ -278,4 +279,12 @@ void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewN
} }
} }
void OutlinerParaObject::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("outlinerParaObject"));
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
GetTextObject().dumpAsXml(pWriter);
xmlTextWriterEndElement(pWriter);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -76,6 +76,8 @@ public: ...@@ -76,6 +76,8 @@ public:
const OUString& rNewName); const OUString& rNewName);
void SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewName, void SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewName,
const SfxStyleFamily& rNewFamily); const SfxStyleFamily& rNewFamily);
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
#endif #endif
......
...@@ -158,12 +158,8 @@ void lcl_dumpSdrModel(WriterHelper& writer, const SdrModel* pModel) ...@@ -158,12 +158,8 @@ void lcl_dumpSdrModel(WriterHelper& writer, const SdrModel* pModel)
writer.writeFormatAttribute("description", "%s", BAD_CAST(OUStringToOString(pObject->GetDescription(), RTL_TEXTENCODING_UTF8).getStr())); writer.writeFormatAttribute("description", "%s", BAD_CAST(OUStringToOString(pObject->GetDescription(), RTL_TEXTENCODING_UTF8).getStr()));
writer.writeFormatAttribute("nOrdNum", TMP_FORMAT, pObject->GetOrdNumDirect()); writer.writeFormatAttribute("nOrdNum", TMP_FORMAT, pObject->GetOrdNumDirect());
const OutlinerParaObject* pOutliner = pObject->GetOutlinerParaObject(); if (const OutlinerParaObject* pOutliner = pObject->GetOutlinerParaObject())
writer.startElement("outliner"); pOutliner->dumpAsXml(writer);
writer.writeFormatAttribute("ptr", "%p", pOutliner);
if (pOutliner)
pOutliner->GetTextObject().dumpAsXml(writer);
writer.endElement();
} }
writer.endElement(); writer.endElement();
} }
......
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