diff options
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 fe2dbadffb51..957ba5a71aa1 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -696,9 +696,16 @@ void ScTabViewShell::UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust ) void ScTabViewShell::ExecuteSave( SfxRequest& rReq ) { // only SID_SAVEDOC / SID_SAVEASDOC + bool bCommitChanges = true; + const SfxItemSet* pReqArgs = rReq.GetArgs(); + const SfxPoolItem* pItem; + + if (pReqArgs && pReqArgs->HasItem(FN_PARAM_1, &pItem)) + bCommitChanges = !static_cast<const SfxBoolItem*>(pItem)->GetValue(); - // Finish entering in any case, even if a formula is being processed - SC_MOD()->InputEnterHandler(); + // Finish entering unless 'DontTerminateEdit' is specified, even if a formula is being processed + if (bCommitChanges) + SC_MOD()->InputEnterHandler(); if ( GetViewData().GetDocShell()->IsDocShared() ) { |