summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-29 15:48:45 +0200
committerNoel Grandin <noel@peralex.com>2015-10-30 08:10:22 +0200
commit065c8b48a604b70140862d0d02deb584626d6994 (patch)
tree578c07b470b8ec9e5908d224c2fbf33cadda5adf /UnoControls
parentaddb63fa8ac9fa1a29a00e886e7ae177b604494c (diff)
use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx2
-rw-r--r--UnoControls/source/base/basecontrol.cxx6
-rw-r--r--UnoControls/source/controls/OConnectionPointContainerHelper.cxx2
-rw-r--r--UnoControls/source/controls/OConnectionPointHelper.cxx2
-rw-r--r--UnoControls/source/controls/framecontrol.cxx2
-rw-r--r--UnoControls/source/controls/progressmonitor.cxx10
-rw-r--r--UnoControls/source/controls/statusindicator.cxx2
7 files changed, 13 insertions, 13 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index e85e4a54527b..e3a45af9d2ed 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -179,7 +179,7 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException, std::exce
// remove listeners
EventObject aObject;
- aObject.Source = Reference< XComponent > ( static_cast<XControlContainer*>(this), UNO_QUERY );
+ aObject.Source.set( static_cast<XControlContainer*>(this), UNO_QUERY );
m_aListeners.disposeAndClear( aObject );
// remove controls
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index 09a8734b2d96..08474e7469e9 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -282,10 +282,10 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
if ( !xLocalToolkit.is() )
{
// but first create well known toolkit, if it not exist
- xLocalToolkit = Reference< XToolkit > ( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
+ xLocalToolkit.set( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
}
m_xPeer = xLocalToolkit->createWindow( *pDescriptor );
- m_xPeerWindow = Reference< XWindow >( m_xPeer, UNO_QUERY );
+ m_xPeerWindow.set( m_xPeer, UNO_QUERY );
// don't forget to release the memory!
delete pDescriptor;
@@ -788,7 +788,7 @@ OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()
if ( m_pMultiplexer == NULL )
{
m_pMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
- m_xMultiplexer = Reference< XInterface >( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
+ m_xMultiplexer.set( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
}
return m_pMultiplexer;
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index 2034db78ef98..ee1827691d6b 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -112,7 +112,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
MutexGuard aGuard( m_aSharedMutex );
// If this container contains elements, build a connectionpoint-instance.
OConnectionPointHelper* pNewConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
- xConnectionPoint = Reference< XConnectionPoint >( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
+ xConnectionPoint.set( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
}
return xConnectionPoint;
diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx
index 57ba1851a045..ac79a019ffc8 100644
--- a/UnoControls/source/controls/OConnectionPointHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointHelper.cxx
@@ -191,7 +191,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti
throw RuntimeException();
}
// Set default return value, if method failed.
- Sequence< Reference< XInterface > > seqReturnConnections = Sequence< Reference< XInterface > >();
+ Sequence< Reference< XInterface > > seqReturnConnections;
// Get reference to private member of OConnectionPointHelperContainer!
OMultiTypeInterfaceContainerHelper& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer();
// Get pointer to specialized container which hold all interfaces of searched type.
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index e4fcd6d78ed6..fd23cb6678be 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -478,7 +478,7 @@ void FrameControl::impl_deleteFrame()
// do not dispose the frame in this guarded section (deadlock?)
MutexGuard aGuard( m_aMutex );
xOldFrame = m_xFrame;
- m_xFrame = Reference< XFrame2 > ();
+ m_xFrame.clear();
}
// notify the listeners
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index d3add993baea..98eb26e123dd 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -52,11 +52,11 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext >
// Create instances for fixedtext, button and progress ...
- m_xTopic_Top = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
- m_xText_Top = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
- m_xTopic_Bottom = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
- m_xText_Bottom = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
- m_xButton = css::uno::Reference< XButton > ( rxContext->getServiceManager()->createInstanceWithContext( BUTTON_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xTopic_Top.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xText_Top.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xTopic_Bottom.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xText_Bottom.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xButton.set ( rxContext->getServiceManager()->createInstanceWithContext( BUTTON_SERVICENAME, rxContext ), UNO_QUERY );
m_xProgressBar = VclPtr<ProgressBar>::Create(rxContext);
// ... cast controls to Reference< XControl > (for "setModel"!) ...
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 54204011cbb6..4a92bb3275a0 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -45,7 +45,7 @@ StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext >
++m_refCount;
// Create instances for fixedtext and progress ...
- m_xText = css::uno::Reference< XFixedText > ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
+ m_xText.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
m_xProgressBar = VclPtr<ProgressBar>::Create(rxContext);
// ... cast controls to css::uno::Reference< XControl > and set model ...
// ( ProgressBar has no model !!! )