[Libreoffice-commits] core.git: sc/qa
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 25 10:34:41 UTC 2019
sc/qa/unit/tiledrendering/tiledrendering.cxx | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
New commits:
commit b929d645ad1b0959c1491629dc88d3124794f922
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Sat Sep 21 16:39:46 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Sep 25 12:33:48 2019 +0200
sc lok: Test invalidation triggered by jumping to the last row on the sheet
Change-Id: I27e9a1cea465fab2c129754b2ebba978919c2bca
Reviewed-on: https://gerrit.libreoffice.org/79496
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index acd017773b54..a2f3e800f72e 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -104,6 +104,7 @@ public:
void testInsertDeletePageInvalidation();
void testGetRowColumnHeadersInvalidation();
void testJumpHorizontallyInvalidation();
+ void testJumpToLastRowInvalidation();
CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
CPPUNIT_TEST(testRowColumnSelections);
@@ -143,6 +144,7 @@ public:
CPPUNIT_TEST(testInsertDeletePageInvalidation);
CPPUNIT_TEST(testGetRowColumnHeadersInvalidation);
CPPUNIT_TEST(testJumpHorizontallyInvalidation);
+ CPPUNIT_TEST(testJumpToLastRowInvalidation);
CPPUNIT_TEST_SUITE_END();
private:
@@ -1812,6 +1814,30 @@ void ScTiledRenderingTest::testJumpHorizontallyInvalidation()
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(26775, 0, 39525, 13005), aView1.m_aInvalidations[1]);
}
+void ScTiledRenderingTest::testJumpToLastRowInvalidation()
+{
+ comphelper::LibreOfficeKit::setActive();
+
+ ScModelObj* pModelObj = createDoc("empty.ods");
+ ScViewData* pViewData = ScDocShell::GetViewData();
+ CPPUNIT_ASSERT(pViewData);
+
+ int nView1 = SfxLokHelper::getView();
+ ViewCallback aView1;
+ CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
+
+ SfxLokHelper::setView(nView1);
+ aView1.m_bInvalidateTiles = false;
+ aView1.m_aInvalidations.clear();
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DOWN | KEY_MOD1);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DOWN | KEY_MOD1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size());
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1000000000, 1000000000), aView1.m_aInvalidations[0]);
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 13005, 26775, 127500255), aView1.m_aInvalidations[1]);
+}
+
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
More information about the Libreoffice-commits
mailing list