editeng/source/items/textitem.cxx | 11 +++++++++++ include/editeng/rsiditem.hxx | 2 ++ sw/qa/extras/inc/swmodeltestbase.hxx | 7 ------- sw/source/core/docnode/nodedump.cxx | 11 +++-------- 4 files changed, 16 insertions(+), 15 deletions(-)
New commits: commit b64391145625f62585669668fbe72dd468a59b06 Author: Miklos Vajna <[email protected]> Date: Tue Dec 9 09:05:49 2014 +0100 SwModelTestBase: unused MethodEntry Change-Id: Ib1ad9bedad4218c369da1efa2c4c6c9843452972 diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index cc18a77..dedd5a9 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -160,13 +160,6 @@ protected: const char* mpTestDocumentPath; const char* mpFilter; - template<typename T> - struct MethodEntry - { - const char* pName; - void (T::*pMethod)(); - }; - sal_uInt32 mnStartTime; utl::TempFile maTempFile; bool mbExported; ///< Does maTempFile already contain something useful? commit 4dbbf535e7f2abfbcdcb3f513e03bdaaeed75d43 Author: Miklos Vajna <[email protected]> Date: Tue Dec 9 09:05:14 2014 +0100 Factor out SvxRsidItem::dumpAsXml() from sw Change-Id: I60c57fa6a9f3619de717e7b2383dc420706b2886 diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 6ccbf9b..7b4ed20 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 160d906..cda3648 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 ab35ecb..d97bdcf 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; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
