summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-10 10:22:39 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-10 09:12:06 +0000
commit213b15fa59ce768086c41dbcdc5c29109a09ad9d (patch)
treeb22d733e53157bde7a7be670b7a7d935cc729ef6 /svx
parent9e52ec96d7a5b809bd51836c154e07ec41c3d8e3 (diff)
svx: implement per-view LOK_CALLBACK_TEXT_SELECTION for graphic sel
Handle multiple views when clicking on a graphic, and thus sending a "text selection is now empty" callback. This avoids an assert when clicking on a Writer image in gtktiledviewer. Change-Id: I2b6d7e561ccc4a6e0782fdad37d4b104c08f1eeb Reviewed-on: https://gerrit.libreoffice.org/26152 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdmrkv.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 1323abd5ea34..5cb8371b6757 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -773,7 +773,13 @@ void SdrMarkView::SetMarkHandles()
sSelection = aSelection.toString();
// hide the text selection too
- GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ {
+ if(SfxViewShell* pViewShell = SfxViewShell::Current())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, "");
+ }
+ else
+ GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
}
if (comphelper::LibreOfficeKit::isViewCallback())
{