diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-12 09:41:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-12 09:42:36 +0100 |
commit | d7bb79d804a8268816da0849215782853b22f696 (patch) | |
tree | 255d120cee122d9d5bc729d90bc2e43984184e5e /sw/source/core/layout/atrfrm.cxx | |
parent | 37cbbb4b486c8eeb87f9491e776fc06a234ca6ec (diff) |
Extract SwFrmFmt::dumpAsXml() from docnode
... and move it where ~all the rest of SwFrmFmt methods are implemented.
Change-Id: I69dd4456046f8d42b745e47e6fd42b2d45b81819
Diffstat (limited to 'sw/source/core/layout/atrfrm.cxx')
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1e224c7cde18..083f884b9d78 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2810,6 +2810,31 @@ OUString SwFrmFmt::GetDescription() const return SW_RES(STR_FRAME); } +void SwFrmFmt::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("swFrmFmt")); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetName().toUtf8().getStr())); + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which()); + + const char* pWhich = 0; + switch (Which()) + { + case RES_FLYFRMFMT: + pWhich = "fly frame format"; + break; + case RES_DRAWFRMFMT: + pWhich = "draw frame format"; + break; + } + if (pWhich) + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("which"), BAD_CAST(pWhich)); + + GetAttrSet().dumpAsXml(pWriter); + + xmlTextWriterEndElement(pWriter); +} + // class SwFlyFrmFmt // Partially implemented inline in hxx |