From 97fa8702c6f8325685bdfb46f6197b9739ebe327 Mon Sep 17 00:00:00 2001
From: Noel <noel.grandin@collabora.co.uk>
Date: Tue, 16 Feb 2021 12:56:09 +0200
Subject: loplugin:referencecasting in sfx2

Change-Id: Id24f477ad6cc964215cc04852efc369247f70a5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 sfx2/source/control/bindings.cxx | 4 ++--
 sfx2/source/control/statcach.cxx | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'sfx2/source/control')

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 32021d47285c..6ac0bb9c59cc 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1552,7 +1552,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
 
                 SfxItemState eState = SfxItemState::SET;
                 rtl::Reference<BindDispatch_Impl> xBind(new BindDispatch_Impl( xDisp, aURL, pCache, pSlot ));
-                xDisp->addStatusListener( xBind.get(), aURL );
+                xDisp->addStatusListener( xBind, aURL );
                 if ( !xBind->GetStatus().IsEnabled )
                 {
                     eState = SfxItemState::DISABLED;
@@ -1590,7 +1590,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
                         rpState.reset(new SfxVoidItem( nSlot ));
                 }
 
-                xDisp->removeStatusListener( xBind.get(), aURL );
+                xDisp->removeStatusListener( xBind, aURL );
                 xBind->Release();
                 xBind.clear();
                 if ( bDeleteCache )
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index b71b96a62579..6942818096ea 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -283,7 +283,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
                 // flags must be set before adding StatusListener because the dispatch object will set the state
                 bSlotDirty = false;
                 bCtrlDirty = true;
-                xDisp->addStatusListener( mxDispatch.get(), aURL );
+                xDisp->addStatusListener( mxDispatch, aURL );
             }
             else if ( rDispat.GetFrame() )
             {
-- 
cgit