sw/source/core/inc/rowfrm.hxx    |    2 ++
 sw/source/core/layout/tabfrm.cxx |   13 +++++++++++++
 sw/source/core/text/xmldump.cxx  |    3 ---
 3 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 0360b9940833609b80b7cf0dd782f124212b01bb
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu May 25 20:23:55 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri May 26 09:02:39 2023 +0200

    sw layout xml dump: extract SwRowFrame::dumpAsXml() from SwFrame
    
    Ideally SwFrame should not really know anything about row frames.
    
    Change-Id: I31e7cbec7466f9d0677755adb631b63c156b55c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152283
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index ebaae2e1dbc9..a48dacf6a37e 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -122,6 +122,8 @@ public:
     bool IsInSplit() const { return m_bIsInSplit; }
     void SetInSplit(bool bNew = true) { m_bIsInSplit = bNew; }
     void OnFrameSize(const SfxPoolItem&);
+
+    void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override;
 };
 
 #endif
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 10d755d9bbf1..c3ebfacb13f8 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4159,6 +4159,19 @@ void SwRowFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
     SwLayoutFrame::MakeAll(pRenderContext);
 }
 
+void SwRowFrame::dumpAsXml(xmlTextWriterPtr writer) const
+{
+    (void)xmlTextWriterStartElement(writer, reinterpret_cast<const 
xmlChar*>("row"));
+    dumpAsXmlAttributes(writer);
+
+    (void)xmlTextWriterStartElement(writer, BAD_CAST("infos"));
+    dumpInfosAsXml(writer);
+    (void)xmlTextWriterEndElement(writer);
+    dumpChildrenAsXml(writer);
+
+    (void)xmlTextWriterEndElement(writer);
+}
+
 tools::Long CalcHeightWithFlys( const SwFrame *pFrame )
 {
     SwRectFnSet aRectFnSet(pFrame);
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index a37eb6578cc1..4e1016522884 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::Row:
-        name = "row";
-        break;
     case SwFrameType::Cell:
         name = "cell";
         break;

Reply via email to