Kaydet (Commit) 0748a5f8 authored tarafından Miklos Vajna's avatar Miklos Vajna

Factor out XFillTransparenceItem::dumpAsXml() from sw

Change-Id: If8e7a8da9e0ce04dafd2354f31abc249058784a7
üst 9da59f23
......@@ -41,6 +41,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif
......
......@@ -32,6 +32,8 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <libxml/xmlwriter.h>
TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item);
XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) :
......@@ -435,6 +437,14 @@ bool XFillTransparenceItem::GetPresentation
}
}
void XFillTransparenceItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("xFillTransparenceItem"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
xmlTextWriterEndElement(pWriter);
}
TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item);
XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence) :
......
......@@ -55,6 +55,7 @@
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xfltrit.hxx>
#include <tools/datetimeutils.hxx>
#include <libxml/encoding.h>
......@@ -463,6 +464,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case XATTR_FILLBITMAP:
static_cast<const XFillBitmapItem*>(pItem)->dumpAsXml(writer);
break;
case XATTR_FILLTRANSPARENCE:
static_cast<const XFillTransparenceItem*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break;
}
if (bDone)
......@@ -477,9 +481,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
case XATTR_FILLTRANSPARENCE:
pWhich = "fill transparence";
break;
case XATTR_FILLBMP_TILE:
pWhich = "fill bitmap tile";
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment