summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-06-24 17:19:30 +0200
committerLászló Németh <nemeth@numbertext.org>2019-06-26 11:03:12 +0200
commit100f43ab871bedda6b427645cbfc2c8083da98b5 (patch)
treeef34c385b6149458c2afe7ce97654cc2e07eef9b /sw/qa
parent2783a34899379dae84889c924e49481631280ab1 (diff)
tdf#78657 DOCX export: fix hyperlink inserted to image
Hyperlink inserted to image lost after export. tdf78657_picture_hyperlink.docx: Test file from Microsoft Word 2016. Change-Id: I1b2b9fe023aea3f46848a9d616374f7c08598756 Reviewed-on: https://gerrit.libreoffice.org/74653 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docxbin0 -> 21039 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx b/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx
new file mode 100644
index 000000000000..bc4759ecc342
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 408590660b82..4da5d109324a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -398,6 +398,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf78657, "tdf78657_picture_hyperlink.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocPtr pXmlRels = parseExport("word/_rels/document.xml.rels");
+ if (!pXmlDoc || !pXmlRels)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/wp:docPr/a:hlinkClick", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:nvPicPr/pic:cNvPr/a:hlinkClick", 1);
+ assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='http://www.google.com']", "TargetMode", "External");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */