sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |   22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 078e65cac18fec8729ed8087233caa1655a02d02
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue May 10 20:04:03 2022 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed May 11 08:20:51 2022 +0200

    CppunitTest_sw_ooxmlexport12: avoid mustTestImportOf()
    
    Can use CPPUNIT_TEST_FIXTURE() instead.
    
    See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd
    (CppunitTest_sw_rtfimport: convert one testcase to use
    CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation.
    
    Change-Id: I1f0fdb4947c0a9763d145d4926b37c7576a25cad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134134
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index fcdede363837..8b4fc39dd02d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -27,16 +27,6 @@ public:
         : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML 
Text")
     {
     }
-
-protected:
-    /**
-     * Denylist handling
-     */
-    bool mustTestImportOf(const char* filename) const override
-    {
-        // If the testcase is stored in some other format, it's pointless to 
test.
-        return o3tl::ends_with(filename, ".docx");
-    }
 };
 
 CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference)
@@ -722,8 +712,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112202, 
"090716_Studentische_Arbeit_VWS.docx")
     assertXPath(pXmlDoc, "/root/page[6]/header//anchored", 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf79435_legacyInputFields, 
"tdf79435_legacyInputFields.doc")
+CPPUNIT_TEST_FIXTURE(Test, testTdf79435_legacyInputFields)
 {
+    loadAndReload("tdf79435_legacyInputFields.doc");
     //using .doc input file to verify cross-format compatibility.
     uno::Reference<text::XFormField> xFormField
         = 
getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(5), 3), 
"Bookmark");
@@ -926,8 +917,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
     CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue());
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf138780, "tdf138780.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf138780)
 {
+    loadAndReload("tdf138780.odt");
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     // Paragraphs were not part of a numbering anymore after roundtrip.
     uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), 
uno::UNO_QUERY);
@@ -1971,8 +1963,9 @@ CPPUNIT_TEST_FIXTURE(Test, 
testTdf101122_noFillForCustomShape)
 // - tdf124678_no_leading_paragraph.odt doesn't contain leading empty paragraph
 //   before the first section
 //
-DECLARE_OOXMLEXPORT_TEST(testTdf124678_case1, 
"tdf124678_no_leading_paragraph.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case1)
 {
+    loadAndReload("tdf124678_no_leading_paragraph.odt");
     CPPUNIT_ASSERT_EQUAL(2, getPages());
     CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", OUString(""),
                                  parseDump("/root/page[1]/header/txt"));
@@ -1985,8 +1978,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124678_case1, 
"tdf124678_no_leading_paragraph.od
 // - tdf124678_no_leading_paragraph.odt doesn't contain leading empty paragraph
 //   before the first section
 //
-DECLARE_OOXMLEXPORT_TEST(testTdf124678_case2, 
"tdf124678_with_leading_paragraph.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case2)
 {
+    loadAndReload("tdf124678_with_leading_paragraph.odt");
     CPPUNIT_ASSERT_EQUAL(2, getPages());
     CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", OUString(""),
                                  parseDump("/root/page[1]/header/txt"));

Reply via email to