diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-01-12 19:02:23 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2022-03-14 11:52:47 +0100 |
commit | 74d24d03afc58a535d3afb7d0c2d172fa1636829 (patch) | |
tree | cc727badd2673dfa293c20ac0210f7765149d246 /sc/source/ui/view | |
parent | 422fd364934d93ea02a614e8f431bfc1126b5a2d (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131517
Diffstat (limited to 'sc/source/ui/view')
-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 e676dcfadd42..b5c6965cbcc1 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5932,6 +5932,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 |