sd/qa/unit/tiledrendering/tiledrendering.cxx | 4 ++++ sd/source/ui/view/ViewShellBase.cxx | 11 +++++++++++ 2 files changed, 15 insertions(+)
New commits: commit d53bb5c044f039bd2fd38977a85012b03abbe32c Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Sep 16 17:15:05 2016 +0200 sd draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback() This is similar to commit 7b784e4e3927d91a96cd0b54fc43c9b488822e47 (sw draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback(), 2016-09-14), but this fix is for Impress. Change-Id: I995d2ed223aa6ce7845c440039d176b6beada84e diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 67455cf..37d0607 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -1058,7 +1058,11 @@ void SdTiledRenderingTest::testCursorViews() // second view as well, even if the second view was created after begin // text edit in the first view. ViewCallback aView2; + aView2.m_bViewLock = false; SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2); + // 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); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 8513599..f07ba04 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1059,6 +1059,17 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const rEditView.RegisterOtherShell(nullptr); // Text selection, if any. rEditView.DrawSelection(pOtherShell); + + // Shape text lock. + if (OutlinerView* pOutlinerView = pDrawView->GetTextEditOutlinerView()) + { + Rectangle aRectangle = pOutlinerView->GetOutputArea(); + vcl::Window* pWin = pThisShell->GetActiveWindow(); + if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM) + aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); + OString sRectangle = aRectangle.toString(); + SfxLokHelper::notifyOtherView(&pDrawViewShell->GetViewShellBase(), pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle); + } } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits