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

Factor out SwFmtFollowTextFlow::dumpAsXml() from core

Change-Id: Iafd2db5d878857c517e79f84b8c9c6a806ccfe4b
üst e9d0ad43
......@@ -41,6 +41,8 @@ public:
SfxMapUnit ePresMetric,
OUString &rText,
const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(bool bInP) const
......
......@@ -36,6 +36,7 @@
#include "fmtpdsc.hxx"
#include "pagedesc.hxx"
#include "fchrfmt.hxx"
#include "fmtfollowtextflow.hxx"
#include <swmodule.hxx>
#include <svl/itemiter.hxx>
#include <svl/intitem.hxx>
......@@ -441,6 +442,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_SURROUND:
static_cast<const SwFmtSurround*>(pItem)->dumpAsXml(writer);
break;
case RES_FOLLOW_TEXT_FLOW:
static_cast<const SwFmtFollowTextFlow*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break;
}
if (bDone)
......@@ -455,11 +459,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
case RES_FOLLOW_TEXT_FLOW:
{
pWhich = "frame follow text flow";
break;
}
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pWhich = "frame wrap influence on object position";
......
......@@ -55,6 +55,7 @@
#include <attrdesc.hrc>
#include <fmtftntx.hxx>
#include <fmtfollowtextflow.hxx>
#include <libxml/xmlwriter.h>
using namespace com::sun::star;
......@@ -834,4 +835,12 @@ bool SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres,
return true;
}
void SwFmtFollowTextFlow::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtFollowTextFlow"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
xmlTextWriterEndElement(pWriter);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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