sw/source/core/inc/tabfrm.hxx | 1 + sw/source/core/layout/tabfrm.cxx | 13 +++++++++++++ sw/source/core/text/xmldump.cxx | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-)
New commits: commit 85c0bf2e6d851ca53dc200c7c36c4419115636b9 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu May 18 20:17:03 2023 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri May 19 08:58:24 2023 +0200 sw layout xml dump: extract SwTabFrame::dumpAsXml() from SwFrame Ideally SwFrame should not really know anything about table frames. Change-Id: I8d7902e1e80124aa7e09cebc823d9e2bb1425ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151982 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 4fa1c54d27d0..7e7a590c7907 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -239,6 +239,7 @@ public: sal_uInt16 GetBottomLineSize() const; virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; + void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; inline const SwFrame *SwTabFrame::FindLastContentOrTable() const diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 5ce99f43023d..c711f62ba67c 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5965,6 +5965,19 @@ bool SwTabFrame::IsCollapsingBorders() const return GetFormat()->GetAttrSet().Get( RES_COLLAPSING_BORDERS ).GetValue(); } +void SwTabFrame::dumpAsXml(xmlTextWriterPtr writer) const +{ + (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("tab")); + dumpAsXmlAttributes(writer); + + (void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); + dumpInfosAsXml(writer); + (void)xmlTextWriterEndElement(writer); + dumpChildrenAsXml(writer); + + (void)xmlTextWriterEndElement(writer); +} + /// Local helper function to calculate height of first text row static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine ) { diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 622dae730d88..a37eb6578cc1 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::Tab: - name = "tab"; - break; case SwFrameType::Row: name = "row"; break;