diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-01-12 19:02:23 +0300 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2022-01-14 15:47:18 +0100 |
commit | 5b5315073d9c73cc51c039a935ef6a5094f3923f (patch) | |
tree | a7f7ae8fc2bc03fc7283d0ec1e2f2d4fa7af8bf2 | |
parent | af168ae749dfd816fe029bbca5967fc3d5a1aa81 (diff) |
lok: remove residue text selection when there's none in the core
Residue selection can stay at the browser even after changing the cellcursor pos
make sure to clean it up if there is no selection rectangle in reality
to be synced with core.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index bb0c8bac9fe5..826550e8f391 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5597,6 +5597,13 @@ void ScGridWindow::notifyKitCellCursor() const pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, getCellCursor().getStr()); if (bListValButton && aListValPos == mrViewData.GetCurPos()) updateLOKValListButton(true, aListValPos); + std::vector<tools::Rectangle> aRects; + GetSelectionRects(aRects); + if (aRects.empty() || !mrViewData.IsActive()) + { + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); + SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY"); + } } void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const |