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

Factor out SwFmtHoriOrient::dumpAsXml() from nodedump

Change-Id: I63ec35abcd7e69147ff4f98b1989875967c470fe
üst f0b4b944
...@@ -99,6 +99,8 @@ public: ...@@ -99,6 +99,8 @@ public:
bool IsPosToggle() const { return bPosToggle; } bool IsPosToggle() const { return bPosToggle; }
void SetPosToggle( bool bNew ) { bPosToggle = bNew; } void SetPosToggle( bool bNew ) { bPosToggle = bNew; }
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy ) inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
......
...@@ -432,6 +432,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -432,6 +432,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
static_cast<const SwFmtVertOrient*>(pItem)->dumpAsXml(writer); static_cast<const SwFmtVertOrient*>(pItem)->dumpAsXml(writer);
break; break;
case RES_HORI_ORIENT:
static_cast<const SwFmtHoriOrient*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break; default: bDone = false; break;
} }
if (bDone) if (bDone)
...@@ -446,13 +449,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -446,13 +449,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue; boost::optional<OString> oValue;
switch (pItem->Which()) switch (pItem->Which())
{ {
case RES_HORI_ORIENT:
{
pWhich = "frame horizontal orientation";
const SwFmtHoriOrient* pOrient = static_cast<const SwFmtHoriOrient*>(pItem);
oValue = "orient: " + OString::number(pOrient->GetHoriOrient()) + ", relation: " + OString::number(pOrient->GetRelationOrient()) + ", position: " + OString::number(pOrient->GetPos());
break;
}
case RES_ANCHOR: case RES_ANCHOR:
{ {
pWhich = "frame anchor"; pWhich = "frame anchor";
......
...@@ -1454,6 +1454,17 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) ...@@ -1454,6 +1454,17 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet; return bRet;
} }
void SwFmtHoriOrient::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtHoriOrient"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nXPos"), BAD_CAST(OString::number(nXPos).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eOrient"), BAD_CAST(OString::number(eOrient).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eRelation"), BAD_CAST(OString::number(eRelation).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bPosToggle"), BAD_CAST(OString::boolean(bPosToggle).getStr()));
xmlTextWriterEndElement(pWriter);
}
// Partially implemented inline in hxx // Partially implemented inline in hxx
SwFmtAnchor::SwFmtAnchor( RndStdIds nRnd, sal_uInt16 nPage ) SwFmtAnchor::SwFmtAnchor( RndStdIds nRnd, sal_uInt16 nPage )
: SfxPoolItem( RES_ANCHOR ), : SfxPoolItem( RES_ANCHOR ),
......
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