diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-14 15:11:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-14 15:04:30 +0000 |
commit | 3c8bbb6025a2ecccc42264d97f76928ef9ab43f7 (patch) | |
tree | d7e09883994d251184a927970d34ee395ff068a0 /sc | |
parent | 19822c8a2d35570593bf2f39f16cbc40a30b09db (diff) |
sc: implement per-view resetSelection()
Fixes the following crash:
- start gtktiledviewer with a Calc document
- enter edit mode
- create a text selection (selection of multiple cells e.g.)
- leave edit mode -> assert fails
Change-Id: Ic8a65a692679afe1e293f7467f7a72cadcf9f083
Reviewed-on: https://gerrit.libreoffice.org/26266
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 912a4fde0a85..7da7eee545df 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -31,6 +31,7 @@ #include <svx/unoshape.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <comphelper/lok.hxx> #include <officecfg/Office/Common.hxx> #include <officecfg/Office/Calc.hxx> #include <svl/numuno.hxx> @@ -866,7 +867,10 @@ void ScModelObj::resetSelection() pViewShell->Unmark(); // and hide the cell and text selection - pDocShell->GetDocument().GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ""); + if (comphelper::LibreOfficeKit::isViewCallback()) + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); + else + pDocShell->GetDocument().GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ""); } void ScModelObj::setClipboard(const uno::Reference<datatransfer::clipboard::XClipboard>& xClipboard) |