summaryrefslogtreecommitdiff
path: root/framework/source/dispatch
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 20:06:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 07:55:40 +0200
commit952b806c22f798977f5478dd630131acf1a5f068 (patch)
tree9abbb9c472343200ecf9d7afa7a1589b5686fa7d /framework/source/dispatch
parent85b1d47450fa33f772d06353c4dad8da4d22f114 (diff)
loplugin:referencecasting in framework
Change-Id: I49aee4023fdb3173d842c19a53f9170ca1e725e4 Reviewed-on: https://gerrit.libreoffice.org/75972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/dispatch')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx2
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx6
-rw-r--r--framework/source/dispatch/interceptionhelper.cxx6
-rw-r--r--framework/source/dispatch/startmoduledispatcher.cxx4
4 files changed, 8 insertions, 10 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 09023554928e..46ed7d59ebd2 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -593,7 +593,7 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig
// c) try to find better results on parent frame
// If no parent frame exists (because this frame is used outside the desktop tree)
// the given frame must be used directly.
- css::uno::Reference< css::frame::XFrame > xParent(xTarget->getCreator(), css::uno::UNO_QUERY);
+ css::uno::Reference< css::frame::XFrame > xParent = xTarget->getCreator();
if ( ! xParent.is())
return xTarget;
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 57fcb9972d0e..69213d42eb6d 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -525,8 +525,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
case E_BLANKDISPATCHER :
{
- css::uno::Reference< css::frame::XFrame > xDesktop( xOwner, css::uno::UNO_QUERY );
- if (xDesktop.is())
+ if (xOwner.is())
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, SPECIALTARGET_BLANK, 0);
xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
@@ -536,8 +535,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
case E_DEFAULTDISPATCHER :
{
- css::uno::Reference< css::frame::XFrame > xDesktop( xOwner, css::uno::UNO_QUERY );
- if (xDesktop.is())
+ if (xOwner.is())
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, SPECIALTARGET_DEFAULT, 0);
xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index c1ef179b0e69..899ce2440946 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -107,7 +107,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
// If no list exist register these interceptor for all dispatch events with "*"!
InterceptorInfo aInfo;
- aInfo.xInterceptor.set(xInterceptor, css::uno::UNO_QUERY);
+ aInfo.xInterceptor = xInterceptor;
css::uno::Reference< css::frame::XInterceptorInfo > xInfo(xInterceptor, css::uno::UNO_QUERY);
if (xInfo.is())
aInfo.lURLPattern = xInfo->getInterceptedURLs();
@@ -176,8 +176,8 @@ void SAL_CALL InterceptionHelper::releaseDispatchProviderInterceptor(const css::
InterceptorList::iterator pIt = m_lInterceptionRegs.findByReference(xInterceptor);
if (pIt != m_lInterceptionRegs.end())
{
- css::uno::Reference< css::frame::XDispatchProvider > xSlaveD (xInterceptor->getSlaveDispatchProvider() , css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XDispatchProvider > xMasterD (xInterceptor->getMasterDispatchProvider(), css::uno::UNO_QUERY);
+ css::uno::Reference< css::frame::XDispatchProvider > xSlaveD = xInterceptor->getSlaveDispatchProvider();
+ css::uno::Reference< css::frame::XDispatchProvider > xMasterD = xInterceptor->getMasterDispatchProvider();
css::uno::Reference< css::frame::XDispatchProviderInterceptor > xSlaveI (xSlaveD , css::uno::UNO_QUERY);
css::uno::Reference< css::frame::XDispatchProviderInterceptor > xMasterI (xMasterD , css::uno::UNO_QUERY);
diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx
index f6538f701be3..8d24ff9ae5c0 100644
--- a/framework/source/dispatch/startmoduledispatcher.cxx
+++ b/framework/source/dispatch/startmoduledispatcher.cxx
@@ -100,8 +100,8 @@ bool StartModuleDispatcher::implts_isBackingModePossible()
if ( ! SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::STARTMODULE))
return false;
- css::uno::Reference< css::frame::XFramesSupplier > xDesktop(
- css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY);
+ css::uno::Reference< css::frame::XFramesSupplier > xDesktop =
+ css::frame::Desktop::create( m_xContext );
FrameListAnalyzer aCheck(
xDesktop,