summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-28 18:22:27 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-28 19:25:59 +0100
commitdaebeae541d354c36e42434411e64755c70329e3 (patch)
treed6c65b49fd2bd9bb199dfa0cd996c06be1c06f4a /sw
parentd5ac1754bac8f81cb51adac82167bca9e9aa61af (diff)
Factor out SwFmtWrapInfluenceOnObjPos::dumpAsXml() from docnode
Change-Id: I8c52801178c5cf80398a19ebe40d336c69db8065
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx2
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx9
-rw-r--r--sw/source/core/bastyp/init.cxx3
-rw-r--r--sw/source/core/docnode/nodedump.cxx9
4 files changed, 16 insertions, 7 deletions
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 046f09d6a4f5..0e70e3bb6787 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -56,6 +56,8 @@ public:
/// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
sal_Int16 GetWrapInfluenceOnObjPos(
const bool _bIterativeAsOnceConcurrent = false ) const;
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(bool bInP) const
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
index 067cd57bd53e..0224f4fb9605 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -20,6 +20,7 @@
#include <fmtwrapinfluenceonobjpos.hxx>
#include <unomid.h>
#include <osl/diagnose.h>
+#include <libxml/xmlwriter.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -138,4 +139,12 @@ sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos(
return nWrapInfluenceOnPosition;
}
+void SwFmtWrapInfluenceOnObjPos::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtWrapInfluenceOnObjPos"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWrapInfluenceOnPosition"), BAD_CAST(OString::number(mnWrapInfluenceOnPosition).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index a8cd5a00197c..6d5454fd7436 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -612,8 +612,7 @@ void _InitCore()
aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, false );
// #i28701#
// #i35017# - constant name has changed
- aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] =
- new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
+ aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] = new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
aAttrTab[ RES_AUTO_STYLE - POOLATTR_BEGIN ] = new SwFmtAutoFmt( RES_AUTO_STYLE );
aAttrTab[ RES_FRMATR_STYLE_NAME - POOLATTR_BEGIN ] = new SfxStringItem( RES_FRMATR_STYLE_NAME, OUString());
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 1d5423649d54..a3771f04b84f 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -37,6 +37,7 @@
#include "pagedesc.hxx"
#include "fchrfmt.hxx"
#include "fmtfollowtextflow.hxx"
+#include "fmtwrapinfluenceonobjpos.hxx"
#include <swmodule.hxx>
#include <svl/itemiter.hxx>
#include <svl/intitem.hxx>
@@ -445,6 +446,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_FOLLOW_TEXT_FLOW:
static_cast<const SwFmtFollowTextFlow*>(pItem)->dumpAsXml(writer);
break;
+ case RES_WRAP_INFLUENCE_ON_OBJPOS:
+ static_cast<const SwFmtWrapInfluenceOnObjPos*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -459,11 +463,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_WRAP_INFLUENCE_ON_OBJPOS:
- {
- pWhich = "frame wrap influence on object position";
- break;
- }
case XATTR_FILLSTYLE:
{
pWhich = "fill style";