cpp.hint                               |    1 
 sw/qa/extras/fodfexport/fodfexport.cxx |   38 +++++++++++++++++++--------------
 sw/qa/inc/swmodeltestbase.hxx          |    1 
 3 files changed, 22 insertions(+), 18 deletions(-)

New commits:
commit 49c0e81e7d25def3ec85b0c06c82053a7246f030
Author:     Xisco Fauli <[email protected]>
AuthorDate: Wed Oct 16 13:35:36 2024 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Oct 16 15:28:13 2024 +0200

    sw: drop DECLARE_FODFEXPORT_TEST macro
    
    Change-Id: I0b232aa689ffc70a2cfca1af5ba5529e34060371
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175015
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/cpp.hint b/cpp.hint
index 727243a3f966..06d157563d7f 100644
--- a/cpp.hint
+++ b/cpp.hint
@@ -58,5 +58,4 @@
 
 #define DECLARE_OOXMLEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
 #define DECLARE_ODFEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
-#define DECLARE_FODFEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
 #define DECLARE_WW8EXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
diff --git a/sw/qa/extras/fodfexport/fodfexport.cxx 
b/sw/qa/extras/fodfexport/fodfexport.cxx
index 0eddb6809609..a24c0c6d63b0 100644
--- a/sw/qa/extras/fodfexport/fodfexport.cxx
+++ b/sw/qa/extras/fodfexport/fodfexport.cxx
@@ -57,28 +57,34 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113696WriterImage)
                          "draw:image[@draw:mime-type='image/png']");
 }
 
-DECLARE_FODFEXPORT_TEST(testSvgImageRoundtrip, "SvgImageTest.fodt")
+CPPUNIT_TEST_FIXTURE(Test, testSvgImageRoundtrip)
 {
     // Related to tdf#123396
+    auto verify = [this]() {
+        // We should have one image (shape)
+        CPPUNIT_ASSERT_EQUAL(1, getShapes());
 
-    // We should have one image (shape)
-    CPPUNIT_ASSERT_EQUAL(1, getShapes());
+        // Get the shape and extract the Graphic
+        uno::Reference<drawing::XShape> xShape = getShape(1);
+        uno::Reference<beans::XPropertySet> XPropertySet(xShape, 
uno::UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(XPropertySet.is());
+        uno::Reference<graphic::XGraphic> xGraphic;
+        XPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
+        CPPUNIT_ASSERT(xGraphic.is());
+        Graphic aGraphic(xGraphic);
 
-    // Get the shape and extract the Graphic
-    uno::Reference<drawing::XShape> xShape = getShape(1);
-    uno::Reference<beans::XPropertySet> XPropertySet(xShape, 
uno::UNO_QUERY_THROW);
-    CPPUNIT_ASSERT(XPropertySet.is());
-    uno::Reference<graphic::XGraphic> xGraphic;
-    XPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
-    CPPUNIT_ASSERT(xGraphic.is());
-    Graphic aGraphic(xGraphic);
+        // The graphic should be SVG - so should contain a VectorGraphicData
+        auto const& pVectorGraphicData = aGraphic.getVectorGraphicData();
+        CPPUNIT_ASSERT(pVectorGraphicData);
 
-    // The graphic should be SVG - so should contain a VectorGraphicData
-    auto const& pVectorGraphicData = aGraphic.getVectorGraphicData();
-    CPPUNIT_ASSERT(pVectorGraphicData);
+        // The VectorGraphicData type should be SVG
+        CPPUNIT_ASSERT_EQUAL(VectorGraphicDataType::Svg, 
pVectorGraphicData->getType());
+    };
 
-    // The VectorGraphicData type should be SVG
-    CPPUNIT_ASSERT_EQUAL(VectorGraphicDataType::Svg, 
pVectorGraphicData->getType());
+    createSwDoc("SvgImageTest.fodt");
+    verify();
+    saveAndReload(mpFilter);
+    verify();
 }
 
 } // end of anonymous namespace
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index e31bcf48860f..765e72002001 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -57,7 +57,6 @@
 
 #define DECLARE_OOXMLEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
 #define DECLARE_ODFEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
-#define DECLARE_FODFEXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
 #define DECLARE_WW8EXPORT_TEST(TestName, filename) 
DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test)
 
 class SwXTextDocument;

Reply via email to