summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-06-30 23:08:31 +0200
committerEike Rathke <erack@redhat.com>2020-07-01 12:41:44 +0200
commit5eb23da4c4a6ba6c35142918d0313432365b8e51 (patch)
treedd8d7de240056f47c777881c66ecfb9930c1f579 /sc/qa/unit
parent1b857954faf28fe4a63ee81686a5448766c213e7 (diff)
Resolves: tdf#85551 OFFSET() NewWidth and NewHeight must be >0 if given
This also makes it necessary to adjust a test that reused the bug document for a different scenario but checked the result. Change-Id: I80136747445d5029aa5c894270448f002c567e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97553 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit f31d8d61859bb375c99419ff176adca27a9197b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97509
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 694644b77df3..b68c5e6cd941 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -123,14 +123,18 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124816)
ScDocument* pDoc = pModelObj->GetDocument();
CPPUNIT_ASSERT(pDoc);
+ // The actual result is completely unrelated to this test and behaviour of
+ // OFFSET() was changed as of tdf#85551 and here result of that test
+ // document is now Err:502 instead of 0.
+ const OUString aExpectedResult("Err:502");
checkCurrentCell(3, 9);
- CPPUNIT_ASSERT_EQUAL(OUString("0"), pDoc->GetString(ScAddress(3, 9, 0)));
+ CPPUNIT_ASSERT_EQUAL(aExpectedResult, pDoc->GetString(ScAddress(3, 9, 0)));
//Without the fix, it would crash
dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(3, 9, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- CPPUNIT_ASSERT_EQUAL(OUString("0"), pDoc->GetString(ScAddress(3, 9, 0)));
+ CPPUNIT_ASSERT_EQUAL(aExpectedResult, pDoc->GetString(ScAddress(3, 9, 0)));
}
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124815)