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

New commits:
commit ada1f96be3680ae63c4241be064153a76d7c08a9
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jul 6 18:08:16 2022 +0200
Commit:     Gökay ŞATIR <gokaysa...@collabora.com>
CommitDate: Thu Jul 7 14:13:16 2022 +0200

    jsdialog: formulabar: dont send huge paragraph id when not found
    
    Change-Id: Ia5586023f639815e54628bfad1a8df11c295c741
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136848
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 0fb604520ac2..94e68ac4c00c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4258,6 +4258,14 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
                     {
                         EditView* pActiveView = pTopView ? pTopView : 
pTableView;
                         ESelection aSel = pActiveView ? 
pActiveView->GetSelection() : ESelection();
+
+                        // if we switched content completly - don't send huge 
numbers
+                        if (aSel.nStartPara == EE_PARA_NOT_FOUND)
+                            aSel.nStartPara = 0;
+
+                        if (aSel.nEndPara == EE_PARA_NOT_FOUND)
+                            aSel.nEndPara = 0;
+
                         ScInputHandler::LOKSendFormulabarUpdate(pActiveViewSh, 
aString, aSel);
                         // TODO: deprecated?
                         
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aString.toUtf8().getStr());

Reply via email to