Simplify SfxBindings::ExecuteSynchron
... by making SfxBindings::Execute return SfxPoolItemHolder. Change-Id: Idd62a5eae791a6a4fec283c0c80fdac19c3526d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180982 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -158,7 +158,7 @@ public:
|
|||||||
|
|
||||||
SfxPoolItemHolder ExecuteSynchron( sal_uInt16 nSlot,
|
SfxPoolItemHolder ExecuteSynchron( sal_uInt16 nSlot,
|
||||||
const SfxPoolItem **pArgs = nullptr);
|
const SfxPoolItem **pArgs = nullptr);
|
||||||
bool Execute( sal_uInt16 nSlot,
|
SfxPoolItemHolder Execute( sal_uInt16 nSlot,
|
||||||
const SfxPoolItem **pArgs = nullptr,
|
const SfxPoolItem **pArgs = nullptr,
|
||||||
SfxCallMode nCall = SfxCallMode::SLOT);
|
SfxCallMode nCall = SfxCallMode::SLOT);
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include <comphelper/string.hxx>
|
#include <comphelper/string.hxx>
|
||||||
#include <cppuhelper/implbase.hxx>
|
#include <cppuhelper/implbase.hxx>
|
||||||
#include <sal/log.hxx>
|
#include <sal/log.hxx>
|
||||||
|
#include <svl/itemset.hxx>
|
||||||
#include <tools/debug.hxx>
|
#include <tools/debug.hxx>
|
||||||
|
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
@@ -863,20 +863,16 @@ void SfxBindings::Release( SfxControllerItem& rItem )
|
|||||||
|
|
||||||
|
|
||||||
SfxPoolItemHolder SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems )
|
SfxPoolItemHolder SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems )
|
||||||
|
{
|
||||||
|
return Execute(nId, ppItems, SfxCallMode::SYNCHRON);
|
||||||
|
}
|
||||||
|
|
||||||
|
SfxPoolItemHolder SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode )
|
||||||
{
|
{
|
||||||
if( !nId || !pDispatcher )
|
if( !nId || !pDispatcher )
|
||||||
return SfxPoolItemHolder();
|
return SfxPoolItemHolder();
|
||||||
|
|
||||||
return Execute_Impl(nId, ppItems, SfxCallMode::SYNCHRON);
|
return Execute_Impl(nId, ppItems, nCallMode);
|
||||||
}
|
|
||||||
|
|
||||||
bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode )
|
|
||||||
{
|
|
||||||
if( !nId || !pDispatcher )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
const SfxPoolItemHolder aRet(Execute_Impl(nId, ppItems, nCallMode));
|
|
||||||
return aRet.is();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SfxPoolItemHolder SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode )
|
SfxPoolItemHolder SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode )
|
||||||
|
@@ -3942,7 +3942,7 @@ bool SfxViewShell::HasMouseClickListeners_Impl() const
|
|||||||
|
|
||||||
bool SfxViewShell::Escape()
|
bool SfxViewShell::Escape()
|
||||||
{
|
{
|
||||||
return GetViewFrame().GetBindings().Execute(SID_TERMINATE_INPLACEACTIVATION);
|
return GetViewFrame().GetBindings().Execute(SID_TERMINATE_INPLACEACTIVATION).is();
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference< view::XRenderable > SfxViewShell::GetRenderable()
|
Reference< view::XRenderable > SfxViewShell::GetRenderable()
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <tabwin.hxx>
|
#include <tabwin.hxx>
|
||||||
#include <fmservs.hxx>
|
#include <fmservs.hxx>
|
||||||
|
|
||||||
|
#include <svl/itemset.hxx>
|
||||||
#include <svx/strings.hrc>
|
#include <svx/strings.hrc>
|
||||||
#include <svx/svxids.hrc>
|
#include <svx/svxids.hrc>
|
||||||
#include <com/sun/star/sdb/CommandType.hpp>
|
#include <com/sun/star/sdb/CommandType.hpp>
|
||||||
|
Reference in New Issue
Block a user