summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-07 09:45:03 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-07 09:46:53 +0100
commit85ce7c0ac69577cf424f4230bcb9103cfdd73d43 (patch)
tree62fc4aa5fed7e3b6ca4703024ed970bcee6ca404 /svx/source/xoutdev
parent1ddb7c2c9d10c92371d76c59c69086115b2c4051 (diff)
Factor out XFillBitmapItem::dumpAsXml() from sw
Change-Id: Ice3a44635a1f4ac2c2852c2e73adae4920412d3a
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/xattr.cxx9
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx12
2 files changed, 21 insertions, 0 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 8c3fc6b90582..8cb9dc225335 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -260,6 +260,15 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
return aUniqueName;
}
+void NameOrIndex::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("nameOrIndex"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("isIndex"), BAD_CAST(OString::boolean(IsIndex()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetName().toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
XColorItem::XColorItem(sal_uInt16 _nWhich, sal_Int32 nIndex, const Color& rTheColor) :
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 23baafe96647..245884f6abb7 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -40,6 +40,8 @@
#include <vcl/bmpacc.hxx>
#include <vcl/dibtools.hxx>
+#include <libxml/xmlwriter.h>
+
using namespace ::com::sun::star;
XOBitmap::XOBitmap( const Bitmap& rBmp ) :
@@ -550,4 +552,14 @@ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const
return NULL;
}
+void XFillBitmapItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBitmapItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+
+ NameOrIndex::dumpAsXml(pWriter);
+
+ xmlTextWriterEndElement(pWriter);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */