diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-03-31 07:04:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-03-31 06:02:34 +0000 |
commit | ad811b4441f6f9f8f42114640fea39cf0f3156a5 (patch) | |
tree | 5674f2ef4fd1db10317ca86b15f80cd877d586bb | |
parent | 3db0ff0c49159f9856c259167256f6c5f89931e0 (diff) |
sw layout xml dump: extract SwFootnoteContFrame::dumpAsXml() from SwFrame
Ideally SwFrame should not really know anything about footnote container
frames.
Change-Id: I2745cb74ff503288863439a15b37cec06766d208
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149814
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/source/core/inc/ftnfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 13 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 3 |
3 files changed, 15 insertions, 3 deletions
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index a6835c9a71ba..56061d97c21f 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -64,6 +64,8 @@ public: const SwBorderAttrs&) const override; virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; void PaintLine( const SwRect &, const SwPageFrame * ) const; + + void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; inline SwFootnoteFrame* SwFootnoteContFrame::AppendChained(SwFrame* pThis, bool bDefaultFormat) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 37a53417f1c8..66612ba3b840 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5503,6 +5503,19 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect, rInf.GetLineStyle() ); } +void SwFootnoteContFrame::dumpAsXml(xmlTextWriterPtr writer) const +{ + (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("ftncont")); + dumpAsXmlAttributes(writer); + + (void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); + dumpInfosAsXml(writer); + (void)xmlTextWriterEndElement(writer); + dumpChildrenAsXml(writer); + + (void)xmlTextWriterEndElement(writer); +} + /// Paints the separator line for inside columns void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol, const SwPageFrame *pPage ) const diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 5544943f3dd0..8344ddbea178 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::FtnCont: - name = "ftncont"; - break; case SwFrameType::Ftn: name = "ftn"; break; |