[Libreoffice-commits] core.git: include/svx svx/source sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jan 9 00:24:44 PST 2015
include/svx/xflbmtit.hxx | 1 +
svx/source/xoutdev/xattr2.cxx | 8 ++++++++
sw/source/core/docnode/nodedump.cxx | 7 ++++---
3 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 4280ff6cb5696f33a425034130875c0a89be5aa5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 9 09:24:01 2015 +0100
Factor out XFillBmpTileItem::dumpAsXml() from sw
Change-Id: I01816988eb3c47e60826ff01c1b8402f9f5130e4
diff --git a/include/svx/xflbmtit.hxx b/include/svx/xflbmtit.hxx
index 7cb1248..cefca74 100644
--- a/include/svx/xflbmtit.hxx
+++ b/include/svx/xflbmtit.hxx
@@ -37,6 +37,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
+ virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 1daf63a..6d3bf32 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -539,6 +539,14 @@ bool XFillBmpTileItem::GetPresentation
return true;
}
+void XFillBmpTileItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBmpTileItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// class XFillBmpTilePosItem
TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem );
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 6a17aae..b8f48e0 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -56,6 +56,7 @@
#include <svx/xflclit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xfltrit.hxx>
+#include <svx/xflbmtit.hxx>
#include <tools/datetimeutils.hxx>
#include <libxml/encoding.h>
@@ -467,6 +468,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case XATTR_FILLTRANSPARENCE:
static_cast<const XFillTransparenceItem*>(pItem)->dumpAsXml(writer);
break;
+ case XATTR_FILLBMP_TILE:
+ static_cast<const XFillBmpTileItem*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -481,9 +485,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case XATTR_FILLBMP_TILE:
- pWhich = "fill bitmap tile";
- break;
case XATTR_FILLBMP_POS:
pWhich = "fill bitmap position";
break;
More information about the Libreoffice-commits
mailing list