Kaydet (Commit) 3dee6c74 authored tarafından Miklos Vajna's avatar Miklos Vajna

Factor out SvxCharRotateItem::dumpAsXml() from sw

Change-Id: I52bca77e8ff0d4fccf8423f01dac9b6a7498f8d1
üst 94899de9
......@@ -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
......
......@@ -74,6 +74,8 @@ public:
bool IsFitToLine() const { return bFitToLine; }
void SetFitToLine( bool b ) { bFitToLine = b; }
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif
......
......@@ -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;
......
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