[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 16 20:08:58 UTC 2021
sc/qa/unit/uicalc/uicalc.cxx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
commit ea7b9f87556414d37b83a5dd45cd944d97597ad1
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Aug 16 18:56:14 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Aug 16 22:04:31 2021 +0200
tdf#143896: sc_uicalc: Add unittest
Change-Id: Idb8aa411a9e9d2c83346f21705ff4ae5aef74aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120554
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 5ddf2165a29b..034df5aa3e7d 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -210,6 +210,28 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138432)
CPPUNIT_ASSERT_EQUAL(OUString("12345,67"), pDoc->GetString(ScAddress(0, 1, 0)));
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143896)
+{
+ mxComponent = loadFromDesktop("private:factory/scalc");
+ ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
+ CPPUNIT_ASSERT(pModelObj);
+ ScDocument* pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ insertStringToCell(*pModelObj, "A2000", "Test");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), pDoc->GetString(ScAddress(0, 1999, 0)));
+
+ pModelObj = saveAndReload(mxComponent, "Calc Office Open XML");
+ pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Test
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), pDoc->GetString(ScAddress(0, 1999, 0)));
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf100582)
{
ScModelObj* pModelObj = createDoc("tdf100582.xls");
More information about the Libreoffice-commits
mailing list