diff options
Diffstat (limited to 'sc/qa/unit/subsequent_export-test2.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_export-test2.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_export-test2.cxx b/sc/qa/unit/subsequent_export-test2.cxx index 361ab683a7f3..2a3a1de1b6f7 100644 --- a/sc/qa/unit/subsequent_export-test2.cxx +++ b/sc/qa/unit/subsequent_export-test2.cxx @@ -198,7 +198,7 @@ public: void testTdf142854_GridVisibilityImportXlsxInHeadlessMode(); void testTdf140431(); void testTdf142929_filterLessThanXLSX(); - void testTdf143220XLSX(); + void testHyperlinkLocationXLSX(); void testTdf142264ManyChartsToXLSX(); void testTdf143929MultiColumnToODS(); void testTdf142578(); @@ -302,7 +302,7 @@ public: CPPUNIT_TEST(testTdf142854_GridVisibilityImportXlsxInHeadlessMode); CPPUNIT_TEST(testTdf140431); CPPUNIT_TEST(testTdf142929_filterLessThanXLSX); - CPPUNIT_TEST(testTdf143220XLSX); + CPPUNIT_TEST(testHyperlinkLocationXLSX); CPPUNIT_TEST(testTdf142264ManyChartsToXLSX); CPPUNIT_TEST(testTdf143929MultiColumnToODS); CPPUNIT_TEST(testTdf142578); @@ -2464,7 +2464,7 @@ void ScExportTest2::testTdf142929_filterLessThanXLSX() xDocSh->DoClose(); } -void ScExportTest2::testTdf143220XLSX() +void ScExportTest2::testHyperlinkLocationXLSX() { ScDocShellRef xDocSh = loadDoc(u"tdf143220.", FORMAT_ODS); CPPUNIT_ASSERT(xDocSh.is()); @@ -2472,7 +2472,13 @@ void ScExportTest2::testTdf143220XLSX() xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); - assertXPath(pDoc, "/x:worksheet/x:hyperlinks/x:hyperlink", "location", "Sheet2!A1"); + + // tdf#143220 link to sheet not valid without cell reference + assertXPath(pDoc, "/x:worksheet/x:hyperlinks/x:hyperlink[@ref='A1']", "location", "Sheet2!A1"); + + // tdf#145079 link with defined name target didn't work because Calc added "A1" at the end + assertXPath(pDoc, "/x:worksheet/x:hyperlinks/x:hyperlink[@ref='A2']", "location", "name"); + assertXPath(pDoc, "/x:worksheet/x:hyperlinks/x:hyperlink[@ref='A3']", "location", "db"); xDocSh->DoClose(); } |