diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-03 09:07:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-03 09:07:58 +0100 |
commit | 1801b559e1234cf1f43a414df38bb47fe81f087a (patch) | |
tree | 79aedfe1fbf04929b4afcfa2bb8432904f846e1b /svx | |
parent | e6e51a0a90c62eaadb9079fb13c618b8d51f1201 (diff) |
Factor out SdrModel::dumpAsXml() from SwDoc::dumpAsXml()
Change-Id: Ic2cc6507390edfd0bc5a38b655a3b652fd5ec33e
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index fe81f4f51634..f2c0f9e2c18a 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -87,6 +87,7 @@ #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <boost/scoped_array.hpp> +#include <libxml/xmlwriter.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -2014,6 +2015,21 @@ void SdrModel::SetSdrUndoFactory( SdrUndoFactory* pUndoFactory ) } } +void SdrModel::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sdrModel")); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + + sal_uInt16 nPageCount = GetPageCount(); + for (sal_uInt16 i = 0; i < nPageCount; ++i) + { + if (const SdrPage* pPage = GetPage(i)) + pPage->dumpAsXml(pWriter); + } + + xmlTextWriterEndElement(pWriter); +} + namespace { class theSdrModelUnoTunnelImplementationId : public rtl::Static< UnoTunnelIdInit, theSdrModelUnoTunnelImplementationId > {}; |