diff options
-rw-r--r-- | editeng/source/items/textitem.cxx | 11 | ||||
-rw-r--r-- | include/editeng/rsiditem.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 11 |
3 files changed, 16 insertions, 8 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 6ccbf9b4c370..7b4ed206fa19 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -593,6 +593,7 @@ void SvxPostureItem::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("svxPostureItem")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which()); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%d", GetValue()); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(GetValueTextByPos(GetValue()).toUtf8().getStr())); xmlTextWriterEndElement(pWriter); } @@ -726,6 +727,7 @@ void SvxWeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("svxWeightItem")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which()); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%d", GetValue()); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(GetValueTextByPos(GetValue()).toUtf8().getStr())); xmlTextWriterEndElement(pWriter); } @@ -3559,4 +3561,13 @@ SfxPoolItem* SvxRsidItem::Create(SvStream& rIn, sal_uInt16 ) const { return new SvxRsidItem( rIn, Which() ); } + +void SvxRsidItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("svxRsidItem")); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which()); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%" SAL_PRIuUINT32, GetValue()); + xmlTextWriterEndElement(pWriter); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/editeng/rsiditem.hxx b/include/editeng/rsiditem.hxx index 160d906dd019..cda36484f8f5 100644 --- a/include/editeng/rsiditem.hxx +++ b/include/editeng/rsiditem.hxx @@ -29,6 +29,8 @@ public: virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE; virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE; + + void dumpAsXml(struct _xmlTextWriter* pWriter) const; }; #endif // INCLUDED_EDITENG_RSIDITEM_HXX diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index ab35ecb0d11c..d97bdcfb36db 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -401,6 +401,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) case RES_CHRATR_CTL_WEIGHT: static_cast<const SvxWeightItem*>(pItem)->dumpAsXml(writer); break; + case RES_CHRATR_RSID: + static_cast<const SvxRsidItem*>(pItem)->dumpAsXml(writer); + break; default: bDone = false; break; } if (bDone) @@ -415,14 +418,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) boost::optional<OString> oValue; switch (pItem->Which()) { - case RES_CHRATR_RSID: - { - pWhich = "character rsid"; - css::uno::Any aAny; - static_cast<const SvxRsidItem*>(pItem)->QueryValue(aAny); - oValue = OString::number(aAny.get<sal_uInt32>()); - break; - } case RES_CHRATR_ROTATE: pWhich = "character rotation"; oValue = OString::number(static_cast<const SvxCharRotateItem*>(pItem)->GetValue()); break; case RES_PARATR_OUTLINELEVEL: pWhich = "paragraph outline level"; oValue = OString::number(static_cast<const SfxUInt16Item*>(pItem)->GetValue()); break; case RES_PARATR_NUMRULE: pWhich = "paragraph numbering rule"; oValue = OUStringToOString(static_cast<const SwNumRuleItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); break; |