summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:06:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-18 20:49:26 +0100
commit6e4238018bf0408f2961e5708212e09a8c3597dc (patch)
treed153f4435c360892f9d1ef536db8e61045292391 /sfx2
parent7385ce6ac788335f15744c104c2b4e095ce90ce8 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/bindings.cxx4
-rw-r--r--sfx2/source/control/dispatch.cxx4
-rw-r--r--sfx2/source/control/shell.cxx6
3 files changed, 7 insertions, 7 deletions
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