diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-09 13:46:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-09 13:46:24 +0200 |
commit | 2b6338f39eb965d3de22bb57e5c1f72432a06329 (patch) | |
tree | 58a73700d46eb510716f609af146c6271491b00d /sd | |
parent | 2e1503dbd01aa62ae4ad0af4f481797521c1c8d5 (diff) |
sd: add SdPage::dumpAsXml()
Change-Id: Ifef668530d660b0b6330f1e60ed558501a74611e
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/sdpage.hxx | 1 | ||||
-rw-r--r-- | sd/source/core/sdpage2.cxx | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index bd065a519c3e..cf5191d2bb7d 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -374,6 +374,7 @@ public: const sd::AnnotationVector& getAnnotations() const { return maAnnotations; } sal_Int32 getHash() const; OString stringify() const; + virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const SAL_OVERRIDE; private: bool mbIsPrecious; diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index aded80fbd404..e2e6304bd402 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -19,6 +19,7 @@ #include <vector> #include <boost/ptr_container/ptr_vector.hpp> +#include <libxml/xmlwriter.h> #include <sfx2/docfile.hxx> #include <vcl/svapp.hxx> @@ -634,4 +635,29 @@ void SdPage::removeAnnotation( const Reference< XAnnotation >& xAnnotation ) } } +void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sdPage")); + + const char* pPageKind = 0; + switch (mePageKind) + { + case PK_STANDARD: + pPageKind = "PK_STANDARD"; + break; + case PK_NOTES: + pPageKind = "PK_NOTES"; + break; + case PK_HANDOUT: + pPageKind = "PK_HANDOUT"; + break; + } + if (pPageKind) + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mePageKind"), BAD_CAST(pPageKind)); + + + FmFormPage::dumpAsXml(pWriter); + xmlTextWriterEndElement(pWriter); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |