summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-13 10:06:52 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-13 09:36:27 +0000
commit786cc8a5a3cd34329c72b867e5fd7896b10a7351 (patch)
tree326a40470c79c6d77827afe75368d318d0492491 /sw/qa
parent465d3076835d88972d99c92b9b518a0e1762fea2 (diff)
sw: emit LOK_CALLBACK_GRAPHIC_VIEW_SELECTION as part of registerCallback()
Have a Writer shape selection in the first view, create a new view, the second view doesn't see the selection. But the same works if the shape selection is created when the second view was created earlier. Emit the svx selection state as part of SwCursorShell::NotifyCursor() to fix the problem, but take care of not sending the status to the new view itself. Change-Id: Iff3979235e1c12cc64867c3184354967f451370b Reviewed-on: https://gerrit.libreoffice.org/28857 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index e61f23ff7e37..a2a88e17c868 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1303,10 +1303,14 @@ void SwTiledRenderingTest::testCreateViewGraphicSelection()
// Make sure that the hidden text cursor isn't visible in the second view, either.
ViewCallback aView2;
aView2.m_bViewCursorVisible = true;
+ aView2.m_bGraphicViewSelection = false;
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2);
// This was true, the second view didn't get the visibility of the text
// cursor of the first view.
CPPUNIT_ASSERT(!aView2.m_bViewCursorVisible);
+ // This was false, the second view didn't get the graphic selection of the
+ // first view.
+ CPPUNIT_ASSERT(aView2.m_bGraphicViewSelection);
mxComponent->dispose();
mxComponent.clear();