diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 11:13:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 11:18:41 +0200 |
commit | b37b7b5cd5a4b7acdee4736008f3947317dad4ce (patch) | |
tree | 7d07a383c81106ed9cdd48ddaff564ed0650c365 /toolkit | |
parent | f9a6e75e21e9919a405a1964d85345a1c0634067 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: Id036f867e75d03d8347cc32a1011c5cdda1dcc73
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 3 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/controls/formattedcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/geometrycontrolmodel.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/stdtabcontroller.cxx | 4 |
6 files changed, 10 insertions, 11 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e31e5c33d164..56c3f19b1a6e 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -626,8 +626,7 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) css::uno::Reference<css::uno::XComponentContext> xContext = ::cppu::defaultBootstrap_InitialComponentContext(); - xServiceManager = css::uno::Reference<css::lang::XMultiServiceFactory>( - xContext->getServiceManager(), css::uno::UNO_QUERY_THROW ); + xServiceManager.set( xContext->getServiceManager(), css::uno::UNO_QUERY_THROW ); // set global process service factory used by unotools config helpers ::comphelper::setProcessServiceFactory( xServiceManager ); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 7c6a32884bcc..94a2f7c49367 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -2357,7 +2357,7 @@ void SAL_CALL VCLXWindow::disposing( const ::com::sun::star::lang::EventObject& if ( aAC.get() == xSource.get() ) { // yep, it does - mpImpl->mxAccessibleContext = uno::Reference< accessibility::XAccessibleContext >(); + mpImpl->mxAccessibleContext.clear(); } } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 3f5cecdd8d44..8e62ecbcd507 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -1213,7 +1213,7 @@ void ResourceListener::stopListening() // --- SAFE --- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex ); if ( m_bListening && m_xResource.is() ) - xModifyBroadcaster = Reference< util::XModifyBroadcaster >( m_xResource, UNO_QUERY ); + xModifyBroadcaster.set( m_xResource, UNO_QUERY ); aGuard.clear(); // --- SAFE --- @@ -1291,7 +1291,7 @@ throw ( RuntimeException, std::exception ) aGuard.reset(); m_bListening = false; xResource = m_xResource; - xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY ); + xListener.set( m_xListener, UNO_QUERY ); m_xResource.clear(); aGuard.clear(); // --- SAFE --- @@ -1316,7 +1316,7 @@ throw ( RuntimeException, std::exception ) // --- SAFE --- aGuard.reset(); m_bListening = false; - xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY ); + xListener.set( m_xListener, UNO_QUERY ); xResource = m_xResource; m_xResource.clear(); m_xListener.clear(); @@ -1773,7 +1773,7 @@ static void lcl_ApplyResolverToNestedContainees( const Reference< resource::XSt Reference< XPropertySet > xPropertySet; if ( xControl.is() ) - xPropertySet = Reference< XPropertySet >( xControl->getModel(), UNO_QUERY ); + xPropertySet.set( xControl->getModel(), UNO_QUERY ); if ( !xPropertySet.is() ) continue; diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index bd2b7b56cf4e..ef8393bbae7b 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -239,7 +239,7 @@ namespace toolkit if ( !m_xCachedFormatter.is() ) { - m_xCachedFormatter = Reference< XNumberFormatter >( + m_xCachedFormatter.set( NumberFormatter::create(::comphelper::getProcessComponentContext()), UNO_QUERY_THROW ); diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index 6bdf50c38dfd..1c35df60a177 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -117,7 +117,7 @@ { { // ensure that the temporary gets destructed NOW - m_xAggregate = Reference< XAggregation >(_rxAggregateInstance, UNO_QUERY); + m_xAggregate.set(_rxAggregateInstance, UNO_QUERY); } OSL_ENSURE(m_xAggregate.is(), "OGeometryControlModel_Base::OGeometryControlModel_Base: invalid object given!"); diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index bb606aee19fa..e6a5387a7318 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -105,9 +105,9 @@ bool StdTabController::ImplCreateComponentSequence( if ( xCtrl.is() ) { if (bPeerComponent) - pComps[n] = Reference< XWindow > (xCtrl->getPeer(), UNO_QUERY); + pComps[n].set(xCtrl->getPeer(), UNO_QUERY); else - pComps[n] = Reference< XWindow > (xCtrl, UNO_QUERY); + pComps[n].set(xCtrl, UNO_QUERY); // TabStop-Property if ( pTabs ) |