sw/inc/fmthdft.hxx | 1 + sw/source/core/layout/atrfrm.cxx | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit 0f8329d83426e03309b4bc3a0a71179ad7a0f0ae Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Sep 6 08:17:11 2024 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Sep 6 09:44:00 2024 +0200 sw doc model xml dump: show start node of headers Without this, it's hard to see which header node section belongs to the header of which page desc. Change-Id: I9994b511c8df7b992350a13ac1cf4fcf875c49ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172930 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx index 02a608c15c87..731e46b490b2 100644 --- a/sw/inc/fmthdft.hxx +++ b/sw/inc/fmthdft.hxx @@ -56,6 +56,7 @@ public: void RegisterToFormat( SwFormat& rFormat ); bool IsActive() const { return m_bActive; } + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; /**Footer, for pageformats diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 58b48777d1ef..ec9f7633a141 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -551,6 +551,20 @@ void SwFormatHeader::RegisterToFormat( SwFormat& rFormat ) rFormat.Add(*this); } +void SwFormatHeader::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatHeader")); + SfxPoolItem::dumpAsXml(pWriter); + + const SwFrameFormat* pHeaderFormat = GetHeaderFormat(); + if (pHeaderFormat) + { + pHeaderFormat->dumpAsXml(pWriter); + } + + (void)xmlTextWriterEndElement(pWriter); +} + // Partially implemented inline in hxx SwFormatFooter::SwFormatFooter( SwFrameFormat *pFooterFormat ) : SfxPoolItem( RES_FOOTER, SfxItemType::SwFormatFooterType ),