diff options
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/control/querystatus.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/control/recentdocsviewitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 4 |
5 files changed, 9 insertions, 11 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index fd539fe899e2..3f788bf8183f 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1813,8 +1813,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp ) css::uno::Reference < css::frame::XDispatchProvider > xProv; if ( pDisp ) - xProv = css::uno::Reference < css::frame::XDispatchProvider > - ( pDisp->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); + xProv.set( pDisp->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); SetDispatchProvider_Impl( xProv ); InvalidateAll( true ); @@ -2175,7 +2174,7 @@ uno::Reference < frame::XDispatch > SfxBindings::GetDispatch( const SfxSlot* pSl new SfxOfficeDispatch( *this, pDispatcher, pSlot, aURL ); pDispatch->SetMasterUnoCommand( bMasterCommand ); - xRet = uno::Reference < frame::XDispatch >( pDispatch ); + xRet.set( pDispatch ); if ( !pCache ) pCache = GetStateCache( pSlot->nSlotId ); diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 8c5127c5e158..6f86cfc9d1e9 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -208,9 +208,8 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem ) SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) { m_pSfxQueryStatusImpl = new SfxQueryStatus_Impl( rDispatchProvider, nSlotId, rCommand ); - m_xStatusListener = Reference< XStatusListener >( - static_cast< cppu::OWeakObject* >( m_pSfxQueryStatusImpl ), - UNO_QUERY ); + m_xStatusListener.set( static_cast< cppu::OWeakObject* >( m_pSfxQueryStatusImpl ), + UNO_QUERY ); } SfxQueryStatus::~SfxQueryStatus() diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index 0b202ca8c815..4c1381241cb3 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -191,7 +191,7 @@ void RecentDocsViewItem::OpenDocument() uno::Reference<frame::XFrame> xActiveFrame = xDesktop->getActiveFrame(); //osl::ClearableMutexGuard aLock(m_aMutex); - xDispatchProvider = Reference<frame::XDispatchProvider>(xActiveFrame, UNO_QUERY); + xDispatchProvider.set(xActiveFrame, UNO_QUERY); //aLock.clear(); aTargetURL.Complete = maURL; diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 6ad13ccb01d1..987323c3e8ff 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -68,7 +68,7 @@ void SAL_CALL BindDispatch_Impl::disposing( const css::lang::EventObject& ) thro if ( xDisp.is() ) { xDisp->removeStatusListener( static_cast<css::frame::XStatusListener*>(this), aURL ); - xDisp = css::uno::Reference< css::frame::XDispatch > (); + xDisp.clear(); } } @@ -154,7 +154,7 @@ void BindDispatch_Impl::Release() if ( xDisp.is() ) { xDisp->removeStatusListener( static_cast<css::frame::XStatusListener*>(this), aURL ); - xDisp = css::uno::Reference< css::frame::XDispatch > (); + xDisp.clear(); } pCache = NULL; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 813a48aa7a53..2bac67573c33 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -197,7 +197,7 @@ void SfxUnoControllerItem::ReleaseDispatch() if ( xDispatch.is() ) { xDispatch->removeStatusListener( static_cast<css::frame::XStatusListener*>(this), aCommand ); - xDispatch = css::uno::Reference< css::frame::XDispatch > (); + xDispatch.clear(); } } @@ -211,7 +211,7 @@ void SfxUnoControllerItem::GetNewDispatch() } // forget old dispatch - xDispatch = css::uno::Reference< css::frame::XDispatch > (); + xDispatch.clear(); // no arms, no cookies ! if ( !pBindings->GetDispatcher_Impl() || !pBindings->GetDispatcher_Impl()->GetFrame() ) |