diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-04 17:16:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-05 08:13:23 +0200 |
commit | 95c0d568fdcd0da939c891d861bb470b28079170 (patch) | |
tree | ca4e4108178ec1176fd1a976df6f31a08d590210 /UnoControls | |
parent | a1afcae81ca3c4b6bb240263b3259090d48c7715 (diff) |
use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.
Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
Diffstat (limited to 'UnoControls')
6 files changed, 13 insertions, 14 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 2ef9a9e6e1de..7c1a9687d52f 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -395,7 +395,6 @@ Reference< XControl > SAL_CALL BaseContainerControl::getControl ( const OUString // Ready for multithreading MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; - Reference< XControl > xRetControl = Reference< XControl > (); size_t nControls = maControlInfoList.size(); // Search for right control @@ -484,7 +483,7 @@ void SAL_CALL BaseContainerControl::removeTabController ( const Reference< XTabC if ( m_xTabControllerList.getConstArray () [nCount] == rTabController ) { // ... if is it found ... remove it from list. - m_xTabControllerList.getArray()[ nCount ] = Reference< XTabController >() ; + m_xTabControllerList.getArray()[ nCount ].clear(); break ; } } diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index f1ffc8220ecd..37e5c893ba5a 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -279,13 +279,13 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException ) OComponentHelper::dispose(); // release context and peer - m_xContext = Reference< XInterface >(); + m_xContext.clear(); impl_releasePeer(); // release view if ( m_xGraphicsView.is() == sal_True ) { - m_xGraphicsView = Reference< XGraphics >(); + m_xGraphicsView.clear(); } } @@ -751,12 +751,12 @@ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( Ru { removePaintListener( this ); removeWindowListener( this ); - m_xGraphicsPeer = Reference< XGraphics >(); + m_xGraphicsPeer.clear(); } if ( m_xGraphicsView.is() == sal_True ) { - m_xGraphicsView = Reference< XGraphics >(); + m_xGraphicsView.clear(); } } @@ -956,12 +956,12 @@ void BaseControl::impl_releasePeer() { removePaintListener( this ); removeWindowListener( this ); - m_xGraphicsPeer = Reference< XGraphics >(); + m_xGraphicsPeer.clear(); } m_xPeer->dispose(); - m_xPeerWindow = Reference< XWindow >(); - m_xPeer = Reference< XWindowPeer >(); + m_xPeerWindow.clear(); + m_xPeer.clear(); if ( m_pMultiplexer != NULL ) { diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx index 346836094e00..775760638967 100644 --- a/UnoControls/source/base/multiplexer.cxx +++ b/UnoControls/source/base/multiplexer.cxx @@ -251,7 +251,7 @@ void SAL_CALL OMRCListenerMultiplexerHelper::disposing( const EventObject& /*aSo { MutexGuard aGuard( m_aMutex ); // peer is disposed, clear the reference - m_xPeer = Reference< XWindow >(); + m_xPeer.clear(); } //____________________________________________________________________________________________________________ diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx index 7f24ddc5d84a..54f937064da3 100644 --- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx @@ -115,7 +115,7 @@ Sequence< Type > SAL_CALL OConnectionPointContainerHelper::getConnectionPointTyp Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryConnectionPoint( const Type& aType ) throw( RuntimeException ) { // Set default return value, if method failed. - Reference< XConnectionPoint > xConnectionPoint = Reference< XConnectionPoint >(); + Reference< XConnectionPoint > xConnectionPoint; // Get all elements of the container, which have the searched type. OInterfaceContainerHelper* pSpecialContainer = m_aMultiTypeContainer.getContainer( aType ); diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index eb9229627e53..24eb001014e3 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -247,7 +247,7 @@ void OConnectionPointHelper::impl_UnlockContainer() { // Free hard uno3-reference to container. // see also "impl_LockContainer()" - m_xLock = Reference< XInterface >(); + m_xLock.clear(); } } // namespace unocontrols diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index a3e9515eb551..2e8d8193f252 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -71,8 +71,8 @@ StatusIndicator::StatusIndicator( const Reference< XComponentContext >& rxContex StatusIndicator::~StatusIndicator() { // Release all references - m_xText = Reference< XFixedText >(); - m_xProgressBar = Reference< XProgressBar >(); + m_xText.clear(); + m_xProgressBar.clear(); } //____________________________________________________________________________________________________________ |