sw/CppunitTest_sw_macros_test.mk |    5 ++++-
 sw/Library_swui.mk               |    1 +
 sw/inc/frameformats.hxx          |    9 +++++----
 3 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit d1999f23caf47a36786182adbe071619fd60f999
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri May 5 16:39:16 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri May 5 17:47:52 2023 +0200

    sw doc model xml dump: restore lost spzFrameFormatTable section
    
    This was lost in commit b12ff94a771db17843f642a82820b2864bec4744
    (introduce sw::FrameFormats<>, 2023-04-11). It used to be handy that you
    can search for spzFrameFormatTable in a doc model xml dump to quickly
    see how many fly/draw formats the document has, so restore it.
    
    Change-Id: Ia5d83e2f71f589208a7ad5718d5705b17520db5e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151433
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk
index 9cc9b597c9ce..413d04a99cb2 100644
--- a/sw/CppunitTest_sw_macros_test.mk
+++ b/sw/CppunitTest_sw_macros_test.mk
@@ -11,7 +11,10 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,sw_macros_test))
 
-$(eval $(call gb_CppunitTest_use_external,sw_macros_test,boost_headers))
+$(eval $(call gb_CppunitTest_use_externals,sw_macros_test,\
+       boost_headers \
+       libxml2 \
+))
 
 $(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_macros_test))
 
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 81a21d003e19..1f97aa0edd1c 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -34,6 +34,7 @@ $(eval $(call 
gb_Library_set_precompiled_header,swui,sw/inc/pch/precompiled_swui
 $(eval $(call gb_Library_use_externals,swui,\
        boost_headers \
        icu_headers \
+       libxml2 \
 ))
 
 $(eval $(call gb_Library_use_custom_headers,swui,\
diff --git a/sw/inc/frameformats.hxx b/sw/inc/frameformats.hxx
index bdf0a69905b5..4edb1f98b134 100644
--- a/sw/inc/frameformats.hxx
+++ b/sw/inc/frameformats.hxx
@@ -28,6 +28,8 @@
 #include <boost/multi_index/ordered_index.hpp>
 #include <boost/multi_index/random_access_index.hpp>
 #include <boost/multi_index/tag.hpp>
+#include <libxml/xmlstring.h>
+#include <libxml/xmlwriter.h>
 
 class SwFrameFormat;
 class SwTableFormat;
@@ -154,13 +156,12 @@ public:
     const_iterator begin() const { return GetByPos().begin(); }
     const_iterator end() const { return GetByPos().end(); }
 
-    void dumpAsXml(xmlTextWriterPtr pWriter, const char*) const
+    void dumpAsXml(xmlTextWriterPtr pWriter, const char* pName) const
     {
-        // TODO
-        //(void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
+        (void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
         for (const auto pFormat : GetByPos())
             pFormat->dumpAsXml(pWriter);
-        //(void)xmlTextWriterEndElement(pWriter);
+        (void)xmlTextWriterEndElement(pWriter);
     };
 
     virtual size_t GetFormatCount() const override { return 
m_vContainer.size(); }

Reply via email to