include/sfx2/shell.hxx | 5 ----- sfx2/source/control/bindings.cxx | 4 ++-- sfx2/source/control/dispatch.cxx | 4 ++-- sfx2/source/control/shell.cxx | 6 +++--- 4 files changed, 7 insertions(+), 12 deletions(-)
New commits: commit 6e4238018bf0408f2961e5708212e09a8c3597dc Author: Noel <noel.gran...@collabora.co.uk> AuthorDate: Thu Mar 18 11:06:57 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Mar 18 20:49:26 2021 +0100 inline some tiny sfx2 functions Change-Id: I960d479d18bdd29fc14dd39649330d05fcdc0010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112664 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 60de3579e8d3..3266c989a7d4 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -193,11 +193,6 @@ public: */ SfxViewShell* GetViewShell() const; - void CallExec( SfxExecFunc pFunc, SfxRequest &rReq ) - { (*pFunc)(this, rReq); } - void CallState( SfxStateFunc pFunc, SfxItemSet &rSet ) - { (*pFunc)(this, rSet); } - static void EmptyExecStub(SfxShell *pShell, SfxRequest &); static void EmptyStateStub(SfxShell *pShell, SfxItemSet &); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 6ac0bb9c59cc..aa565d9c4a96 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -988,8 +988,8 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell // The value is attached to a toggleable attribute (Bools) sal_uInt16 nWhich = pSlot->GetWhich(rPool); SfxItemSet aSet(rPool, {{nWhich, nWhich}}); - SfxStateFunc aFunc = pSlot->GetStateFnc(); - pShell->CallState( aFunc, aSet ); + SfxStateFunc pFunc = pSlot->GetStateFnc(); + (*pFunc)(pShell, aSet); const SfxPoolItem *pOldItem; SfxItemState eState = aSet.GetItemState(nWhich, true, &pOldItem); if ( eState == SfxItemState::DISABLED ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9939b01f0b90..613b8cf0f7b7 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -250,7 +250,7 @@ void SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest xImp->pInCallAliveFlag = &bThisDispatcherAlive; SfxExecFunc pFunc = rSlot.GetExecFnc(); - rShell.CallExec( pFunc, rReq ); + (*pFunc)(&rShell, rReq); // If 'this' is still alive if ( bThisDispatcherAlive ) @@ -1655,7 +1655,7 @@ bool SfxDispatcher::FillState_(const SfxSlotServer& rSvr, SfxItemSet& rState, else pFunc = pSlot->GetStateFnc(); - pSh->CallState( pFunc, rState ); + (*pFunc)(pSh, rState); #ifdef DBG_UTIL // To examine the conformity of IDL (SlotMap) and current Items if ( rState.Count() ) diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 353dde1a8d07..795f25f708aa 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -381,7 +381,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) const sal_uInt16 nId = rSlot.GetWhich( rPool ); SfxItemSet aSet(rPool, {{nId, nId}}); SfxStateFunc pFunc = rSlot.GetStateFnc(); - CallState( pFunc, aSet ); + (*pFunc)( this, aSet ); return aSet.GetItemState(nId) != SfxItemState::DISABLED; } @@ -437,7 +437,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot SfxExecFunc pFunc = pSlot->GetExecFnc(); if ( pFunc ) - CallExec( pFunc, rReq ); + (*pFunc)( this, rReq ); return rReq.GetReturnValue(); } @@ -472,7 +472,7 @@ const SfxPoolItem* SfxShell::GetSlotState // Call Status method SfxStateFunc pFunc = pSlot->GetStateFnc(); if ( pFunc ) - CallState( pFunc, aSet ); + (*pFunc)( this, aSet ); eState = aSet.GetItemState( nSlotId, true, &pItem ); // get default Item if possible _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits