summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/items/frmitems.cxx14
-rw-r--r--include/editeng/brushitem.hxx2
-rw-r--r--sw/source/core/docnode/nodedump.cxx4
3 files changed, 19 insertions, 1 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index e4b6e0c6be97..784326db6345 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -81,6 +81,7 @@
#include <editeng/unoprnms.hxx>
#include <editeng/memberids.hrc>
#include <editeng/editerr.hxx>
+#include <libxml/xmlwriter.h>
using namespace ::editeng;
using namespace ::com::sun::star;
@@ -4102,6 +4103,19 @@ void SvxBrushItem::ApplyGraphicTransparency_Impl()
}
}
+void SvxBrushItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("svxBrushItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("color"), BAD_CAST(aColor.AsRGBHexString().toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("shadingValue"), BAD_CAST(OString::number(nShadingValue).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("link"), BAD_CAST(maStrLink.toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("filter"), BAD_CAST(maStrFilter.toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("graphicPos"), BAD_CAST(OString::number(eGraphicPos).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("loadAgain"), BAD_CAST(OString::boolean(bLoadAgain).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// class SvxFrameDirectionItem ----------------------------------------------
SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue ,
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index ae4cb9a13667..16dc38de410c 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -127,6 +127,8 @@ public:
static SvxGraphicPosition WallpaperStyle2GraphicPos( WallpaperStyle eStyle );
static WallpaperStyle GraphicPos2WallpaperStyle( SvxGraphicPosition ePos );
static sal_Int8 TransparencyToPercent(sal_Int32 nTrans);
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif // INCLUDED_EDITENG_BRUSHITEM_HXX
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 17540bca3647..a83799b526f8 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -416,6 +416,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_CHRATR_FONT:
static_cast<const SvxFontItem*>(pItem)->dumpAsXml(writer);
break;
+ case RES_CHRATR_BACKGROUND:
+ static_cast<const SvxBrushItem*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -430,7 +433,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_CHRATR_BACKGROUND: pWhich = "character background"; break;
case RES_CHRATR_CTL_FONT: pWhich = "character ctl font"; break;
case RES_CHRATR_FONTSIZE:
{