sc/source/ui/view/gridwin.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 5b5315073d9c73cc51c039a935ef6a5094f3923f
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Wed Jan 12 19:02:23 2022 +0300
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Fri Jan 14 15:47:18 2022 +0100

    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.tu...@collabora.com>
    Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Tested-by: Henry Castro <hcas...@collabora.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>

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

Reply via email to