diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-01-27 16:27:06 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-01-27 21:28:41 +0100 |
commit | 4c61179b747e6309b9693cc1e2e79b2589aa807d (patch) | |
tree | 90ec44c43268dcdaca2467c8006deffa2646a6ee /sc | |
parent | 8aa853b2365430558693a32aa23825e199543cf9 (diff) |
add test for tdf#96912
Change-Id: I6d3f7f86cffef8e91cf108c3aecdf5278e4b8658
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xlsx/preserve_space.xlsx | bin | 0 -> 7175 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/preserve_space.xlsx b/sc/qa/unit/data/xlsx/preserve_space.xlsx Binary files differnew file mode 100644 index 000000000000..401a908296ea --- /dev/null +++ b/sc/qa/unit/data/xlsx/preserve_space.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 761a34ae7685..e1f89b4c231f 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -155,6 +155,7 @@ public: void testMoveCellAnchoredShapes(); void testMatrixMultiplication(); void testPreserveTextWhitespaceXLSX(); + void testPreserveTextWhitespace2XLSX(); void testTextDirection(); void testRefStringXLSX(); @@ -211,6 +212,7 @@ public: CPPUNIT_TEST(testLinkedGraphicRT); CPPUNIT_TEST(testImageWithSpecialID); CPPUNIT_TEST(testPreserveTextWhitespaceXLSX); + CPPUNIT_TEST(testPreserveTextWhitespace2XLSX); CPPUNIT_TEST(testSheetLocalRangeNameXLS); CPPUNIT_TEST(testSheetTextBoxHyperlink); CPPUNIT_TEST(testFontSize); @@ -2782,6 +2784,20 @@ void ScExportTest::testPreserveTextWhitespaceXLSX() xDocSh->DoClose(); } +void ScExportTest::testPreserveTextWhitespace2XLSX() +{ + ScDocShellRef xShell = loadDoc("preserve_space.", FORMAT_XLSX); + ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.Is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); + CPPUNIT_ASSERT(pDoc); + assertXPath(pDoc, "/x:sst/x:si[1]/x:t", "space", "preserve"); + assertXPath(pDoc, "/x:sst/x:si[2]/x:r[1]/x:t", "space", "preserve"); + assertXPath(pDoc, "/x:sst/x:si[2]/x:r[2]/x:t", "space", "preserve"); + xDocSh->DoClose(); +} + void ScExportTest::testHiddenShape() { ScDocShellRef xDocSh = loadDoc("hiddenShape.", FORMAT_XLSX); |