diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-12 12:47:04 +0200 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2020-04-12 14:35:48 +0200 |
commit | b0e1592bbbe5d25d65b834e7202b4e6cdee435a6 (patch) | |
tree | 0a2babc7ba9ae0261b7a86d39299f056ecce77f2 | |
parent | 7768889c351e079f4fc59647ccafc37013217040 (diff) |
tdf#105272: Add unittest
Change-Id: I80aa192651595a719a5ac9a06423d2cf80aa7a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92078
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf105272.xlsx | bin | 0 -> 12785 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf105272.xlsx b/sc/qa/unit/data/xlsx/tdf105272.xlsx Binary files differnew file mode 100644 index 000000000000..51fc60d442cc --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf105272.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index e212fd9fe34b..2c8940b792d6 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -214,6 +214,7 @@ public: void testOpenDocumentAsReadOnly(); void testKeepSettingsOfBlankRows(); + void testTdf105272(); void testTdf118990(); void testTdf121612(); void testPivotCacheAfterExportXLSX(); @@ -352,6 +353,7 @@ public: CPPUNIT_TEST(testOpenDocumentAsReadOnly); CPPUNIT_TEST(testKeepSettingsOfBlankRows); + CPPUNIT_TEST(testTdf105272); CPPUNIT_TEST(testTdf118990); CPPUNIT_TEST(testTdf121612); CPPUNIT_TEST(testPivotCacheAfterExportXLSX); @@ -4327,6 +4329,21 @@ void ScExportTest::testKeepSettingsOfBlankRows() xDocSh->DoClose(); } +void ScExportTest::testTdf105272() +{ + ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX); + ScDocument& rDoc = xDocSh->GetDocument(); + //without the fix in place,it would fail + //Expected: Table1[[#This Row],[Total]]/Table1[[#This Row],['# Athletes]] + //Actual : table1[[#this row],[total]]/table1[[#this row],['# athletes]] + + ASSERT_FORMULA_EQUAL(rDoc, ScAddress(7, 3, 0), + "Table1[[#This Row],[Total]]/Table1[[#This Row],['# Athletes]]", + "Wrong formula"); +} + void ScExportTest::testTdf118990() { ScDocShellRef xDocSh = loadDoc("tdf118990.", FORMAT_XLSX); |