From e93b30c9d9f4deba597b73e04df7d4082b779b69 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 15 Sep 2016 12:17:14 +0200 Subject: sd draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback() This is basically the Impress equivalent of commit 2ea385a54b53797ab3960869012f3ce3268eab2c (sw draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback(), 2016-09-13). Change-Id: Ib138845de6db2a8ad49dc8596af3e05ec5278610 --- sd/source/ui/view/ViewShellBase.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sd/source/ui/view/ViewShellBase.cxx') diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index d5fce1d471a4..8513599d920b 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -88,6 +88,7 @@ #include #include #include +#include #include "fubullet.hxx" #include "drawview.hxx" @@ -1049,7 +1050,21 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const if (!pDrawView) return; - pDrawView->AdjustMarkHdl(pOtherShell); + if (pDrawView->GetTextEditObject()) + { + // Blinking cursor. + EditView& rEditView = pDrawView->GetTextEditOutlinerView()->GetEditView(); + rEditView.RegisterOtherShell(pOtherShell); + rEditView.ShowCursor(); + rEditView.RegisterOtherShell(nullptr); + // Text selection, if any. + rEditView.DrawSelection(pOtherShell); + } + else + { + // Graphic selection. + pDrawView->AdjustMarkHdl(pOtherShell); + } } //===== ViewShellBase::Implementation ========================================= -- cgit v1.2.3