include/test/unoapi_test.hxx | 6 - sc/qa/extras/htmlexporttest.cxx | 6 - sc/qa/unit/subsequent_export_test.cxx | 4 sd/qa/unit/export-tests.cxx | 101 +++++++++++++++++------ sw/qa/extras/htmlexport/htmlexport.cxx | 112 +++++++++++++++++--------- sw/qa/extras/htmlexport/htmlexport2.cxx | 10 +- sw/qa/extras/htmlexport/htmlmodeltestbase.hxx | 6 - sw/qa/extras/htmlexport/xhtmlexport.cxx | 56 ++++++++----- sw/qa/extras/odfexport/odfexport.cxx | 4 sw/qa/extras/odfexport/odfexport4.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlencryption.cxx | 8 - sw/qa/extras/txtencexport/txtencexport.cxx | 12 +- sw/qa/filter/html/html.cxx | 19 +++- sw/qa/inc/swmodeltestbase.hxx | 3 sw/qa/unit/swmodeltestbase.cxx | 6 - test/source/unoapi_test.cxx | 8 - xmlsecurity/qa/unit/signing/signing2.cxx | 8 - 17 files changed, 251 insertions(+), 120 deletions(-)
New commits: commit 53d3a02db55e5bca1d78e75829fcea5f4f323741 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Feb 4 10:03:13 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Feb 4 14:27:23 2026 +0100 UnoApiTest: drop setFilterOptions and just pass FilterOptions as a parameter Change-Id: Ie950bd1565e5e6223b232e723bec75409b96420c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198646 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx index 6f7208b488f8..f366555db3f6 100644 --- a/include/test/unoapi_test.hxx +++ b/include/test/unoapi_test.hxx @@ -147,14 +147,15 @@ public: void save(TestFilter eFilter, const css::uno::Sequence<css::beans::PropertyValue>& rParams = {}, const char* pPassword = nullptr); - void saveAndReload(TestFilter eFilter, const char* pPassword = nullptr); + void saveAndReload(TestFilter eFilter, + const css::uno::Sequence<css::beans::PropertyValue>& rParams = {}, + const char* pPassword = nullptr); std::unique_ptr<vcl::pdf::PDFiumDocument> parsePDFExport(const OString& rPassword = OString()); void createTempCopy(std::u16string_view fileName); void skipValidation() { mbSkipValidation = true; } - void setFilterOptions(const OUString& rFilterOptions) { maFilterOptions = rFilterOptions; } void setImportFilterOptions(const OUString& rFilterOptions) { @@ -184,7 +185,6 @@ private: bool mbSkipValidation; OUString m_aBaseString; - OUString maFilterOptions; OUString maImportFilterOptions; TestFilter meImportFilterName; diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx index 24bfe60c024b..31e9ad4a8fda 100644 --- a/sc/qa/extras/htmlexporttest.cxx +++ b/sc/qa/extras/htmlexporttest.cxx @@ -9,6 +9,7 @@ #include <sal/config.h> +#include <comphelper/propertyvalue.hxx> #include <test/htmltesttools.hxx> #include <test/unoapixml_test.hxx> @@ -29,8 +30,9 @@ public: assertXPath(pDoc, "/html/body", 1); assertXPath(pDoc, "/html/body/table/tr/td/img", 1); - setFilterOptions(u"SkipImages"_ustr); - save(TestFilter::HTML_CALC); + save(TestFilter::HTML_CALC, { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"SkipImages"_ustr), + }); pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT (pDoc); diff --git a/sc/qa/unit/subsequent_export_test.cxx b/sc/qa/unit/subsequent_export_test.cxx index e0f3b22b7d5e..231cd0dfa712 100644 --- a/sc/qa/unit/subsequent_export_test.cxx +++ b/sc/qa/unit/subsequent_export_test.cxx @@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testPasswordExport) pDoc->SetValue(0, 0, 0, 1.0); - saveAndReload(aFilterNames[i], /*pPassword*/ "test"); + saveAndReload(aFilterNames[i], /*rParams*/ {}, /*pPassword*/ "test"); pDoc = getScDoc(); double aVal = pDoc->GetValue(0, 0, 0); @@ -258,7 +258,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf134332) ASSERT_DOUBLES_EQUAL(238.0, pDoc->GetValue(ScAddress(0, 10144, 0))); - saveAndReload(TestFilter::ODS, /*pPassword*/ "test"); + saveAndReload(TestFilter::ODS, /*rParams*/ {}, /*pPassword*/ "test"); // Without the fixes in place, it would have failed here pDoc = getScDoc(); diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 5e7f2344ac68..822004ad2e82 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -12,6 +12,7 @@ #include "sdmodeltestbase.hxx" #include <sdpage.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/scopeguard.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/sequence.hxx> @@ -565,7 +566,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testImpressPasswordExport) { createSdImpressDoc(); - saveAndReload(vFormat[i], /*pPassword*/ "test"); + saveAndReload(vFormat[i], /*rParams*/ {}, /*pPassword*/ "test"); } } @@ -573,7 +574,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDrawPasswordExport) { createSdDrawDoc(); - saveAndReload(TestFilter::ODG, /*pPassword*/ "test"); + saveAndReload(TestFilter::ODG, /*rParams*/ {}, /*pPassword*/ "test"); } CPPUNIT_TEST_FIXTURE(SdExportTest, testSwappedOutImageExport) @@ -1020,9 +1021,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdf) loadFromFile(u"pdf/sample.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); const SdrPage* pPage = GetPage(1); @@ -1043,9 +1048,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextPos) loadFromFile(u"pdf/textheight1.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXml = parseLayout(); sal_Int32 x = getXPath(pXml, "//textarray[1]", "x").toInt32(); @@ -1074,9 +1083,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont) loadFromFile(u"pdf/differentfonts.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXml = parseLayout(); { @@ -1113,8 +1126,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi) loadFromFile(u"pdf/BasicHindi.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); @@ -1140,9 +1157,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfGrayscaleImageUnderInvisibleTe loadFromFile(u"pdf/GrayscaleImageUnderInvisibleTest.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xGroupShape.is()); @@ -1187,9 +1208,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfClippedImages) loadFromFile(u"pdf/ClippedImages.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xGroupShape.is()); @@ -1217,9 +1242,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfMissingFontVersion) loadFromFile(u"pdf/ErrareHumanumEst.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); + saveAndReload(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); const SdrPage* pPage = GetPage(1); @@ -1242,8 +1271,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfEmbeddedFonts) loadFromFile(u"pdf/sciencejournalsource.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); @@ -1263,8 +1296,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfPatternStroke) loadFromFile(u"pdf/pattern-stroke.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); @@ -1283,8 +1320,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfPatternFill) loadFromFile(u"pdf/pattern-fill.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); @@ -1305,8 +1346,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testPdfPageMasterOrientation) loadFromFile(u"pdf/SampleSlideDeck.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); @@ -1327,8 +1372,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextShear) loadFromFile(u"pdf/textshear.pdf"); - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); + save(TestFilter::FODG, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"_ustr), + }); xmlDocUniquePtr pXmlDoc = parseExportedFile(); diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index c41c1eb5324f..49775639e11c 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -161,8 +161,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImages) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImagesWithSkipImagesEnabled) { createSwDoc("textAndImage.docx"); - setFilterOptions(u"SkipImages"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"SkipImages"_ustr), + }); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -174,8 +176,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImagesWithSkipImagesEnabled) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbedded) { createSwDoc("skipimage-embedded.doc"); - setFilterOptions(u"SkipImages"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"SkipImages"_ustr), + }); // Embedded spreadsheet was exported as image, so content was lost. Make // sure it's exported as HTML instead. @@ -193,8 +197,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbedded) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument) { createSwDoc("skipimage-embedded-document.docx"); - setFilterOptions(u"SkipImages"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"SkipImages"_ustr), + }); // Similar to testSkipImagesEmbedded, but with an embedded Writer object, // not a Calc one, and this time OOXML, not WW8. @@ -376,8 +382,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNormalImageExport) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testEmbedImagesEnabled) { createSwDoc("textAndImage.docx"); - setFilterOptions(u"EmbedImages"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"EmbedImages"_ustr), + }); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -395,8 +403,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testEmbedImagesEnabled) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTML) { createSwWebDoc("hello.html"); - setFilterOptions(u"XHTML"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"XHTML"_ustr), + }); OString aExpected("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML"_ostr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); @@ -416,8 +426,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfParagraph) setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-p.xhtml"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -468,8 +480,11 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleData) setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-ole-data.xhtml"); verify(); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(TestFilter::HTML_WRITER); + saveAndReload( + TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); verify(); } @@ -519,8 +534,11 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleImg) setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-ole-img.xhtml"); verify(); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(TestFilter::HTML_WRITER); + saveAndReload( + TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); verify(); // "type" attribute was missing for the inner <object> element. @@ -578,8 +596,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfJpgImg) setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-jpg-img.xhtml"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -594,8 +614,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable) setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-table.xhtml"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -617,8 +639,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable2) { createSwDoc("reqif-table2.odt"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -657,8 +681,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfTableHeight) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTMLUseCSS) { createSwDoc("xhtml-css.odt"); - setFilterOptions(u"XHTML"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"XHTML"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -675,8 +701,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfList) setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-list.xhtml"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -720,8 +748,11 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2) setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-ole2.xhtml"); verify(); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(TestFilter::HTML_WRITER); + saveAndReload( + TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); verify(); // Check that the replacement graphic is exported at RTF level. @@ -764,8 +795,11 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2Odg) setImportFilterName(TestFilter::HTML_WRITER); createSwDoc("reqif-ole-odg.xhtml"); verify(); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(TestFilter::HTML_WRITER); + saveAndReload( + TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); verify(); } @@ -817,8 +851,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTransparentImageReqIf) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testOleNodataReqIf) { createSwDoc("reqif-ole-nodata.odt"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); // This failed, io::IOException was thrown during the filter() call. xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -834,8 +870,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testOleNodataReqIf) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNoLangReqIf) { createSwDoc("reqif-no-lang.odt"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -878,8 +916,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf132739) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShadeReqIf) { createSwDoc("field-shade-reqif.odt"); - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); diff --git a/sw/qa/extras/htmlexport/htmlexport2.cxx b/sw/qa/extras/htmlexport/htmlexport2.cxx index 72dd217512c4..8f0cc3ceb735 100644 --- a/sw/qa/extras/htmlexport/htmlexport2.cxx +++ b/sw/qa/extras/htmlexport/htmlexport2.cxx @@ -131,9 +131,13 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testJson) xDrawPageSupplier->getDrawPage()->add(xShape); // When exporting to HTML, and specifying options as JSON: - setFilterOptions(u"{\"XhtmlNs\":{\"type\":\"string\", \"value\":\"reqif-xhtml\"}," - "\"ShapeDPI\":{\"type\":\"long\",\"value\":\"192\"}}"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue( + u"FilterOptions"_ustr, + u"{\"XhtmlNs\":{\"type\":\"string\", \"value\":\"reqif-xhtml\"}," + "\"ShapeDPI\":{\"type\":\"long\",\"value\":\"192\"}}"_ustr), + }); // Then make sure those options are not ignored: // Without the accompanying fix in place, this test would have failed, as GetPngPath() expects diff --git a/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx b/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx index e144d039ab96..9cfcbcd0db4f 100644 --- a/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx +++ b/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx @@ -207,8 +207,10 @@ void SwHtmlDomExportTest::ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryS void SwHtmlDomExportTest::ExportToReqif() { - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); } void SwHtmlDomExportTest::ImportFromReqif(const OUString& rUrl) diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx index 3bc10238985e..bdbc64193078 100644 --- a/sw/qa/extras/htmlexport/xhtmlexport.cxx +++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx @@ -11,6 +11,7 @@ #include <swmodeltestbase.hxx> #include <test/htmltesttools.hxx> +#include <comphelper/propertyvalue.hxx> namespace { @@ -26,8 +27,11 @@ public: CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testImageEmbedding) { createSwDoc("image-mimetype.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); + htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -40,8 +44,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testImageEmbedding) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf131812) { createSwDoc("tdf131812.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -55,8 +61,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf131812) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf146264) { createSwDoc("tdf146264.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -74,8 +82,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf146264) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf167910) { createSwDoc("tdf167910.fodt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -104,8 +114,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf167910) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf118637) { createSwDoc("tdf118637.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -117,8 +129,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf118637) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf145361) { createSwDoc("tdf145361.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); // Without the fix in place, this test would have failed with // - SfxBaseModel::impl_store <file:///tmp/lu66091ameq.tmp> failed: 0xc10(Error Area:Io Class:Write Code:16) SvStream* pStream = maTempFile.GetStream(StreamMode::READ); @@ -132,8 +146,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf145361) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf142483) { createSwDoc("tdf142483.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -171,8 +187,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf142483) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf107696) { createSwDoc("tdf107696.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -201,8 +219,10 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf107696) CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf66305) { createSwDoc("tdf66305.odt"); - setFilterOptions(u"UTF8"_ustr); - save(TestFilter::XHTML_WRITER); + save(TestFilter::XHTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8"_ustr), + }); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 59d5dd657819..03c31089bd95 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -490,7 +490,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Correct) CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); - saveAndReload(TestFilter::ODT, sPass); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); @@ -504,7 +504,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong) CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); - saveAndReload(TestFilter::ODT, sPass); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); diff --git a/sw/qa/extras/odfexport/odfexport4.cxx b/sw/qa/extras/odfexport/odfexport4.cxx index 63a9e25e119d..3399bb0f8691 100644 --- a/sw/qa/extras/odfexport/odfexport4.cxx +++ b/sw/qa/extras/odfexport/odfexport4.cxx @@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165115) { // Test saving a template file with password protection createSwDoc(); - saveAndReload(TestFilter::OTT, "test"); + saveAndReload(TestFilter::OTT, /*rParams*/ {}, /*pPassword*/ "test"); } CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName) diff --git a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx index 651c72bf9a79..f288d9e56193 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx @@ -26,7 +26,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2007) // Standard encryption format, AES 128, SHA1 uno::Reference<text::XTextRange> xParagraph(getParagraph(1)); CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString()); - saveAndReload(TestFilter::DOCX, sPass); + saveAndReload(TestFilter::DOCX, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString()); } @@ -36,7 +36,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2010) createSwDoc("Encrypted_MSO2010_abc.docx", sPass); // Agile encryption format, AES 128, CBC, SHA1 CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString()); - saveAndReload(TestFilter::DOCX, sPass); + saveAndReload(TestFilter::DOCX, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString()); } @@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2013) // Agile encryption format, AES 256, CBC, SHA512 uno::Reference<text::XTextRange> xParagraph(getParagraph(1)); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString()); - saveAndReload(TestFilter::DOCX, sPass); + saveAndReload(TestFilter::DOCX, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString()); } @@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordLOStandard) // Standard encryption format, AES 128, SHA1 uno::Reference<text::XTextRange> xParagraph(getParagraph(1)); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString()); - saveAndReload(TestFilter::DOCX, sPass); + saveAndReload(TestFilter::DOCX, /*rParams*/ {}, sPass); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString()); } diff --git a/sw/qa/extras/txtencexport/txtencexport.cxx b/sw/qa/extras/txtencexport/txtencexport.cxx index 3871a62bb747..032024969e53 100644 --- a/sw/qa/extras/txtencexport/txtencexport.cxx +++ b/sw/qa/extras/txtencexport/txtencexport.cxx @@ -8,6 +8,7 @@ */ #include <swmodeltestbase.hxx> +#include <comphelper/propertyvalue.hxx> namespace { @@ -39,8 +40,10 @@ protected: CPPUNIT_TEST_FIXTURE(TxtEncExportTest, testBulletsNotHidden) { createSwDoc("bullets.odt"); - setFilterOptions(u"UTF8,,,,"_ustr); - save(TestFilter::TEXT_ENCODED); + save(TestFilter::TEXT_ENCODED, { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8,,,,"_ustr), + }); + OString aData = readExportedFile(); OUString aString = OStringToOUString( @@ -68,8 +71,9 @@ CPPUNIT_TEST_FIXTURE(TxtEncExportTest, testBulletsNotHidden) CPPUNIT_TEST_FIXTURE(TxtEncExportTest, testBulletsHidden) { createSwDoc("bullets.odt"); - setFilterOptions(u"UTF8,,,,,false"_ustr); - save(TestFilter::TEXT_ENCODED); + save(TestFilter::TEXT_ENCODED, { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"UTF8,,,,,false"_ustr), + }); OString aData = readExportedFile(); OUString aString = OStringToOUString( diff --git a/sw/qa/filter/html/html.cxx b/sw/qa/filter/html/html.cxx index 51a7ffb2371d..0ef77459d48d 100644 --- a/sw/qa/filter/html/html.cxx +++ b/sw/qa/filter/html/html.cxx @@ -14,6 +14,7 @@ #include <vcl/gdimtf.hxx> +#include <comphelper/propertyvalue.hxx> #include <docsh.hxx> #include <fmtfsize.hxx> #include <frameformats.hxx> @@ -117,8 +118,10 @@ CPPUNIT_TEST_FIXTURE(Test, testSvmImageExport) xBodyText->insertTextContent(xCursor, xTextContent, false); // When exporting to reqif: - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); // Then make sure we only export PNG: xmlDocUniquePtr pXmlDoc = WrapReqifFromTempFile(); @@ -148,8 +151,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTableCellFloatValueType) pBoxFormat->GetDoc().SetAttr(aSet, *pBoxFormat); // When exporting to XHTML: - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); // Then make sure that the sdval attribute is omitted, which is not in the XHTML spec: xmlDocUniquePtr pXmlDoc = WrapReqifFromTempFile(); @@ -206,8 +211,10 @@ CPPUNIT_TEST_FIXTURE(Test, testCenteredTableCSSExport) pWrtShell->SetTableAttr(aSet); // When exporting to XHTML: - setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(TestFilter::HTML_WRITER); + save(TestFilter::HTML_WRITER, + { + comphelper::makePropertyValue(u"FilterOptions"_ustr, u"xhtmlns=reqif-xhtml"_ustr), + }); // Then make sure that CSS is used to horizontally position the table: xmlDocUniquePtr pXmlDoc = WrapReqifFromTempFile(); diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index 51c2efafbef4..842cd960cff7 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -179,7 +179,8 @@ protected: /// Get TextFrame by name css::uno::Reference<css::drawing::XShape> getTextFrameByName(const OUString& aName); - void saveAndReload(TestFilter eFilter, const char* pPassword = nullptr); + void saveAndReload(TestFilter eFilter, const css::uno::Sequence<css::beans::PropertyValue>& rParams = {}, + const char* pPassword = nullptr); /// Get page count. int getPages() const; diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index e6911497644c..ae42c7c3264d 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -384,9 +384,11 @@ void SwModelTestBase::loadURL(OUString const& rURL, const char* pPassword) calcLayout(); } -void SwModelTestBase::saveAndReload(TestFilter eFilter, const char* pPassword) +void SwModelTestBase::saveAndReload(TestFilter eFilter, + const css::uno::Sequence<css::beans::PropertyValue>& rParams, + const char* pPassword) { - save(eFilter, /*rParams*/ {}, pPassword); + save(eFilter, rParams, pPassword); loadURL(maTempFile.GetURL(), pPassword); } diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index f97eaa01ba25..f381a00fc6f0 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -329,8 +329,6 @@ void UnoApiTest::save(TestFilter eFilter, const uno::Sequence<beans::PropertyVal if (rParams.hasElements()) aMediaDescriptor.update(rParams); - if (!maFilterOptions.isEmpty()) - aMediaDescriptor[u"FilterOptions"_ustr] <<= maFilterOptions; if (pPassword) { @@ -360,9 +358,11 @@ void UnoApiTest::save(TestFilter eFilter, const uno::Sequence<beans::PropertyVal validate(maTempFile.GetFileName(), eFilter); } -void UnoApiTest::saveAndReload(TestFilter eFilter, const char* pPassword) +void UnoApiTest::saveAndReload(TestFilter eFilter, + const uno::Sequence<beans::PropertyValue>& rParams, + const char* pPassword) { - save(eFilter, /*rParams*/ {}, pPassword); + save(eFilter, rParams, pPassword); loadFromURL(maTempFile.GetURL(), pPassword); } diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx index 6fd6d1f2e549..58cd7a4618a6 100644 --- a/xmlsecurity/qa/unit/signing/signing2.cxx +++ b/xmlsecurity/qa/unit/signing/signing2.cxx @@ -132,7 +132,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODF13) comphelper::ScopeGuard g([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); }); SetODFDefaultVersion(SvtSaveOptions::ODFVER_013); - saveAndReload(TestFilter::ODT, "password"); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, /*pPassword*/ "password"); xmlDocUniquePtr pXmlDoc = parseExport(u"META-INF/manifest.xml"_ustr); assertXPath(pXmlDoc, "/manifest:manifest", "version", u"1.3"); @@ -180,7 +180,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODF13) { // store it with new wholesome ODF extended encryption - reload - saveAndReload(TestFilter::ODT, "password"); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, /*pPassword*/ "password"); // test wholesome ODF extended encryption xmlDocUniquePtr pXmlDoc = parseExport(u"META-INF/manifest.xml"_ustr); @@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODFWholesom { // store it with new wholesome ODF extended encryption - reload - saveAndReload(TestFilter::ODT, "password"); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, /*pPassword*/ "password"); // test wholesome ODF extended encryption xmlDocUniquePtr pXmlDoc = parseExport(u"META-INF/manifest.xml"_ustr); @@ -317,7 +317,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODFWholesom comphelper::ScopeGuard g([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); }); SetODFDefaultVersion(SvtSaveOptions::ODFVER_013); - saveAndReload(TestFilter::ODT, "password"); + saveAndReload(TestFilter::ODT, /*rParams*/ {}, /*pPassword*/ "password"); xmlDocUniquePtr pXmlDoc = parseExport(u"META-INF/manifest.xml"_ustr); assertXPath(pXmlDoc, "/manifest:manifest", "version", u"1.3");
