summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/tabvwsha.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabvwsha.cxx')
-rw-r--r--sc/source/ui/view/tabvwsha.cxx11
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