sc/qa/unit/data/ods/tdf98844.ods |binary sc/qa/unit/subsequent_filters-test.cxx | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+)
New commits: commit 263dedd5f6c242045174a3be21a16212f65408de Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Sun Jun 28 19:21:44 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Sun Jun 28 20:32:04 2020 +0200 tdf#98844: sc: Add unittest Change-Id: I31fc5ca3778048010e34dafd289e0cadf7ee4169 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97347 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/data/ods/tdf98844.ods b/sc/qa/unit/data/ods/tdf98844.ods new file mode 100644 index 000000000000..1e072b7c65e0 Binary files /dev/null and b/sc/qa/unit/data/ods/tdf98844.ods differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 0cb013df3bda..71d0d22ea069 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -226,6 +226,7 @@ public: void testBnc762542(); void testTdf103734(); + void testTdf98844(); void testTdf100458(); void testTdf127982(); void testTdf100709XLSX(); @@ -382,6 +383,7 @@ public: CPPUNIT_TEST(testHiddenSheetsXLSX); CPPUNIT_TEST(testTdf103734); + CPPUNIT_TEST(testTdf98844); CPPUNIT_TEST(testTdf100458); CPPUNIT_TEST(testTdf127982); CPPUNIT_TEST(testTdf100709XLSX); @@ -3744,6 +3746,25 @@ void ScFiltersTest::testTdf103734() xDocSh->DoClose(); } +void ScFiltersTest::testTdf98844() +{ + ScDocShellRef xDocSh = loadDoc("tdf98844.", FORMAT_ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is()); + ScDocument& rDoc = xDocSh->GetDocument(); + + CPPUNIT_ASSERT_EQUAL(47.6227, rDoc.GetValue(ScAddress(0,7,0))); + CPPUNIT_ASSERT_EQUAL(48.0, rDoc.GetValue(ScAddress(0,8,0))); + + xDocSh->DoHardRecalc(); + + // Without the fix in place, SUM() wouldn't have been updated when + // Precision as shown is enabled + CPPUNIT_ASSERT_EQUAL(48.0, rDoc.GetValue(ScAddress(0,7,0))); + CPPUNIT_ASSERT_EQUAL(48.0, rDoc.GetValue(ScAddress(0,8,0))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testTdf100458() { ScDocShellRef xDocSh = loadDoc("tdf100458_lost_zero_value.", FORMAT_ODS); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits