summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-05 09:07:36 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-05 09:08:58 +0100
commit3434327a5f2559a6d24146b35236042fe8741038 (patch)
tree7b15fd1f346947fcb1f6366c34a003712ad66342 /sw
parent166fe80d65f1d46e52d313cf8894d9604b6a2ab8 (diff)
Factor out SvxPostureItem::dumpAsXml() from sw
Again, the motivation is that dumper for something in editeng should be in that module as well, before home-grown dumpers are invented and duplicated e.g. in all sw/sc/sd. Change-Id: Icfeed9549efbd80226ff04e9070766188cc8646e
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/nodedump.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 190f753ffca5..705e34a53603 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -45,6 +45,7 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/editobj.hxx>
#include <editeng/outlobj.hxx>
+#include <editeng/postitem.hxx>
#include <svx/xdef.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdmodel.hxx>
@@ -386,17 +387,30 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
const SfxPoolItem* pItem = aIter.FirstItem();
while (pItem)
{
+ bool bDone = true;
+ switch (pItem->Which())
+ {
+ case RES_CHRATR_POSTURE:
+ case RES_CHRATR_CJK_POSTURE:
+ case RES_CHRATR_CTL_POSTURE:
+ static_cast<const SvxPostureItem*>(pItem)->dumpAsXml(writer);
+ break;
+ default: bDone = false; break;
+ }
+ if (bDone)
+ {
+ pItem = aIter.NextItem();
+ continue;
+ }
+
writer.startElement("item");
writer.writeFormatAttribute("whichId", TMP_FORMAT, pItem->Which());
const char* pWhich = 0;
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_CHRATR_POSTURE: pWhich = "character posture"; break;
case RES_CHRATR_WEIGHT: pWhich = "character weight"; break;
- case RES_CHRATR_CJK_POSTURE: pWhich = "character cjk posture"; break;
case RES_CHRATR_CJK_WEIGHT: pWhich = "character cjk weight"; break;
- case RES_CHRATR_CTL_POSTURE: pWhich = "character ctl posture"; break;
case RES_CHRATR_CTL_WEIGHT: pWhich = "character ctl weight"; break;
case RES_CHRATR_RSID:
{