diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-27 20:23:29 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-27 20:41:44 +0200 |
commit | 5142c9226318019200ed6e055b4eb1503bd002db (patch) | |
tree | 845bbc0f420e8f7b807fcdecd9b95561baaa0833 /sc/qa | |
parent | 5d33f6634c5fb84cb2a801d7819c8affb031cc02 (diff) |
add test for tdf#91334
Change-Id: Iaeee4a86e000445a23970986d5750d27adff2e2d
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/hyperlink.xlsx | bin | 0 -> 9833 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 15 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sc/qa/unit/data/xlsx/hyperlink.xlsx b/sc/qa/unit/data/xlsx/hyperlink.xlsx Binary files differnew file mode 100644 index 000000000000..059e649987c7 --- /dev/null +++ b/sc/qa/unit/data/xlsx/hyperlink.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 60b4b5c7dafe..3f0ea9088c8c 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -144,6 +144,7 @@ public: void testTextUnderlineColor(); void testSheetRunParagraphProperty(); void testHiddenShape(); + void testHyperlinkXLSX(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -198,6 +199,7 @@ public: CPPUNIT_TEST(testTextUnderlineColor); CPPUNIT_TEST(testSheetRunParagraphProperty); CPPUNIT_TEST(testHiddenShape); + CPPUNIT_TEST(testHyperlinkXLSX); CPPUNIT_TEST_SUITE_END(); @@ -225,7 +227,8 @@ void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) { BAD_CAST("text"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0") }, { BAD_CAST("xlink"), BAD_CAST("http://www.w3c.org/1999/xlink") }, { BAD_CAST("xdr"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing") }, - { BAD_CAST("x"), BAD_CAST("http://schemas.openxmlformats.org/spreadsheetml/2006/main") } + { BAD_CAST("x"), BAD_CAST("http://schemas.openxmlformats.org/spreadsheetml/2006/main") }, + { BAD_CAST("r"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships") } }; for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i) { @@ -2642,6 +2645,16 @@ void ScExportTest::testHiddenShape() assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:nvSpPr/xdr:cNvPr", "hidden", "1"); } +void ScExportTest::testHyperlinkXLSX() +{ + ScDocShellRef xDocSh = loadDoc("hyperlink.", XLSX); + CPPUNIT_ASSERT(xDocSh.Is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", XLSX); + CPPUNIT_ASSERT(pDoc); + assertXPath(pDoc, "/r:Relationships/r:Relationship", "Target", "#Sheet2!A1"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |