diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-05-11 18:32:52 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.com> | 2016-05-11 21:33:14 +0530 |
commit | a5a71cea62ac3041006c5e9815ae2317999639ac (patch) | |
tree | ac0a8420535948507f5b27354f26c85de086b3de /sc | |
parent | 0241896fad3fea09f31e4637bc3dcf2baf12a67a (diff) |
sc: Add new param, DontTerminateEdit, to .uno:Save
... which determines if current editing mode before save should
be terminated with save or not.
Change-Id: I49318013f1244eb8681a19ed3da50fbecd336a3d
Diffstat (limited to 'sc')
-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 e012f7157fc6..ef0d1ced1843 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -715,9 +715,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() ) { |