diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2022-04-01 14:50:42 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2022-04-06 11:37:38 +0200 |
commit | e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593 (patch) | |
tree | ce6ae80c3f1515d3f84921283830090e0742442a /sc/source/ui/view/tabvwsha.cxx | |
parent | lok: send status update for .uno:SplitCell (diff) | |
download | core-e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593.tar.gz core-e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593.zip |
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.
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>
Diffstat (limited to 'sc/source/ui/view/tabvwsha.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 4a6062fddff5..446854246c89 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -759,9 +759,16 @@ void ScTabViewShell::ExecuteSave( SfxRequest& rReq ) // Finish entering unless 'DontTerminateEdit' is specified, even if a formula is being processed if (bCommitChanges) { - SC_MOD()->InputEnterHandler(); + bool bLOKActive = comphelper::LibreOfficeKit::isActive(); - if (comphelper::LibreOfficeKit::isActive()) + // 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. + SC_MOD()->InputEnterHandler(ScEnterMode::NORMAL, bLOKActive /* bBeforeSavingInLOK */); + + if (bLOKActive) { // Normally this isn't needed, but in Calc when editing a cell formula // and manually saving (without changing cells or hitting enter), while |