diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-23 09:08:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-23 09:09:27 +0100 |
commit | ea1d8c5ab3183f67c27683133d286725b4fa98bc (patch) | |
tree | 6023823a3e188ef2b5acf8ec9f2a39e7ecae9daa /svl | |
parent | 5d47b83cef0b2d0486162989722b23e53eb0cdb1 (diff) |
Factor out SfxPoolItem::dumpAsXml() from sw
The primary benefit of this is that it's no longer necessary to manually
downcast to each and every subclass in sw.
Change-Id: I5742d5744836eef192eef2d4f7ad180da67eb914
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/poolitem.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index bf26c1e04eae..3a0e9f8cd9be 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -21,6 +21,7 @@ #include <svl/poolitem.hxx> #include <tools/stream.hxx> #include <osl/diagnose.h> +#include <libxml/xmlwriter.h> TYPEINIT0(SfxPoolItem); TYPEINIT1(SfxVoidItem, SfxPoolItem); @@ -207,6 +208,13 @@ bool SfxPoolItem::GetPresentation return false; } +void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sfxPoolItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterEndElement(pWriter); +} + SfxVoidItem::SfxVoidItem( sal_uInt16 which ): SfxPoolItem(which) { |