diff options
author | Tünde Tóth <tundeth@gmail.com> | 2019-05-09 11:00:36 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-05-10 13:37:01 +0200 |
commit | 5ddaaa0c86a9c7851d2277d56b379a3412b1fff3 (patch) | |
tree | f8741fd07300d96ee0011239f4aea6053edb03c6 /sc/qa | |
parent | e896fc4ddf822c665a42fa5d314bb1dfd92de1a2 (diff) |
tdf#125173 fix hyperlink inserted to text box
Hyperlink inserted to text box lost after export.
Change-Id: I796e54339292cb4a5e98de1ead6558d66587d353
Reviewed-on: https://gerrit.libreoffice.org/72033
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/text_box_hyperlink.ods | bin | 0 -> 8538 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/text_box_hyperlink.ods b/sc/qa/unit/data/ods/text_box_hyperlink.ods Binary files differnew file mode 100644 index 000000000000..77778e99818b --- /dev/null +++ b/sc/qa/unit/data/ods/text_box_hyperlink.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index bc8545ca182e..1879924d705a 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -221,6 +221,7 @@ public: void testTdf115159(); void testTdf112567(); void testTdf123645XLSX(); + void testTdf125173XLSX(); void testXltxExport(); @@ -347,6 +348,7 @@ public: CPPUNIT_TEST(testTdf115159); CPPUNIT_TEST(testTdf112567); CPPUNIT_TEST(testTdf123645XLSX); + CPPUNIT_TEST(testTdf125173XLSX); CPPUNIT_TEST(testXltxExport); @@ -4352,6 +4354,22 @@ void ScExportTest::testTdf123645XLSX() assertXPath(pXmlRels, "/r:Relationships/r:Relationship[@Id='rId5']", "Target", "https://bugs.documentfoundation.org/show_bug.cgi?id=123645"); } +void ScExportTest::testTdf125173XLSX() +{ + ScDocShellRef xDocSh = loadDoc("text_box_hyperlink.", FORMAT_ODS); + CPPUNIT_ASSERT(xDocSh.is()); + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX); + + xmlDocPtr pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/drawing1.xml"); + CPPUNIT_ASSERT(pDoc); + assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp/xdr:nvSpPr/xdr:cNvPr/a:hlinkClick", 1); + + xmlDocPtr pXmlRels = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels"); + CPPUNIT_ASSERT(pXmlRels); + assertXPath(pXmlRels, "/r:Relationships/r:Relationship[@Id='rId1']", "Target", "http://www.google.com/"); + assertXPath(pXmlRels, "/r:Relationships/r:Relationship[@Id='rId1']", "TargetMode", "External"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |