summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2021-03-15 17:10:10 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2021-03-19 20:40:21 +0100
commit69bcdb4cffe2c3a12e215b6cf5d99f18e49a5973 (patch)
treeb6bf83048aa43b7fc653854fc82e13daba9175c1 /sd/qa/unit
parent01d6d4419e08c16d5488970d3f3ad9f059ee2625 (diff)
lok: switch to the correct view before any UI update is done via SfxBindings.
Change-Id: I541e53b4219340233ed5a4bec407ded5adf6a841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112538 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 79163b0cea67..5c4cb06f0790 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1002,6 +1002,7 @@ void SdTiledRenderingTest::testViewCursorParts()
SfxLokHelper::createView();
pXImpressDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ViewCallback aView2;
+ int nView2 = SfxLokHelper::getView();
// Select the shape in the second view.
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
@@ -1015,6 +1016,7 @@ void SdTiledRenderingTest::testViewCursorParts()
pView->UnmarkAllObj(pView->GetSdrPageView());
// Now switch to the second part in the second view.
+ SfxLokHelper::setView(nView2);
pXImpressDocument->setPart(1);
aView2.m_nPart = 1;
aView1.m_bGraphicViewSelectionInvalidated = false;
@@ -1055,10 +1057,10 @@ void SdTiledRenderingTest::testCursorViews()
// second view as well, even if the second view was created after begin
// text edit in the first view.
ViewCallback aView2;
+ SfxLokHelper::setView(nView1);
// This failed: the second view didn't get a lock notification, even if the
// first view already started text edit.
CPPUNIT_ASSERT(aView2.m_bViewLock);
- SfxLokHelper::setView(nView1);
aView2.m_bTilesInvalidated = false;
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0);
@@ -1185,6 +1187,8 @@ void SdTiledRenderingTest::testCursorVisibility_MultiView()
pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
centerX, centerY,
2, MOUSE_LEFT, 0);
+
+ SfxLokHelper::setView(nView1);
pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP,
centerX, centerY,
2, MOUSE_LEFT, 0);