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

New commits:
commit d59b4fd985f147eda04746e27678762598add6f4
Author:     Miklos Vajna <[email protected]>
AuthorDate: Tue Sep 16 08:17:24 2025 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Sep 16 18:33:08 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/+/191039
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 43f94cfaf7e8..2644f912a4d0 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -269,6 +269,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 cc5bcf24599f..3fd54049de1b 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3052,6 +3052,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