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

New commits:
commit 1983695a64c27894fb76bc33bcdc4a2ed9813fc8
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Mar 21 20:22:55 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Mar 22 07:04:28 2023 +0000

    CppunitTest_sw_htmlexport: avoid XHTML magic
    
    Set the filter option explicitly, rather than inferring it from the test
    name.
    
    Change-Id: Idaf476756b477bf55a31598ce67028fcf1c9d4ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149256
    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 9936a101c2ce..f1bbd82f0dd0 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("XHTML") != -1)
-            setFilterOptions("XHTML");
-        else if (getTestName().indexOf("ReqIf") != -1)
+        if (getTestName().indexOf("ReqIf") != -1)
         {
             if (o3tl::ends_with(filename, ".xhtml"))
             {
@@ -854,8 +852,12 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIfTableHeight)
     assertXPathNoAttribute(pDoc, "//reqif-xhtml:td", "height");
 }
 
-DECLARE_HTMLEXPORT_TEST(testXHTMLUseCSS, "xhtml-css.odt")
+CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTMLUseCSS)
 {
+    createSwDoc("xhtml-css.odt");
+    setFilterOptions("XHTML");
+    save(OUString::createFromAscii(mpFilter));
+
     SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
     CPPUNIT_ASSERT(pStream);
     sal_uInt64 nLength = pStream->TellEnd();

Reply via email to