include/sfx2/bindings.hxx | 2 +- sfx2/source/control/bindings.cxx | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-)
New commits: commit 343ca5c8ae6f7216683c78b961816bf149f957a0 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed May 22 10:01:14 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed May 22 12:22:47 2024 +0200 sfx2: bGlobalOnly is always false Change-Id: Iaba1a77ae0ac7537f1dbf05fa097b3235b36f64d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167921 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx index 2b85b4dbd065..2fac9d1048ef 100644 --- a/include/sfx2/bindings.hxx +++ b/include/sfx2/bindings.hxx @@ -101,7 +101,7 @@ friend class SfxBindings_Impl; private: SAL_DLLPRIVATE SfxPoolItemHolder Execute_Impl( sal_uInt16 nSlot, const SfxPoolItem **pArgs, sal_uInt16 nModi, - SfxCallMode nCall, const SfxPoolItem **pInternalArgs, bool bGlobalOnly=false); + SfxCallMode nCall, const SfxPoolItem **pInternalArgs); SAL_DLLPRIVATE void SetSubBindings_Impl( SfxBindings* ); SAL_DLLPRIVATE void UpdateSlotServer_Impl(); // Update SlotServer SAL_DLLPRIVATE std::optional<SfxItemSet> CreateSet_Impl(SfxStateCache& rCache, const SfxSlot* &pRealSlot, diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 63c8e56080d6..659d72254868 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -876,7 +876,7 @@ bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallM } SfxPoolItemHolder SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode, - const SfxPoolItem **ppInternalArgs, bool bGlobalOnly ) + const SfxPoolItem **ppInternalArgs ) { SfxStateCache *pCache = GetStateCache( nId ); if ( !pCache ) @@ -885,7 +885,7 @@ SfxPoolItemHolder SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** while ( pBind ) { if ( pBind->GetStateCache( nId ) ) - return pBind->Execute_Impl( nId, ppItems, nModi, nCallMode, ppInternalArgs, bGlobalOnly ); + return pBind->Execute_Impl( nId, ppItems, nModi, nCallMode, ppInternalArgs ); pBind = pBind->pImpl->pSubBindings; } } @@ -944,10 +944,6 @@ SfxPoolItemHolder SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** pSlot = pServer->GetSlot(); } - if ( bGlobalOnly ) - if ( dynamic_cast< const SfxModule *>( pShell ) == nullptr && dynamic_cast< const SfxApplication *>( pShell ) == nullptr && dynamic_cast< const SfxViewFrame *>( pShell ) == nullptr ) - return SfxPoolItemHolder(); - SfxItemPool &rPool = pShell->GetPool(); SfxRequest aReq( nId, nCallMode, rPool ); aReq.SetModifier( nModi );