diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-20 16:29:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-21 09:06:33 +0200 |
commit | 553f10c71a2cc92f5f5890e24948f5277e3d2758 (patch) | |
tree | 2040ea0241bc538f5372c5a9234e0cf523e00b9e /svl | |
parent | c33647429b179c024f0749be85c89f737a8b42db (diff) |
add dumpAsXml() to more pool items
Change-Id: I276109148bab8180ce2442f5ee69722357362453
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/cenumitm.cxx | 9 | ||||
-rw-r--r-- | svl/source/items/poolitem.cxx | 10 | ||||
-rw-r--r-- | svl/source/items/stritem.cxx | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index f17ce3c1eb55..183c7f1f967a 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -25,6 +25,7 @@ #include "whassert.hxx" #include <comphelper/extract.hxx> +#include <libxml/xmlwriter.h> // virtual @@ -175,6 +176,14 @@ bool SfxBoolItem::GetPresentation(SfxItemPresentation, return true; } +void SfxBoolItem::dumpAsXml(struct _xmlTextWriter* pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sfxBoolItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValueTextByVal(m_bValue).toUtf8().getStr())); + xmlTextWriterEndElement(pWriter); +} + // virtual bool SfxBoolItem::QueryValue(css::uno::Any& rVal, sal_uInt8) const { diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 81264d940b52..93fe79e416cc 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -193,6 +193,10 @@ void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("sfxPoolItem")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("typeName"), BAD_CAST(typeid(*this).name())); + OUString rText; + if (GetPresentation( SFX_ITEM_PRESENTATION_COMPLETE, MAP_100TH_MM, MAP_100TH_MM, rText)) + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(rText.getStr())); xmlTextWriterEndElement(pWriter); } @@ -240,6 +244,12 @@ bool SfxVoidItem::GetPresentation return true; } +void SfxVoidItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sfxVoidItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterEndElement(pWriter); +} SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const { diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx index ae8727a77ed1..c00a637b676c 100644 --- a/svl/source/items/stritem.cxx +++ b/svl/source/items/stritem.cxx @@ -58,6 +58,7 @@ void SfxStringItem::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr())); xmlTextWriterEndElement(pWriter); } + SfxPoolItem* SfxStringItem::CreateDefault() { return new SfxStringItem(); |