diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-14 15:11:21 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:09 -0400 |
commit | 77f059d17de0fe0d7c048bde3c12e226b9d25d5e (patch) | |
tree | 5e851d5c8574a94b87718e38222133d1538bd6ba /sc | |
parent | 46e53a28a4f89b3f79424029011f47abe0ca3eff (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>
(cherry picked from commit 3c8bbb6025a2ecccc42264d97f76928ef9ab43f7)
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 b6523f93ba27..2df4022cf74c 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -30,6 +30,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> @@ -864,7 +865,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) |