diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-16 10:48:46 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-17 07:49:56 +0100 |
commit | b447be3ccba686c4e35d61b05b50d31045c9d1ac (patch) | |
tree | 5e7af1828bcb0ae8c9284efbe4dfc97b3b51e89d /sc/qa/unit/uicalc | |
parent | 0e4a1615a77f7d4753ae5f657acff30bf6b248fc (diff) |
tdf#132057: sc_uicalc: Add unittest
Change-Id: I56c385e0458e2096e0c1e4fd0c85d47c40fe207b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129987
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/unit/uicalc')
-rw-r--r-- | sc/qa/unit/uicalc/data/tdf132057.ods | bin | 0 -> 21861 bytes | |||
-rw-r--r-- | sc/qa/unit/uicalc/uicalc.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/uicalc/data/tdf132057.ods b/sc/qa/unit/uicalc/data/tdf132057.ods Binary files differnew file mode 100644 index 000000000000..cc6b319c9ffa --- /dev/null +++ b/sc/qa/unit/uicalc/data/tdf132057.ods diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 317f9751c1c4..15d34995c4b2 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -722,6 +722,21 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf68290) lcl_AssertCurrentCursorPosition(*pDoc, "M3"); } +CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf132057) +{ + ScModelObj* pModelObj = createDoc("tdf132057.ods"); + ScDocument* pDoc = pModelObj->GetDocument(); + CPPUNIT_ASSERT(pDoc); + + lcl_AssertCurrentCursorPosition(*pDoc, "AU43"); + + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN); + Scheduler::ProcessEventsToIdle(); + + // Without the fix in place, the cursor would have jumped to cell BM1 + lcl_AssertCurrentCursorPosition(*pDoc, "G39"); +} + CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf122232) { ScModelObj* pModelObj = createDoc("tdf122232.ods"); |