diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 09:49:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 09:59:30 +0200 |
commit | 3d96f1ef5556869bb60522c9cfa5c9c6f8db0a18 (patch) | |
tree | dd4a4f6f457333ff91660824b817db22c461bf10 /svtools | |
parent | 3fdbf5935e0aff6350e861e868c7e0a12dd1bc8f (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I2f8c9cb71a06f7796576509f605796624e654422
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/accessibilityoptions.cxx | 8 | ||||
-rw-r--r-- | svtools/source/config/printoptions.cxx | 8 | ||||
-rw-r--r-- | svtools/source/config/test/test.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/accessibleruler.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenuacc.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 4 | ||||
-rw-r--r-- | svtools/source/java/javacontext.cxx | 3 | ||||
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/acceleratorexecute.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/embedtransfer.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/contextmenuhelper.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/fpicker.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/framestatuslistener.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/statusbarcontroller.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 8 |
18 files changed, 36 insertions, 39 deletions
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index cc7e1e456937..b05c7a8640df 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -113,11 +113,11 @@ SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl() { try { - m_xCfg = css::uno::Reference< css::container::XNameAccess >( + m_xCfg.set( ::comphelper::ConfigurationHelper::openConfig( - comphelper::getProcessComponentContext(), - s_sAccessibility, - ::comphelper::ConfigurationHelper::E_STANDARD), + comphelper::getProcessComponentContext(), + s_sAccessibility, + ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY); bIsModified = false; diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index f31041077304..1137e21a89cc 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -120,11 +120,11 @@ SvtPrintOptions_Impl::SvtPrintOptions_Impl(const OUString& rConfigRoot) { try { - m_xCfg = css::uno::Reference< css::container::XNameAccess >( + m_xCfg.set( ::comphelper::ConfigurationHelper::openConfig( - comphelper::getProcessComponentContext(), - ROOTNODE_PRINTOPTION, - ::comphelper::ConfigurationHelper::E_STANDARD), + comphelper::getProcessComponentContext(), + ROOTNODE_PRINTOPTION, + ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY); if (m_xCfg.is()) diff --git a/svtools/source/config/test/test.cxx b/svtools/source/config/test/test.cxx index 0ca5c5a2d2ea..3b01d07d19cf 100644 --- a/svtools/source/config/test/test.cxx +++ b/svtools/source/config/test/test.cxx @@ -210,7 +210,7 @@ Reference< XMultiServiceFactory > TestApplication::getUNOServiceManager() { Reference< XComponentContext > rCtx = cppu::defaultBootstrap_InitialComponentContext(); - smgr = Reference< XMultiServiceFactory > ( rCtx->getServiceManager() , UNO_QUERY ); + smgr.set( rCtx->getServiceManager() , UNO_QUERY ); } return smgr; } diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index 849a6209c283..c6280d5070e8 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -349,7 +349,7 @@ void SAL_CALL SvtRulerAccessible::disposing() comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this ); mnClientId = 0; } - mxParent = uno::Reference< XAccessible >(); + mxParent.clear(); } } } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 69fbbef5de85..e1871b8c372e 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -138,11 +138,11 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr { if( mpControl ) { - mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible(), UNO_QUERY ); + mxAccContext.set( mpControl->GetAccessible(), UNO_QUERY ); } else { - mxAccContext = Reference< XAccessibleContext >( new ToolbarMenuEntryAcc( this ) ); + mxAccContext.set( new ToolbarMenuEntryAcc( this ) ); } } diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 5bfc82116f33..c27c689f665a 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -368,7 +368,7 @@ Reference< XAccessible > SAL_CALL ToolbarMenuAcc::getAccessibleAtPoint( const aw } else { - xRet = Reference< XAccessible >( pEntry->GetAccessible(true), UNO_QUERY ); + xRet.set( pEntry->GetAccessible(true), UNO_QUERY ); } } } diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 756ac3d55161..1a3bb0fe30ca 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -851,7 +851,7 @@ void AssignmentPersistentData::ImplCommit() Reference< XTablesSupplier > xSupplTables(xConn, UNO_QUERY); if (xSupplTables.is()) { - m_xCurrentDatasourceTables = Reference< XNameAccess >(xSupplTables->getTables(), UNO_QUERY); + m_xCurrentDatasourceTables.set(xSupplTables->getTables(), UNO_QUERY); if (m_xCurrentDatasourceTables.is()) aTableNames = m_xCurrentDatasourceTables->getElementNames(); } diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 5ccc99e3b65f..74a2f39ffd1f 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -466,11 +466,11 @@ bool ExportDialog::GetGraphicStream() uno::Reference< lang::XComponent > xSourceDoc; if ( mxPage.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxPage, uno::UNO_QUERY_THROW ); + xSourceDoc.set( mxPage, uno::UNO_QUERY_THROW ); else if ( mxShapes.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxShapes, uno::UNO_QUERY_THROW ); + xSourceDoc.set( mxShapes, uno::UNO_QUERY_THROW ); else if ( mxShape.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxShape, uno::UNO_QUERY_THROW ); + xSourceDoc.set( mxShape, uno::UNO_QUERY_THROW ); if ( xSourceDoc.is() ) { xGraphicExporter->setSourceDocument( xSourceDoc ); diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index d5b0a1d1173e..ca850ebc1714 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -358,7 +358,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc if( xGraphic.is() ) { - xRet = uno::Reference< beans::XPropertySet >( xGraphic, uno::UNO_QUERY ); + xRet.set( xGraphic, uno::UNO_QUERY ); } else { @@ -371,7 +371,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc { uno::Reference< ::graphic::XGraphic > xGraphic( implLoadBitmap( xBtm ) ); if( xGraphic.is() ) - xRet = uno::Reference< beans::XPropertySet >( xGraphic, uno::UNO_QUERY ); + xRet.set( xGraphic, uno::UNO_QUERY ); } return xRet; diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx index 759570d3f3bd..3830ee557555 100644 --- a/svtools/source/java/javacontext.cxx +++ b/svtools/source/java/javacontext.cxx @@ -70,8 +70,7 @@ Any SAL_CALL JavaContext::getValueByName( const OUString& Name) throw (RuntimeEx { osl::MutexGuard aGuard(osl::Mutex::getGlobalMutex()); if (!m_xHandler.is()) - m_xHandler = Reference< XInteractionHandler >( - new JavaInteractionHandler(m_bShowErrorsOnce)); + m_xHandler.set( new JavaInteractionHandler(m_bShowErrorsOnce)); } retVal = makeAny(m_xHandler); diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 82a113371abe..2f9bf8f87ecc 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -94,14 +94,14 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque for ( i = 0; i < aSeqCont.getLength(); i++ ) { - abort = Reference< XInteractionAbort>::query( aSeqCont[i]); + abort.set( aSeqCont[i], UNO_QUERY ); if ( abort.is() ) break; } for ( i= 0; i < aSeqCont.getLength(); i++) { - retry= Reference<XInteractionRetry>::query( aSeqCont[i]); + retry.set( aSeqCont[i], UNO_QUERY ); if ( retry.is() ) break; } diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 1fac755a5cf0..83fa88591c8e 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -112,7 +112,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon // specify our internal dispatch provider // frame or desktop?! => document or global config. bool bDesktopIsUsed = false; - m_xDispatcher = css::uno::Reference< css::frame::XDispatchProvider >(xEnv, css::uno::UNO_QUERY); + m_xDispatcher.set(xEnv, css::uno::UNO_QUERY); if (!m_xDispatcher.is()) { aLock.clear(); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index cc38346d136f..bd70919a1063 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -199,7 +199,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo void SvEmbedTransferHelper::ObjectReleased() { - m_xObj = uno::Reference< embed::XEmbeddedObject >(); + m_xObj.clear(); } void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc, diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 4f27a682fe7a..ce325fd018eb 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -404,8 +404,7 @@ ContextMenuHelper::associateUIConfigurationManagers() { uno::Reference< ui::XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), uno::UNO_QUERY ); - m_xDocImageMgr = uno::Reference< ui::XImageManager >( - xDocUICfgMgr->getImageManager(), uno::UNO_QUERY ); + m_xDocImageMgr.set( xDocUICfgMgr->getImageManager(), uno::UNO_QUERY ); } } @@ -424,8 +423,7 @@ ContextMenuHelper::associateUIConfigurationManagers() xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId )); if ( xUICfgMgr.is() ) { - m_xModuleImageMgr = uno::Reference< ui::XImageManager >( - xUICfgMgr->getImageManager(), uno::UNO_QUERY ); + m_xModuleImageMgr.set( xUICfgMgr->getImageManager(), uno::UNO_QUERY ); } uno::Reference< container::XNameAccess > xNameAccess( diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx index 6b5848ec628a..f1cff13f2242 100644 --- a/svtools/source/uno/fpicker.cxx +++ b/svtools/source/uno/fpicker.cxx @@ -66,7 +66,7 @@ Reference< css::uno::XInterface > FilePicker_CreateInstance ( Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager()); if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog()) { - xResult = Reference< css::uno::XInterface >( Application::createFilePicker( context ) ); + xResult.set( Application::createFilePicker( context ) ); if (!xResult.is()) { @@ -139,7 +139,7 @@ Reference< css::uno::XInterface > FolderPicker_CreateInstance ( Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager()); if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog()) { - xResult = Reference< css::uno::XInterface >( Application::createFolderPicker( context ) ); + xResult.set( Application::createFolderPicker( context ) ); if (!xResult.is()) { try diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index 98d5724d7567..aed11138467f 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -189,7 +189,7 @@ void FrameStatusListener::addStatusListener( const OUString& aCommandURL ) xURLTransformer->parseStrict( aTargetURL ); xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL ); if ( aIter != m_aListenerMap.end() ) { @@ -238,7 +238,7 @@ void FrameStatusListener::bindListener() Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( m_xContext.is() && xDispatchProvider.is() ) { - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); while ( pIter != m_aListenerMap.end() ) { diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index a5553d3510ae..eede3ba0da08 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -387,7 +387,7 @@ void StatusbarController::addStatusListener( const OUString& aCommandURL ) xURLTransformer->parseStrict( aTargetURL ); xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL ); if ( aIter != m_aListenerMap.end() ) { @@ -435,7 +435,7 @@ void StatusbarController::bindListener() Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( m_xContext.is() && xDispatchProvider.is() ) { - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); while ( pIter != m_aListenerMap.end() ) { diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 2ef47dee93ae..e4aaff3e83f1 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -114,7 +114,7 @@ Reference< XLayoutManager > ToolboxController::getLayoutManager() const Reference< XPropertySet > xPropSet; { SolarMutexGuard aSolarMutexGuard; - xPropSet = Reference< XPropertySet >( m_xFrame, UNO_QUERY ); + xPropSet.set( m_xFrame, UNO_QUERY ); } if ( xPropSet.is() ) @@ -422,7 +422,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL ) m_xUrlTransformer->parseStrict( aTargetURL ); xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL ); if ( aIter != m_aListenerMap.end() ) { @@ -497,7 +497,7 @@ void ToolboxController::bindListener() Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( m_xContext.is() && xDispatchProvider.is() ) { - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); while ( pIter != m_aListenerMap.end() ) { @@ -647,7 +647,7 @@ void ToolboxController::updateStatus( const OUString& aCommandURL ) // Try to find a dispatch object for the requested command URL Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); - xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ); + xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY ); if ( m_xContext.is() && xDispatchProvider.is() ) { aTargetURL.Complete = aCommandURL; |