sw/source/core/inc/tabfrm.hxx | 1 - sw/source/core/layout/tabfrm.cxx | 7 ++++++- sw/source/core/text/xmldump.cxx | 10 ---------- 3 files changed, 6 insertions(+), 12 deletions(-)
New commits: commit af4341a0262352efecd772a7390fb2cff544564b Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Aug 11 08:05:11 2023 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 11 09:16:16 2023 +0200 sw: fold SwTabFrame::dumpAsXmlAttributes() into dumpAsXml() One dumpAsXml() per SwFrame subclass is enough, no need to have a separate function that dumps just the attributes. Change-Id: I7341e6a2c71c9a3596f70397c4450206222b76f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155572 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 8fa64bc72bad..28b48e7ec0c9 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -238,7 +238,6 @@ public: sal_uInt16 GetBottomLineSize() const; - virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 8b8242cfe83d..ea2b963f76f9 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -6063,7 +6063,12 @@ bool SwTabFrame::IsCollapsingBorders() const void SwTabFrame::dumpAsXml(xmlTextWriterPtr writer) const { (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("tab")); - dumpAsXmlAttributes(writer); + SwFrame::dumpAsXmlAttributes( writer ); + if ( HasFollow() ) + (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); + + if (m_pPrecede != nullptr) + (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrame*>( m_pPrecede )->GetFrameId() ); (void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); dumpInfosAsXml(writer); diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 402727606fde..29cbd4c5e911 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -322,14 +322,4 @@ void SwSectionFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrame*>( m_pPrecede )->GetFrameId() ); } -void SwTabFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const -{ - SwFrame::dumpAsXmlAttributes( writer ); - if ( HasFollow() ) - (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); - - if (m_pPrecede != nullptr) - (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrame*>( m_pPrecede )->GetFrameId() ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */