Kaydet (Commit) 10d67638 authored tarafından Miklos Vajna's avatar Miklos Vajna

Factor out XFillBmpPosItem::dumpAsXml() from sw

Change-Id: I7e483efd3aa96c34fb02affa73ee5ffb9840209c
üst 4c2de252
...@@ -41,6 +41,7 @@ public: ...@@ -41,6 +41,7 @@ public:
SVX_DLLPRIVATE virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE; SVX_DLLPRIVATE virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE;
SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); } SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); }
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
......
...@@ -588,6 +588,14 @@ sal_uInt16 XFillBmpPosItem::GetValueCount() const ...@@ -588,6 +588,14 @@ sal_uInt16 XFillBmpPosItem::GetValueCount() const
return 9; return 9;
} }
void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBmpPosItem"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
xmlTextWriterEndElement(pWriter);
}
// class XFillBmpTileSizeXItem // class XFillBmpTileSizeXItem
TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem ); TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem );
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#include <svx/xbtmpit.hxx> #include <svx/xbtmpit.hxx>
#include <svx/xfltrit.hxx> #include <svx/xfltrit.hxx>
#include <svx/xflbmtit.hxx> #include <svx/xflbmtit.hxx>
#include <svx/xflbmpit.hxx>
#include <tools/datetimeutils.hxx> #include <tools/datetimeutils.hxx>
#include <libxml/encoding.h> #include <libxml/encoding.h>
...@@ -471,6 +472,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -471,6 +472,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case XATTR_FILLBMP_TILE: case XATTR_FILLBMP_TILE:
static_cast<const XFillBmpTileItem*>(pItem)->dumpAsXml(writer); static_cast<const XFillBmpTileItem*>(pItem)->dumpAsXml(writer);
break; break;
case XATTR_FILLBMP_POS:
static_cast<const XFillBmpPosItem*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break; default: bDone = false; break;
} }
if (bDone) if (bDone)
...@@ -485,9 +489,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -485,9 +489,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue; boost::optional<OString> oValue;
switch (pItem->Which()) switch (pItem->Which())
{ {
case XATTR_FILLBMP_POS:
pWhich = "fill bitmap position";
break;
case XATTR_FILLBMP_STRETCH: case XATTR_FILLBMP_STRETCH:
pWhich = "fill bitmap stretch"; pWhich = "fill bitmap stretch";
break; 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