diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-10-09 21:50:55 +0200 |
---|---|---|
committer | Marco Cecchetti <mrcekets@gmail.com> | 2016-10-14 15:01:36 +0000 |
commit | 6c9337866d9b4fe4870c3ab2729c6837d07473ff (patch) | |
tree | 5e955cecfe583cb4c8f5595feeb658bdd0436dc2 /sc/qa | |
parent | a6c008b12cd2c2daf95a18eff0d72239588a5321 (diff) |
LOK: Calc: missing invalidate when ending larger-than-cell edit text
- reason: when text content goes further than the cell border the
output area of the edit view is grown (extended to an adjacent cell),
on the contrary the output area of edit views used only for
invalidating windows of other view shells is never updated, so, in
other views, only the tile where the edit cell is placed is
invalidated;
- solution: instead of adding fake edit views for invalidation porpuse
(and having to updated the output area of each of them when required),
the new solution provides each new edit view, created on cell editing,
with a set of `foreign` windows related to other views, they are added
and removed to this collection owned by an edit view still using the
ScExtraEditViewManager, which has been in turn simplified; when
EdiEngine::UpdateViews is invoked not only the window where the edit
view lives is invalidated but also all `foreign` windows in the owned
set;
- note: ScTiledRenderingTest::testTextEditViewInvalidations unit test
has been enhanced in order to test correct invalidation when text
content goes out of the starting tile.
Change-Id: Id223fb1a032d3b18d2cf70df31f704abd245b3ac
Reviewed-on: https://gerrit.libreoffice.org/29625
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/29658
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/tiledrendering/tiledrendering.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index dac54bf3852e..83db147f15b3 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -738,6 +738,23 @@ void ScTiledRenderingTest::testTextEditViewInvalidations() CPPUNIT_ASSERT(lcl_hasEditView(*pViewData)); CPPUNIT_ASSERT(aView2.m_bInvalidateTiles); + // text edit a cell in view #1 until + // we can be sure we are out of the initial tile + for (int i = 0; i < 40; ++i) + { + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); + } + Scheduler::ProcessEventsToIdle(); + + // text edit a cell in view #1 inside the new tile and + // check that view #2 receive a tile invalidate message + aView2.m_bInvalidateTiles = false; + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); + Scheduler::ProcessEventsToIdle(); + CPPUNIT_ASSERT(aView2.m_bInvalidateTiles); + // view #3 SfxLokHelper::createView(); ViewCallback aView3; |