diff options
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/control/objface.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/templateremoteview.cxx | 4 |
4 files changed, 16 insertions, 26 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index e9eba41d1b04..e681c199ec83 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1038,7 +1038,7 @@ void SfxBindings::Release( SfxControllerItem& rItem ) } -const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, +const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems, const SfxPoolItem **ppInternalArgs ) { DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" ); @@ -1046,10 +1046,10 @@ const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolIt if( !nId || !pDispatcher ) return nullptr; - return Execute_Impl( nId, ppItems, nModi, SfxCallMode::SYNCHRON, ppInternalArgs ); + return Execute_Impl( nId, ppItems, 0, SfxCallMode::SYNCHRON, ppInternalArgs ); } -bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode, +bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode, const SfxPoolItem **ppInternalArgs ) { DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" ); @@ -1057,7 +1057,7 @@ bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt if( !nId || !pDispatcher ) return false; - const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, nModi, nCallMode, ppInternalArgs ); + const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, 0, nCallMode, ppInternalArgs ); return ( pRet != nullptr ); } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 8c4a2f9b5f11..f0d4327bd64e 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -179,13 +179,13 @@ void SfxDispatcher::Push(SfxShell& rShell) /** This method checks whether a particular <SfxShell> instance is on the SfxDispatcher. - @returns sal_True The SfxShell instance is on the SfxDispatcher. - sal_False The SfxShell instance is not on the SfxDispatcher. + @returns true The SfxShell instance is on the SfxDispatcher. + false The SfxShell instance is not on the SfxDispatcher. */ bool SfxDispatcher::IsActive(const SfxShell& rShell) { - return CheckVirtualStack(rShell, true); + return CheckVirtualStack(rShell); } /** With this method it can be determined whether the SfxDispatcher is @@ -515,7 +515,7 @@ IMPL_LINK_NOARG_TYPED( SfxDispatcher, EventHdl_Impl, Idle *, void ) This method is intended among other things to make assertions possible without the side effect of having to flush the SfxDispathcer. */ -bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep) +bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell) { SFX_STACK(SfxDispatcher::CheckVirtualStack); @@ -538,11 +538,7 @@ bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep) } } - bool bReturn; - if ( bDeep ) - bReturn = std::find(aStack.begin(), aStack.end(), &rShell) != aStack.end(); - else - bReturn = aStack.back() == &rShell; + bool bReturn = std::find(aStack.begin(), aStack.end(), &rShell) != aStack.end(); return bReturn; } @@ -990,12 +986,6 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, const SfxItemSet &rArgs) { - return Execute( nSlot, eCall, 0, rArgs ); -} - -const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, - sal_uInt16 nModi, const SfxItemSet &rArgs) -{ if ( IsLocked(nSlot) ) return nullptr; @@ -1011,7 +1001,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, pArg = aIter.NextItem() ) MappedPut_Impl( aSet, *pArg ); SfxRequest aReq( nSlot, eCall, aSet ); - aReq.SetModifier( nModi ); + aReq.SetModifier( 0 ); _Execute( *pShell, *pSlot, aReq, eCall ); return aReq.GetReturnValue(); } diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 69ec8f1c7455..38ee27667ee0 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -59,10 +59,10 @@ struct SfxObjectUI_Impl bool bContext; sal_uInt32 nFeature; - SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, bool bVis, sal_uInt32 nFeat) : + SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, sal_uInt32 nFeat) : nPos(n), nResId(nId), - bVisible(bVis), + bVisible(true), bContext(false), nFeature(nFeat) { @@ -381,7 +381,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, sal if ((nPos & SFX_VISIBILITY_MASK) == 0) nPos |= SFX_VISIBILITY_STANDARD; - return new SfxObjectUI_Impl(nPos, nResId, true, nFeature); + return new SfxObjectUI_Impl(nPos, nResId, nFeature); } sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const @@ -437,7 +437,7 @@ void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext) void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext, sal_uInt32 nFeature) { - SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, true, nFeature); + SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, nFeature); pUI->bContext = bContext; pImpData->aChildWindows.push_back(pUI); } diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx index 9f74e8329654..07aaef278cae 100644 --- a/sfx2/source/control/templateremoteview.cxx +++ b/sfx2/source/control/templateremoteview.cxx @@ -70,12 +70,12 @@ void TemplateRemoteView::showRegion(ThumbnailViewItem * /*pItem*/) //TODO: } -bool TemplateRemoteView::loadRepository (TemplateRepository* pItem, bool bRefresh) +bool TemplateRemoteView::loadRepository (TemplateRepository* pItem) { if (!pItem) return false; - if (!pItem->getTemplates().empty() && !bRefresh) + if (!pItem->getTemplates().empty()) { insertItems(pItem->getTemplates()); return true; |