[Libreoffice-commits] core.git: sc/qa

shubham656 (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 11:55:32 UTC 2021


 sc/qa/unit/uicalc/data/tdf126685.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx         |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit d9d86730a6acbb7fe1c94d7bf8b58b81ab51b4a6
Author:     shubham656 <shubham656jain at gmail.com>
AuthorDate: Sun Jun 27 15:37:04 2021 +0530
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 7 13:54:58 2021 +0200

    tdf#126685 Add UnitTest
    
    Change-Id: I84feb90f63f947a20db06cc66dd0f610fa71e7ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117945
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/uicalc/data/tdf126685.ods b/sc/qa/unit/uicalc/data/tdf126685.ods
new file mode 100644
index 000000000000..bb08e47635e2
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf126685.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index d133876f6d04..3b3bdadbd4e2 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -824,6 +824,24 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
     CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126685)
+{
+    ScModelObj* pModelObj = createDoc("tdf126685.ods");
+
+    ScDocument* pDoc = pModelObj->GetDocument();
+    CPPUNIT_ASSERT(pDoc);
+
+    dispatchCommand(mxComponent, ".uno:SelectAll", {}); // test should crash here without the fix
+    Scheduler::ProcessEventsToIdle();
+
+    CPPUNIT_ASSERT_EQUAL(
+        OUString("Control Height will change from 0.65 to 0.61 cm with 120dpi ..."),
+        pDoc->GetString(ScAddress(3, 1, 1)));
+    dispatchCommand(mxComponent, ".uno:Cut", {});
+
+    CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(3, 1, 1)));
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119793)
 {
     ScModelObj* pModelObj = createDoc("tdf119793.ods");


More information about the Libreoffice-commits mailing list