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

sw: include SwNumRule in doc model xml dump

Change-Id: I1f3ef757f76c88243c4be1f1a86042040eb524e8
üst 4e7495ac
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <hints.hxx> #include <hints.hxx>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <SwNumberTreeTypes.hxx> #include <SwNumberTreeTypes.hxx>
#include <ndarr.hxx>
#include <vector> #include <vector>
class SwTxtFmtColl; class SwTxtFmtColl;
...@@ -269,6 +270,7 @@ public: ...@@ -269,6 +270,7 @@ public:
void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent ); void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
void Validate(); void Validate();
void dumpAsXml(xmlTextWriterPtr w);
}; };
/// namespace for static functions and methods for numbering and bullets /// namespace for static functions and methods for numbering and bullets
......
...@@ -296,13 +296,14 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -296,13 +296,14 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<sal_Int32> oValue; boost::optional<sal_Int32> oValue;
switch (pItem->Which()) switch (pItem->Which())
{ {
case RES_CHRATR_POSTURE: pWhich = "posture"; break; case RES_CHRATR_POSTURE: pWhich = "character posture"; break;
case RES_CHRATR_WEIGHT: pWhich = "weight"; break; case RES_CHRATR_WEIGHT: pWhich = "character weight"; break;
case RES_CHRATR_CJK_POSTURE: pWhich = "cjk posture"; break; case RES_CHRATR_CJK_POSTURE: pWhich = "character cjk posture"; break;
case RES_CHRATR_CJK_WEIGHT: pWhich = "cjk weight"; break; case RES_CHRATR_CJK_WEIGHT: pWhich = "character cjk weight"; break;
case RES_CHRATR_CTL_POSTURE: pWhich = "ctl posture"; break; case RES_CHRATR_CTL_POSTURE: pWhich = "character ctl posture"; break;
case RES_CHRATR_CTL_WEIGHT: pWhich = "ctl weight"; break; case RES_CHRATR_CTL_WEIGHT: pWhich = "character ctl weight"; break;
case RES_PARATR_OUTLINELEVEL: pWhich = "outline level"; oValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); 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) if (pWhich)
writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich)); writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich));
...@@ -333,6 +334,15 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) ...@@ -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 ) void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
{ {
WriterHelper writer( w ); WriterHelper writer( w );
...@@ -382,6 +392,8 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w ) ...@@ -382,6 +392,8 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
} }
writer.endElement(); writer.endElement();
} }
if (GetNumRule())
GetNumRule()->dumpAsXml(w);
writer.endElement(); writer.endElement();
} }
......
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