editeng/source/items/textitem.cxx | 8 ++++++++ include/editeng/charrotateitem.hxx | 2 ++ sw/source/core/docnode/nodedump.cxx | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-)
New commits: commit 3dee6c74c37d1667c1d56767896e9578e2836e29 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Dec 11 08:52:06 2014 +0100 Factor out SvxCharRotateItem::dumpAsXml() from sw Change-Id: I52bca77e8ff0d4fccf8423f01dac9b6a7498f8d1 diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 7b4ed20..4d75b47 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -3084,6 +3084,14 @@ bool SvxCharRotateItem::operator==( const SfxPoolItem& rItem ) const IsFitToLine() == static_cast<const SvxCharRotateItem&>(rItem).IsFitToLine(); } +void SvxCharRotateItem::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("svxCharRotateItem")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("fitToLine"), BAD_CAST(OString::boolean(IsFitToLine()).getStr())); + xmlTextWriterEndElement(pWriter); +} /************************************************************************* |* class SvxCharScaleItem diff --git a/include/editeng/charrotateitem.hxx b/include/editeng/charrotateitem.hxx index 574d2fc..c78cfc6 100644 --- a/include/editeng/charrotateitem.hxx +++ b/include/editeng/charrotateitem.hxx @@ -74,6 +74,8 @@ public: bool IsFitToLine() const { return bFitToLine; } void SetFitToLine( bool b ) { bFitToLine = b; } + + void dumpAsXml(struct _xmlTextWriter* pWriter) const; }; #endif diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index d97bdcf..b2053cd 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -404,6 +404,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) case RES_CHRATR_RSID: static_cast<const SvxRsidItem*>(pItem)->dumpAsXml(writer); break; + case RES_CHRATR_ROTATE: + static_cast<const SvxCharRotateItem*>(pItem)->dumpAsXml(writer); + break; default: bDone = false; break; } if (bDone) @@ -418,7 +421,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) boost::optional<OString> oValue; switch (pItem->Which()) { - 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; case RES_CHRATR_FONT: pWhich = "character font"; oValue = OUStringToOString(static_cast<const SvxFontItem*>(pItem)->GetFamilyName(), RTL_TEXTENCODING_UTF8); break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits