diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-06-28 20:14:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-06-29 08:46:44 +0200 |
commit | 91d09185ca21d95f0c70f386bfaafc1c080ded0b (patch) | |
tree | 22db70c65d63eaa5230362ccc7fb06b8dc1670d1 /sw | |
parent | 61f5c991a97de8990badfed6ef840941b5aa8c7f (diff) |
CppunitTest_sw_ooxmlexport17: 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: I12ac2b9764f270ecc516439c58a017bd61e87897
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136587
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index bcd34ff459a2..75d7b8feb4ba 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -39,15 +39,6 @@ class Test : public SwModelTestBase { public: Test() : SwModelTestBase(DATA_DIRECTORY, "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"); - } }; DECLARE_OOXMLEXPORT_TEST(testTdf135164_cancelledNumbering, "tdf135164_cancelledNumbering.docx") @@ -565,8 +556,9 @@ DECLARE_OOXMLEXPORT_TEST(TestWPGZOrder, "testWPGZOrder.docx") } } -DECLARE_OOXMLEXPORT_TEST(testTdf148720, "tdf148720.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf148720) { + loadAndReload("tdf148720.odt"); const auto& pLayout = parseLayoutDump(); const OString sShapeXPaths[] = @@ -900,8 +892,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf144563, "tdf144563.docx") // broken test document? #if !defined(_WIN32) -DECLARE_OOXMLEXPORT_TEST(testTdf146955, "tdf146955.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf146955) { + loadAndReload("tdf146955.odt"); // import of a (broken?) DOCX export with dozens of frames raised a SAX exception, // when the code tried to access to a non-existent footnote uno::Reference<text::XFootnotesSupplier> xNotes(mxComponent, uno::UNO_QUERY); @@ -909,8 +902,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146955, "tdf146955.odt") } #endif -DECLARE_OOXMLEXPORT_TEST(testTdf144668, "tdf144668.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf144668) { + loadAndReload("tdf144668.odt"); uno::Reference<beans::XPropertySet> xPara1(getParagraph(1, u"level1"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("[0001]"), getProperty<OUString>(xPara1, "ListLabelString")); |