sw/inc/fmthdft.hxx               |    1 +
 sw/source/core/layout/atrfrm.cxx |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit d04844f42022f0675f188f8f21881779d0afbbc6
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri Aug 30 08:21:20 2024 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Aug 30 09:35:03 2024 +0200

    sw doc model xml dump: show start node of footers
    
    Without this, it's hard to see which footer node section belongs to the
    footer of which page desc.
    
    Change-Id: I6fb4158684f6f6ae38293df4e7d982c5d8fddf72
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172625
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index fb68df76c0fa..02a608c15c87 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -87,6 +87,7 @@ public:
 
     void RegisterToFormat( SwFormat& rFormat );
     bool IsActive() const { return m_bActive; }
+    void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 inline const SwFormatHeader &SwAttrSet::GetHeader(bool bInP) const
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 128fc74aa629..b24905273b29 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -596,6 +596,20 @@ SwFormatFooter* SwFormatFooter::Clone( SfxItemPool* ) const
     return new SwFormatFooter( *this );
 }
 
+void SwFormatFooter::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatFooter"));
+    SfxPoolItem::dumpAsXml(pWriter);
+
+    const SwFrameFormat* pFooterFormat = GetFooterFormat();
+    if (pFooterFormat)
+    {
+        pFooterFormat->dumpAsXml(pWriter);
+    }
+
+    (void)xmlTextWriterEndElement(pWriter);
+}
+
 // Partially implemented inline in hxx
 SwFormatContent::SwFormatContent( const SwFormatContent &rCpy )
     : SfxPoolItem( RES_CNTNT, SfxItemType::SwFormatContentType )

Reply via email to