diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-20 16:29:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-21 09:06:33 +0200 |
commit | 553f10c71a2cc92f5f5890e24948f5277e3d2758 (patch) | |
tree | 2040ea0241bc538f5372c5a9234e0cf523e00b9e /editeng | |
parent | c33647429b179c024f0749be85c89f737a8b42db (diff) |
add dumpAsXml() to more pool items
Change-Id: I276109148bab8180ce2442f5ee69722357362453
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/numitem.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 3c3fa19d71a7..800f59cd1499 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -43,7 +43,7 @@ #include <comphelper/processfactory.hxx> #include <tools/mapunit.hxx> #include <unotools/configmgr.hxx> - +#include <libxml/xmlwriter.h> #include <editeng/unonrule.hxx> #define DEF_WRITER_LSPACE 500 //Standard Indentation @@ -691,6 +691,27 @@ void SvxNumRule::Store( SvStream &rStream ) DestroyFontToSubsFontConverter(pConverter); } +void SvxNumRule::dumpAsXml(struct _xmlTextWriter* pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("svxNumRule")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("levelCount"), BAD_CAST(OUString::number(nLevelCount).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("continuousNumbering"), BAD_CAST(OUString::number(bContinuousNumbering).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("numberingType"), BAD_CAST(OUString::number((int)eNumberingType).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("featureFlags"), BAD_CAST(OUString::number((int)nFeatureFlags).getStr())); + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) + { + if(aFmts[i]) + { + xmlTextWriterStartElement(pWriter, BAD_CAST("aFmts")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("i"), BAD_CAST(OUString::number(i).getStr())); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", aFmts[i]); + xmlTextWriterEndElement(pWriter); + } + } + xmlTextWriterEndElement(pWriter); +} + + SvxNumRule::~SvxNumRule() { for(SvxNumberFormat* aFmt : aFmts) @@ -965,6 +986,14 @@ bool SvxNumBulletItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberI return false; } +void SvxNumBulletItem::dumpAsXml(struct _xmlTextWriter* pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("svxNumBulletItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + pNumRule->dumpAsXml(pWriter); + xmlTextWriterEndElement(pWriter); +} + SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevels, SvxNumRuleType eType ) { const sal_uInt16 nSrcLevels = pRule->GetLevelCount(); |