sw/source/core/docnode/nodedump.cxx | 25 ------------------------- sw/source/core/layout/atrfrm.cxx | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-)
New commits: commit d7bb79d804a8268816da0849215782853b22f696 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Feb 12 09:41:54 2015 +0100 Extract SwFrmFmt::dumpAsXml() from docnode ... and move it where ~all the rest of SwFrmFmt methods are implemented. Change-Id: I69dd4456046f8d42b745e47e6fd42b2d45b81819 diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index f291c78..3eed9fa 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -264,31 +264,6 @@ void SwFrmFmts::dumpAsXml(xmlTextWriterPtr w, const char* pName) const } } -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); -} - void SwCharFmts::dumpAsXml(xmlTextWriterPtr w) const { WriterHelper writer(w); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1e224c7..083f884 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits