sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
New commits: commit 68826c545434653b083ef5fd4ec955b1e5fb73d3 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Jan 17 08:26:03 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jan 17 10:02:35 2024 +0100 CppunitTest_sw_ooxmllinks: convert one test to use CPPUNIT_TEST_FIXTURE() No need go via Writer-specific macros. Change-Id: Ib5e0b4f527cb6ff7ba72fd54037a339274aaf379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162186 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx index 6d5fefb9e968..247160636829 100644 --- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx @@ -78,9 +78,7 @@ CPPUNIT_TEST_SUITE_END(); \ void Import() \ { \ - auto xChanges = comphelper::ConfigurationChanges::create(); \ - officecfg::Office::Common::Save::URL::FileSystem::set(!bAbsolute, xChanges); \ - xChanges->commit(); \ + SetAbsolute(bAbsolute); \ executeImportTest(FileName); \ } \ void verify() override; \ @@ -95,12 +93,21 @@ public: : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") { } + + void SetAbsolute(bool bAbsolute) + { + auto xChanges = comphelper::ConfigurationChanges::create(); + officecfg::Office::Common::Save::URL::FileSystem::set(!bAbsolute, xChanges); + xChanges->commit(); + } }; /* IMPORT */ -DECLARE_LINKS_IMPORT_TEST(testRelativeToRelativeImport, "relative-link.docx", USE_RELATIVE) +CPPUNIT_TEST_FIXTURE(Test, testRelativeToRelativeImport) { + SetAbsolute(USE_RELATIVE); + createSwDoc("relative-link.docx"); uno::Reference<text::XTextRange> xParagraph = getParagraph(1); uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1); OUString sTarget = getProperty<OUString>(xText, "HyperLinkURL");