summaryrefslogtreecommitdiff
path: root/sw/qa/extras/tiledrendering
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-11-22 17:04:19 -0500
committerAshod Nakashian <ashnakash@gmail.com>2016-11-25 14:02:35 +0000
commit9d2f30911de2f9d87cebb1a360fabe0bf9c05294 (patch)
treeead01e7fcd3c068517395706dc9ffa3c28e07e54 /sw/qa/extras/tiledrendering
parent3f20d981311d87a3c3ccc933f2e8c6e3e6d8ff39 (diff)
Lok: invalidate Writer comments correctly
Because notifications to all views were disabled (to avoid moving the cursors of everyone when someone adds a comment) invalidation was also broken. The issue was observed when a comment crossed tile boundaries, the other tile was not redrawn. This forces invalidation so tiles are rendered correctly, fixing this regression. One small issue remains in that invalidating a comment only invalidates the text-area and not the complete PostIt (specifically, the author and date are not invalidated). This means that they can still get trimmed when crossing tile boundaries. That will be addressed separately, as it was an existing issue before the regression this patch fixes. Change-Id: Ic8173e4873d58836883b897f735fc627bb0572ee Reviewed-on: https://gerrit.libreoffice.org/31091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sw/qa/extras/tiledrendering')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 7b441d67648a..19a40665d2df 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1506,6 +1506,14 @@ void SwTiledRenderingTest::testCommentEndTextEdit()
// of the comment.
CPPUNIT_ASSERT(!aView1.m_bOwnCursorAtOrigin);
+ // Hit enter and expect invalidation.
+ Scheduler::ProcessEventsToIdle();
+ aView1.m_bTilesInvalidated = false;
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
+
mxComponent->dispose();
mxComponent.clear();
comphelper::LibreOfficeKit::setActive(false);