[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 24 15:46:54 UTC 2021
sc/qa/unit/uicalc/data/tdf112735.ods |binary
sc/qa/unit/uicalc/uicalc.cxx | 18 ++++++++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit dd681824b5415ba75e01034e48fa0ae2ec8474c5
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Mar 24 09:24:43 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Mar 24 16:46:11 2021 +0100
tdf#112735: sc_uicalc: Add unittest
Change-Id: I1744f666dbd59f71bc0e43afd81c0aa164aff515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113016
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/uicalc/data/tdf112735.ods b/sc/qa/unit/uicalc/data/tdf112735.ods
new file mode 100644
index 000000000000..2bb75fc5a559
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf112735.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 6d161ab81c23..e3f1d2e14496 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1093,6 +1093,24 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf130614)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage->GetObjCount());
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf112735)
+{
+ ScModelObj* pModelObj = createDoc("tdf112735.ods");
+ ScDocument* pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("(empty)"), pDoc->GetString(ScAddress(1, 0, 0)));
+
+ goToCell("B3");
+
+ dispatchCommand(mxComponent, ".uno:RecalcPivotTable", {});
+
+ // Without the fix in place, this test would haved failed with
+ // - Expected: (empty)
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("(empty)"), pDoc->GetString(ScAddress(1, 0, 0)));
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133342)
{
ScModelObj* pModelObj = createDoc("tdf133342.ods");
More information about the Libreoffice-commits
mailing list