diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2022-04-01 14:50:42 +0530 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-04-12 20:28:25 +0200 |
commit | c45ab05455486323763851d6c3b6a168ae1abba6 (patch) | |
tree | bd121b737537cf090d8b604d785bd76d1a1f5aac /sc/source/ui/app/inputhdl.cxx | |
parent | d19c99d10764531279e59959aa84f832afee14a6 (diff) |
lok: avoid validation-dialog yield when saving
Disable error dialog box when about to save in lok mode as this
ultimately invokes SvpSalInstance::DoYield() when we want to save
immediately without committing any erroneous input in possibly a cell
with validation rules. After save is complete the user can continue
editing.
Conflicts:
sc/source/ui/app/inputhdl.cxx
Change-Id: Iffa0766ad594db75f57158986c4e1d2646f71da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132410
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132656
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index d844401a8807..30f18a075c7c 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3002,7 +3002,7 @@ static void lcl_SelectionToEnd( EditView* pView ) } } -void ScInputHandler::EnterHandler( ScEnterMode nBlockMode ) +void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInLOK ) { if (!mbDocumentDisposing && comphelper::LibreOfficeKit::isActive() && pActiveViewSh != SfxViewShell::Current()) @@ -3082,6 +3082,16 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode ) pSelEngine->ReleaseMouse(); } + if (bBeforeSavingInLOK) + { + // Invalid entry but not applied to the document model. + // Exit to complete the "save", leaving the edit view as it is + // for the user to continue after save. + bInOwnChange = false; + bInEnterHandler = false; + return; + } + if (pData->DoError(pActiveViewSh->GetFrameWeld(), aString, aCursorPos)) bForget = true; // Do not take over input } |