[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 2 19:48:39 UTC 2021
sc/qa/unit/subsequent_filters-test.cxx | 36 +++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
New commits:
commit 4c95b7415340b07fd94e8f374aa2dfbb070783f8
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Feb 2 17:33:52 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Feb 2 20:47:54 2021 +0100
tdf#84762: sc_subsequent_filters: Add unittest
Change-Id: I54f7b65628c40922eeb9159435f94e675f3c888a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110329
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 7ceee84f63ae..89a5eb084244 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -227,6 +227,7 @@ public:
void testCopyMergedNumberFormats();
void testVBAUserFunctionXLSM();
void testEmbeddedImageXLS();
+ void testTdf84762();
void testTdf44076();
void testEditEngStrikeThroughXLSX();
void testRefStringXLSX();
@@ -413,6 +414,7 @@ public:
CPPUNIT_TEST(testVBAUserFunctionXLSM);
CPPUNIT_TEST(testEmbeddedImageXLS);
CPPUNIT_TEST(testErrorOnExternalReferences);
+ CPPUNIT_TEST(testTdf84762);
CPPUNIT_TEST(testTdf44076);
CPPUNIT_TEST(testEditEngStrikeThroughXLSX);
CPPUNIT_TEST(testRefStringXLSX);
@@ -3704,6 +3706,40 @@ void ScFiltersTest::testErrorOnExternalReferences()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf84762()
+{
+ ScDocShellRef xDocSh = loadDoc(u"blank.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open empty doc", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ rDoc.SetString(ScAddress(0,0,0), "=RAND()");
+ rDoc.SetString(ScAddress(0,1,0), "=RAND()");
+ rDoc.SetString(ScAddress(1,0,0), "=RAND()*A1");
+ rDoc.SetString(ScAddress(1,1,0), "=RAND()*B1");
+
+ double nValA1, nValB1, nValA2, nValB2;
+
+ // Without the fix in place, some cells wouldn't have been updated
+ // after using F9 a few times
+ for(sal_Int16 i = 0; i < 10; ++i)
+ {
+ nValA1 = rDoc.GetValue(0, 0, 0);
+ nValB1 = rDoc.GetValue(0, 1, 0);
+ nValA2 = rDoc.GetValue(1, 0, 0);
+ nValB2 = rDoc.GetValue(1, 1, 0);
+
+ xDocSh->DoRecalc(false);
+
+ CPPUNIT_ASSERT(nValA1 != rDoc.GetValue(0, 0, 0));
+ CPPUNIT_ASSERT(nValA2 != rDoc.GetValue(0, 1, 0));
+ CPPUNIT_ASSERT(nValB1 != rDoc.GetValue(1, 0, 0));
+ CPPUNIT_ASSERT(nValB2 != rDoc.GetValue(1, 1, 0));
+ }
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testTdf44076()
{
ScDocShellRef xDocSh = loadDoc(u"blank.", FORMAT_ODS);
More information about the Libreoffice-commits
mailing list