summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-07-06 18:08:16 +0200
committerGökay ŞATIR <gokaysatir@collabora.com>2022-07-07 14:13:16 +0200
commitada1f96be3680ae63c4241be064153a76d7c08a9 (patch)
tree3073c491bf1b7a40eb6d4f05da949f2ae76ddc0b
parentece304df9ad2aa0f974927320a1324c06b89f337 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
1 files changed, 8 insertions, 0 deletions
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());