sw/source/core/inc/hffrm.hxx | 2 ++ sw/source/core/layout/hffrm.cxx | 13 +++++++++++++ sw/source/core/text/xmldump.cxx | 3 --- 3 files changed, 15 insertions(+), 3 deletions(-)
New commits: commit c586d7f1f8370c9e6334c6f38b5ed883212945c7 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Mar 23 22:07:25 2023 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Mar 24 07:03:05 2023 +0000 sw layout xml dump: extract SwFooterFrame::dumpAsXml() from SwFrame Ideally SwFrame should not really know anything about footers. Change-Id: I5fe349b0a9bf11f84649d6f274c2620b7563174d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149472 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx index d8f9f0556265..32af4dab9e30 100644 --- a/sw/source/core/inc/hffrm.hxx +++ b/sw/source/core/inc/hffrm.hxx @@ -53,6 +53,8 @@ class SwFooterFrame final : public SwHeadFootFrame { public: SwFooterFrame( SwFrameFormat* pFrame, SwFrame* pSib ) : SwHeadFootFrame(pFrame, pSib, SwFrameType::Footer) {}; + + void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; #endif diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 10c69f9a9bc1..e15b308176df 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -778,4 +778,17 @@ void SwHeaderFrame::dumpAsXml(xmlTextWriterPtr writer) const (void)xmlTextWriterEndElement(writer); } +void SwFooterFrame::dumpAsXml(xmlTextWriterPtr writer) const +{ + (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("footer")); + dumpAsXmlAttributes(writer); + + (void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); + dumpInfosAsXml(writer); + (void)xmlTextWriterEndElement(writer); + dumpChildrenAsXml(writer); + + (void)xmlTextWriterEndElement(writer); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index a7db17625cf9..5544943f3dd0 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -174,9 +174,6 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const switch ( GetType( ) ) { - case SwFrameType::Footer: - name = "footer"; - break; case SwFrameType::FtnCont: name = "ftncont"; break;