From 2eb4bd3c8ce8d4ac76680e5179364b12a656ae94 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 5 Jan 2015 18:39:47 +0100 Subject: Factor out XFillStyleItem::dumpAsXml() from sw Change-Id: I04aed56c1e32f98f8920530e3ba313765baa1bba --- svx/source/xoutdev/xattr.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'svx/source/xoutdev') diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index ae7e2406256d..fc1625e51ef5 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -54,6 +54,7 @@ #include #include +#include using namespace ::com::sun::star; @@ -2189,6 +2190,19 @@ bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 return true; } +void XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("xFillStyleItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr())); + + OUString aPresentation; + GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr())); + + xmlTextWriterEndElement(pWriter); +} + TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem); XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor) : -- cgit