summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/ViewShellBase.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-15 12:17:14 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-15 14:49:00 +0200
commite93b30c9d9f4deba597b73e04df7d4082b779b69 (patch)
tree993cb5e7e58430f4412f7aacd2311db5c90806f7 /sd/source/ui/view/ViewShellBase.cxx
parent74844277cc2194c9e43f5bd7a6f78a9603da32f3 (diff)
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
Diffstat (limited to 'sd/source/ui/view/ViewShellBase.cxx')
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx17
1 files changed, 16 insertions, 1 deletions
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 <tools/diagnose_ex.h>
#include <sfx2/lokhelper.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <editeng/editview.hxx>
#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 =========================================