sw/qa/extras/docbookexport/docbookexport.cxx | 6 sw/qa/extras/embedded_fonts/embedded_fonts.cxx | 2 sw/qa/extras/fodfexport/fodfexport.cxx | 5 sw/qa/extras/htmlexport/htmlexport.cxx | 76 +++++----- sw/qa/extras/htmlexport/htmlexport2.cxx | 8 - sw/qa/extras/htmlexport/htmlmodeltestbase.hxx | 2 sw/qa/extras/htmlexport/xhtmlexport.cxx | 20 +- sw/qa/extras/htmlimport/htmlimport.cxx | 4 sw/qa/extras/mailmerge/mailmergetestbase.cxx | 2 sw/qa/extras/odfexport/odfexport.cxx | 60 ++++---- sw/qa/extras/odfexport/odfexport2.cxx | 48 +++--- sw/qa/extras/odfexport/odfexport3.cxx | 32 ++-- sw/qa/extras/odfexport/odfexport4.cxx | 76 +++++----- sw/qa/extras/odfimport/odffeatures.cxx | 2 sw/qa/extras/odfimport/odfimport.cxx | 2 sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlencryption.cxx | 10 - sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 76 +++++----- sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 22 +-- sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 36 ++--- sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 142 ++++++++++---------- sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 78 +++++------ sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 48 +++--- sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 88 ++++++------ sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 66 ++++----- sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 34 ++-- sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 54 +++---- sw/qa/extras/ooxmlexport/ooxmlexport19.cxx | 28 +-- sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 62 ++++---- sw/qa/extras/ooxmlexport/ooxmlexport20.cxx | 112 +++++++-------- sw/qa/extras/ooxmlexport/ooxmlexport21.cxx | 44 +++--- sw/qa/extras/ooxmlexport/ooxmlexport22.cxx | 44 +++--- sw/qa/extras/ooxmlexport/ooxmlexport23.cxx | 68 ++++----- sw/qa/extras/ooxmlexport/ooxmlexport24.cxx | 44 +++--- sw/qa/extras/ooxmlexport/ooxmlexport25.cxx | 26 +-- sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 90 ++++++------ sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 134 +++++++++---------- sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 102 +++++++------- sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 82 +++++------ sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 96 ++++++------- sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 8 - sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 42 ++--- sw/qa/extras/ooxmlexport/ooxmlexport_de_locale.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport_template.cxx | 5 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 136 +++++++++---------- sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 18 +- sw/qa/extras/ooxmlexport/ooxmlw14export.cxx | 22 +-- sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 2 sw/qa/extras/rtfexport/rtfexport.cxx | 120 ++++++++--------- sw/qa/extras/rtfexport/rtfexport2.cxx | 148 ++++++++++----------- sw/qa/extras/rtfexport/rtfexport3.cxx | 72 +++++----- sw/qa/extras/rtfexport/rtfexport4.cxx | 74 +++++----- sw/qa/extras/rtfexport/rtfexport5.cxx | 122 ++++++++--------- sw/qa/extras/rtfexport/rtfexport6.cxx | 118 ++++++++-------- sw/qa/extras/rtfexport/rtfexport7.cxx | 114 ++++++++-------- sw/qa/extras/rtfexport/rtfexport8.cxx | 88 ++++++------ sw/qa/extras/rtfimport/rtfimport.cxx | 2 sw/qa/extras/rtfimport/rtfimport2.cxx | 2 sw/qa/extras/txtencexport/txtencexport.cxx | 6 sw/qa/extras/txtexport/txtexport.cxx | 14 - sw/qa/extras/txtimport/txtimport.cxx | 2 sw/qa/extras/uiwriter/uiwriter9.cxx | 2 sw/qa/extras/unowriter/unowriter.cxx | 2 sw/qa/extras/ww8export/ww8export.cxx | 38 ++--- sw/qa/extras/ww8export/ww8export2.cxx | 34 ++-- sw/qa/extras/ww8export/ww8export3.cxx | 46 +++--- sw/qa/extras/ww8export/ww8export4.cxx | 34 ++-- sw/qa/extras/ww8import/ww8import.cxx | 2 sw/qa/filter/html/html.cxx | 2 sw/qa/filter/md/md.cxx | 40 ++--- sw/qa/filter/xml/xml.cxx | 2 sw/qa/inc/swmodeltestbase.hxx | 19 +- sw/qa/unit/swmodeltestbase.cxx | 13 - 74 files changed, 1640 insertions(+), 1646 deletions(-)
New commits: commit c2f0d0a83358e7142bba9c16a7863a4500fc9118 Author: Xisco Fauli <[email protected]> AuthorDate: Mon Nov 17 17:25:06 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Nov 18 08:56:59 2025 +0100 SwModelTestBase: drop mpFilter in preparation for a follow-up commit Change-Id: I1e92cf6c938d654b0d22b093829baa78d1c6228f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194115 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/docbookexport/docbookexport.cxx b/sw/qa/extras/docbookexport/docbookexport.cxx index e7543d99577e..c7af794bcb75 100644 --- a/sw/qa/extras/docbookexport/docbookexport.cxx +++ b/sw/qa/extras/docbookexport/docbookexport.cxx @@ -15,14 +15,14 @@ class DocbookExportTest : public SwModelTestBase { public: DocbookExportTest() : - SwModelTestBase(u"/sw/qa/extras/docbookexport/data/"_ustr, u"DocBook File"_ustr) + SwModelTestBase(u"/sw/qa/extras/docbookexport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(DocbookExportTest, testsimple) { createSwDoc("simple.docx"); - save(mpFilter); + save(u"DocBook File"_ustr); xmlDocUniquePtr pDoc = parseXml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -33,7 +33,7 @@ CPPUNIT_TEST_FIXTURE(DocbookExportTest, testsimple) CPPUNIT_TEST_FIXTURE(DocbookExportTest, testtdf91095) { createSwDoc("tdf91095.docx"); - save(mpFilter); + save(u"DocBook File"_ustr); xmlDocUniquePtr pDoc = parseXml(maTempFile); CPPUNIT_ASSERT(pDoc); } diff --git a/sw/qa/extras/embedded_fonts/embedded_fonts.cxx b/sw/qa/extras/embedded_fonts/embedded_fonts.cxx index aefc57c9f09f..8fd1c9e6d99b 100644 --- a/sw/qa/extras/embedded_fonts/embedded_fonts.cxx +++ b/sw/qa/extras/embedded_fonts/embedded_fonts.cxx @@ -36,7 +36,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/embedded_fonts/data/"_ustr, u"writer8"_ustr) + : SwModelTestBase(u"/sw/qa/extras/embedded_fonts/data/"_ustr) { } }; diff --git a/sw/qa/extras/fodfexport/fodfexport.cxx b/sw/qa/extras/fodfexport/fodfexport.cxx index 97d9bcdfca5b..a4a83545adcc 100644 --- a/sw/qa/extras/fodfexport/fodfexport.cxx +++ b/sw/qa/extras/fodfexport/fodfexport.cxx @@ -17,8 +17,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/fodfexport/data/"_ustr, - u"OpenDocument Text Flat XML"_ustr) + : SwModelTestBase(u"/sw/qa/extras/fodfexport/data/"_ustr) { } }; @@ -83,7 +82,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSvgImageRoundtrip) createSwDoc("SvgImageTest.fodt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"OpenDocument Text Flat XML"_ustr); verify(); } diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index fa6b75e9da92..2e84ffc2735f 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -58,10 +58,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo81276) CPPUNIT_ASSERT(abs(sal_Int32(500) - getProperty<sal_Int32>(xStyle, u"BottomMargin"_ustr)) < 10); }; - setImportFilterName(mpFilter); + setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("fdo81276.html"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); } @@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo62336) // The problem was essentially a crash during table export as docx/rtf/html // If calc-layout is enabled, the crash does not occur, that's why loadFromFile/save is used loadFromFile(u"fdo62336.docx"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); } CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo86857) @@ -91,10 +91,10 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo86857) CPPUNIT_ASSERT_EQUAL(Color(0x66ffff), getProperty<Color>(xCell, u"BackColor"_ustr)); }; - setImportFilterName(mpFilter); + setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("fdo86857.html"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); } @@ -143,14 +143,14 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testCharacterBorder) }; createSwDoc("charborder.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); } CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImages) { createSwDoc("textAndImage.docx"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -162,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImagesWithSkipImagesEnabled) { createSwDoc("textAndImage.docx"); setFilterOptions(u"SkipImages"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -175,7 +175,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbedded) { createSwDoc("skipimage-embedded.doc"); setFilterOptions(u"SkipImages"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); // Embedded spreadsheet was exported as image, so content was lost. Make // sure it's exported as HTML instead. @@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument) { createSwDoc("skipimage-embedded-document.docx"); setFilterOptions(u"SkipImages"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); // Similar to testSkipImagesEmbedded, but with an embedded Writer object, // not a Calc one, and this time OOXML, not WW8. @@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageProperties) { createSwDoc("HTMLImage.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageProperties) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportCheckboxRadioButtonState) { createSwDoc("checkbox-radiobutton.doc"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -274,7 +274,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportCheckboxRadioButtonState) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportUrlEncoding) { createSwDoc("tdf76291.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -286,7 +286,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportUrlEncoding) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportInternalUrl) { createSwDoc("tdf90905.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -298,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportInternalUrl) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageBulletList) { createSwDoc("tdf66822.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageBulletList) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf83890) { createSwDoc("tdf83890.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -348,7 +348,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf83890) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExtbChars) { createSwWebDoc("extb.html"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); OUString aExpected(u"\U00024b62"_ustr); // Assert that UTF8 encoded non-BMP Unicode character is correct uno::Reference<text::XTextRange> xTextRange1 = getRun(getParagraph(1), 1); @@ -362,7 +362,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExtbChars) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNormalImageExport) { createSwDoc("textAndImage.docx"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -377,7 +377,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testEmbedImagesEnabled) { createSwDoc("textAndImage.docx"); setFilterOptions(u"EmbedImages"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -396,7 +396,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTML) { createSwWebDoc("hello.html"); setFilterOptions(u"XHTML"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); OString aExpected("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML"_ostr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); @@ -417,7 +417,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfParagraph) setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("reqif-p.xhtml"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleData) createSwDoc("reqif-ole-data.xhtml"); verify(); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); } @@ -520,7 +520,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleImg) createSwDoc("reqif-ole-img.xhtml"); verify(); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); // "type" attribute was missing for the inner <object> element. @@ -580,7 +580,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfJpgImg) setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("reqif-jpg-img.xhtml"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -596,7 +596,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable) setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("reqif-table.xhtml"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -619,7 +619,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable2) { createSwDoc("reqif-table2.odt"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -659,7 +659,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTMLUseCSS) { createSwDoc("xhtml-css.odt"); setFilterOptions(u"XHTML"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -677,7 +677,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfList) setImportFilterName(u"HTML (StarWriter)"_ustr); createSwDoc("reqif-list.xhtml"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); @@ -722,7 +722,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2) createSwDoc("reqif-ole2.xhtml"); verify(); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); // Check that the replacement graphic is exported at RTF level. @@ -766,14 +766,14 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2Odg) createSwDoc("reqif-ole-odg.xhtml"); verify(); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); verify(); } CPPUNIT_TEST_FIXTURE(HtmlExportTest, testList) { createSwWebDoc("list.html"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -786,7 +786,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testList) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTransparentImage) { createSwDoc("transparent-image.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -820,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testOleNodataReqIf) { createSwDoc("reqif-ole-nodata.odt"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); // This failed, io::IOException was thrown during the filter() call. xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -837,7 +837,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNoLangReqIf) { createSwDoc("reqif-no-lang.odt"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); xmlDocUniquePtr pDoc = WrapReqifFromTempFile(); @@ -848,7 +848,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNoLangReqIf) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShade) { createSwDoc("field-shade.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -866,7 +866,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShade) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf132739) { createSwDoc("tdf132739.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -881,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShadeReqIf) { createSwDoc("field-shade-reqif.odt"); setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -898,7 +898,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShadeReqIf) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf126879) { createSwDoc("tdf126879.odt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); static constexpr OString aExpected("<!DOCTYPE html>"_ostr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); diff --git a/sw/qa/extras/htmlexport/htmlexport2.cxx b/sw/qa/extras/htmlexport/htmlexport2.cxx index 4376e05e9570..9fedfb541fde 100644 --- a/sw/qa/extras/htmlexport/htmlexport2.cxx +++ b/sw/qa/extras/htmlexport/htmlexport2.cxx @@ -489,7 +489,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testClearingBreak) createSwWebDoc("clearing-break.html"); // Then make sure that the clear property of the break is not ignored: verify(); - saveAndReload(mpFilter); + saveAndReload(u"HTML (StarWriter)"_ustr); // Make sure that the clear property of the break is not ignored during export: verify(); } @@ -552,7 +552,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testImageKeepRatio) xBodyText->insertTextContent(xCursor, xTextContent, false); // When exporting to HTML: - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); // Then make sure that the width is not a fixed size, that would break on resizing the browser // window: @@ -623,7 +623,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf114769) xRun->setPropertyValue(u"HyperLinkURL"_ustr, uno::Any(u".\another.odt"_ustr)); // Export - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); htmlDocUniquePtr pHtmlDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pHtmlDoc); @@ -638,7 +638,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf114769) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf153923) { createSwDoc("TableWithIndent.fodt"); - save(mpFilter); + save(u"HTML (StarWriter)"_ustr); // Parse it as XML (strict!) xmlDocUniquePtr pDoc = parseXml(maTempFile); diff --git a/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx b/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx index 9e563add4012..0a4098d685aa 100644 --- a/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx +++ b/sw/qa/extras/htmlexport/htmlmodeltestbase.hxx @@ -146,7 +146,7 @@ class HtmlExportTest : public SwModelTestBase, public HtmlTestTools { public: HtmlExportTest() - : SwModelTestBase(u"/sw/qa/extras/htmlexport/data/"_ustr, u"HTML (StarWriter)"_ustr) + : SwModelTestBase(u"/sw/qa/extras/htmlexport/data/"_ustr) { } diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx index 8faca4785d41..893b18a814b1 100644 --- a/sw/qa/extras/htmlexport/xhtmlexport.cxx +++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx @@ -18,7 +18,7 @@ class XHtmlExportTest : public SwModelTestBase, public HtmlTestTools { public: XHtmlExportTest() - : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr, u"XHTML Writer File"_ustr) + : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr) { } }; @@ -27,7 +27,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testImageEmbedding) { createSwDoc("image-mimetype.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); @@ -41,7 +41,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf131812) { createSwDoc("tdf131812.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf146264) { createSwDoc("tdf146264.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf167910) { createSwDoc("tdf167910.fodt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf118637) { createSwDoc("tdf118637.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -118,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf145361) { createSwDoc("tdf145361.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_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); @@ -133,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf142483) { createSwDoc("tdf142483.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -172,7 +172,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf107696) { createSwDoc("tdf107696.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); @@ -202,7 +202,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf66305) { createSwDoc("tdf66305.odt"); setFilterOptions(u"UTF8"_ustr); - save(mpFilter); + save(u"XHTML Writer File"_ustr); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream); sal_uInt64 nLength = pStream->TellEnd(); diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 8d8d8d0a5804..dc03d4872134 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -43,7 +43,7 @@ namespace class HtmlImportTest : public SwModelTestBase { public: - HtmlImportTest() : SwModelTestBase(u"sw/qa/extras/htmlimport/data/"_ustr, u"HTML (StarWriter)"_ustr) {} + HtmlImportTest() : SwModelTestBase(u"sw/qa/extras/htmlimport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(HtmlImportTest, testPictureImport) @@ -475,7 +475,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testReqIfPageStyle) class SwHtmlOptionsImportTest : public SwModelTestBase { public: - SwHtmlOptionsImportTest() : SwModelTestBase(u"/sw/qa/extras/htmlimport/data/"_ustr, u"HTML (StarWriter)"_ustr) {} + SwHtmlOptionsImportTest() : SwModelTestBase(u"/sw/qa/extras/htmlimport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testAllowedRTFOLEMimeTypes) diff --git a/sw/qa/extras/mailmerge/mailmergetestbase.cxx b/sw/qa/extras/mailmerge/mailmergetestbase.cxx index 72e3ddfdb588..035ee3f00c3a 100644 --- a/sw/qa/extras/mailmerge/mailmergetestbase.cxx +++ b/sw/qa/extras/mailmerge/mailmergetestbase.cxx @@ -46,7 +46,7 @@ class MailMergeTestBase : public SwModelTestBase { public: MailMergeTestBase() - : SwModelTestBase(u"/sw/qa/extras/mailmerge/data/"_ustr, u"writer8"_ustr) + : SwModelTestBase(u"/sw/qa/extras/mailmerge/data/"_ustr) , mnCurOutputType(0) , maMMtestFilename(nullptr) { diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index eb070f6cce9d..20bdea8a547d 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -62,25 +62,23 @@ namespace class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr, u"writer8"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(Test, testMathObjectFlatExport) { - comphelper::ScopeGuard g([this]() { - mpFilter = "writer8"; + comphelper::ScopeGuard g([]() { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Cache::Writer::OLE_Objects::set(20, pBatch); return pBatch->commit(); }); - mpFilter = "OpenDocument Text Flat XML"; // doesn't happen with ODF package std::shared_ptr<comphelper::ConfigurationChanges> pBatch( comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Cache::Writer::OLE_Objects::set(1, pBatch); pBatch->commit(); createSwDoc("2_MathType3.docx"); - saveAndReload(mpFilter); + saveAndReload(u"OpenDocument Text Flat XML"_ustr); // doesn't happen with ODF package uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(!xModifiable->isModified()); @@ -196,7 +194,7 @@ void testTdf43569_CheckIfFieldParse() CPPUNIT_TEST_FIXTURE(Test, testTdf43569) { createSwDoc("tdf43569_conditionalfield.doc"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // check if our parser is valid testTdf43569_CheckIfFieldParse(); @@ -212,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf43569) CPPUNIT_TEST_FIXTURE(Test, testTdf130314) { createSwDoc("tdf130314.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Without the fix in place, this test would have hung CPPUNIT_ASSERT_EQUAL(2, getPages()); } @@ -220,7 +218,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130314) CPPUNIT_TEST_FIXTURE(Test, testTdf133487) { createSwDoc("MadeByLO7.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(3, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -238,7 +236,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133487) CPPUNIT_TEST_FIXTURE(Test, testTdf141467) { createSwDoc("Formcontrol needs high z-index.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(2, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -271,7 +269,7 @@ DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt") CPPUNIT_TEST_FIXTURE(Test, testTdf125877) { createSwDoc("tdf95806.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xSupplier->getTextTables(), uno::UNO_QUERY); @@ -289,7 +287,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf125877) CPPUNIT_TEST_FIXTURE(Test, testTdf150149) { createSwDoc("tdf150149.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); // This was 0 (lost table header in multi-column section) @@ -337,7 +335,7 @@ DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt") CPPUNIT_TEST_FIXTURE(Test, testUserFieldDecl) { createSwDoc("user-field-decl.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); // Without the accompanying fix in place, this test would have failed with 'Expected: 2; @@ -349,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUserFieldDecl) CPPUNIT_TEST_FIXTURE(Test, testUserFieldDeclFly) { createSwDoc("user-field-decl-fly.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -479,7 +477,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFramebackgrounds) createSwDoc("framebackgrounds.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -500,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Correct) CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); - saveAndReload(mpFilter, sPass); + saveAndReload(u"writer8"_ustr, sPass); CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); @@ -514,7 +512,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong) CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); - saveAndReload(mpFilter, sPass); + saveAndReload(u"writer8"_ustr, sPass); CPPUNIT_ASSERT_EQUAL(1, getPages()); getParagraph(1, u"012"_ustr); @@ -523,7 +521,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong) CPPUNIT_TEST_FIXTURE(Test, testOOoxmlEmbedded) { createSwDoc("oooxml_embedded.sxw"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects()); uno::Sequence<OUString> aSeq(xAccess->getElementNames()); @@ -598,7 +596,7 @@ DECLARE_ODFEXPORT_TEST(testTdf140437, "tdf140437.odt") CPPUNIT_TEST_FIXTURE(Test, testTdf131621) { createSwDoc("tdf131621.ott"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(12, getShapes()); //Crash test, Check number of pages CPPUNIT_ASSERT_EQUAL( 1, getPages() ); @@ -607,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131621) CPPUNIT_TEST_FIXTURE(Test, testTdf135144) { createSwDoc("tdf135144.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); //Crashes at import time after roundtrip CPPUNIT_ASSERT_EQUAL(3, getPages()); CPPUNIT_ASSERT_EQUAL(4, getShapes()); @@ -650,7 +648,7 @@ DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt") CPPUNIT_TEST_FIXTURE(Test, testSenderInitials) { createSwDoc("sender-initials.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Test sender-initial properties (both annotation metadata and text field) uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); @@ -748,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92379) createSwDoc("tdf92379.fodt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -823,7 +821,7 @@ DECLARE_ODFEXPORT_TEST(testTextframeGradient, "textframe-gradient.odt") CPPUNIT_TEST_FIXTURE(Test, testDuplicateCrossRefHeadingBookmark) { createSwDoc("CrossRefHeadingBookmark.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // the file contains invalid duplicate heading cross reference bookmarks // but we have to round trip them, tdf#94804 @@ -929,7 +927,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58949) officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false, pBatch); pBatch->commit(); createSwDoc("fdo58949.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); /* * The problem was that the exporter didn't insert "Obj102" to the @@ -965,7 +963,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58949) CPPUNIT_TEST_FIXTURE(Test, testTdf134987) { createSwDoc("tdf134987.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects()); uno::Sequence<OUString> aSeq(xAccess->getElementNames()); @@ -1225,7 +1223,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectionKey) createSwDoc("protection-key.fodt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); // we can't assume that the user entered the password; check that we @@ -1240,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectionKey) CPPUNIT_TEST_FIXTURE(Test, testTdf128188) { createSwDoc("footnote-collect-at-end-of-section.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); SwDoc* pDoc = getSwDoc(); SwFootnoteIdxs const& rFootnotes(pDoc->GetFootnoteIdxs()); // Section1 @@ -1274,7 +1272,7 @@ DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt") CPPUNIT_TEST_FIXTURE(Test, testTdf103091) { createSwDoc("tdf103091.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // check that all conditional paragraph style conditions are imported uno::Reference<container::XNameAccess> xParaStyles(getStyles(u"ParagraphStyles"_ustr)); uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName( @@ -1442,7 +1440,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf69500) xPersistence->store(); } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Without the fix, the toolbar will be gone after save-and-reload { @@ -1489,7 +1487,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_images) xImgMgr->store(); } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Verify that the custom icon is still present after save-and-reload { @@ -1533,7 +1531,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_accelerators) xAccel->store(); } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Verify that the custom keyboard shortcut is still present after save-and-reload { @@ -1548,7 +1546,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_accelerators) CPPUNIT_TEST_FIXTURE(Test, testTdf60700_directories) { createSwDoc(); - save(mpFilter); + save(u"writer8"_ustr); // There is no way to read the contents of Configurations2/ from a loaded document, // because only UIConfigurationManager has a reference to it and there is no method diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 8d09dc96b867..7d08d1f51d33 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -34,7 +34,7 @@ namespace class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr, u"writer8"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr) {} }; DECLARE_ODFEXPORT_TEST(testTdf100492, "tdf100492.odt") @@ -82,7 +82,7 @@ DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt") CPPUNIT_TEST_FIXTURE(Test, testTdf106733) { createSwDoc("tdf106733.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page) // fo:hyphenation-keep="page" defined in direct paragraph formatting createSwDoc("tdf132599_page.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // This was 2 (not truncated hyphenated line) CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto) // fo:hyphenation-keep="auto" defined in direct paragraph formatting createSwDoc("tdf132599_auto.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // not truncated hyphenated line CPPUNIT_ASSERT_EQUAL(2, getPages()); } @@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_spread) // fo:hyphenation-keep="page" loext:hyphenation-keep-type="spread" createSwDoc("tdf132599_spread.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // shift last line of right page, resulting 3 pages CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_spread_left_page) // fo:hyphenation-keep="page" loext:hyphenation-keep-type="spread" createSwDoc("tdf132599_spread-left-page.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // do not shift last line of left page // This was 4 (shifted last line of left page, when it's hyphenated) CPPUNIT_ASSERT_EQUAL(3, getPages()); @@ -166,7 +166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_column) // last line of the left column is shifted, according to // fo:hyphenation-keep="page" loext:hyphenation-keep-type="column" createSwDoc("tdf132599_column.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // shift last line of the first column, resulting 3 pages CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -180,7 +180,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_not_last_column) // last line of the not last column is not shifted, according to // fo:hyphenation-keep="page" loext:hyphenation-keep-type="page" createSwDoc("tdf132599_page_in_not_last_column.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // do not shift last line of the first column, resulting 2 pages CPPUNIT_ASSERT_EQUAL(2, getPages()); } @@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_last_column) // last line of the last column is shifted, according to // fo:hyphenation-keep="page" loext:hyphenation-keep-type="page" createSwDoc("tdf132599_page_in_last_column.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // shift last line of the first page, resulting 3 pages CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_always) // last full line of the paragraph column is not hyphenated // fo:hyphenation-keep="page" loext:hyphenation-keep-type="always" createSwDoc("tdf132599_always.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -224,7 +224,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table) // last full line of the table is not hyphenated on page 1 // fo:hyphenation-keep="page" loext:hyphenation-keep-type="" createSwDoc("tdf132599_page_in_table.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // This was 2 (not handling hyphenation-keep in tables) CPPUNIT_ASSERT_EQUAL(3, getPages()); @@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style) // fo:hyphenation-keep="page" defined in default paragraph style createSwDoc("tdf160518_page_in_default_paragraph_style.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style) // fo:hyphenation-keep="auto" defined in default paragraph style createSwDoc("tdf160518_auto_in_default_paragraph_style.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(2, getPages()); } @@ -264,7 +264,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style) // fo:hyphenation-keep="page" defined in text body style createSwDoc("tdf160518_page_in_text_body_style.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(3, getPages()); } @@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_text_body_style) // fo:hyphenation-keep="auto" defined in text body style createSwDoc("tdf160518_auto_in_text_body_style.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(2, getPages()); } @@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354_page) // fo:hyphenation-keep="page" defined in direct paragraph formatting createSwDoc("tdf165354_page.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // This was 3 in tdf132599, but now 2, shifting only the last hyphenated word, // not the full line, because of loext:hyphenation-keep-line=true CPPUNIT_ASSERT_EQUAL(2, getPages()); @@ -297,7 +297,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354_page) CPPUNIT_TEST_FIXTURE(Test, testTdf158885_compound_remain) { createSwDoc("tdf158885_compound-remain.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:text-properties[@loext:hyphenation-compound-remain-char-count='3']", 1); @@ -340,7 +340,7 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt") CPPUNIT_TEST_FIXTURE(Test, testRubyPosition) { createSwDoc("ruby-position.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -364,7 +364,7 @@ DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt") CPPUNIT_TEST_FIXTURE(Test, testSignatureLineProperties) { createSwDoc("signatureline-properties.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); uno::Reference<drawing::XShape> xShape = getShape(1); CPPUNIT_ASSERT(xShape.is()); @@ -538,7 +538,7 @@ DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt") CPPUNIT_TEST_FIXTURE(Test, tdf99631) { createSwDoc("tdf99631.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // check import of VisualArea settings of the embedded XLSX OLE objects xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/settings.xml"_ustr); assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaWidth']", u"4516"); @@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf163575) { // crashes/assert at export time createSwDoc("tdf163575.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); } DECLARE_ODFEXPORT_TEST(testTdf159923, "tdf159923.fodt") @@ -571,7 +571,7 @@ DECLARE_ODFEXPORT_TEST(testTdf159923_stretched, "tdf159923_stretched.fodt") CPPUNIT_TEST_FIXTURE(Test, tdf145871) { createSwDoc("tdf145871.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY); @@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf145871) CPPUNIT_TEST_FIXTURE(Test, tdf128504) { createSwDoc("tdf128504.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); uno::Reference<text::XTextRange> xPara = getParagraph(6); uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY); OUString unVisitedStyleName = getProperty<OUString>(xRun, u"UnvisitedCharStyleName"_ustr); @@ -728,7 +728,7 @@ DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt") CPPUNIT_TEST_FIXTURE(Test, tdf124470) { createSwDoc("tdf124470TableAndEmbeddedUsedFonts.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Table styles were exported out of place, inside font-face-decls. // Without the fix in place, this will fail already in ODF validation: // "content.xml[2,2150]: Error: tag name "style:style" is not allowed. Possible tag names are: <font-face>" diff --git a/sw/qa/extras/odfexport/odfexport3.cxx b/sw/qa/extras/odfexport/odfexport3.cxx index 5c5565f6c2f7..8edbcd75238e 100644 --- a/sw/qa/extras/odfexport/odfexport3.cxx +++ b/sw/qa/extras/odfexport/odfexport3.cxx @@ -38,7 +38,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr, u"writer8"_ustr) + : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr) { } }; @@ -93,7 +93,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxRoundedCorners) createSwDoc("textbox-rounded-corners.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); // Table inside a textbox should be in the extension namespace. @@ -541,14 +541,14 @@ CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame) createSwDoc("btlr-frame.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(/*bIsExport*/ true); } CPPUNIT_TEST_FIXTURE(Test, testTdf129520) { createSwDoc("tdf129520.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); CPPUNIT_ASSERT_EQUAL(u"M"_ustr, getParagraph(1)->getString()); @@ -635,7 +635,7 @@ DECLARE_ODFEXPORT_TEST(testMasterPageWithDrawingPage, "sw_hatch.odt") CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeOOo) { createSwDoc("pagestyle_background_ooo33.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(3, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); // Standard @@ -730,7 +730,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeOOo) CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO64) { createSwDoc("pagestyle_background_lo64.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(6, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); // Standard @@ -912,7 +912,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO64) CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO70) { createSwDoc("pagestyle_background_lo70.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(6, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); // Standard @@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO70) CPPUNIT_TEST_FIXTURE(Test, testFillBitmapUnused) { createSwDoc("fillbitmap3.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(4, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // nav_5f_home and all its references are completely gone @@ -1243,7 +1243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEmbeddedPdf) createSwDoc("embedded-pdf.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); uno::Sequence<uno::Any> aArgs{ uno::Any(maTempFile.GetURL()) }; @@ -1514,7 +1514,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") CPPUNIT_TEST_FIXTURE(Test, testTableStyles3) { createSwDoc("table_styles_3.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // This test checks if default valued attributes aren't exported. xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -1705,7 +1705,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyles4) CPPUNIT_TEST_FIXTURE(Test, testTableStyles5) { createSwDoc("table_styles_5.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // Test if cell styles doesn't have a style:parent-style-name attribute. xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -1779,7 +1779,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyles5) CPPUNIT_TEST_FIXTURE(Test, testTdf145226) { createSwDoc("tdf145226.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -1809,7 +1809,7 @@ DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt") CPPUNIT_TEST_FIXTURE(Test, testTdf129568) { createSwDoc("tdf129568.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Test that export doesn't fail, and that style is imported and in use. uno::Reference<style::XStyle> xStyle( getStyles(u"CellStyles"_ustr)->getByName(u"Default Style.1"_ustr), uno::UNO_QUERY); @@ -1820,7 +1820,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129568) CPPUNIT_TEST_FIXTURE(Test, testTdf129568ui) { createSwDoc("tdf129568-ui.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Same as above, but styles referenced by UI name. uno::Reference<style::XStyle> xStyle( getStyles(u"CellStyles"_ustr)->getByName(u"Default Style.1"_ustr), uno::UNO_QUERY); @@ -1831,7 +1831,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129568ui) CPPUNIT_TEST_FIXTURE(Test, testTdf164712) { createSwDoc("tdf164712.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); auto xText = getParagraph(1)->getText(); CPPUNIT_ASSERT(xText.is()); auto xCursor(xText->createTextCursorByRange(getParagraph(1))); @@ -1918,7 +1918,7 @@ DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.docx") CPPUNIT_TEST_FIXTURE(Test, testImageMimetype) { createSwDoc("image-mimetype.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // Test that the loext:mimetype attribute is written for exported images, tdf#109202 diff --git a/sw/qa/extras/odfexport/odfexport4.cxx b/sw/qa/extras/odfexport/odfexport4.cxx index 015125b86bf0..8c1599e073bf 100644 --- a/sw/qa/extras/odfexport/odfexport4.cxx +++ b/sw/qa/extras/odfexport/odfexport4.cxx @@ -42,7 +42,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr, u"writer8"_ustr) + : SwModelTestBase(u"/sw/qa/extras/odfexport/data/"_ustr) { } }; @@ -50,7 +50,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, tdf135942) { createSwDoc("nestedTableInFooter.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // All table autostyles should be collected, including nested, and must not crash. CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf150927) // Similar to tdf135942 createSwDoc("table-in-frame-in-table-in-header-base.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // All table autostyles should be collected, including nested, and must not crash. CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData) pBatch->commit(); createSwDoc("personalmetadata.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"meta.xml"_ustr); assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:initial-creator", 1); assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:creation-date", 1); @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData) pBatch->commit(); createSwDoc("personalmetadata.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); pXmlDoc = parseExport(u"meta.xml"_ustr); assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:initial-creator", 0); assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:creation-date", 0); @@ -144,7 +144,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData) { // 1. Check we have the original edit time info createSwDoc("personalmetadata.odt"); - save(mpFilter); + save(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"meta.xml"_ustr); assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/meta:editing-duration", u"PT21M22S"); @@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData) // 2. Check edit time info is 0 createSwDoc("personalmetadata.odt"); - save(mpFilter); + save(u"writer8"_ustr); pXmlDoc = parseExport(u"meta.xml"_ustr); assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/meta:editing-duration", u"P0D"); @@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf151100) // Similar to tdf135942 createSwDoc("tdf151100.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // All table autostyles should be collected, including nested, and must not crash. CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -273,7 +273,7 @@ DECLARE_ODFEXPORT_TEST(testTdf143793_noBodyWrapping, "tdf143793_noBodyWrapping.o CPPUNIT_TEST_FIXTURE(Test, testTdf137199) { createSwDoc("tdf137199.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(u">1<"_ustr, getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr)); @@ -336,7 +336,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName) CPPUNIT_TEST_FIXTURE(Test, testListFormatDocx) { createSwDoc("listformat.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Ensure in resulting ODT we also have not just prefix/suffix, but custom delimiters CPPUNIT_ASSERT_EQUAL(u">1<"_ustr, getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr)); @@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(Test, testListFormatDocx) CPPUNIT_TEST_FIXTURE(Test, testShapeWithHyperlink) { createSwDoc("shape-with-hyperlink.odt"); - save(mpFilter); + save(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(Test, testListFormatOdt) createSwDoc("listformat.odt"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); verify(); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -524,7 +524,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleLink) CPPUNIT_TEST_FIXTURE(Test, tdf120972) { createSwDoc("table_number_format_3.docx"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); OUString cDecimal(SvtSysLocale().GetLocaleData().getNumDecimalSep()[0]); @@ -831,7 +831,7 @@ DECLARE_ODFEXPORT_TEST(testTdf78510, "WordTest_edit.odt") CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkerMarkupRoundtrip) { createSwDoc("ParagraphMarkerMarkup.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Test that the markup stays at save-and-reload xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); OUString autostyle = getXPath(pXmlDoc, "//office:body/office:text/text:p", "marker-style-name"); @@ -882,7 +882,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentStyles) CPPUNIT_TEST_FIXTURE(Test, testTdf150408_IsLegal) { createSwDoc("IsLegal.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Second level's numbering should use Arabic numbers for first level reference auto xPara = getParagraph(1); @@ -926,7 +926,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382) CPPUNIT_ASSERT_LESS(sal_Int32(100), width); // It was 720, i.e. 0.5 inch } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // 2. Make sure that exported document has NoGapAfterNoteNumber option set, // and has correct layout { @@ -1006,7 +1006,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159438) // Given a text with bookmarks, where an end of one bookmark is the position of another, // and the start of a third createSwDoc("bookmark_order.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); auto xPara = getParagraph(1); // Check that the order of runs is correct (bookmarks don't overlap) @@ -1095,7 +1095,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160700) { // Given a document with an empty numbered paragraph, and a cross-reference to it createSwDoc("tdf160700.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Refresh fields and ensure cross-reference to numbered para is okay auto xTextFieldsSupplier(mxComponent.queryThrow<text::XTextFieldsSupplier>()); @@ -1128,7 +1128,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160253_ordinary_numbering) // Before the fix, this already failed with // Error: "list2916587379" is referenced by an IDREF, but not defined. createSwDoc("tdf160253_ordinary_numbering.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Make sure that the fourth paragraph has correct number - it was "1." before the fix CPPUNIT_ASSERT_EQUAL(u"3."_ustr, @@ -1149,7 +1149,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160253_outline_numbering) // Before the fix, this already failed with // Error: "list2916587379" is referenced by an IDREF, but not defined. createSwDoc("tdf160253_outline_numbering.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // Make sure that the third paragraph has correct number - it was "1" before the fix CPPUNIT_ASSERT_EQUAL(u"2"_ustr, @@ -1166,7 +1166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableInFrameAnchoredToPage) // Given a table in a frame anchored to a page: // it must not assert on export because of missing format for an exported table createSwDoc("table_in_frame_to_page.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); auto AutoStyleUsedIn = [this, &pXmlDoc](const OString& path, const char* attr) -> OString { @@ -1192,7 +1192,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDeletedTableAutostylesExport) // Given a document with deleted table: // it must not assert on export because of missing format for an exported table createSwDoc("deleted_table.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); } DECLARE_ODFEXPORT_TEST(testTdf160877, "tdf160877.odt") @@ -1216,7 +1216,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMidnightRedlineDatetime) // - Error: "2001-01-01" does not satisfy the "dateTime" type // because "2001-01-01T00:00:00" became "2001-01-01" on roundtrip. createSwDoc("midnight_redline.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); assertXPathContent(pXmlDoc, @@ -1230,7 +1230,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122452) // FIXME: Error: element "text:insertion" was found where no element may occur skipValidation(); createSwDoc("tdf122452.doc"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); // Without the fix in place this fails with: @@ -1243,7 +1243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122452) CPPUNIT_TEST_FIXTURE(Test, testTdf159027) { createSwDoc("tdf159027.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); SwDoc* pDoc = getSwDoc(); pDoc->getIDocumentFieldsAccess().UpdateFields(true); @@ -1315,7 +1315,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163703) { // Given a document with italics autostyle in a comment createSwDoc("italics-in-comment.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); auto xFields( mxComponent.queryThrow<text::XTextFieldsSupplier>()->getTextFields()->createEnumeration()); @@ -1364,7 +1364,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf36709) { // Verifies that loext:text-indent correctly round-trips createSwDoc("tdf36709.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -1391,7 +1391,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163913) { // Verifies that loext:left-margin and loext:right-margin correctly round-trip createSwDoc("tdf163913.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -1470,7 +1470,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace) CPPUNIT_ASSERT_EQUAL(u"false"_ustr, val); } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // 2. Make sure that exported document has MsWordUlTrailSpace option set { xmlDocUniquePtr pXmlDoc = parseExport(u"settings.xml"_ustr); @@ -1511,7 +1511,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace) CPPUNIT_ASSERT_EQUAL(u"false"_ustr, val); } - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); // 4. Make sure that exported document has MsWordUlTrailSpace option not set { xmlDocUniquePtr pXmlDoc = parseExport(u"settings.xml"_ustr); @@ -1552,7 +1552,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf71583) { // Verifies that loext:text-indent correctly round-trips createSwDoc("tdf71583.odt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[1]", "page-count-range"); } @@ -1561,7 +1561,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166011) { // Verifies that style:script-type correctly round-trips createSwDoc("tdf166011.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -1575,7 +1575,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166011ee) { // Verifies that style:script-type correctly round-trips with Edit Engine createSwDoc("tdf166011ee.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); @@ -1590,7 +1590,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf168817) // A ruby text with a hyperlink // Without the fix, it failed an assertion on save, and produced invalid XML that couldn't load createSwDoc("ruby+hyperlink.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); // Check that only one instance of respective elements are produced assertXPath(pXmlDoc, "//text:p", 1); @@ -1610,7 +1610,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164677) // properties, and generated a single section autostyle, so all the sections got identical // properties after reload: createSwDoc("colored-sections-separators.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); auto xTextSections = mxComponent.queryThrow<text::XTextSectionsSupplier>()->getTextSections(); CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextSections->getElementNames().getLength()); @@ -1679,7 +1679,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf37128ConvertStartEndOnResave) // start/end, respectively. Make sure documents produced by older // versions of LO convert these values to left/right. createSwDoc("tdf37128-start-end-to-left-right.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -1706,7 +1706,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118350StartEndPreserved) // Check that fo:text-align start/end round-trip correctly for // documents made by newer versions of LO. createSwDoc("tdf118350-start-end-preserved.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr); @@ -1731,7 +1731,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118350StartEndPreserved) CPPUNIT_TEST_FIXTURE(Test, testTdf162120StyleWritingModeAutomaticSerialization) { createSwDoc("tdf162120-style-writing-mode-automatic.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"writer8"_ustr); auto pStylesDoc = parseExport(u"styles.xml"_ustr); assertXPath(pStylesDoc, "//style:paragraph-properties[@style:writing-mode-automatic]", 1); diff --git a/sw/qa/extras/odfimport/odffeatures.cxx b/sw/qa/extras/odfimport/odffeatures.cxx index f35fdfd87a71..779acc6f1e2d 100644 --- a/sw/qa/extras/odfimport/odffeatures.cxx +++ b/sw/qa/extras/odfimport/odffeatures.cxx @@ -17,7 +17,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase("/sw/qa/extras/odfimport/data/", "writer8") + : SwModelTestBase("/sw/qa/extras/odfimport/data/") { } }; diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index e4eafa283478..b0866cf087ce 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -76,7 +76,7 @@ typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > String class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/odfimport/data/"_ustr, u"writer8"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/odfimport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(Test, testEmptySvgFamilyName) diff --git a/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx index da76f6a1c112..5c661d0587c1 100644 --- a/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx @@ -16,7 +16,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) + : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) { } }; diff --git a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx index 7e329f7759da..b8be177a2ff3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx @@ -14,7 +14,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) + : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) { } }; @@ -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(mpFilter, sPass); + saveAndReload(u"Office Open XML Text"_ustr, 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(mpFilter, sPass); + saveAndReload(u"Office Open XML Text"_ustr, 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(mpFilter, sPass); + saveAndReload(u"Office Open XML Text"_ustr, 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(mpFilter, sPass); + saveAndReload(u"Office Open XML Text"_ustr, sPass); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString()); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index b32a58bc1024..0ca030e2c633 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -37,13 +37,13 @@ class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {} }; CPPUNIT_TEST_FIXTURE(Test, testfdo81381) { createSwDoc("fdo81381.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:object[1]/o:OLEObject[1]", "DrawAspect", u"Icon"); } @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo81381) CPPUNIT_TEST_FIXTURE(Test, testSdtAlias) { createSwDoc("sdt-alias.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // <w:alias> was completely missing. @@ -61,7 +61,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtAlias) CPPUNIT_TEST_FIXTURE(Test, testFooterBodyDistance) { createSwDoc("footer-body-distance.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Page break was exported as section break, this was 0 assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br", 1); @@ -84,7 +84,7 @@ DECLARE_OOXMLEXPORT_TEST(testfdo81031, "fdo81031.docx") CPPUNIT_TEST_FIXTURE(Test, testPlausableBorder) { createSwDoc("plausable-border.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // sw::util::IsPlausableSingleWordSection() did not merge two page styles due to borders. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Page break was exported as section break, this was 0 @@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPlausableBorder) CPPUNIT_TEST_FIXTURE(Test, testUnwantedSectionBreak) { createSwDoc("unwanted-section-break.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // This was 2: an additional sectPr was added to the document. assertXPath(pXmlDoc, "//w:sectPr", 1); @@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUnwantedSectionBreak) CPPUNIT_TEST_FIXTURE(Test, testfdo80897 ) { createSwDoc("fdo80897.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr/a:prstTxWarp", "prst", u"textTriangle"); } @@ -121,7 +121,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80997, "fdo80997.docx") CPPUNIT_TEST_FIXTURE(Test, testFdo80902) { createSwDoc("fdo80902.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that the docGrid type was set as default so fix it for other grid type xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -131,7 +131,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo80902) CPPUNIT_TEST_FIXTURE(Test, testParaShading) { createSwDoc("para-shading.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // Make sure the themeColor attribute is not written when it would be empty. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:shd", "themeColor"); @@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(Test, testParaShading) CPPUNIT_TEST_FIXTURE(Test, testFDO83044) { createSwDoc("fdo83044.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:text", 1); @@ -157,7 +157,7 @@ DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx") CPPUNIT_TEST_FIXTURE(Test, testShapeInFloattable) { createSwDoc("shape-in-floattable.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // No nested drawingML w:txbxContent. assertXPath(pXmlDoc, "//mc:Choice//w:txbxContent//w:txbxContent", 0); @@ -169,7 +169,7 @@ CPPUNIT_TEST_FIXTURE(Test, testShapeInFloattable) CPPUNIT_TEST_FIXTURE(Test, testEmptyAnnotationMark) { createSwDoc("empty-annotation-mark.docx"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); // Delete the word that is commented, and save again. uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 3); CPPUNIT_ASSERT_EQUAL(u"with"_ustr, xRun->getString()); @@ -242,7 +242,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDropdownInCell) createSwDoc("dropdown-in-cell.docx"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); verify(/*bIsExport*/ true); } @@ -258,7 +258,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableAlignment, "table-alignment.docx") CPPUNIT_TEST_FIXTURE(Test, testSdtIgnoredFooter) { createSwDoc("sdt-ignored-footer.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // This was 1, make sure no w:sdt sneaks into the main document from the footer. assertXPath(pXmlDoc, "//w:sdt", 0); @@ -267,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtIgnoredFooter) CPPUNIT_TEST_FIXTURE(Test, testSdtRunPicture) { createSwDoc("sdt-run-picture.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // SDT around run was exported as SDT around paragraph xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // This was 1: there was an SDT around w:p. @@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChartDupe) createSwDoc("chart-dupe.docx"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); verify(); xmlDocUniquePtr pXmlDocCT = parseExport(u"[Content_Types].xml"_ustr); @@ -348,7 +348,7 @@ DECLARE_OOXMLEXPORT_TEST(testNumberingFont, "numbering-font.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf106541_noinheritChapterNumbering) { createSwDoc("tdf106541_noinheritChapterNumbering.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // in LO, it appears that styles based on the Chapter Numbering style explicitly set the // numbering style/outline level to 0 by default, and that LO prevents inheriting directly from "Outline" style. @@ -390,7 +390,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104713_undefinedStyles, "tdf104713_undefinedStyl CPPUNIT_TEST_FIXTURE(Test, testDrawingmlFlipv) { createSwDoc("drawingml-flipv.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that the shape had vertical flip only, but then we added rotation as well on export. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPathNoAttribute(pXmlDoc, "//a:xfrm", "rot"); @@ -399,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDrawingmlFlipv) CPPUNIT_TEST_FIXTURE(Test, testRot90Fliph) { createSwDoc("rot90-fliph.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that a shape rotation of 90° got turned into 270° after roundtrip. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "//a:xfrm", "flipH", u"1"); @@ -410,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRot90Fliph) CPPUNIT_TEST_FIXTURE(Test, testRot180Flipv) { createSwDoc("rot180-flipv.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // 180° rotation got lost after roundtrip. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "//a:xfrm", "flipV", u"1"); @@ -421,7 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRot180Flipv) CPPUNIT_TEST_FIXTURE(Test, testRot270Flipv) { createSwDoc("rot270-flipv.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // 270° rotation got turned into 90° after roundtrip. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "//a:xfrm", "flipV", u"1"); @@ -507,7 +507,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextboxTable, "textbox-table.docx") CPPUNIT_TEST_FIXTURE(Test, testCropPixel) { createSwDoc("crop-pixel.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // If map mode of the graphic is in pixels, then we used to handle original // size of the graphic as mm100, but it was in pixels. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -519,7 +519,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCropPixel) CPPUNIT_TEST_FIXTURE(Test, testEffectExtent) { createSwDoc("effect-extent.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that in case there were no shadows on the picture, we // wrote a <wp:effectExtent> full or zeros. xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); @@ -530,7 +530,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEffectExtent) CPPUNIT_TEST_FIXTURE(Test, testEffectExtentInline) { createSwDoc("effect-extent-inline.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that in case there was inline rotated picture, we // wrote a <wp:effectExtent> full or zeros. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -590,8 +590,8 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphMark2, "paragraph-mark2.docx") CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkNonempty) { createSwDoc("paragraph-mark-nonempty.odt"); - save(mpFilter); - validate(maTempFile.GetFileName(), mpFilter); + save(u"Office Open XML Text"_ustr); + validate(maTempFile.GetFileName(), u"Office Open XML Text"); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // There were two <w:sz> elements, make sure the 40 one is dropped and the 20 one is kept. @@ -679,7 +679,7 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlSymbolChicagoList, "symbol_chicago_list.docx") CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHTW) { createSwDoc("numlist-zhtw.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr); @@ -689,7 +689,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHTW) CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHCN) { createSwDoc("numlist-zhcn.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr); @@ -699,7 +699,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHCN) CPPUNIT_TEST_FIXTURE(Test, testOOxmlOutlineNumberTypes) { createSwDoc("outline-number-types.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr); @@ -800,7 +800,7 @@ DECLARE_OOXMLEXPORT_TEST(testEffectExtentMargin, "effectextent-margin.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf88583) { createSwDoc("tdf88583.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), u"FillColor"_ustr)); @@ -832,7 +832,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf89791) uno::Reference< beans::XPropertySet > properties(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Titre"_ustr), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(u"Corps de texte"_ustr, getProperty<OUString>(properties, u"FollowStyle"_ustr)); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); properties.set(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Titre"_ustr), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(u"Corps de texte"_ustr, getProperty<OUString>(properties, u"FollowStyle"_ustr)); @@ -923,7 +923,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf44986, "tdf44986.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf118682) { createSwDoc("tdf118682.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); @@ -952,7 +952,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118682) CPPUNIT_TEST_FIXTURE(Test, testTdf133163) { createSwDoc("tdf133163.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); @@ -980,7 +980,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133163) CPPUNIT_TEST_FIXTURE(Test, testTdf166102) { createSwDoc("tdf166102.fodt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); @@ -1003,7 +1003,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166102) CPPUNIT_TEST_FIXTURE(Test, testTdf133647) { createSwDoc("tdf133647.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Keep original formula during round-trip @@ -1020,7 +1020,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133647) CPPUNIT_TEST_FIXTURE(Test, testTdf123386) { createSwDoc("tdf123386.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Keep original formula during round-trip @@ -1039,7 +1039,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123386) CPPUNIT_TEST_FIXTURE(Test, testTdf123389) { createSwDoc("tdf123389.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // Keep original formula during round-trip @@ -1067,7 +1067,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf115094v3) // i.e. some unwanted ~-2mm left margin appeared. CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1991), pFormat->GetHoriOrient().GetPos()); } - save(mpFilter); + save(u"Office Open XML Text"_ustr); // floating table is now exported directly without surrounding frame xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 809cd9d99214..653b01a15f88 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -40,7 +40,7 @@ class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {} }; DECLARE_OOXMLEXPORT_TEST(testWPGtextboxes, "testWPGtextboxes.docx") @@ -96,14 +96,14 @@ CPPUNIT_TEST_FIXTURE(Test, testSmartart) }; createSwDoc("smartart.docx"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); verify(); } CPPUNIT_TEST_FIXTURE(Test, testFdo69548) { createSwDoc("fdo69548.docx"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); // The problem was that the last space in target URL was removed CPPUNIT_ASSERT_EQUAL(u"#this_is_a_bookmark"_ustr, getProperty<OUString>(getRun(getParagraph(1), 1), u"HyperLinkURL"_ustr)); } @@ -275,7 +275,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf162916_nastyTOC, "tdf162916_nastyTOC.docx") CPPUNIT_TEST_FIXTURE(Test, testFontEsc) { createSwDoc("test_tdf120412.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc =parseExport(u"word/document.xml"_ustr); // don't lose the run with superscript formatting assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2); @@ -430,7 +430,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx") CPPUNIT_TEST_FIXTURE(Test, testFdo73389) { createSwDoc("fdo73389.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The width of the inner table was too large. The first fix still converted // the "auto" table width to a fixed one. The second fix used variable width. // The recent fix uses fixed width again, according to the fixed width cells. @@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo73389) CPPUNIT_TEST_FIXTURE(Test, testTdf133735) { createSwDoc("fdo73389.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:spacing", "after", u"0"); @@ -456,7 +456,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133735) CPPUNIT_TEST_FIXTURE(Test, testTdf134569_nestedTable) { createSwDoc("tdf134569_nestedTable.docx"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); // non-overridden w:after spacing in the table was pushing the document to the second page. CPPUNIT_ASSERT_EQUAL(1, getPages()); } @@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134569_nestedTable) CPPUNIT_TEST_FIXTURE(Test, testTdf59274) { createSwDoc("tdf59274.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // Table with "auto" table width and incomplete grid: 11 columns, but only 4 gridCol elements. xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSmartartStrict) }; createSwDoc("strict-smartart.docx"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); verify(); } @@ -732,7 +732,7 @@ DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf116194) { createSwDoc("tdf116194.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that the importer lost consecutive tables with w:gridBefore xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:tbl", 2); @@ -741,7 +741,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf116194) CPPUNIT_TEST_FIXTURE(Test, testTdf134606) { createSwDoc("tdf134606.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // The problem was that the importer lost the nested table structure with w:gridBefore xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl"); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 425606d0a445..49d3d17128c1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -31,7 +31,7 @@ class Test : public SwModelTestBase { public: - Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) {} + Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {} }; DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx") @@ -77,7 +77,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor) { createSwDoc("tdf92524_autoColor.doc"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(getParagraph(1), u"ParaBackColor"_ustr)); } @@ -85,7 +85,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor) CPPUNIT_TEST_FIXTURE(Test, testTdf116436_rowFill) { createSwDoc("tdf116436_rowFill.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); @@ -103,7 +103,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121665_back2backColumnBreaks, "tdf121665_back2ba CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent0) { createSwDoc("tdf126795_TabsRelativeToIndent0.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), u"ParaTabStops"_ustr); CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength()); @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent0) CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent1) { createSwDoc("tdf126795_TabsRelativeToIndent1.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), u"ParaTabStops"_ustr); CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength()); @@ -152,7 +152,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124384, "tdf124384.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf121456_tabsOffset) { createSwDoc("tdf121456_tabsOffset.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); for (int i=2; i<8; i++) { uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( i ), u"ParaTabStops"_ustr); @@ -166,7 +166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121456_tabsOffset) CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle) { createSwDoc("tdf121456_tabsOffset.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:t", u"Inhaltsverzeichnis"); assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:instrText", u" TOC \f \o \"1-9\" \h"); @@ -177,7 +177,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle) CPPUNIT_TEST_FIXTURE(Test, testTdf129525) { createSwDoc("tdf129525.rtf"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[4]/w:t", u"Overview"); assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[5]/w:t", u"3"); @@ -198,7 +198,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitleDocx) { createSwDoc("tdf121456_tabsOffset.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(7, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -255,7 +255,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_stri CPPUNIT_TEST_FIXTURE(Test, testTdf76683_negativeTwipsMeasure) { createSwDoc("tdf76683_negativeTwipsMeasure.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col", 2); sal_uInt32 nColumn1 = getXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[1]", "w").toUInt32(); @@ -360,7 +360,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf94801, "tdf94801.docx") CPPUNIT_TEST_FIXTURE(Test, testParagraphSplitOnSectionBorder) { createSwDoc("parasplit-on-section-border.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(2, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); @@ -373,7 +373,7 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphSplitOnSectionBorder) CPPUNIT_TEST_FIXTURE(Test, testTdf44832_testSectionWithDifferentHeader) { createSwDoc("tdf44832_section_new_header.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(2, getPages()); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:headerReference", 1); @@ -420,7 +420,7 @@ DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.d CPPUNIT_TEST_FIXTURE(Test, testTdf117805) { createSwDoc("tdf117805.odt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference<packages::zip::XZipFileAccess2> xNameAccess @@ -471,7 +471,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf113399) { createSwDoc("tdf113399.doc"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); // 0 padding was not preserved // In LO 0 is the default, but in OOXML format the default is 254 / 127 uno::Reference<beans::XPropertySet> xPropSet(getShape(1), uno::UNO_QUERY); @@ -548,7 +548,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142542_cancelledAutospacing, "tdf142542_cancelle CPPUNIT_TEST_FIXTURE(Test, testTdf137655) { createSwDoc("tdf137655.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // These were 280. assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "before", u"0"); @@ -594,7 +594,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_firstParaInSection, "tdf104354_firstParaI CPPUNIT_TEST_FIXTURE(Test, testPageBreak_after) { createSwDoc("pageBreak_after.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); // The problem was that the page breakAfter put the empty page BEFORE the table xmlDocUniquePtr pDump = parseLayoutDump(); assertXPath(pDump, "/root/page[1]/body/tab", 1); @@ -722,7 +722,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCe CPPUNIT_TEST_FIXTURE(Test, testTdf98620_environmentBiDi) { createSwDoc("tdf98620_environmentBiDi.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(2, getPages()); CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( getParagraph(1), u"WritingMode"_ustr )); CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(1), u"ParaAdjust"_ustr )); @@ -871,7 +871,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149996, "lorem_hyperlink.fodt") CPPUNIT_TEST_FIXTURE(Test, testGroupedShapeLink) { createSwDoc("grouped_link.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); // tdf#145147 Hyperlink in grouped shape not imported // tdf#154469 Hyperlink in grouped shape not exported uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index bf020ba383b5..fe50033e7252 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -25,7 +25,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr) + : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) { } }; @@ -33,7 +33,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference) { createSwDoc("table_cross_reference.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // tdf#42346: Cross references to tables were not saved // MSO uses simple bookmarks for referencing table caption, so we do the same by export @@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference) CPPUNIT_TEST_FIXTURE(Test, testTableCrossReferenceCustomFormat) { createSwDoc("table_cross_reference_custom_format.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // tdf#42346: Cross references to tables were not saved // Check also captions with custom formatting @@ -340,7 +340,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableCrossReferenceCustomFormat) CPPUNIT_TEST_FIXTURE(Test, testObjectCrossReference) { createSwDoc("object_cross_reference.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(10, getShapes()); CPPUNIT_ASSERT_EQUAL(2, getPages()); // tdf#42346: Cross references to objects were not saved @@ -731,14 +731,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTd112202) createSwDoc("090716_Studentische_Arbeit_VWS.docx"); verify(); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); verify(/*bIsExport*/ true); } CPPUNIT_TEST_FIXTURE(Test, testTdf79435_legacyInputFields) { createSwDoc("tdf79435_legacyInputFields.doc"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); //using .doc input file to verify cross-format compatibility. uno::Reference<text::XFormField> xFormField = getProperty<uno::Reference<text::XFormField>>( getRun(getParagraph(5), 3), u"Bookmark"_ustr); @@ -888,7 +888,7 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx") CPPUNIT_TEST_FIXTURE(Test, testVMLShapetypeId) { createSwDoc("controlshape.fodt"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // must be _x0000_t<NR> assertXPath(pXmlDoc, @@ -906,7 +906,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLShapetypeId) CPPUNIT_TEST_FIXTURE(Test, testTdf73547) { createSwDoc("tdf73547-dash.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); double nD = getXPath(pXmlDoc, "//a:custDash/a:ds[1]", "d").toDouble(); CPPUNIT_ASSERT_DOUBLES_EQUAL(105000.0, nD, 5000.0); // was 100000 @@ -936,7 +936,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf105444) { createSwDoc("tdf105444.docx"); - save(mpFilter); + save(u"Office Open XML Text"_ustr); xmlDocUniquePtr pXmlComm = parseExport(u"word/comments.xml"_ustr); // there is no extra paragraph on Win32, only a single one. assertXPath(pXmlComm, "/w:comments/w:comment/w:p", 1); @@ -961,7 +961,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx") CPPUNIT_TEST_FIXTURE(Test, testTdf138780) { createSwDoc("tdf138780.odt"); - saveAndReload(mpFilter); + saveAndReload(u"Office Open XML Text"_ustr); CPPUNIT_ASSERT_EQUAL(1, getPages()); // Paragraphs were not part of a numbering anymore after roundtrip. -e ... etc. - the rest is truncated
