Kaydet (Commit) daebeae5 authored tarafından Miklos Vajna's avatar Miklos Vajna

Factor out SwFmtWrapInfluenceOnObjPos::dumpAsXml() from docnode

Change-Id: I8c52801178c5cf80398a19ebe40d336c69db8065
üst d5ac1754
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
/// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT> /// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
sal_Int16 GetWrapInfluenceOnObjPos( sal_Int16 GetWrapInfluenceOnObjPos(
const bool _bIterativeAsOnceConcurrent = false ) const; const bool _bIterativeAsOnceConcurrent = false ) const;
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(bool bInP) const inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(bool bInP) const
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <fmtwrapinfluenceonobjpos.hxx> #include <fmtwrapinfluenceonobjpos.hxx>
#include <unomid.h> #include <unomid.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <libxml/xmlwriter.h>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -138,4 +139,12 @@ sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos( ...@@ -138,4 +139,12 @@ sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos(
return nWrapInfluenceOnPosition; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -612,8 +612,7 @@ void _InitCore() ...@@ -612,8 +612,7 @@ void _InitCore()
aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, false ); aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, false );
// #i28701# // #i28701#
// #i35017# - constant name has changed // #i35017# - constant name has changed
aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] = aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] = new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
aAttrTab[ RES_AUTO_STYLE - POOLATTR_BEGIN ] = new SwFmtAutoFmt( RES_AUTO_STYLE ); 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()); aAttrTab[ RES_FRMATR_STYLE_NAME - POOLATTR_BEGIN ] = new SfxStringItem( RES_FRMATR_STYLE_NAME, OUString());
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "pagedesc.hxx" #include "pagedesc.hxx"
#include "fchrfmt.hxx" #include "fchrfmt.hxx"
#include "fmtfollowtextflow.hxx" #include "fmtfollowtextflow.hxx"
#include "fmtwrapinfluenceonobjpos.hxx"
#include <swmodule.hxx> #include <swmodule.hxx>
#include <svl/itemiter.hxx> #include <svl/itemiter.hxx>
#include <svl/intitem.hxx> #include <svl/intitem.hxx>
...@@ -445,6 +446,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -445,6 +446,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_FOLLOW_TEXT_FLOW: case RES_FOLLOW_TEXT_FLOW:
static_cast<const SwFmtFollowTextFlow*>(pItem)->dumpAsXml(writer); static_cast<const SwFmtFollowTextFlow*>(pItem)->dumpAsXml(writer);
break; break;
case RES_WRAP_INFLUENCE_ON_OBJPOS:
static_cast<const SwFmtWrapInfluenceOnObjPos*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break; default: bDone = false; break;
} }
if (bDone) if (bDone)
...@@ -459,11 +463,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -459,11 +463,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue; boost::optional<OString> oValue;
switch (pItem->Which()) switch (pItem->Which())
{ {
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pWhich = "frame wrap influence on object position";
break;
}
case XATTR_FILLSTYLE: case XATTR_FILLSTYLE:
{ {
pWhich = "fill style"; pWhich = "fill style";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment