summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-08 09:01:28 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-08 09:01:45 +0100
commit0748a5f8298e2ea817e131234f5e99300ed7f9f7 (patch)
tree2a98be05537296374f0ec978f77722b5d7839524
parentinstall the new templates too (diff)
downloadcore-0748a5f8298e2ea817e131234f5e99300ed7f9f7.tar.gz
core-0748a5f8298e2ea817e131234f5e99300ed7f9f7.zip
Factor out XFillTransparenceItem::dumpAsXml() from sw
Change-Id: If8e7a8da9e0ce04dafd2354f31abc249058784a7
-rw-r--r--include/svx/xfltrit.hxx1
-rw-r--r--svx/source/xoutdev/xattr2.cxx10
-rw-r--r--sw/source/core/docnode/nodedump.cxx7
3 files changed, 15 insertions, 3 deletions
diff --git a/include/svx/xfltrit.hxx b/include/svx/xfltrit.hxx
index 8ba5db6168c2..3424a691d334 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 ac87203aa363..1daf63ab01a9 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 8bc14bcd462e..6a17aaeb3a99 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;