diff options
author | Tünde Tóth <tundeth@gmail.com> | 2019-07-30 09:29:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-08-01 10:24:21 +0200 |
commit | a912df26c6bd9251802f853775753d20f3b3de2b (patch) | |
tree | 2135f60bc8556607da60c9e9661439266d496743 /sw | |
parent | 97185d833c8dc75032ff73cbf597635b32c5f5fb (diff) |
tdf#126590 DOCX import: fix absolute hyperlinks to documents
Absolute links in DOCX documents created with Word didn't work.
Change-Id: Ie23c9ded1c88752768b925ec26df3061beeddd8e
Reviewed-on: https://gerrit.libreoffice.org/76581
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf126590.docx | bin | 0 -> 12046 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126590.docx b/sw/qa/extras/ooxmlexport/data/tdf126590.docx Binary files differnew file mode 100644 index 000000000000..147db4565275 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf126590.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx index dc5deaf30df4..0a9ab492e0e7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx @@ -240,6 +240,16 @@ DECLARE_LINKS_EXPORT_TEST(testTdf123627_export, "tdf123627.docx", USE_RELATIVE, CPPUNIT_ASSERT(sTarget.endsWith("New/test.docx")); } +DECLARE_LINKS_EXPORT_TEST(testTdf126590_export, "tdf126590.docx", USE_ABSOLUTE, DONT_MODIFY_LINK) +{ + xmlDocPtr pXmlDoc = parseExport("word/_rels/document.xml.rels"); + if (!pXmlDoc) + return; + // in the original file: Target="file:///C:\TEMP\test.docx" => invalid file URI + assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']", "Target", + "file:///C:/TEMP/test.docx"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |