diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/sfx.sdi | 4 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index f5e366abcdb1..5275aef5d335 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -3428,7 +3428,7 @@ SfxBoolItem MacroRecordingFloat SID_RECORDING_FLOATWINDOW SfxVoidItem Redo SID_REDO -( SfxUInt16Item Redo SID_REDO ) +( SfxUInt16Item Redo SID_REDO, SfxBoolItem Repair SID_REPAIRPACKAGE ) [ AutoUpdate = FALSE, FastCall = FALSE, @@ -4555,7 +4555,7 @@ SfxVoidItem BasicIDEShowWindow SID_BASICIDE_SHOWWINDOW SfxVoidItem Undo SID_UNDO -( SfxUInt16Item Undo SID_UNDO ) +( SfxUInt16Item Undo SID_UNDO, SfxBoolItem Repair SID_REPAIRPACKAGE ) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 0d973a911205..c464fba861a0 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -313,6 +313,22 @@ bool SfxDispatcher::IsAppDispatcher() const return !xImp->pFrame; } +/// Decides if the request is FASTCALL or not, depending on arguments. +bool lcl_IsConditionalFastCall(SfxRequest &rReq) +{ + sal_uInt16 nId = rReq.GetSlot(); + bool bRet = false; + + if (nId == SID_UNDO || nId == SID_REDO) + { + const SfxItemSet* pArgs = rReq.GetArgs(); + if (pArgs && pArgs->HasItem(SID_REPAIRPACKAGE)) + bRet = true; + } + + return bRet; +} + /** Helper function to check whether a slot can be executed and check the execution itself */ @@ -321,7 +337,7 @@ void SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest SFX_STACK(SfxDispatcher::Call_Impl); // The slot may be called (meaning enabled) - if ( rSlot.IsMode(SfxSlotMode::FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) ) + if ( rSlot.IsMode(SfxSlotMode::FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) || lcl_IsConditionalFastCall(rReq)) { if ( GetFrame() ) { |