include/test/unoapi_test.hxx            |    6 ++++--
 sc/qa/unit/subsequent_export_test3.cxx  |    6 +++---
 sc/qa/unit/subsequent_filters_test3.cxx |    6 +++---
 sc/qa/unit/subsequent_filters_test4.cxx |    2 +-
 sd/qa/unit/export-tests.cxx             |   12 ++++++------
 sw/qa/extras/htmlexport/htmlexport.cxx  |   20 ++++++++++----------
 sw/qa/extras/htmlexport/htmlexport2.cxx |    8 ++++----
 sw/qa/extras/htmlimport/htmlimport.cxx  |   14 +++++++-------
 sw/qa/filter/html/html.cxx              |    8 ++++----
 sw/qa/filter/md/md.cxx                  |   14 +++++++-------
 test/source/unoapi_test.cxx             |    5 +++--
 xmloff/qa/unit/draw.cxx                 |    2 +-
 12 files changed, 53 insertions(+), 50 deletions(-)

New commits:
commit 6675e7893ebe8d59ed3975b1cbd4f3673e66e746
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue Nov 18 16:25:34 2025 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Nov 18 21:11:09 2025 +0100

    UnoApiTest: use TestFilter enum in setImportFilterName too
    
    Change-Id: I16dae720be9dd9dd4bbc2a691d83fa6339f33c2c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194166
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index f5b3e62d48b3..2790f531d774 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -37,6 +37,7 @@ enum class TestFilter
     FODS,
     FODT,
     HTML_CALC,
+    HTML_CALC_WEBQUERY,
     HTML_IMPRESS,
     HTML_WRITER,
     MD,
@@ -80,6 +81,7 @@ const std::unordered_map<TestFilter, OUString> 
TestFilterNames{
     { TestFilter::FODS, u"OpenDocument Spreadsheet Flat XML"_ustr },
     { TestFilter::FODT, u"OpenDocument Text Flat XML"_ustr },
     { TestFilter::HTML_CALC, u"HTML (StarCalc)"_ustr },
+    { TestFilter::HTML_CALC_WEBQUERY, u"calc_HTML_WebQuery"_ustr },
     { TestFilter::HTML_IMPRESS, u"impress_html_Export"_ustr },
     { TestFilter::HTML_WRITER, u"HTML (StarWriter)"_ustr },
     { TestFilter::MD, u"Markdown"_ustr },
@@ -147,7 +149,7 @@ public:
         maImportFilterOptions = rFilterOptions;
     }
 
-    void setImportFilterName(const OUString& rFilterName) { maImportFilterName 
= rFilterName; }
+    void setImportFilterName(TestFilter eFilterName) { meImportFilterName = 
eFilterName; }
 
 protected:
     // reference to document component that we are testing
@@ -171,7 +173,7 @@ private:
     OUString maFilterOptions;
 
     OUString maImportFilterOptions;
-    OUString maImportFilterName;
+    TestFilter meImportFilterName;
 };
 
 inline void assertRectangleEqual(const tools::Rectangle& rExpected, const 
tools::Rectangle& rActual,
diff --git a/sc/qa/unit/subsequent_export_test3.cxx 
b/sc/qa/unit/subsequent_export_test3.cxx
index a460c36275b0..aa5789d03e25 100644
--- a/sc/qa/unit/subsequent_export_test3.cxx
+++ b/sc/qa/unit/subsequent_export_test3.cxx
@@ -1294,13 +1294,13 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, 
testImageWithSpecialID)
 
 CPPUNIT_TEST_FIXTURE(ScExportTest3, testAbsNamedRangeHTML)
 {
-    setImportFilterName(u"calc_HTML_WebQuery"_ustr);
+    setImportFilterName(TestFilter::HTML_CALC_WEBQUERY);
     createScDoc("html/numberformat.html");
     ScDocShell* pDocSh = getScDocShell();
     pDocSh->DoHardRecalc();
 
     //reset import filter
-    setImportFilterName(u"calc8"_ustr);
+    setImportFilterName(TestFilter::ODS);
     saveAndReload(TestFilter::ODS);
     pDocSh = getScDocShell();
     pDocSh->DoHardRecalc();
@@ -2014,7 +2014,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, 
testTdf137020_FlipVertical)
 
 CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf82254_csv_bom)
 {
-    setImportFilterName(SC_TEXT_CSV_FILTER_NAME);
+    setImportFilterName(TestFilter::CSV);
     createScDoc("csv/testTdf82254-csv-bom.csv");
     saveAndReload(TestFilter::CSV);
     ScDocShell* pDocSh = getScDocShell();
diff --git a/sc/qa/unit/subsequent_filters_test3.cxx 
b/sc/qa/unit/subsequent_filters_test3.cxx
index f7fa93e35824..9ea3ab3854c2 100644
--- a/sc/qa/unit/subsequent_filters_test3.cxx
+++ b/sc/qa/unit/subsequent_filters_test3.cxx
@@ -1693,7 +1693,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf98657)
 
 CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf88821)
 {
-    setImportFilterName(u"calc_HTML_WebQuery"_ustr);
+    setImportFilterName(TestFilter::HTML_CALC_WEBQUERY);
     createScDoc("html/tdf88821.html");
     ScDocument* pDoc = getScDoc();
 
@@ -1704,7 +1704,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf88821)
 
 CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf88821_2)
 {
-    setImportFilterName(u"calc_HTML_WebQuery"_ustr);
+    setImportFilterName(TestFilter::HTML_CALC_WEBQUERY);
     createScDoc("html/tdf88821-2.html");
     ScDocument* pDoc = getScDoc();
 
@@ -1716,7 +1716,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf88821_2)
 
 CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf103960)
 {
-    setImportFilterName(u"calc_HTML_WebQuery"_ustr);
+    setImportFilterName(TestFilter::HTML_CALC_WEBQUERY);
     createScDoc("html/tdf103960.html");
     ScDocument* pDoc = getScDoc();
 
diff --git a/sc/qa/unit/subsequent_filters_test4.cxx 
b/sc/qa/unit/subsequent_filters_test4.cxx
index e4f9f5d865f3..88f6f04bc7ca 100644
--- a/sc/qa/unit/subsequent_filters_test4.cxx
+++ b/sc/qa/unit/subsequent_filters_test4.cxx
@@ -312,7 +312,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testChartImportXLS)
 
 CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testNumberFormatHTML)
 {
-    setImportFilterName(u"calc_HTML_WebQuery"_ustr);
+    setImportFilterName(TestFilter::HTML_CALC_WEBQUERY);
     createScDoc("html/numberformat.html");
 
     ScDocument* pDoc = getScDoc();
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index cd2456e6a369..15c867227d8f 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1019,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdf)
     loadFromFile(u"pdf/sample.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     const SdrPage* pPage = GetPage(1);
@@ -1042,7 +1042,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextPos)
     loadFromFile(u"pdf/textheight1.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     xmlDocUniquePtr pXml = parseLayout();
@@ -1073,7 +1073,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont)
     loadFromFile(u"pdf/differentfonts.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     xmlDocUniquePtr pXml = parseLayout();
@@ -1139,7 +1139,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, 
testExplodedPdfGrayscaleImageUnderInvisibleTe
     loadFromFile(u"pdf/GrayscaleImageUnderInvisibleTest.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), 
uno::UNO_QUERY);
@@ -1186,7 +1186,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, 
testExplodedPdfClippedImages)
     loadFromFile(u"pdf/ClippedImages.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), 
uno::UNO_QUERY);
@@ -1216,7 +1216,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, 
testExplodedPdfMissingFontVersion)
     loadFromFile(u"pdf/ErrareHumanumEst.pdf");
 
     
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
-    setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
+    setImportFilterName(TestFilter::FODG);
     saveAndReload(TestFilter::FODG);
 
     const SdrPage* pPage = GetPage(1);
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index c5a9052bf086..4dac93fc04d2 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo81276)
         CPPUNIT_ASSERT(abs(sal_Int32(500) - getProperty<sal_Int32>(xStyle, 
u"BottomMargin"_ustr))
                        < 10);
     };
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("fdo81276.html");
     verify();
     saveAndReload(TestFilter::HTML_WRITER);
@@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo86857)
         CPPUNIT_ASSERT_EQUAL(Color(0x66ffff), getProperty<Color>(xCell, 
u"BackColor"_ustr));
     };
 
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("fdo86857.html");
     verify();
     saveAndReload(TestFilter::HTML_WRITER);
@@ -414,7 +414,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTML)
 CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfParagraph)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-p.xhtml");
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
     save(TestFilter::HTML_WRITER);
@@ -465,7 +465,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleData)
         CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xObjects->getCount());
     };
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-ole-data.xhtml");
     verify();
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
@@ -516,7 +516,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleImg)
     };
 
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-ole-img.xhtml");
     verify();
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
@@ -577,7 +577,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfPngImg)
 CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfJpgImg)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-jpg-img.xhtml");
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
     save(TestFilter::HTML_WRITER);
@@ -593,7 +593,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfJpgImg)
 CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-table.xhtml");
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
     save(TestFilter::HTML_WRITER);
@@ -674,7 +674,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTMLUseCSS)
 CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfList)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-list.xhtml");
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
     save(TestFilter::HTML_WRITER);
@@ -718,7 +718,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2)
     };
 
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-ole2.xhtml");
     verify();
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
@@ -762,7 +762,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2Odg)
         
CPPUNIT_ASSERT(xObject->supportsService(u"com.sun.star.drawing.DrawingDocument"_ustr));
     };
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-ole-odg.xhtml");
     verify();
     setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
diff --git a/sw/qa/extras/htmlexport/htmlexport2.cxx 
b/sw/qa/extras/htmlexport/htmlexport2.cxx
index 9873c15fc1d2..c1fe12df2435 100644
--- a/sw/qa/extras/htmlexport/htmlexport2.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport2.cxx
@@ -981,7 +981,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testHTML_PreserveSpaces)
 
     // Test import
 
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     loadFromURL(maTempFile.GetURL());
     CPPUNIT_ASSERT_EQUAL(paraText, getParagraph(1)->getString());
 }
@@ -1010,7 +1010,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIF_PreserveSpaces)
     // Test import
 
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     loadFromURL(maTempFile.GetURL());
     CPPUNIT_ASSERT_EQUAL(paraText, getParagraph(1)->getString());
 }
@@ -1075,7 +1075,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testHTML_NoPreserveSpaces)
 
     // Test import
 
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     loadFromURL(maTempFile.GetURL());
 
     CPPUNIT_ASSERT_EQUAL(u"No special spaces"_ustr, 
getParagraph(1)->getString());
@@ -1140,7 +1140,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIF_NoPreserveSpaces)
     // Test import
 
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     loadFromURL(maTempFile.GetURL());
 
     CPPUNIT_ASSERT_EQUAL(u"No special spaces"_ustr, 
getParagraph(1)->getString());
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index dc03d4872134..842c5408d82c 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -309,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testOutlineLevel)
 CPPUNIT_TEST_FIXTURE(HtmlImportTest, testReqIfBr)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-br.xhtml");
     // <reqif-xhtml:br/> was not recognized as a line break from a ReqIf file.
     CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("aaa
bbb"));
@@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf80194_subscript)
 CPPUNIT_TEST_FIXTURE(HtmlImportTest, testReqIfTable)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-table.xhtml");
     // to see this: soffice --infilter="HTML (StarWriter):xhtmlns=reqif-xhtml" 
sw/qa/extras/htmlimport/data/reqif-table.xhtml
     // Load a table with xhtmlns=reqif-xhtml filter param.
@@ -463,7 +463,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf118579)
 CPPUNIT_TEST_FIXTURE(HtmlImportTest, testReqIfPageStyle)
 {
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("reqif-page-style.xhtml");
     // Without the accompanying fix in place, this test would have failed with
     // 'Expected: Standard, Actual  : HTML'.
@@ -523,7 +523,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testOleImg)
     // Given an XHTML with an <object> (containing GIF) and an inner <object> 
(containing PNG, to be
     // ignored):
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("ole-img.xhtml");
 
     // Then make sure the result is a single Writer image:
@@ -542,7 +542,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testOleImgSvg)
     // Given an XHTML with an <object> (containing SVG) and an inner <object> 
(containing PNG, to be
     // ignored):
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("ole-img-svg.xhtml");
 
     // Then make sure the result is a single Writer image:
@@ -579,7 +579,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testOleData)
     // Given an XHTML with an <object> (containing non-image, non-OLE2 data) 
and an inner <object>
     // (containing PNG):
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("ole-data.xhtml");
 
     // Then make sure the result is a single clickable Writer image:
@@ -600,7 +600,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testOleData2)
 {
     // Given an XHTML with 2 objects: the first has a link, the second does 
not have:
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("ole-data2.xhtml");
 
     // Then make sure that the second image doesn't have a link set:
diff --git a/sw/qa/filter/html/html.cxx b/sw/qa/filter/html/html.cxx
index 6f9b457a2fb3..51a7ffb2371d 100644
--- a/sw/qa/filter/html/html.cxx
+++ b/sw/qa/filter/html/html.cxx
@@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEmptyParagraph)
 {
     // Given a document with 2 paragraphs, the second is empty:
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("empty-paragraph.xhtml");
 
     // Then make sure that the resulting document has a 2nd empty paragraph:
@@ -62,7 +62,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeKeepAspect)
 {
     // Given a document with an OLE object, width set to 100%, height is not 
set:
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("relative-keep-aspect.xhtml");
 
     // Then make sure that the aspect ratio of the image is kept:
@@ -82,7 +82,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeKeepAspectImage)
 {
     // Given a document with an image, width set to 100%, height is not set:
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("relative-keep-aspect-image.xhtml");
 
     // Then make sure that the aspect ratio of the image is kept:
@@ -223,7 +223,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCenteredTableCSSImport)
 {
     // Given an XHTML file with a centered (with inline CSS) table, when 
importing that document:
     setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
-    setImportFilterName(u"HTML (StarWriter)"_ustr);
+    setImportFilterName(TestFilter::HTML_WRITER);
     createSwDoc("centered-table.xhtml");
 
     // Then make sure that the table is centered:
diff --git a/sw/qa/filter/md/md.cxx b/sw/qa/filter/md/md.cxx
index 10c5521a3393..03e384678bf6 100644
--- a/sw/qa/filter/md/md.cxx
+++ b/sw/qa/filter/md/md.cxx
@@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(Test, testExportingBasicElements)
 
 CPPUNIT_TEST_FIXTURE(Test, testHeading)
 {
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("heading.md");
 
     CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getParagraph(1)->getString());
@@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHeading)
 
 CPPUNIT_TEST_FIXTURE(Test, testList)
 {
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("list.md");
 
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(SVX_NUM_ARABIC), 
getNumberingTypeOfParagraph(1));
@@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(Test, testExportingRedlines)
 
 CPPUNIT_TEST_FIXTURE(Test, testTables)
 {
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("tables.md");
 
     uno::Reference<text::XTextContent> const xtable(getParagraphOrTable(1));
@@ -401,7 +401,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBlockQuoteMdImport)
 {
     // Given a document with a "block quote" 2nd paragraph:
     // When importing that document:
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("quote.md");
 
     // Then make sure that the paragraph style is set correctly:
@@ -538,7 +538,7 @@ CPPUNIT_TEST_FIXTURE(Test, testImageLinkMdImport)
 {
     // Given a document with an image which has a link on it:
     // When importing that document:
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("image-and-link.md");
 
     // Then make sure the link is not lost:
@@ -764,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNestedTableMdExport)
 CPPUNIT_TEST_FIXTURE(Test, testTastListItemsMdImport)
 {
     // Given a document with 2 task list items:
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
 
     // When importing that document from markdown:
     createSwDoc("task-list-items.md");
@@ -840,7 +840,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEmbeddedImageMdImport)
 {
     // Given a document with an embedded image:
     // When importing that document:
-    setImportFilterName("Markdown");
+    setImportFilterName(TestFilter::MD);
     createSwDoc("embedded-image.md");
 
     // Then make sure the embedded image gets imported, with the correct size:
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 30c4b40d3bf4..a3cc8bbd3519 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -27,6 +27,7 @@ using namespace css::uno;
 UnoApiTest::UnoApiTest(OUString path)
     : mbSkipValidation(false)
     , m_aBaseString(std::move(path))
+    , meImportFilterName(TestFilter::NONE)
 {
     maTempFile.EnableKillingFile();
 }
@@ -96,11 +97,11 @@ void UnoApiTest::loadFromURL(OUString const& rURL, const 
char* pPassword)
         aFilterOptions.push_back(aValue);
     }
 
-    if (!maImportFilterName.isEmpty())
+    if (meImportFilterName != TestFilter::NONE)
     {
         beans::PropertyValue aValue;
         aValue.Name = "FilterName";
-        aValue.Value <<= maImportFilterName;
+        aValue.Value <<= TestFilterNames.at(meImportFilterName);
         aFilterOptions.push_back(aValue);
     }
 
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 9587882fe5c9..545686a6cfef 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -1112,7 +1112,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testPdfExportAsOdg)
     // save and reload as odg and fodg
     for (TestFilter eFormat : formats)
     {
-        setImportFilterName(TestFilterNames.at(eFormat));
+        setImportFilterName(eFormat);
         saveAndReload(eFormat);
 
         // Check that the graphic in the second page of the document is the 
second page of the pdf

Reply via email to