UnoControls/source/base/basecontainercontrol.cxx                      |    2 -
 UnoControls/source/base/basecontrol.cxx                               |    6 
++--
 UnoControls/source/controls/OConnectionPointContainerHelper.cxx       |    2 -
 UnoControls/source/controls/OConnectionPointHelper.cxx                |    2 -
 UnoControls/source/controls/framecontrol.cxx                          |    2 -
 UnoControls/source/controls/progressmonitor.cxx                       |   10 
+++---
 UnoControls/source/controls/statusindicator.cxx                       |    2 -
 accessibility/source/extended/accessiblelistboxentry.cxx              |    5 
+--
 accessibility/source/extended/textwindowaccessibility.cxx             |    9 
++----
 accessibility/source/standard/floatingwindowaccessible.cxx            |    3 --
 accessibility/source/standard/vclxaccessiblelist.cxx                  |    3 --
 avmedia/source/framework/soundhandler.cxx                             |    8 
++---
 avmedia/source/gstreamer/gstmanager.cxx                               |    2 -
 avmedia/source/gstreamer/gstuno.cxx                                   |    2 -
 avmedia/source/macavf/macavfuno.mm                                    |    2 -
 avmedia/source/macavf/manager.mm                                      |    2 -
 avmedia/source/opengl/ogluno.cxx                                      |    2 -
 avmedia/source/quicktime/manager.mm                                   |    2 -
 avmedia/source/quicktime/quicktimeuno.mm                              |    2 -
 avmedia/source/viewer/mediawindow_impl.cxx                            |    2 -
 avmedia/source/vlc/vlcmanager.cxx                                     |    2 -
 avmedia/source/vlc/vlcplayer.cxx                                      |    2 -
 avmedia/source/vlc/vlcuno.cxx                                         |    2 -
 avmedia/source/win/manager.cxx                                        |    2 -
 avmedia/source/win/player.cxx                                         |    2 -
 avmedia/source/win/winuno.cxx                                         |    2 -
 basctl/source/accessibility/accessibledialogcontrolshape.cxx          |    2 -
 basctl/source/basicide/moduldl2.cxx                                   |   10 
++----
 basctl/source/basicide/moduldlg.cxx                                   |    2 -
 basctl/source/dlged/dlgedobj.cxx                                      |    4 +-
 basctl/source/dlged/propbrw.cxx                                       |    4 --
 basic/qa/cppunit/test_vba.cxx                                         |    6 
+---
 basic/source/classes/propacc.cxx                                      |    2 -
 basic/source/classes/sbunoobj.cxx                                     |   15 
++++------
 basic/source/uno/namecont.cxx                                         |    2 -
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx |    5 
+--
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx |    3 --
 bridges/test/testclient.cxx                                           |    2 -
 bridges/test/testcomp.cxx                                             |    2 -
 bridges/test/testsameprocess.cxx                                      |    2 -
 canvas/source/cairo/cairo_canvashelper.cxx                            |    8 
++---
 canvas/source/tools/canvastools.cxx                                   |    4 +-
 canvas/workben/canvasdemo.cxx                                         |    3 --
 chart2/source/controller/accessibility/AccessibleChartElement.cxx     |    3 --
 chart2/source/controller/accessibility/AccessibleChartView.cxx        |    2 -
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx       |    4 +-
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx         |    4 +-
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx     |    2 -
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx           |   10 
+++---
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx        |    4 +-
 chart2/source/controller/main/ChartController.cxx                     |    4 +-
 chart2/source/controller/main/ChartController_Tools.cxx               |    2 -
 chart2/source/controller/main/ChartFrameloader.cxx                    |    2 -
 chart2/source/controller/main/PositionAndSizeHelper.cxx               |    2 -
 chart2/source/tools/DiagramHelper.cxx                                 |    2 -
 chart2/source/tools/ExplicitCategoriesProvider.cxx                    |    6 
+---
 chart2/source/tools/InternalDataProvider.cxx                          |    6 
+---
 chart2/source/tools/LifeTime.cxx                                      |    2 -
 chart2/source/tools/ObjectIdentifier.cxx                              |    4 +-
 chart2/source/view/charttypes/GL3DBarChart.cxx                        |    2 -
 chart2/source/view/charttypes/PieChart.cxx                            |    2 -
 chart2/source/view/charttypes/VSeriesPlotter.cxx                      |    6 
++--
 chart2/source/view/diagram/VDiagram.cxx                               |   15 
++++------
 chart2/source/view/main/AbstractShapeFactory.cxx                      |    2 -
 chart2/source/view/main/ChartView.cxx                                 |    2 -
 chart2/source/view/main/ShapeFactory.cxx                              |    2 -
 chart2/workbench/addin/sampleaddin.cxx                                |    4 +-
 editeng/source/accessibility/AccessibleEditableTextPara.cxx           |   10 
++----
 sc/source/ui/Accessibility/AccessibleEditObject.cxx                   |    6 
+---
 svtools/source/control/valueacc.cxx                                   |    6 
+---
 svx/source/accessibility/AccessibleControlShape.cxx                   |    3 --
 svx/source/accessibility/AccessibleShape.cxx                          |    3 --
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx             |    6 
+---
 svx/source/accessibility/svxrectctaccessiblecontext.cxx               |    9 
++----
 sw/source/core/access/accpara.cxx                                     |    6 
+---
 sw/source/core/access/acctextframe.cxx                                |    3 --
 testtools/source/bridgetest/cppobj.cxx                                |    4 +-
 toolkit/source/awt/vclxaccessiblecomponent.cxx                        |    9 
++----
 78 files changed, 138 insertions(+), 179 deletions(-)

New commits:
commit 065c8b48a604b70140862d0d02deb584626d6994
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Oct 29 15:48:45 2015 +0200

    use uno::Reference::set method instead of assignment
    
    Change-Id: I58410209f32f988f258a588364e0b037c2790211

diff --git a/UnoControls/source/base/basecontainercontrol.cxx 
b/UnoControls/source/base/basecontainercontrol.cxx
index e85e4a5..e3a45af 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 09a8734..08474e7 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 2034db7..ee18276 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 57ba185..ac79a01 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 e4fcd6d..fd23cb6 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 d3add99..98eb26e 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 5420401..4a92bb3 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 !!! )
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 51e1fe4..073d38f 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -251,7 +251,7 @@ namespace accessibility
 
             ListBoxAccessibleBase::disposing();
         }
-        m_aParent = WeakReference< XAccessible >();
+        m_aParent.clear();
     }
 
     // XServiceInfo
diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 0da4018..fd78096 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -160,7 +160,7 @@ SoundHandler::~SoundHandler()
         css::frame::DispatchResultEvent aEvent;
         aEvent.State = css::frame::DispatchResultState::FAILURE;
         m_xListener->dispatchFinished(aEvent);
-        m_xListener = css::uno::Reference< css::frame::XDispatchResultListener 
>();
+        m_xListener.clear();
     }
 }
 
@@ -220,7 +220,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const 
css::util::URL&
         m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, 
aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), 
OUString()) ), css::uno::UNO_QUERY_THROW );
         // OK- we can start async playing ...
         // Count this request and initialize self-holder against dying by uno 
ref count ...
-        m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< 
::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
+        m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), 
css::uno::UNO_QUERY);
         m_xPlayer->start();
         m_aUpdateIdle.SetPriority( SchedulerPriority::LOWER );
         m_aUpdateIdle.Start();
@@ -314,7 +314,7 @@ IMPL_LINK_NOARG_TYPED(SoundHandler, implts_PlayerNotify, 
Idle *, void)
     // We use m_xSelfHold to let us die ... but we must live till real 
finishing of this method too!!!
     // So we SHOULD use another "self-holder" temp. to provide that ...
     css::uno::Reference< css::uno::XInterface > xOperationHold = m_xSelfHold;
-    m_xSelfHold = css::uno::Reference< css::uno::XInterface >();
+    m_xSelfHold.clear();
 
     // notify might existing listener
     // And forget this listener!
@@ -327,7 +327,7 @@ IMPL_LINK_NOARG_TYPED(SoundHandler, implts_PlayerNotify, 
Idle *, void)
         else
             aEvent.State = css::frame::DispatchResultState::FAILURE;
         m_xListener->dispatchFinished(aEvent);
-        m_xListener = css::uno::Reference< css::frame::XDispatchResultListener 
>();
+        m_xListener.clear();
     }
 
     // } SAFE
diff --git a/avmedia/source/gstreamer/gstmanager.cxx 
b/avmedia/source/gstreamer/gstmanager.cxx
index 374f68a..1f0bc61 100644
--- a/avmedia/source/gstreamer/gstmanager.cxx
+++ b/avmedia/source/gstreamer/gstmanager.cxx
@@ -66,7 +66,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const OUString&
     DBG( "avmediagst: Manager::createPlayer" );
 
     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) 
)  )
-        xRet = uno::Reference< media::XPlayer >();
+        xRet.clear();
 
     return xRet;
 }
diff --git a/avmedia/source/gstreamer/gstuno.cxx 
b/avmedia/source/gstreamer/gstuno.cxx
index 283cd57..6e8bbc8 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -47,7 +47,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediagst_component_getFactory(
     if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
     {
         const OUString aServiceName( SERVICE_NAME );
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString 
>( &aServiceName, 1 ) ) );
     }
diff --git a/avmedia/source/macavf/macavfuno.mm 
b/avmedia/source/macavf/macavfuno.mm
index 27a0fe2..fca3be2 100644
--- a/avmedia/source/macavf/macavfuno.mm
+++ b/avmedia/source/macavf/macavfuno.mm
@@ -36,7 +36,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediaMacAVF_component_getFactor
     {
         const ::rtl::OUString aServiceName( AVMEDIA_MACAVF_MANAGER_SERVICENAME 
);
 
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME,
                         create_MediaPlayer, uno::Sequence< ::rtl::OUString >( 
&aServiceName, 1 ) ) );
diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index ece9d58..19dda1f 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -53,7 +53,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const ::rtl::OU
     OSL_TRACE( "avmediamacavf: Manager::createPlayer" );
 
     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) 
)  )
-        xRet = uno::Reference< media::XPlayer >();
+        xRet.clear();
 
     return xRet;
 }
diff --git a/avmedia/source/opengl/ogluno.cxx b/avmedia/source/opengl/ogluno.cxx
index 3eea976..b393f8b 100644
--- a/avmedia/source/opengl/ogluno.cxx
+++ b/avmedia/source/opengl/ogluno.cxx
@@ -29,7 +29,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediaogl_component_getFactory(
     {
         const OUString aServiceName( "com.sun.star.media.Manager_OpenGL" );
 
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         OUString("com.sun.star.comp.avmedia.Manager_OpenGL" ),
                         create_MediaPlayer, uno::Sequence< OUString >( 
&aServiceName, 1 ) ) );
diff --git a/avmedia/source/quicktime/manager.mm 
b/avmedia/source/quicktime/manager.mm
index 2e271f0..25ae118 100644
--- a/avmedia/source/quicktime/manager.mm
+++ b/avmedia/source/quicktime/manager.mm
@@ -53,7 +53,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const ::rtl::OU
     SAL_INFO( "avmedia.quicktime", "Manager::createPlayer" );
 
     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) 
)  )
-        xRet = uno::Reference< media::XPlayer >();
+        xRet.clear();
 
     return xRet;
 }
diff --git a/avmedia/source/quicktime/quicktimeuno.mm 
b/avmedia/source/quicktime/quicktimeuno.mm
index 3faf545..c5efdeb 100644
--- a/avmedia/source/quicktime/quicktimeuno.mm
+++ b/avmedia/source/quicktime/quicktimeuno.mm
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediaQuickTime_component_getFac
     {
         const ::rtl::OUString aServiceName( 
::rtl::OUString(AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
 
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         
::rtl::OUString(AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ),
                         create_MediaPlayer, uno::Sequence< OUString >( 
&aServiceName, 1 ) ) );
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index ad59261..8340e82 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -243,7 +243,7 @@ uno::Reference< media::XPlayer > 
MediaWindowImpl::createPlayer(
             
xContext->getServiceManager()->createInstanceWithContext(rManagerServName, 
xContext),
             uno::UNO_QUERY );
         if( xManager.is() )
-            xPlayer = uno::Reference< media::XPlayer >( 
xManager->createPlayer( rURL ), uno::UNO_QUERY );
+            xPlayer.set( xManager->createPlayer( rURL ), uno::UNO_QUERY );
         else
             SAL_WARN( "avmedia", "failed to create media player service " << 
rManagerServName );
     } catch ( const uno::Exception &e )
diff --git a/avmedia/source/vlc/vlcmanager.cxx 
b/avmedia/source/vlc/vlcmanager.cxx
index 296c350..b3c9224 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -101,7 +101,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const rtl::OUSt
     VLCPlayer* pPlayer( new VLCPlayer( mURL,
                                        *mInstance,
                                        mEventHandler /*, mxMgr */ ) );
-    mPlayer = uno::Reference< media::XPlayer >( pPlayer );
+    mPlayer.set( pPlayer );
 
     return mPlayer;
 }
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 1318a18..99f3634 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -245,7 +245,7 @@ uno::Reference< css::media::XFrameGrabber > SAL_CALL 
VLCPlayer::createFrameGrabb
     if ( !mrFrameGrabber.is() )
     {
         VLCFrameGrabber *frameGrabber = new VLCFrameGrabber( mEventHandler, 
mUrl );
-        mrFrameGrabber = uno::Reference< css::media::XFrameGrabber >( 
frameGrabber );
+        mrFrameGrabber.set( frameGrabber );
     }
 
     return mrFrameGrabber;
diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx
index 67b0c0c..bfa2c91 100644
--- a/avmedia/source/vlc/vlcuno.cxx
+++ b/avmedia/source/vlc/vlcuno.cxx
@@ -56,7 +56,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediavlc_component_getFactory(
     if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
     {
         const OUString aServiceName( SERVICE_NAME );
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString 
>( &aServiceName, 1 ) ) );
     }
diff --git a/avmedia/source/win/manager.cxx b/avmedia/source/win/manager.cxx
index 94e45af..bab1b5b 100644
--- a/avmedia/source/win/manager.cxx
+++ b/avmedia/source/win/manager.cxx
@@ -50,7 +50,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const OUString&
     const INetURLObject                 aURL( rURL );
 
     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) 
)  )
-        xRet = uno::Reference< media::XPlayer >();
+        xRet.clear();
 
     return xRet;
 }
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index a1f7e44..b04eaf9 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -437,7 +437,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
         xRet = pWindow;
 
         if( !pWindow->create( aArguments ) )
-            xRet = uno::Reference< ::media::XPlayerWindow >();
+            xRet.clear();
     }
 
     return xRet;
diff --git a/avmedia/source/win/winuno.cxx b/avmedia/source/win/winuno.cxx
index c39c00a..a93fb9a 100644
--- a/avmedia/source/win/winuno.cxx
+++ b/avmedia/source/win/winuno.cxx
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL 
avmediawin_component_getFactory(
     {
         const OUString aServiceName( "com.sun.star.media.Manager_DirectX" );
 
-        xFactory = uno::Reference< lang::XSingleServiceFactory >( 
::cppu::createSingleFactory(
+        xFactory.set( ::cppu::createSingleFactory(
                         reinterpret_cast< lang::XMultiServiceFactory* >( 
pServiceManager ),
                         OUString("com.sun.star.comp.avmedia.Manager_DirectX" ),
                         create_MediaPlayer, uno::Sequence< OUString >( 
&aServiceName, 1 ) ) );
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx 
b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index 9e39553..5c4c996 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -58,7 +58,7 @@ AccessibleDialogControlShape::AccessibleDialogControlShape 
(DialogWindow* pDialo
     m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() 
);
 
     if ( m_pDlgEdObj )
-        m_xControlModel = Reference< XPropertySet >( 
m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
+        m_xControlModel.set( m_pDlgEdObj->GetUnoControlModel(), UNO_QUERY );
 
     if ( m_xControlModel.is() )
         m_xControlModel->addPropertyChangeListener( OUString(), static_cast< 
beans::XPropertyChangeListener* >( this ) );
diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 0c503a3..7b4f0fb 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -805,15 +805,13 @@ void LibPage::InsertLib()
         OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
         if ( xSFA->exists( aModURL ) )
         {
-            xModLibContImport = Reference< script::XLibraryContainer2 >(
-                        
script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), 
UNO_QUERY );
+            xModLibContImport.set( 
script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), 
UNO_QUERY );
         }
 
         OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
         if ( xSFA->exists( aDlgURL ) )
         {
-            xDlgLibContImport = Reference< script::XLibraryContainer2 >(
-                        
script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), 
UNO_QUERY );
+            xDlgLibContImport.set( 
script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), 
UNO_QUERY );
         }
 
         if ( xModLibContImport.is() || xDlgLibContImport.is() )
@@ -973,7 +971,7 @@ void LibPage::InsertLib()
                                     OUString aModStorageURL( 
aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
 
                                     // create library link
-                                    xModLib = Reference< 
container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, 
aModStorageURL, true ), UNO_QUERY);
+                                    xModLib.set( 
xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), 
UNO_QUERY);
                                 }
                                 else
                                 {
@@ -1042,7 +1040,7 @@ void LibPage::InsertLib()
                                     OUString aDlgStorageURL( 
aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
 
                                     // create library link
-                                    xDlgLib = Reference< 
container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, 
aDlgStorageURL, true ), UNO_QUERY);
+                                    xDlgLib.set( 
xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), 
UNO_QUERY);
                                 }
                                 else
                                 {
diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 939c841..2041ec2 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -286,7 +286,7 @@ void Shell::CopyDialogResources(
 
     // create dialog model
     Reference< XComponentContext > xContext = 
comphelper::getProcessComponentContext();
-    Reference< container::XNameContainer > xDialogModel = Reference< 
container::XNameContainer >( 
xContext->getServiceManager()->createInstanceWithContext
+    Reference< container::XNameContainer > xDialogModel( 
xContext->getServiceManager()->createInstanceWithContext
         ( "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY );
     Reference< io::XInputStream > xInput( io_xISP->createInputStream() );
     ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, 
rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel 
>() );
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 4304ab3..c348536 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -1522,7 +1522,7 @@ void DlgEdForm::UpdateGroups()
         sal_uInt32 nSize = aChildList.size();
         Sequence< Reference< awt::XControl > > aSeqControls( nSize );
         for ( sal_uInt32 i = 0; i < nSize; ++i )
-            aSeqControls.getArray()[i] = Reference< awt::XControl >( 
aChildList[i]->GetControl(), UNO_QUERY );
+            aSeqControls.getArray()[i].set( aChildList[i]->GetControl(), 
UNO_QUERY );
 
         sal_Int32 nGroupCount = xTabModel->getGroupCount();
         for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
@@ -1550,7 +1550,7 @@ void DlgEdForm::UpdateGroups()
                         if ( xCtrlModel.get() == pModels[nModel].get() )
                         {
                             // get the control peer and insert into the list 
of peers
-                            aSeqPeers.getArray()[ nModel ] = Reference< 
awt::XWindow >( xCtrl->getPeer(), UNO_QUERY );
+                            aSeqPeers.getArray()[ nModel ].set( 
xCtrl->getPeer(), UNO_QUERY );
                             break;
                         }
                     }
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index b121294..544fbde 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -131,9 +131,7 @@ void PropBrw::ImplReCreateController()
         // create a property browser controller
         Reference< XMultiComponentFactory > xFactory( 
xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
         static const char s_sControllerServiceName[] = 
"com.sun.star.awt.PropertyBrowserController";
-        m_xBrowserController = Reference< XPropertySet >(
-            xFactory->createInstanceWithContext( s_sControllerServiceName, 
xInspectorContext ), UNO_QUERY
-        );
+        m_xBrowserController.set( xFactory->createInstanceWithContext( 
s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
         if ( !m_xBrowserController.is() )
         {
             ShowServiceNotAvailableError( GetParent(), 
s_sControllerServiceName, true );
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index f7ddc6c..ba14562 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -91,10 +91,8 @@ void VBATest::testMiscOLEStuff()
     if( xContext.is() )
     {
         uno::Reference<lang::XMultiComponentFactory> xSMgr = 
xContext->getServiceManager();
-        xOLEFactory = uno::Reference<lang::XMultiServiceFactory>(
-            xSMgr->createInstanceWithContext(
-                "com.sun.star.bridge.OleObjectFactory",
-                xContext ), uno::UNO_QUERY );
+        xOLEFactory.set( xSMgr->createInstanceWithContext( 
"com.sun.star.bridge.OleObjectFactory", xContext ),
+                         uno::UNO_QUERY );
     }
     bool bOk = false;
     if( xOLEFactory.is() )
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 2a0b49a..ae2cdb2 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -216,7 +216,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, 
SbxArray& rPar, bool bWrite
                 cppu::UnoType<Sequence<PropertyValue>>::get() );
         Sequence<PropertyValue> const *pArg =
                 static_cast<Sequence<PropertyValue> const 
*>(aArgAsAny.getValue());
-        Reference< XPropertyAccess > xPropAcc = Reference< XPropertyAccess 
>::query( xInterface );
+        Reference< XPropertyAccess > xPropAcc( xInterface, UNO_QUERY );
         xPropAcc->setPropertyValues( *pArg );
 
         // Build a SbUnoObject and return it
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 248f96b..c4165e8 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -248,12 +248,11 @@ SbUnoObject* createOLEObject_Impl( const OUString& aType )
     {
         bNeedsInit = false;
 
-        Reference< XComponentContext > xContext(
-            comphelper::getProcessComponentContext() );
+        Reference< XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
         if( xContext.is() )
         {
             Reference<XMultiComponentFactory> xSMgr = 
xContext->getServiceManager();
-            xOLEFactory = Reference<XMultiServiceFactory>(
+            xOLEFactory.set(
                 xSMgr->createInstanceWithContext(
                     OUString( "com.sun.star.bridge.OleObjectFactory"),
                         xContext ), UNO_QUERY );
@@ -2347,15 +2346,15 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const 
Any& aUnoObj_ )
 
     Reference< XTypeProvider > xTypeProvider;
     // Did the object have an invocation itself?
-    mxInvocation = Reference< XInvocation >( x, UNO_QUERY );
+    mxInvocation.set( x, UNO_QUERY );
 
-    xTypeProvider = Reference< XTypeProvider >( x, UNO_QUERY );
+    xTypeProvider.set( x, UNO_QUERY );
 
     if( mxInvocation.is() )
     {
 
         // get the ExactName
-        mxExactNameInvocation = Reference< XExactName >::query( mxInvocation );
+        mxExactNameInvocation.set( mxInvocation, UNO_QUERY );
 
         // The remainder refers only to the introspection
         if( !xTypeProvider.is() )
@@ -2462,10 +2461,10 @@ void SbUnoObject::doIntrospection()
     }
 
     // get MaterialHolder from access
-    mxMaterialHolder = Reference< XMaterialHolder >::query( mxUnoAccess );
+    mxMaterialHolder.set( mxUnoAccess, UNO_QUERY );
 
     // get ExactName from access
-    mxExactName = Reference< XExactName >::query( mxUnoAccess );
+    mxExactName.set( mxUnoAccess, UNO_QUERY );
 }
 
 
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index a9e2c0e..6996ab1 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2779,7 +2779,7 @@ void SAL_CALL SfxLibraryContainer::disposing()
     EventObject aEvent( xModel.get() );
     maVBAScriptListeners.disposing( aEvent );
     stopAllComponentListening();
-    mxOwnerDocument = WeakReference< XModel >();
+    mxOwnerDocument.clear();
 }
 
 // Methods XLibraryContainerPassword
diff --git 
a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx 
b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index f36c35e..005197b 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
@@ -79,7 +79,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
     }
     css::uno::Reference< test::javauno::nativethreadpool::XRelay > relay;
     try {
-        relay = css::uno::Reference< test::javauno::nativethreadpool::XRelay >(
+        relay.set(
             factory->createInstanceWithContext(
                 OUString( "test.javauno.nativethreadpool.Relay" ),
                 context),
@@ -99,8 +99,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
     }
     css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
     try {
-        source
-            = css::uno::Reference< test::javauno::nativethreadpool::XSource >(
+        source.set(
                 css::bridge::UnoUrlResolver::create(context)->resolve(
                     OUString( "uno:socket,host=localhost,port=3830;urp;test" 
)),
                 css::uno::UNO_QUERY_THROW);
diff --git 
a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx 
b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index 81a3d9b..3ac084f 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
@@ -69,8 +69,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
     css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
     try {
         // Use "127.0.0.1" instead of "localhost", see #i32281#:
-        source
-            = css::uno::Reference< test::javauno::nativethreadpool::XSource >(
+        source.set(
                 css::bridge::UnoUrlResolver::create(context)->resolve(
                     OUString( "uno:socket,host=127.0.0.1,port=3831;urp;test" 
)),
                 css::uno::UNO_QUERY_THROW);
diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx
index 9e533a8..b8a2a06 100644
--- a/bridges/test/testclient.cxx
+++ b/bridges/test/testclient.cxx
@@ -203,7 +203,7 @@ int main( int argc, char *argv[] )
 //                          Reference < XComponent > rComp( rBridge , 
UNO_QUERY );
 //                          rComp->dispose();
 
-                        rInitialObject = Reference < XInterface > ();
+                        rInitialObject.clear();
                         printf( "Waiting...\n" );
                         TimeValue value={bReverse ?1000 :2,0};
                         osl_waitThread( &value );
diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx
index 376dab7..f07760e 100644
--- a/bridges/test/testcomp.cxx
+++ b/bridges/test/testcomp.cxx
@@ -591,7 +591,7 @@ void testAllTypes( const Reference < XCallMe > & rRCallMe )
         types.Float = (float)123.239;
         types.Double = 1279.12490012;
         types.String = OUString("abcdefghijklmnopqrstuvwxyz");
-        types.Interface = Reference< XInterface >( rRCallMe , UNO_QUERY);
+        types.Interface.set( rRCallMe , UNO_QUERY);
         types.Any <<= types.Double;
 
         TestTypes retTypes = rRCallMe->transport( types );
diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx
index 8009e2b..a4f5537 100644
--- a/bridges/test/testsameprocess.cxx
+++ b/bridges/test/testsameprocess.cxx
@@ -197,7 +197,7 @@ int main( int argc, char *argv[] )
         rComp->dispose();
 
 
-        rComp = Reference < XComponent > ( rSMgr , UNO_QUERY );
+        rComp.set( rSMgr , UNO_QUERY );
         rComp->dispose();
     }
     return 0;
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index bef07e2..030f7e0 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1336,7 +1336,7 @@ namespace cairocanvas
                                                                                
        bool                             bHasAlpha )
     {
         SurfaceSharedPtr pSurface=pInputSurface;
-        uno::Reference< rendering::XCachedPrimitive > rv = uno::Reference< 
rendering::XCachedPrimitive >(NULL);
+        uno::Reference< rendering::XCachedPrimitive > rv(NULL);
         geometry::IntegerSize2D aBitmapSize = rSize;
 
         if( mpCairo )
@@ -1381,7 +1381,7 @@ namespace cairocanvas
                 aMatrix.xx = aMatrix.yy = 1;
                 cairo_set_matrix( mpCairo.get(), &aMatrix );
 
-                rv = uno::Reference< rendering::XCachedPrimitive >(
+                rv.set(
                     new CachedBitmap( pSurface, viewState, renderState,
                                       // cast away const, need to
                                       // change refcount (as this is
@@ -1467,7 +1467,7 @@ namespace cairocanvas
                 free( data );
         }
         else
-            rv = uno::Reference< rendering::XCachedPrimitive >(NULL);
+            rv.set(NULL);
 
 #ifdef CAIRO_CANVAS_PERF_TRACE
         mxDevice->stopPerfTrace( &aTimer, "drawBitmap" );
@@ -1500,7 +1500,7 @@ namespace cairocanvas
                 free( data );
         }
         else
-            rv = uno::Reference< rendering::XCachedPrimitive >(NULL);
+            rv.set(NULL);
 
 #ifdef CAIRO_CANVAS_PERF_TRACE
         mxDevice->stopPerfTrace( &aTimer, "drawBitmap" );
diff --git a/canvas/source/tools/canvastools.cxx 
b/canvas/source/tools/canvastools.cxx
index f54ecce..d01adf3 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -77,7 +77,7 @@ namespace canvas
         {
             // setup identity transform
             setIdentityAffineMatrix2D( renderState.AffineTransform );
-            renderState.Clip = uno::Reference< rendering::XPolyPolygon2D >();
+            renderState.Clip.clear();
             renderState.DeviceColor = uno::Sequence< double >();
             renderState.CompositeOperation = 
rendering::CompositeOperation::OVER;
 
@@ -88,7 +88,7 @@ namespace canvas
         {
             // setup identity transform
             setIdentityAffineMatrix2D( viewState.AffineTransform );
-            viewState.Clip = uno::Reference< rendering::XPolyPolygon2D >();
+            viewState.Clip.clear();
 
             return viewState;
         }
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 7f93115..50211ff 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -657,8 +657,7 @@ void DemoApp::Main()
     try
     {
         uno::Reference< uno::XComponentContext > xCtx = 
::cppu::defaultBootstrap_InitialComponentContext();
-        xFactory = uno::Reference< lang::XMultiServiceFactory >(  
xCtx->getServiceManager(),
-                                                                  
uno::UNO_QUERY );
+        xFactory.set(  xCtx->getServiceManager(), uno::UNO_QUERY );
         if( xFactory.is() )
             ::comphelper::setProcessServiceFactory( xFactory );
     }
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx 
b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index b92b64c..767cfba 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -175,8 +175,7 @@ Reference< awt::XFont > SAL_CALL 
AccessibleChartElement::getFont()
 
     Reference< awt::XFont > xFont;
     // using assignment for broken gcc 3.3
-    Reference< awt::XDevice > xDevice = Reference< awt::XDevice >(
-        Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY );
+    Reference< awt::XDevice > xDevice( Reference< awt::XWindow >( 
GetInfo().m_xWindow ), uno::UNO_QUERY );
 
     if( xDevice.is())
     {
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx 
b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 4b742f1..b230b97 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -350,7 +350,7 @@ void SAL_CALL AccessibleChartView::selectionChanged( const 
lang::EventObject& /*
     Reference< view::XSelectionSupplier > xSelectionSupplier;
     {
         MutexGuard aGuard( GetMutex());
-        xSelectionSupplier = Reference< view::XSelectionSupplier 
>(m_xSelectionSupplier);
+        xSelectionSupplier.set(m_xSelectionSupplier);
     }
 
     if( xSelectionSupplier.is() )
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index afdebd1..9c776ec 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -80,7 +80,7 @@ void Chart2ModelContact::setModel( const 
::com::sun::star::uno::Reference<
 
 void Chart2ModelContact::clear()
 {
-    m_xChartModel = uno::WeakReference< frame::XModel >(0);
+    m_xChartModel.clear();
     m_xChartView.clear();
     mpModel = NULL;
 }
@@ -108,7 +108,7 @@ uno::Reference< lang::XUnoTunnel > 
Chart2ModelContact::getChartView() const
         Reference<frame::XModel> xModel(m_xChartModel);
         uno::Reference< lang::XMultiServiceFactory > xFact( xModel, 
uno::UNO_QUERY );
         if( xFact.is() )
-            m_xChartView = Reference< lang::XUnoTunnel >( 
xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY );
+            m_xChartView.set( xFact->createInstance( CHART_VIEW_SERVICE_NAME 
), uno::UNO_QUERY );
     }
     return m_xChartView;
 }
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 87427b2..4b6fe80 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -634,11 +634,11 @@ void ChartDataWrapper::initDataAccess()
     if( !xChartDoc.is() )
         return;
     if( xChartDoc->hasInternalDataProvider() )
-        m_xDataAccess = Reference< XAnyDescriptionAccess >( 
xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
+        m_xDataAccess.set( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW 
);
     else
     {
         //create a separate "internal data provider" that is not connected to 
the model
-        m_xDataAccess = Reference< XAnyDescriptionAccess >( 
ChartModelHelper::createInternalDataProvider(
+        m_xDataAccess.set( ChartModelHelper::createInternalDataProvider(
             xChartDoc, false /*bConnectToModel*/ ), uno::UNO_QUERY_THROW );
     }
 }
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index b93dfc5..a6ed2f6 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1088,7 +1088,7 @@ Reference< drawing::XShapes > 
ChartDocumentWrapper::getAdditionalShapes() const
     if( !aShapeVector.empty() )
     {
         // create a shape collection
-        xFoundShapes = uno::Reference< drawing::XShapes >( 
drawing::ShapeCollection::create(
+        xFoundShapes.set( drawing::ShapeCollection::create(
                     comphelper::getProcessComponentContext()), uno::UNO_QUERY 
);
 
         OSL_ENSURE( xFoundShapes.is(), "Couldn't create a shape collection!" );
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 840f79d..4bb26f9 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -933,7 +933,7 @@ Reference< drawing::XShape > SAL_CALL 
DiagramWrapper::getZAxisTitle()
     Reference< drawing::XShape > xRet;
     Reference< XAxis > xAxis( getAxis(2) );
     if( xAxis.is() )
-        xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), 
uno::UNO_QUERY );
+        xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
     return xRet;
 }
 
@@ -981,7 +981,7 @@ Reference< drawing::XShape > SAL_CALL 
DiagramWrapper::getXAxisTitle()
     Reference< drawing::XShape > xRet;
     Reference< XAxis > xAxis( getAxis(0) );
     if( xAxis.is() )
-        xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), 
uno::UNO_QUERY );
+        xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
     return xRet;
 }
 
@@ -1029,7 +1029,7 @@ Reference< drawing::XShape > SAL_CALL 
DiagramWrapper::getYAxisTitle()
     Reference< drawing::XShape > xRet;
     Reference< XAxis > xAxis( getAxis(1) );
     if( xAxis.is() )
-        xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), 
uno::UNO_QUERY );
+        xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
     return xRet;
 }
 
@@ -1068,7 +1068,7 @@ Reference< drawing::XShape > SAL_CALL 
DiagramWrapper::getSecondXAxisTitle()
     Reference< drawing::XShape > xRet;
     Reference< XAxis > xAxis( getSecondaryAxis(0) );
     if( xAxis.is() )
-        xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), 
uno::UNO_QUERY );
+        xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
     return xRet;
 }
 
@@ -1078,7 +1078,7 @@ Reference< drawing::XShape > SAL_CALL 
DiagramWrapper::getSecondYAxisTitle()
     Reference< drawing::XShape > xRet;
     Reference< XAxis > xAxis( getSecondaryAxis(1) );
     if( xAxis.is() )
-        xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), 
uno::UNO_QUERY );
+        xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY );
     return xRet;
 }
 
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 70c7566..72d5e79 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -188,7 +188,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const 
OUString& rPropertyName
                 Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( 
xSeriesContainer->getDataSeries() );
                 if(aSeriesSeq.getLength())
                 {
-                    xPropSet = Reference< beans::XPropertySet 
>(aSeriesSeq[0],uno::UNO_QUERY);
+                    xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
                     if(xPropSet.is())
                     {
                         if( rPropertyName == "LineColor" )
@@ -227,7 +227,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( 
const OUString& rProperty
                 Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( 
xSeriesContainer->getDataSeries() );
                 if(aSeriesSeq.getLength())
                 {
-                    xPropSet = Reference< beans::XPropertySet 
>(aSeriesSeq[0],uno::UNO_QUERY);
+                    xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
                     break;
                 }
             }
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index c002ef8..3b9f86a 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -487,7 +487,7 @@ void SAL_CALL ChartController::attachFrame(
         SolarMutexGuard aSolarGuard;
         m_pChartWindow = 
VclPtr<ChartWindow>::Create(this,pParent,pParent?pParent->GetStyle():0);
         m_pChartWindow->SetBackground();//no Background
-        m_xViewWindow = uno::Reference< awt::XWindow >( 
m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY );
+        m_xViewWindow.set( m_pChartWindow->GetComponentInterface(), 
uno::UNO_QUERY );
         m_pChartWindow->Show();
         m_apDropTargetHelper.reset(
             new ChartDropTargetHelper( m_pChartWindow->GetDropTarget(),
@@ -841,7 +841,7 @@ void SAL_CALL ChartController::dispose()
             uno::Reference< view::XSelectionChangeListener > 
xSelectionChangeListener;
             uno::Reference< chart2::data::XDataReceiver > xDataReceiver( 
getModel(), uno::UNO_QUERY );
             if( xDataReceiver.is() )
-                xSelectionChangeListener = uno::Reference< 
view::XSelectionChangeListener >( xDataReceiver->getRangeHighlighter(), 
uno::UNO_QUERY );
+                xSelectionChangeListener.set( 
xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
             if( xSelectionChangeListener.is() )
             {
                 uno::Reference< frame::XController > xController( this );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index c6e01a8..bd91f1c 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -512,7 +512,7 @@ void ChartController::executeDispatch_Copy()
                     }
                     if ( pSelectedObj )
                     {
-                        xTransferable = Reference< datatransfer::XTransferable 
>( new ChartTransferable(
+                        xTransferable.set( new ChartTransferable(
                                 &m_pDrawModelWrapper->getSdrModel(), 
pSelectedObj, aSelOID.isAdditionalShape() ) );
                     }
                 }
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx 
b/chart2/source/controller/main/ChartFrameloader.cxx
index ec94827..5669aa8 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -123,7 +123,7 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const 
uno::Sequence< beans::PropertyVa
     uno::Reference< frame::XController >    xController = NULL;
     uno::Reference< awt::XWindow >          xComponentWindow = NULL;
     {
-        xController = uno::Reference< frame::XController >(
+        xController.set(
             m_xCC->getServiceManager()->createInstanceWithContext(
             CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME,m_xCC )
             , uno::UNO_QUERY );
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx 
b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index 5283348..ea88fc2 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -138,7 +138,7 @@ bool PositionAndSizeHelper::moveObject( const OUString& 
rObjectCID
     ObjectType eObjectType( ObjectIdentifier::getObjectType( rObjectCID ) );
     if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType 
|| OBJECTTYPE_DIAGRAM_FLOOR==eObjectType)
     {
-        xObjectProp = uno::Reference< beans::XPropertySet >( 
ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY );
+        xObjectProp.set( ObjectIdentifier::getDiagramForCID( rObjectCID, 
xChartModel ), uno::UNO_QUERY );
         if(!xObjectProp.is())
             return false;
     }
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index 162bdf6..c4817bf 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1056,7 +1056,7 @@ void lcl_switchToDateCategories( const Reference< 
XChartDocument >& xChartDoc, c
             sal_Int32 nNumberFormat = -1;
             xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= 
nNumberFormat;
 
-            Reference< util::XNumberFormats > xNumberFormats = Reference< 
util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() );
+            Reference< util::XNumberFormats > xNumberFormats( 
xNumberFormatsSupplier->getNumberFormats() );
             if( xNumberFormats.is() )
             {
                 Reference< beans::XPropertySet > xKeyProps;
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx 
b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index dcfdada..56977db 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -174,8 +174,7 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( 
uno::Sequence< OUStr
     if(!nCount)
         return;
     rOutTexts.realloc(nCount);
-    Reference< util::XNumberFormats > xNumberFormats;
-    xNumberFormats = Reference< util::XNumberFormats >( 
rModel.getNumberFormats() );
+    Reference< util::XNumberFormats > xNumberFormats( 
rModel.getNumberFormats() );
 
     sal_Int32 nAxisNumberFormat = 0;
     Reference< XCoordinateSystem > xCooSysModel( 
ChartModelHelper::getFirstCoordinateSystem( rModel ) );
@@ -421,8 +420,7 @@ bool lcl_fillDateCategories( const uno::Reference< 
data::XDataSequence >& xDataS
         uno::Sequence< uno::Any > aValues = xDataSequence->getData();
         sal_Int32 nCount = aValues.getLength();
         rDateCategories.reserve(nCount);
-        Reference< util::XNumberFormats > xNumberFormats;
-        xNumberFormats = Reference< util::XNumberFormats >( 
rModel.getNumberFormats() );
+        Reference< util::XNumberFormats > xNumberFormats( 
rModel.getNumberFormats() );
 
         bool bOwnData = false;
         bool bOwnDataAnddAxisHasAnyFormat = false;
diff --git a/chart2/source/tools/InternalDataProvider.cxx 
b/chart2/source/tools/InternalDataProvider.cxx
index 9a08c90..f05cae2 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -161,15 +161,13 @@ struct lcl_internalizeSeries : public 
::std::unary_function< Reference< chart2::
                         comphelper::copyProperties(
                             Reference< beans::XPropertySet >( xLabel, 
uno::UNO_QUERY ),
                             Reference< beans::XPropertySet >( xNewLabel, 
uno::UNO_QUERY ));
-                        aNewSeriesData[i] = Reference< 
chart2::data::XLabeledDataSequence >(
-                                new LabeledDataSequence( xNewValues, xNewLabel 
));
+                        aNewSeriesData[i].set( new LabeledDataSequence( 
xNewValues, xNewLabel ) );
                     }
                 }
                 else
                 {
                     if( m_bConnectToModel )
-                        aNewSeriesData[i] = Reference< 
chart2::data::XLabeledDataSequence >(
-                            new LabeledDataSequence( xNewValues ));
+                        aNewSeriesData[i].set( new LabeledDataSequence( 
xNewValues ) );
                 }
             }
             if( m_bConnectToModel )
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 7d6d724..3c40abf 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -336,7 +336,7 @@ void CloseableLifeTimeManager::impl_doClose()
     uno::Reference< util::XCloseable > xCloseable=NULL;
     try
     {
-        xCloseable = uno::Reference< util::XCloseable >(m_pCloseable);;
+        xCloseable.set(m_pCloseable);
         if(xCloseable.is())
         {
             //--call notifyClosing on all registered close listeners
diff --git a/chart2/source/tools/ObjectIdentifier.cxx 
b/chart2/source/tools/ObjectIdentifier.cxx
index 3b917ac..cac87c7 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -1330,7 +1330,7 @@ Reference< beans::XPropertySet > 
ObjectIdentifier::getObjectPropertySet(
                     Reference< XDataSeries > xSeries( 
ObjectIdentifier::getDataSeriesForCID(
                         rObjectCID, xChartModel ) );
                     if( xSeries.is() )
-                        xObjectProperties = Reference< beans::XPropertySet >( 
xSeries, uno::UNO_QUERY );
+                        xObjectProperties.set( xSeries, uno::UNO_QUERY );
 
                     break;
                 }
@@ -1368,7 +1368,7 @@ Reference< beans::XPropertySet > 
ObjectIdentifier::getObjectPropertySet(
                                 errorBar = "ErrorBarZ";
 
                             xSeriesProp->getPropertyValue( errorBar ) >>= 
xErrorBarProp;
-                            xObjectProperties = Reference< beans::XPropertySet 
>( xErrorBarProp, uno::UNO_QUERY );
+                            xObjectProperties.set( xErrorBarProp, 
uno::UNO_QUERY );
                         }
                     }
                     break;
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 5aba63e..c1ee3c2 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -875,7 +875,7 @@ void GL3DBarChart::spawnRenderThread(RenderThread *pThread)
 
     Size aSize = mpWindow->GetSizePixel();
     mpWindow->getContext().setWinSize(aSize);
-    mpRenderThread = rtl::Reference<RenderThread>(pThread);
+    mpRenderThread.set(pThread);
     mpWindow->getContext().resetCurrent();
     mpRenderThread->launch();
 }
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index d8e76e8..cbeac17 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -363,7 +363,7 @@ void PieChart::createTextLabelShape(
     ///the current label in order to simplify later label position 
rearrangement;
     uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, 
uno::UNO_QUERY );
     if( xChild.is() )
-        aPieLabelInfo.xLabelGroupShape = uno::Reference<drawing::XShape>( 
xChild->getParent(), uno::UNO_QUERY );
+        aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), 
uno::UNO_QUERY );
     aPieLabelInfo.fValue = nVal;
     aPieLabelInfo.bMovementAllowed = bMovementAllowed;
     aPieLabelInfo.bMoved= false;
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index e5370ac..f7fae64 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2417,7 +2417,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
                 // set CID to symbol for selection
                 if( xShape.is() )
                 {
-                    aEntry.aSymbol = uno::Reference< drawing::XShape >( 
xSymbolGroup, uno::UNO_QUERY );
+                    aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
 
                     OUString aChildParticle( 
ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) );
                     aChildParticle = ObjectIdentifier::addChildParticle( 
aChildParticle, ObjectIdentifier::createChildParticleWithIndex( 
OBJECTTYPE_LEGEND_ENTRY, 0 ) );
@@ -2446,7 +2446,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
             // set CID to symbol for selection
             if( xShape.is())
             {
-                aEntry.aSymbol = uno::Reference< drawing::XShape >( 
xSymbolGroup, uno::UNO_QUERY );
+                aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
 
                 OUString aChildParticle( 
ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
                 OUString aCID = 
ObjectIdentifier::createClassifiedIdentifierForParticles( 
rSeries.getSeriesParticle(), aChildParticle );
@@ -2491,7 +2491,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
                     // set CID to symbol for selection
                     if( xShape.is())
                     {
-                        aEntry.aSymbol = uno::Reference< drawing::XShape >( 
xSymbolGroup, uno::UNO_QUERY );
+                        aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY );
 
                         bool bAverageLine = 
RegressionCurveHelper::isMeanValueLine( aCurves[i] );
                         ObjectType eObjectType = bAverageLine ? 
OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE;
diff --git a/chart2/source/view/diagram/VDiagram.cxx 
b/chart2/source/view/diagram/VDiagram.cxx
index a5788de..3e3adef 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -154,14 +154,14 @@ void VDiagram::createShapes_2d()
 
     //create group shape
     uno::Reference< drawing::XShapes > xOuterGroup_Shapes = 
m_pShapeFactory->createGroup2D(m_xTarget);
-    m_xOuterGroupShape = uno::Reference<drawing::XShape>( xOuterGroup_Shapes, 
uno::UNO_QUERY );
+    m_xOuterGroupShape.set( xOuterGroup_Shapes, uno::UNO_QUERY );
 
     uno::Reference< drawing::XShapes > xGroupForWall( 
m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") );
 
     //create independent group shape as container for datapoints and such 
things
     {
         uno::Reference< drawing::XShapes > xShapes = 
m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID");
-        m_xCoordinateRegionShape = uno::Reference<drawing::XShape>( xShapes, 
uno::UNO_QUERY );
+        m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY );
     }
 
     bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( 
m_xDiagram );
@@ -473,8 +473,7 @@ void VDiagram::createShapes_3d()
         return;
 
     //create shape
-    m_xOuterGroupShape = uno::Reference< drawing::XShape >(
-            m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" 
), uno::UNO_QUERY);
+    m_xOuterGroupShape.set( m_pShapeFactory->createGroup3D( m_xTarget, 
"PlotAreaExcludingAxes" ), uno::UNO_QUERY);
 
     uno::Reference< drawing::XShapes > xOuterGroup_Shapes =
             uno::Reference<drawing::XShapes>( m_xOuterGroupShape, 
uno::UNO_QUERY );
@@ -482,7 +481,7 @@ void VDiagram::createShapes_3d()
     //create additional group to manipulate the aspect ratio of the whole 
diagram:
     xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, 
OUString() );
 
-    m_xAspectRatio3D = uno::Reference< beans::XPropertySet >( 
xOuterGroup_Shapes, uno::UNO_QUERY );
+    m_xAspectRatio3D.set( xOuterGroup_Shapes, uno::UNO_QUERY );
 
     bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( 
m_xDiagram );
 
@@ -492,7 +491,7 @@ void VDiagram::createShapes_3d()
     {
         uno::Reference< beans::XPropertySet > xWallProp( NULL );
         if( m_xDiagram.is() )
-            xWallProp=uno::Reference< beans::XPropertySet >( 
m_xDiagram->getWall());
+            xWallProp.set( m_xDiagram->getWall() );
 
         OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( 
OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
         if( !bAddFloorAndWall )
@@ -615,7 +614,7 @@ void VDiagram::createShapes_3d()
     {
         uno::Reference< beans::XPropertySet > xFloorProp( NULL );
         if( m_xDiagram.is() )
-            xFloorProp=uno::Reference< beans::XPropertySet >( 
m_xDiagram->getFloor());
+            xFloorProp.set( m_xDiagram->getFloor() );
 
         Stripe aStripe( drawing::Position3D(0,0,0)
             , drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME)
@@ -643,7 +642,7 @@ void VDiagram::createShapes_3d()
     //create an additional scene for the smaller inner coordinate region:
     {
         uno::Reference< drawing::XShapes > xShapes = 
m_pShapeFactory->createGroup3D( 
xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID" );
-        m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, 
uno::UNO_QUERY );
+        m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY );
 
         uno::Reference< beans::XPropertySet > xShapeProp( 
m_xCoordinateRegionShape, uno::UNO_QUERY );
         OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet");
diff --git a/chart2/source/view/main/AbstractShapeFactory.cxx 
b/chart2/source/view/main/AbstractShapeFactory.cxx
index c8e2295..63fd319 100644
--- a/chart2/source/view/main/AbstractShapeFactory.cxx
+++ b/chart2/source/view/main/AbstractShapeFactory.cxx
@@ -130,7 +130,7 @@ uno::Reference< drawing::XShapes > 
AbstractShapeFactory::getChartRootShape(
             {
                 if( AbstractShapeFactory::getShapeName( xShape ) == 
"com.sun.star.chart2.shapes" )
                 {
-                    xRet = uno::Reference< drawing::XShapes >( xShape, 
uno::UNO_QUERY );
+                    xRet.set( xShape, uno::UNO_QUERY );
                     break;
                 }
             }
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index 333f3c6..975f3cf 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1970,7 +1970,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const 
OUString& rObjectCID, bool
                             aShapeName = "PlotAreaIncludingAxes";
                         SdrObject* pShape = 
DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList );
                         if( pShape )
-                            xShape = uno::Reference< drawing::XShape >( 
pShape->getUnoShape(), uno::UNO_QUERY);
+                            xShape.set( pShape->getUnoShape(), uno::UNO_QUERY);
                     }
                 }
             }
diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 7117fdd..0457be3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -79,7 +79,7 @@ uno::Reference< drawing::XShapes > 
ShapeFactory::getOrCreateChartRootShape(
     setShapeName(xShape, "com.sun.star.chart2.shapes");
     xShape->setSize(awt::Size(0,0));
 
-    xRet = uno::Reference<drawing::XShapes>(xShape, uno::UNO_QUERY);
+    xRet.set(xShape, uno::UNO_QUERY);
     return xRet;
 }
 
diff --git a/chart2/workbench/addin/sampleaddin.cxx 
b/chart2/workbench/addin/sampleaddin.cxx
index 1c964f7..6bfb8b0 100644
--- a/chart2/workbench/addin/sampleaddin.cxx
+++ b/chart2/workbench/addin/sampleaddin.cxx
@@ -263,7 +263,7 @@ void SAL_CALL SampleAddIn::refresh() throw( 
uno::RuntimeException )
                 // create line first time
                 if( ! mxMyRedLine.is())
                 {
-                    mxMyRedLine = uno::Reference< drawing::XShape >(
+                    mxMyRedLine.set(
                         xFactory->createInstance( 
"com.sun.star.drawing.LineShape" ),
                         uno::UNO_QUERY );
                     xPage->add( mxMyRedLine );
@@ -287,7 +287,7 @@ void SAL_CALL SampleAddIn::refresh() throw( 
uno::RuntimeException )
                 // create text object first time
                 if( ! mxMyText.is())
                 {
-                    mxMyText = uno::Reference< drawing::XShape >(
+                    mxMyText.set(
                         xFactory->createInstance( 
"com.sun.star.drawing.TextShape" ),
                         uno::UNO_QUERY );
                     xPage->add( mxMyText );
commit addb63fa8ac9fa1a29a00e886e7ae177b604494c
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Oct 29 13:57:50 2015 +0200

    convert Sequence<XInterface> constructions to use initializer lists
    
    Change-Id: I66475190cc0f18465c56b94af7bc0d5a1ca81242

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index aed1f9b..51e1fe4 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -509,8 +509,7 @@ namespace accessibility
         if ( xParent.is() )
         {
             utl::AccessibleRelationSetHelper* pRelationSetHelper = new 
utl::AccessibleRelationSetHelper;
-            Sequence< Reference< XInterface > > aSequence(1);
-            aSequence[0] = xParent;
+            Sequence< Reference< XInterface > > aSequence { xParent };
             pRelationSetHelper->AddRelation(
                 AccessibleRelation( AccessibleRelationType::NODE_CHILD_OF, 
aSequence ) );
             xRelSet = pRelationSetHelper;
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index b78aa7e..a970ef1 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1442,16 +1442,14 @@ Document::retrieveParagraphRelationSet( Paragraph const 
* pParagraph )
 
     if ( aPara > m_aVisibleBegin && aPara < m_aVisibleEnd )
     {
-        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence(1);
-        aSequence[0] = getAccessibleChild( aPara - 1 );
+        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence { getAccessibleChild( aPara - 1 ) };
         css::accessibility::AccessibleRelation aRelation( 
css::accessibility::AccessibleRelationType::CONTENT_FLOWS_FROM, aSequence );
         pRelationSetHelper->AddRelation( aRelation );
     }
 
     if ( aPara >= m_aVisibleBegin && aPara < m_aVisibleEnd -1 )
     {
-        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence(1);
-        aSequence[0] = getAccessibleChild( aPara + 1 );
+        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence { getAccessibleChild( aPara + 1 ) };
         css::accessibility::AccessibleRelation aRelation( 
css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence );
         pRelationSetHelper->AddRelation( aRelation );
     }
@@ -1526,8 +1524,7 @@ void    Document::FillAccessibleRelationSet( 
utl::AccessibleRelationSetHelper& r
 {
     if( getAccessibleParent()->getAccessibleContext()->getAccessibleRole() == 
css::accessibility::AccessibleRole::SCROLL_PANE )
     {
-        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence(1);
-        aSequence[0] = getAccessibleParent();
+        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence {  getAccessibleParent() };
         rRelationSet.AddRelation( css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
     }
     else
diff --git a/accessibility/source/standard/floatingwindowaccessible.cxx 
b/accessibility/source/standard/floatingwindowaccessible.cxx
index a6238c0..7a3f1f5 100755
--- a/accessibility/source/standard/floatingwindowaccessible.cxx
+++ b/accessibility/source/standard/floatingwindowaccessible.cxx
@@ -43,8 +43,7 @@ void 
FloatingWindowAccessible::FillAccessibleRelationSet(utl::AccessibleRelation
         vcl::Window* pParentWindow = pWindow->GetParent();
         if( pParentWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pParentWindow->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pParentWindow->GetAccessible() };
             rRelationSet.AddRelation( AccessibleRelation( 
AccessibleRelationType::SUB_WINDOW_OF, aSequence ) );
         }
     }
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx 
b/accessibility/source/standard/vclxaccessiblelist.cxx
index 2695c84..dd4ac1a 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -461,8 +461,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const 
VclWindowEvent& rVclWindowEve
     {
         if (m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) 
!= WB_DROPDOWN)
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pBox->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pBox->GetAccessible() };
             rRelationSet.AddRelation( 
com::sun::star::accessibility::AccessibleRelation( 
com::sun::star::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
     }
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 6332468..f7a43de 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -823,9 +823,8 @@ namespace accessibility
             if ( nMyParaIndex > 0 &&
                  mpParaManager->IsReferencable( nMyParaIndex - 1 ) )
             {
-                uno::Sequence<uno::Reference<XInterface> > aSequence(1);
-                aSequence[0] =
-                    mpParaManager->GetChild( nMyParaIndex - 1 
).first.get().getRef();
+                uno::Sequence<uno::Reference<XInterface> > aSequence
+                    { mpParaManager->GetChild( nMyParaIndex - 1 
).first.get().getRef() };
                 AccessibleRelation aAccRel( 
AccessibleRelationType::CONTENT_FLOWS_FROM,
                                             aSequence );
                 pAccRelSetHelper->AddRelation( aAccRel );
@@ -835,9 +834,8 @@ namespace accessibility
             if ( (nMyParaIndex + 1) < (sal_Int32)mpParaManager->GetNum() &&
                  mpParaManager->IsReferencable( nMyParaIndex + 1 ) )
             {
-                uno::Sequence<uno::Reference<XInterface> > aSequence(1);
-                aSequence[0] =
-                    mpParaManager->GetChild( nMyParaIndex + 1 
).first.get().getRef();
+                uno::Sequence<uno::Reference<XInterface> > aSequence
+                    { mpParaManager->GetChild( nMyParaIndex + 1 
).first.get().getRef() };
                 AccessibleRelation aAccRel( 
AccessibleRelationType::CONTENT_FLOWS_TO,
                                             aSequence );
                 pAccRelSetHelper->AddRelation( aAccRel );
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx 
b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 5d9cdfd..ce2b9cc 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -530,15 +530,13 @@ uno::Reference< XAccessibleRelationSet > 
ScAccessibleEditObject::getAccessibleRe
         vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
         if ( pLabeledBy && pLabeledBy != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pLabeledBy->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
             rRelationSet->AddRelation( AccessibleRelation( 
AccessibleRelationType::LABELED_BY, aSequence ) );
         }
         vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
         if ( pMemberOf && pMemberOf != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pMemberOf->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
             rRelationSet->AddRelation( AccessibleRelation( 
AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
         return rSet;
diff --git a/svtools/source/control/valueacc.cxx 
b/svtools/source/control/valueacc.cxx
index f932092..ee388f8 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -320,16 +320,14 @@ uno::Reference< accessibility::XAccessibleRelationSet > 
SAL_CALL ValueSetAcc::ge
         vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
         if ( pLabeledBy && pLabeledBy != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pLabeledBy->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
             pRelationSet->AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
         }
 
         vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
         if ( pMemberOf && pMemberOf != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pMemberOf->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
             pRelationSet->AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
     }
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index 2cebeaf..d40771a 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -590,8 +590,7 @@ Reference< XAccessibleRelationSet > SAL_CALL 
AccessibleControlShape::getAccessib
     {
         Reference < XAccessible > xAcc (pCtlAccShape->getAccessibleContext(), 
UNO_QUERY);
 
-        ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > > aSequence(1);
-        aSequence[0] = xAcc;
+        css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > 
aSequence { xAcc };
         if( getAccessibleRole() == AccessibleRole::RADIO_BUTTON )
         {
             pRelationSetHelper->AddRelation( AccessibleRelation( 
AccessibleRelationType::MEMBER_OF, aSequence ) );
diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 8c5a9ff..8ec7594 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -401,8 +401,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL
     ::utl::AccessibleRelationSetHelper* pRelationSet = new 
utl::AccessibleRelationSetHelper;
 
     //this mxshape is the captioned shape
-    uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-    aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+    uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
mpParent->GetAccessibleCaption(mxShape) };
     if(aSequence[0].get())
     {
         pRelationSet->AddRelation(
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx 
b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index 74960ea..065d688 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -144,16 +144,14 @@ uno::Reference< XAccessibleRelationSet > 
SvxPixelCtlAccessible::getAccessibleRel
     vcl::Window *pLabeledBy = mrPixelCtl.GetAccessibleRelationLabeledBy();
     if ( pLabeledBy && pLabeledBy != &mrPixelCtl )
     {
-        uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-        aSequence[0] = pLabeledBy->GetAccessible();
+        uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
         rRelationSet->AddRelation( css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
     }
 
     vcl::Window* pMemberOf = mrPixelCtl.GetAccessibleRelationMemberOf();
     if ( pMemberOf && pMemberOf != &mrPixelCtl )
     {
-        uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-        aSequence[0] = pMemberOf->GetAccessible();
+        uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
         rRelationSet->AddRelation( css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
     }
     return rSet;
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx 
b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 35c79d8..3969526 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -354,15 +354,13 @@ Reference< XAccessibleRelationSet > SAL_CALL 
SvxRectCtlAccessibleContext::getAcc
         vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
         if ( pLabeledBy && pLabeledBy != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pLabeledBy->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
             pRelationSetHelper->AddRelation( 
css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
         }
         vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
         if ( pMemberOf && pMemberOf != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pMemberOf->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
             pRelationSetHelper->AddRelation( 
css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
     }
@@ -856,8 +854,7 @@ Reference<XAccessibleRelationSet> SAL_CALL 
SvxRectCtlChildAccessibleContext::get
     uno::Reference< css::accessibility::XAccessibleRelationSet > xSet = 
pRelationSetHelper;
     if( mxParent.is() )
       {
-        uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-        aSequence[0] = mxParent;
+        uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
mxParent };
         pRelationSetHelper->AddRelation( 
css::accessibility::AccessibleRelation( 
css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
 
     }
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 1471a30..0a1a5bf 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -974,8 +974,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL 
SwAccessibleParagraph::getAccess
         const SwContentFrm* pPrevCntFrm( pTextFrm->FindPrevCnt( true ) );
         if ( pPrevCntFrm )
         {
-            uno::Sequence< uno::Reference<XInterface> > aSequence(1);
-            aSequence[0] = GetMap()->GetContext( pPrevCntFrm );
+            uno::Sequence< uno::Reference<XInterface> > aSequence { 
GetMap()->GetContext( pPrevCntFrm ) };
             AccessibleRelation aAccRel( 
AccessibleRelationType::CONTENT_FLOWS_FROM,
                                         aSequence );
             pHelper->AddRelation( aAccRel );
@@ -984,8 +983,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL 
SwAccessibleParagraph::getAccess
         const SwContentFrm* pNextCntFrm( pTextFrm->FindNextCnt( true ) );
         if ( pNextCntFrm )
         {
-            uno::Sequence< uno::Reference<XInterface> > aSequence(1);
-            aSequence[0] = GetMap()->GetContext( pNextCntFrm );
+            uno::Sequence< uno::Reference<XInterface> > aSequence { 
GetMap()->GetContext( pNextCntFrm ) };
             AccessibleRelation aAccRel( 
AccessibleRelationType::CONTENT_FLOWS_TO,
                                         aSequence );
             pHelper->AddRelation( aAccRel );
diff --git a/sw/source/core/access/acctextframe.cxx 
b/sw/source/core/access/acctextframe.cxx
index cc88805..fb3e039 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -321,8 +321,7 @@ SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const
 
 AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const 
SwFlyFrm* pFrm )
 {
-    uno::Sequence<uno::Reference<XInterface> > aSequence(1);
-    aSequence[0] = GetMap()->GetContext( pFrm );
+    uno::Sequence<uno::Reference<XInterface> > aSequence { 
GetMap()->GetContext( pFrm ) };
     return AccessibleRelation( nType, aSequence );
 }
 
diff --git a/testtools/source/bridgetest/cppobj.cxx 
b/testtools/source/bridgetest/cppobj.cxx
index a48a131..eee2194 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -1036,8 +1036,8 @@ void Test_Impl::testConstructorsService(
     Constructors::create2(context, args);
 
     Sequence<Type> argSeq1(1); argSeq1[0] = cppu::UnoType<sal_Int32>::get();
-    Sequence<Reference<XInterface> > argSeq2(1); argSeq2[0] = 
static_cast<XComponent*>(new Dummy());
-    Sequence<Reference<XComponent> > argSeq2a(1); argSeq2a[0] = 
static_cast<XComponent*>(new Dummy());
+    Sequence<Reference<XInterface> > argSeq2 { static_cast<XComponent*>(new 
Dummy()) };
+    Sequence<Reference<XComponent> > argSeq2a { static_cast<XComponent*>(new 
Dummy()) };
 
     Sequence<TestPolyStruct2<sal_Unicode, Sequence<Any> > > argSeq3(1);
     argSeq3[0] = TestPolyStruct2<sal_Unicode, Sequence<Any> >('X', arg27);
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index b83169d..b82fff5 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -365,24 +365,21 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( 
utl::AccessibleRelation
         vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
         if ( pLabeledBy && pLabeledBy != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pLabeledBy->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
             rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
         }
 
         vcl::Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor();
         if ( pLabelFor && pLabelFor != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pLabelFor->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabelFor->GetAccessible() };
             rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
         }
 
         vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
         if ( pMemberOf && pMemberOf != pWindow )
         {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = pMemberOf->GetAccessible();
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
             rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
         }
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to