[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Oct 9 07:41:28 PDT 2013
sw/inc/numrule.hxx | 2 ++
sw/source/core/docnode/nodedump.cxx | 26 +++++++++++++++++++-------
2 files changed, 21 insertions(+), 7 deletions(-)
New commits:
commit 49279e759cd9d6a6136e26f08a260bc3daa3dd86
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Oct 9 16:26:30 2013 +0200
sw: include SwNumRule in doc model xml dump
Change-Id: I1f3ef757f76c88243c4be1f1a86042040eb524e8
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 39edc8b..7503e17 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -29,6 +29,7 @@
#include <hints.hxx>
#include <boost/unordered_map.hpp>
#include <SwNumberTreeTypes.hxx>
+#include <ndarr.hxx>
#include <vector>
class SwTxtFmtColl;
@@ -269,6 +270,7 @@ public:
void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
void Validate();
+ void dumpAsXml(xmlTextWriterPtr w);
};
/// namespace for static functions and methods for numbering and bullets
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 59a6a1a..92da056 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -296,13 +296,14 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<sal_Int32> oValue;
switch (pItem->Which())
{
- case RES_CHRATR_POSTURE: pWhich = "posture"; break;
- case RES_CHRATR_WEIGHT: pWhich = "weight"; break;
- case RES_CHRATR_CJK_POSTURE: pWhich = "cjk posture"; break;
- case RES_CHRATR_CJK_WEIGHT: pWhich = "cjk weight"; break;
- case RES_CHRATR_CTL_POSTURE: pWhich = "ctl posture"; break;
- case RES_CHRATR_CTL_WEIGHT: pWhich = "ctl weight"; break;
- case RES_PARATR_OUTLINELEVEL: pWhich = "outline level"; oValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); break;
+ 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: pWhich = "character rsid"; break;
+ case RES_PARATR_OUTLINELEVEL: pWhich = "paragraph outline level"; oValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); break;
}
if (pWhich)
writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich));
@@ -333,6 +334,15 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w)
}
}
+void SwNumRule::dumpAsXml(xmlTextWriterPtr w)
+{
+ WriterHelper writer(w);
+ writer.startElement("swnumrule");
+ OString aName = OUStringToOString(GetName(), RTL_TEXTENCODING_UTF8);
+ writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr()));
+ writer.endElement();
+}
+
void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
{
WriterHelper writer( w );
@@ -382,6 +392,8 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
}
writer.endElement();
}
+ if (GetNumRule())
+ GetNumRule()->dumpAsXml(w);
writer.endElement();
}
More information about the Libreoffice-commits
mailing list