diff options
author | Tünde Tóth <tundeth@gmail.com> | 2019-09-24 11:53:46 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-09-30 12:59:21 +0200 |
commit | a0f46953883aadab1ae7cae5641d3fc1a6089f81 (patch) | |
tree | f8cbe13e3200692853fd47dc0c57351866fff3bd /sw/qa | |
parent | 2941768d4f17f95a7450475d2e3e9173e3aa98fe (diff) |
tdf#127732 DOCX export: fix internal hyperlinks to frame target
Hyperlinks to internal frame targets didn't work in Word.
Change-Id: Ia402bbdd2e77d8d3bb68ed2ed3a6bde1a913617c
Reviewed-on: https://gerrit.libreoffice.org/79448
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/internal_hyperlink_frame.odt | bin | 0 -> 9021 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt Binary files differnew file mode 100644 index 000000000000..2497d5926a26 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 7d94913e9449..33d767e0bd81 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -771,6 +771,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127605, "tdf127605.odt") CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } +DECLARE_OOXMLEXPORT_TEST(testTdf127732, "internal_hyperlink_frame.odt") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + + OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:bookmarkStart", "name"); + OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); + CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |