diff options
author | Tünde Tóth <tundeth@gmail.com> | 2019-08-16 09:43:21 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-08-21 12:46:13 +0200 |
commit | cd293966322a45dec000c6612979c267307a3868 (patch) | |
tree | 39a910aa7ffe6f299fcc2de0297e51bd12c8ddc3 /sw | |
parent | 8b30e6f03407df94e0adb46c6f3fb492a2419114 (diff) |
tdf#123627 DOCX import: fix tinderboxing
related to commit 4c30848c852c44cbad8509c770feed5244f1940f
"tdf#123627 DOCX import: fix relative hyperlinks to documents",
until fixing possible profile-dependency of the unit test.
Change-Id: Ifbc2a5c94957234d46371655523c8cd2595e98e8
Reviewed-on: https://gerrit.libreoffice.org/77559
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx index 4be6351a12f1..3939fc69b723 100644 --- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx @@ -184,15 +184,14 @@ DECLARE_LINKS_IMPORT_TEST(testTdf123627_import, "tdf123627.docx", USE_RELATIVE) /* EXPORT */ DECLARE_LINKS_EXPORT_TEST(testRelativeToRelativeExport, "relative-link.docx", USE_RELATIVE, - DONT_MODIFY_LINK) + USE_TEMP_DIR) { xmlDocPtr pXmlDoc = parseExport("word/_rels/document.xml.rels"); if (!pXmlDoc) return; - OUString sTarget = getXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[2]", "Target"); -// CPPUNIT_ASSERT(!sTarget.startsWith("file:///")); - CPPUNIT_ASSERT(sTarget.endsWith("relative.docx")); + assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']", "Target", + "relative.docx"); } DECLARE_LINKS_EXPORT_TEST(testRelativeToAbsoluteExport, "relative-link.docx", USE_ABSOLUTE, @@ -229,15 +228,14 @@ DECLARE_LINKS_EXPORT_TEST(testAbsoluteToAbsoluteExport, "absolute-link.docx", US CPPUNIT_ASSERT(sTarget.endsWith("test.docx")); } -DECLARE_LINKS_EXPORT_TEST(testTdf123627_export, "tdf123627.docx", USE_RELATIVE, DONT_MODIFY_LINK) +DECLARE_LINKS_EXPORT_TEST(testTdf123627_export, "tdf123627.docx", USE_RELATIVE, USE_TEMP_DIR) { xmlDocPtr pXmlDoc = parseExport("word/_rels/document.xml.rels"); if (!pXmlDoc) return; - OUString sTarget = getXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[2]", "Target"); -// CPPUNIT_ASSERT(!sTarget.startsWith("file:///")); - CPPUNIT_ASSERT(sTarget.endsWith("New/test.docx")); + assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']", "Target", + "test.docx"); } DECLARE_LINKS_EXPORT_TEST(testTdf126590_export, "tdf126590.docx", USE_ABSOLUTE, DONT_MODIFY_LINK) |