[Libreoffice-commits] core.git: include/svx svx/source sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Jan 8 00:02:11 PST 2015
include/svx/xfltrit.hxx | 1 +
svx/source/xoutdev/xattr2.cxx | 10 ++++++++++
sw/source/core/docnode/nodedump.cxx | 7 ++++---
3 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 0748a5f8298e2ea817e131234f5e99300ed7f9f7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 8 09:01:28 2015 +0100
Factor out XFillTransparenceItem::dumpAsXml() from sw
Change-Id: If8e7a8da9e0ce04dafd2354f31abc249058784a7
diff --git a/include/svx/xfltrit.hxx b/include/svx/xfltrit.hxx
index 8ba5db6..3424a69 100644
--- a/include/svx/xfltrit.hxx
+++ b/include/svx/xfltrit.hxx
@@ -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
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index ac87203..1daf63a 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -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) :
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 8bc14bc..6a17aae 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -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;
More information about the Libreoffice-commits
mailing list