diff options
-rw-r--r-- | sw/inc/fmtfsize.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 19 |
3 files changed, 24 insertions, 8 deletions
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx index 6bb75daa1073..29598be03579 100644 --- a/sw/inc/fmtfsize.hxx +++ b/sw/inc/fmtfsize.hxx @@ -97,6 +97,8 @@ public: void SetHeightPercentRelation ( sal_Int16 n ) { m_eHeightPercentRelation = n; } void SetWidthPercent ( sal_uInt8 n ) { m_nWidthPercent = n; } void SetWidthPercentRelation ( sal_Int16 n ) { m_eWidthPercentRelation = n; } + + void dumpAsXml(struct _xmlTextWriter* pWriter) const; }; inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(bool bInP) const diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index c0cda7594cc9..7d18b6563e21 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -426,6 +426,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) case RES_CNTNT: static_cast<const SwFmtCntnt*>(pItem)->dumpAsXml(writer); break; + case RES_FRM_SIZE: + static_cast<const SwFmtFrmSize*>(pItem)->dumpAsXml(writer); + break; default: bDone = false; break; } if (bDone) @@ -440,14 +443,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) boost::optional<OString> oValue; switch (pItem->Which()) { - case RES_FRM_SIZE: - { - pWhich = "frame size"; - const SwFmtFrmSize* pSize = static_cast<const SwFmtFrmSize*>(pItem); - oValue = "height size type: " + OString::number(pSize->GetHeightSizeType()) + ", height: " + OString::number(pSize->GetHeight()) - + ", width size type: " + OString::number(pSize->GetWidthSizeType()) + ", width: " + OString::number(pSize->GetWidth()); - break; - } case RES_VERT_ORIENT: { pWhich = "frame vertical orientation"; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index dbf0caaf6848..79517f21cd37 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -411,6 +411,25 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } +void SwFmtFrmSize::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtFrmSize")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + + std::stringstream aSize; + aSize << m_aSize; + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("size"), BAD_CAST(aSize.str().c_str())); + + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmHeightType"), BAD_CAST(OString::number(m_eFrmHeightType).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmWidthType"), BAD_CAST(OString::number(m_eFrmWidthType).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidthPercent"), BAD_CAST(OString::number(m_nWidthPercent).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eWidthPercentRelation"), BAD_CAST(OString::number(m_eWidthPercentRelation).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nHeightPercent"), BAD_CAST(OString::number(m_nHeightPercent).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eHeightPercentRelation"), BAD_CAST(OString::number(m_eHeightPercentRelation).getStr())); + + xmlTextWriterEndElement(pWriter); +} + // Partially implemented inline in hxx SwFmtFillOrder::SwFmtFillOrder( SwFillOrder nFO ) : SfxEnumItem( RES_FILL_ORDER, sal_uInt16(nFO) ) |