sw/qa/extras/htmlexport/htmlexport.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 63784053ccd321c8f3fc7fe60f4e50fda597f553
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Feb 21 20:23:23 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Feb 22 07:10:28 2023 +0000

    CppunitTest_sw_htmlexport: remove magic SkipImages name handling
    
    Now we call setFilterOptions("SkipImages") everywhere explicitly, so
    preTest() can be simplified.
    
    Change-Id: I4c01f93bae2d9a4a31f3fff82911df4c683b862b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147422
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 9e337d282fdc..443ae8443ba3 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -214,9 +214,7 @@ private:
 
     virtual std::unique_ptr<Resetter> preTest(const char* filename) override
     {
-        if (getTestName().indexOf("SkipImages") != -1)
-            setFilterOptions("SkipImages");
-        else if (getTestName().indexOf("EmbedImages") != -1)
+        if (getTestName().indexOf("EmbedImages") != -1)
             setFilterOptions("EmbedImages");
         else if (getTestName().indexOf("XHTML") != -1)
             setFilterOptions("XHTML");
@@ -453,8 +451,12 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, 
testSkipImagesEmbedded)
     assertXPath(pDoc, "//span/table", 1);
 }
 
-DECLARE_HTMLEXPORT_TEST(testSkipImagesEmbeddedDocument, 
"skipimage-embedded-document.docx")
+CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument)
 {
+    createSwDoc("skipimage-embedded-document.docx");
+    setFilterOptions("SkipImages");
+    save(OUString::createFromAscii(mpFilter));
+
     // Similar to testSkipImagesEmbedded, but with an embedded Writer object,
     // not a Calc one, and this time OOXML, not WW8.
     htmlDocUniquePtr pDoc = parseHtml(maTempFile);

Reply via email to