diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-22 09:16:39 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-22 09:18:28 +0100 |
commit | e17847e0ce5602b0cdf312ba2c72bd99aa7b72b2 (patch) | |
tree | 4b9d4104d3132ad0ec23c500b63d2a9cf1c09cbb /svl | |
parent | 3adaad3e36d0adc444f1085fceb7f4e5b43cfeef (diff) |
Factor out SfxStringItem::dumpAsXml() from sw
Change-Id: If218d83297bfdd39471d5502c0639248c96af9c6
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/stritem.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx index dd94154bbe8e..dea5550102c9 100644 --- a/svl/source/items/stritem.cxx +++ b/svl/source/items/stritem.cxx @@ -19,7 +19,7 @@ #include <svl/stritem.hxx> #include <stringio.hxx> - +#include <libxml/xmlwriter.h> // class SfxStringItem @@ -53,4 +53,12 @@ SfxPoolItem * SfxStringItem::Clone(SfxItemPool *) const return new SfxStringItem(*this); } +void SfxStringItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sfxStringItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr())); + xmlTextWriterEndElement(pWriter); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |