summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/items/textitem.cxx10
-rw-r--r--include/editeng/fhgtitem.hxx2
-rw-r--r--sw/source/core/docnode/nodedump.cxx12
3 files changed, 16 insertions, 8 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 3ea6bb73f029..16870d91208e 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1128,6 +1128,16 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
ePropUnit = eMetric;
}
+void SvxFontHeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("svxFontHeightItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("height"), BAD_CAST(OString::number(nHeight).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("prop"), BAD_CAST(OString::number(nProp).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("propUnit"), BAD_CAST(OString::number(ePropUnit).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// class SvxFontWidthItem -----------------------------------------------
SvxFontWidthItem::SvxFontWidthItem( const sal_uInt16 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) :
diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx
index e069f1b0abff..7034dcfdf079 100644
--- a/include/editeng/fhgtitem.hxx
+++ b/include/editeng/fhgtitem.hxx
@@ -91,6 +91,8 @@ public:
sal_uInt16 GetProp() const { return nProp; }
SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ...
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index a83799b526f8..f6cd7f85eafb 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -414,11 +414,15 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
static_cast<const SwNumRuleItem*>(pItem)->dumpAsXml(writer);
break;
case RES_CHRATR_FONT:
+ case RES_CHRATR_CTL_FONT:
static_cast<const SvxFontItem*>(pItem)->dumpAsXml(writer);
break;
case RES_CHRATR_BACKGROUND:
static_cast<const SvxBrushItem*>(pItem)->dumpAsXml(writer);
break;
+ case RES_CHRATR_FONTSIZE:
+ static_cast<const SvxFontHeightItem*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -433,14 +437,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_CHRATR_CTL_FONT: pWhich = "character ctl font"; break;
- case RES_CHRATR_FONTSIZE:
- {
- pWhich = "character font size";
- const SvxFontHeightItem* pFontHeightItem = static_cast<const SvxFontHeightItem*>(pItem);
- oValue = "nHeight: " + OString::number(pFontHeightItem->GetHeight()) + ", nProp: " + OString::number(pFontHeightItem->GetProp());
- break;
- }
case RES_CNTNT:
{
pWhich = "content";