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

New commits:
commit 10ad75b5063e8c47f62afe9b6f31565d31630f0c
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Sep 16 08:17:24 2025 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Sep 16 12:26:55 2025 +0200

    sw doc model xml dump: handle SwFlyFrameFormat
    
    Turns out this can have an own title/description which is not on the
    underlying SdrObject, show this.
    
    Change-Id: I536d9d6b65c2eb65140d8aeb3a1ff65cf29f6995
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191014
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index d2a4ad6e6090..fc95a002c037 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -279,6 +279,8 @@ public:
     void SetLastFlyFramePrtRectPos( const Point &rPoint ) { 
m_aLastFlyFramePrtRectPos = rPoint; }
 
     SwFlyDrawContact* GetOrCreateContact();
+
+    void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 //The DrawFrame-Format
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 305eecb9c48c..5a2cd41491e7 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3078,6 +3078,20 @@ SwFlyDrawContact* SwFlyFrameFormat::GetOrCreateContact()
     return m_pContact.get();
 }
 
+void SwFlyFrameFormat::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFlyFrameFormat"));
+    (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", 
this);
+    (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("title"),
+                                      BAD_CAST(msTitle.toUtf8().getStr()));
+    (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("desc"),
+                                      BAD_CAST(msDesc.toUtf8().getStr()));
+
+    sw::SpzFrameFormat::dumpAsXml(pWriter);
+
+    (void)xmlTextWriterEndElement(pWriter);
+}
+
 /// Creates the Frames if the format describes a paragraph-bound frame.
 /// MA: 1994-02-14: creates the Frames also for frames anchored at page.
 void SwFlyFrameFormat::MakeFrames()

Reply via email to