sc/source/ui/app/inputhdl.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 6ab6f7bf61efe7f42161a2d5760763bf39f8795a
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Fri Jun 24 14:04:03 2022 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Jun 29 10:40:26 2022 +0200

    lok: formulabar: send correct caret position for numbers
    
    It fixes the bug:
    
    1. Open spreadsheet and type long numer in some cell (only numbers)
    2. Move cell cursor to another cell, then using keyboard go back to the 
previous cell
    3. click in formulabar somewhere in the middle of a number
    4. try to type one character
    
    result: character was added in correct place but cursor was moved to the 
start
    expected: caret will stay at correct place
    
    Change-Id: I514d868dce5478e65d57fd2f350da9777b615e0a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136395
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Rashesh Padia <rashesh.pa...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136598
    Tested-by: Jenkins

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9ad38d7d321d..77e2342e6955 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2775,6 +2775,10 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, 
bool bSetModified )
 
     if (comphelper::LibreOfficeKit::isActive() && pActiveViewSh && pInputWin)
     {
+        UpdateActiveView();
+        if (pActiveView)
+            aSel = pActiveView->GetSelection();
+
         ScInputHandler::LOKSendFormulabarUpdate(pActiveViewSh,
                                                 
ScEditUtil::GetMultilineString(*mpEditEngine),
                                                 aSel);

Reply via email to