sc/source/ui/app/inputhdl.cxx |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 67699071ba8bf51055028ea185b0afc2a1540f9e
Author:     Rashesh <rashesh.pa...@collabora.com>
AuthorDate: Fri Sep 13 15:48:16 2024 +0530
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Sep 19 14:34:16 2024 +0200

    cool#10040: fix: send LOK_CALLBACK_CELLFORMULA with LOK formulabar update
    
    - we were not getting the cell content when we are editing cell using
    formulabar in online. This message is important to autocomplete formulas
    in online.
    
    Change-Id: I62da49cb8800583931ffefcc39ab181ab9562eb6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173333
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 85a1b1bd27b6..9df0cef85609 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2820,15 +2820,6 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, 
bool bSetModified )
             // If we will end up updating LoKit at the end, we can skip it here
             pInputWin->SetTextString(aText, !bUpdateKit);
         }
-
-        if (comphelper::LibreOfficeKit::isActive())
-        {
-            if (pActiveViewSh)
-            {
-                // TODO: deprecated?
-                
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aText.toUtf8());
-            }
-        }
     }
 
     // If the cursor is before the end of a paragraph, parts are being pushed 
to
@@ -2871,8 +2862,10 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, 
bool bSetModified )
         if (pActiveView)
             aSel = pActiveView->GetSelection();
 
+        OUString aText = ScEditUtil::GetMultilineString(*mpEditEngine);
+        pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aText.toUtf8());
         pActiveViewSh->LOKSendFormulabarUpdate(pActiveView,
-                                               
ScEditUtil::GetMultilineString(*mpEditEngine),
+                                               aText,
                                                aSel);
     }
 
@@ -4381,7 +4374,6 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* 
pState,
                             aSel.nEndPara = 0;
 
                         pActiveViewSh->LOKSendFormulabarUpdate(pActiveView, 
aString, aSel);
-                        // TODO: deprecated?
                         
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aString.toUtf8());
                     }
                 }

Reply via email to