[Libreoffice-commits] core.git: sc/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 12 12:36:21 UTC 2020


 sc/qa/unit/data/xlsx/tdf105272.xlsx   |binary
 sc/qa/unit/subsequent_export-test.cxx |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit b0e1592bbbe5d25d65b834e7202b4e6cdee435a6
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Apr 12 12:47:04 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Sun Apr 12 14:35:48 2020 +0200

    tdf#105272: Add unittest
    
    Change-Id: I80aa192651595a719a5ac9a06423d2cf80aa7a3d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92078
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf105272.xlsx b/sc/qa/unit/data/xlsx/tdf105272.xlsx
new file mode 100644
index 000000000000..51fc60d442cc
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf105272.xlsx differ
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);


More information about the Libreoffice-commits mailing list