sfx2/source/appl/appopen.cxx | 2 sfx2/source/appl/appuno.cxx | 34 +-- sfx2/source/appl/childwin.cxx | 6 sfx2/source/appl/helpinterceptor.cxx | 4 sfx2/source/appl/imagemgr.cxx | 4 sfx2/source/appl/imestatuswindow.cxx | 3 sfx2/source/appl/opengrf.cxx | 2 sfx2/source/appl/shutdownicon.cxx | 2 sfx2/source/appl/workwin.cxx | 14 - sfx2/source/bastyp/fltfnc.cxx | 10 - sfx2/source/config/evntconf.cxx | 7 sfx2/source/control/bindings.cxx | 5 sfx2/source/control/querystatus.cxx | 5 sfx2/source/control/recentdocsviewitem.cxx | 2 sfx2/source/control/statcach.cxx | 4 sfx2/source/control/unoctitm.cxx | 4 sfx2/source/dialog/backingcomp.cxx | 4 sfx2/source/dialog/backingwindow.cxx | 2 sfx2/source/dialog/dockwin.cxx | 2 sfx2/source/dialog/filedlghelper.cxx | 4 sfx2/source/dialog/mailmodel.cxx | 5 sfx2/source/dialog/recfloat.cxx | 5 sfx2/source/doc/docfile.cxx | 6 sfx2/source/doc/doctempl.cxx | 5 sfx2/source/doc/doctemplates.cxx | 2 sfx2/source/doc/guisaveas.cxx | 23 +- sfx2/source/doc/objmisc.cxx | 6 sfx2/source/doc/objserv.cxx | 2 sfx2/source/doc/objstor.cxx | 33 ++- sfx2/source/doc/objxtor.cxx | 4 sfx2/source/doc/sfxbasemodel.cxx | 18 - sfx2/source/doc/templatedlg.cxx | 5 sfx2/source/notify/eventsupplier.cxx | 5 sfx2/source/sidebar/SidebarController.cxx | 2 sfx2/source/toolbox/tbxitem.cxx | 3 sfx2/source/view/ipclient.cxx | 2 sfx2/source/view/sfxbasecontroller.cxx | 6 sfx2/source/view/viewfrm.cxx | 4 sfx2/source/view/viewprn.cxx | 2 sfx2/source/view/viewsh.cxx | 14 - shell/source/win32/simplemail/smplmailsuppl.cxx | 2 slideshow/source/engine/slideshowimpl.cxx | 2 slideshow/test/demoshow.cxx | 3 sot/source/unoolestorage/xolesimplestorage.cxx | 4 starmath/source/mathmlexport.cxx | 16 - starmath/source/mathmlimport.cxx | 13 - stoc/source/implementationregistration/implreg.cxx | 2 stoc/source/inspect/introspection.cxx | 38 ++-- stoc/source/invocation/invocation.cxx | 69 +++---- stoc/source/javaloader/javaloader.cxx | 3 stoc/source/javavm/javavm.cxx | 12 - stoc/source/uriproc/UriReferenceFactory.cxx | 3 stoc/test/javavm/jvm_interaction/interactionhandler.cxx | 4 stoc/test/registry_tdprovider/testregistrytdprovider.cxx | 93 ++++------ stoc/test/testcorefl.cxx | 5 stoc/test/testintrosp.cxx | 3 stoc/test/testsmgr_cpnt.cxx | 2 svl/source/fsstor/fsstorage.cxx | 11 - svl/source/fsstor/ostreamcontainer.cxx | 18 - svl/source/misc/sharecontrolfile.cxx | 10 - svl/source/misc/strmadpt.cxx | 3 svl/source/passwordcontainer/passwordcontainer.cxx | 2 svtools/source/config/accessibilityoptions.cxx | 8 svtools/source/config/printoptions.cxx | 8 svtools/source/config/test/test.cxx | 2 svtools/source/control/accessibleruler.cxx | 2 svtools/source/control/toolbarmenu.cxx | 4 svtools/source/control/toolbarmenuacc.cxx | 2 svtools/source/dialogs/addresstemplate.cxx | 2 svtools/source/filter/exportdialog.cxx | 6 svtools/source/graphic/provider.cxx | 4 svtools/source/java/javacontext.cxx | 3 svtools/source/java/javainteractionhandler.cxx | 4 svtools/source/misc/acceleratorexecute.cxx | 2 svtools/source/misc/embedtransfer.cxx | 2 svtools/source/uno/contextmenuhelper.cxx | 6 svtools/source/uno/fpicker.cxx | 4 svtools/source/uno/framestatuslistener.cxx | 4 svtools/source/uno/statusbarcontroller.cxx | 4 svtools/source/uno/toolboxcontroller.cxx | 8 svx/source/accessibility/AccessibleShape.cxx | 6 svx/source/accessibility/AccessibleTextHelper.cxx | 2 svx/source/accessibility/ChildrenManagerImpl.cxx | 11 - svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 6 svx/source/core/graphichelper.cxx | 2 svx/source/dialog/docrecovery.cxx | 4 svx/source/dialog/rubydialog.cxx | 4 svx/source/fmcomp/gridcell.cxx | 6 svx/source/fmcomp/gridctrl.cxx | 5 svx/source/form/datanavi.cxx | 13 - svx/source/form/filtnav.cxx | 4 svx/source/form/fmexpl.cxx | 2 svx/source/form/fmobj.cxx | 10 - svx/source/form/fmpgeimp.cxx | 2 svx/source/form/fmshimp.cxx | 18 - svx/source/form/fmsrcimp.cxx | 13 - svx/source/form/fmtools.cxx | 8 svx/source/form/formcontroller.cxx | 12 - svx/source/form/formdispatchinterceptor.cxx | 2 svx/source/form/navigatortree.cxx | 6 svx/source/form/navigatortreemodel.cxx | 4 svx/source/form/sdbdatacolumn.cxx | 4 svx/source/gallery2/galmisc.cxx | 2 svx/source/gengal/gengal.cxx | 3 svx/source/smarttags/SmartTagMgr.cxx | 8 svx/source/svdraw/sdrpagewindow.cxx | 2 svx/source/svdraw/svdoashp.cxx | 2 svx/source/svdraw/svdoole2.cxx | 6 svx/source/svdraw/svdouno.cxx | 5 svx/source/table/accessiblecell.cxx | 2 svx/source/tbxctrls/tbcontrl.cxx | 2 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 18 - svx/source/unodraw/UnoGraphicExporter.cxx | 12 - svx/source/unodraw/unomod.cxx | 2 svx/source/unodraw/unopage.cxx | 2 115 files changed, 400 insertions(+), 475 deletions(-)
New commits: commit 3d96f1ef5556869bb60522c9cfa5c9c6f8db0a18 Author: Noel Grandin <[email protected]> Date: Thu Nov 5 09:49:43 2015 +0200 use uno::Reference::set method instead of assignment Change-Id: I2f8c9cb71a06f7796576509f605796624e654422 diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index cc7e1e4..b05c7a8 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 f310410..1137e21 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 0ca5c5a..3b01d07 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 849a620..c6280d5 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 69fbbef..e1871b8 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 5bfc821..c27c689 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 756ac3d..1a3bb0f 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 5ccc99e..74a2f39 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 d5b0a1d..ca850eb 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 759570d..3830ee5 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 82a1133..2f9bf8f 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 1fac755..83fa885 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 cc38346..bd70919 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 4f27a68..ce325fd 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 6b5848e..f1cff13 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 98d5724..aed1113 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 a5553d3..eede3ba 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 2ef47de..e4aaff3 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; diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 9fd40a5..586521a 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -454,8 +454,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL } } } - xStateSet = Reference<XAccessibleStateSet>( - new ::utl::AccessibleStateSetHelper (*pStateSet)); + xStateSet.set( new ::utl::AccessibleStateSetHelper (*pStateSet)); } else { @@ -500,8 +499,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL } // Create a copy of the state set that may be modified by the // caller without affecting the current state set. - xStateSet = Reference<XAccessibleStateSet>( - new ::utl::AccessibleStateSetHelper (*pStateSet)); + xStateSet.set( new ::utl::AccessibleStateSetHelper (*pStateSet)); } } UpdateDocumentAllSelState(xStateSet); diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index a9c609e..7464cf8 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -1136,7 +1136,7 @@ namespace accessibility ::uno::Reference< XAccessible > xPara; ::accessibility::AccessibleParaManager::WeakPara::HardRefType aHardRef( begin->first.get() ); if( aHardRef.is() ) - xPara = ::uno::Reference< XAccessible >( aHardRef.getRef(), ::uno::UNO_QUERY ); + xPara.set( aHardRef.getRef(), ::uno::UNO_QUERY ); // release everything from the remove position until the end maParaManager.Release(aFunctor.GetParaIndex(), nCurrParas); diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 3117101..0a01bed 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -171,7 +171,7 @@ uno::Reference<XAccessible> ShapeTypeHandler::Instance().CreateAccessibleObject ( aShapeInfo, maShapeTreeInfo)); - rChildDescriptor.mxAccessibleShape = uno::Reference<XAccessible> ( + rChildDescriptor.mxAccessibleShape.set( static_cast<uno::XWeak*>(pShape.get()), uno::UNO_QUERY); if ( pShape.is() ) @@ -613,8 +613,7 @@ void ChildrenManagerImpl::SetInfo (const AccessibleShapeTreeInfo& rShapeTreeInfo SolarMutexGuard g; xCurrentBroadcaster = maShapeTreeInfo.GetModelBroadcaster(); xCurrentController = maShapeTreeInfo.GetController(); - xCurrentSelectionSupplier = Reference<view::XSelectionSupplier> ( - xCurrentController, uno::UNO_QUERY); + xCurrentSelectionSupplier.set( xCurrentController, uno::UNO_QUERY); maShapeTreeInfo = rShapeTreeInfo; } @@ -893,10 +892,8 @@ void ChildrenManagerImpl::UpdateSelection() Reference<drawing::XShape> xSelectedShape; if (xSelectionSupplier.is()) { - xSelectedShapeAccess = Reference<container::XIndexAccess> ( - xSelectionSupplier->getSelection(), uno::UNO_QUERY); - xSelectedShape = Reference<drawing::XShape> ( - xSelectionSupplier->getSelection(), uno::UNO_QUERY); + xSelectedShapeAccess.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); + xSelectedShape.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); } // Remember the current and new focused shape. diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 95ae358..b5489af 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -424,7 +424,7 @@ void SAL_CALL SvxPixelCtlAccessible::disposing() mnClientId = 0; } } - //mxParent = uno::Reference< XAccessible >(); + //mxParent.clear(); } } @@ -497,7 +497,7 @@ uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Poin void SvxPixelCtlAccessible::LoseFocus() { - m_xCurChild = uno::Reference< XAccessible >() ; + m_xCurChild.clear(); } void SvxPixelCtlAccessibleChild::CheckChild() @@ -808,7 +808,7 @@ void SAL_CALL SvxPixelCtlAccessibleChild::disposing() mnClientId = 0; } - mxParent = uno::Reference< XAccessible >(); + mxParent.clear(); delete mpBoundingBox; } diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index 70df0c9d..954766e 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -268,7 +268,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha aDescriptor[1].Name = "URL"; aDescriptor[1].Value <<= sPath; - Reference< XComponent > xSourceDocument = Reference< XComponent >( xShape, UNO_QUERY_THROW ); + Reference< XComponent > xSourceDocument( xShape, UNO_QUERY_THROW ); if ( xSourceDocument.is() ) { xGraphicExporter->setSourceDocument( xSourceDocument ); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 00c0af8..736c957 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -703,7 +703,7 @@ SaveProgressDialog::SaveProgressDialog(vcl::Window* pParent, RecoveryCore* pCore m_pProgrParent->set_height_request(aSize.Height()); PluginProgress* pProgress = new PluginProgress(m_pProgrParent, pCore->getComponentContext()); - m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); + m_xProgress.set(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); } SaveProgressDialog::~SaveProgressDialog() @@ -889,7 +889,7 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) m_pFileListLB->InsertHeaderEntry(get<FixedText>("nameft")->GetText() + "\t" + get<FixedText>("statusft")->GetText()); PluginProgress* pProgress = new PluginProgress(m_pProgrParent, pCore->getComponentContext()); - m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); + m_xProgress.set(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); m_pTitleFT->SetBackground(rStyleSettings.GetWindowColor()); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 70ecd3a60b..49faa45 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -110,7 +110,7 @@ public: } Reference<XRubySelection> GetRubySelection() { - xSelection = Reference<XRubySelection>(xController, UNO_QUERY); + xSelection.set(xController, UNO_QUERY); return xSelection; } void UpdateRubyValues() @@ -155,7 +155,7 @@ void SvxRubyData_Impl::SetController(Reference<XController> xCtrl) bHasSelectionChanged = true; xController = xCtrl; - xSelSupp = Reference<XSelectionSupplier>(xController, UNO_QUERY); + xSelSupp.set(xController, UNO_QUERY); if (xSelSupp.is()) xSelSupp->addSelectionChangeListener(this); } diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 21b5fba..1c05b02 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -207,7 +207,7 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< css::bea } Reference< XRowSet > xCur; if (m_rParent.getDataSource()) - xCur = Reference< XRowSet > (Reference< XInterface >(*m_rParent.getDataSource()), UNO_QUERY); + xCur.set(Reference< XInterface >(*m_rParent.getDataSource()), UNO_QUERY); // TODO : the cursor wrapper should use an XRowSet interface, too pCellControl->Init( m_rParent.GetDataWindow(), xCur ); @@ -1919,7 +1919,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe Reference< css::util::XNumberFormatsSupplier > xSupplier; Reference< XRowSet > xForm; if ( m_rColumn.GetParent().getDataSource() ) - xForm = Reference< XRowSet >( Reference< XInterface >(*m_rColumn.GetParent().getDataSource()), UNO_QUERY ); + xForm.set( Reference< XInterface >(*m_rColumn.GetParent().getDataSource()), UNO_QUERY ); if ( xForm.is() ) xSupplier = getNumberFormats( getConnection( xForm ), true ); SvNumberFormatter* pFormatterUsed = NULL; @@ -3002,7 +3002,7 @@ void DbFilterField::Update() // the columnmodel Reference< css::container::XChild > xModelAsChild(m_rColumn.getModel(), UNO_QUERY); // the grid model - xModelAsChild = Reference< css::container::XChild > (xModelAsChild->getParent(),UNO_QUERY); + xModelAsChild.set(xModelAsChild->getParent(),UNO_QUERY); Reference< XRowSet > xForm(xModelAsChild->getParent(), UNO_QUERY); if (!xForm.is()) return; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index bff7671..107baac 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1415,9 +1415,8 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt Reference< css::util::XNumberFormatsSupplier > xSupplier = getNumberFormats(getConnection(_xCursor), true); if (xSupplier.is()) { - m_xFormatter = Reference< css::util::XNumberFormatter >( - css::util::NumberFormatter::create(m_xContext), - UNO_QUERY); + m_xFormatter.set( css::util::NumberFormatter::create(m_xContext), + UNO_QUERY); m_xFormatter->attachNumberFormatsSupplier(xSupplier); // retrieve the datebase of the Numberformatter diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 2ed4ce5..0262ecb 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1062,7 +1062,7 @@ namespace svxform { DBG_ASSERT( _xModel.is(), "XFormsPage::SetModel(): invalid model" ); - m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY ); + m_xUIHelper.set( _xModel, UNO_QUERY ); OUString sRet; m_bHasModel = true; const ImageList& rImageList = m_pNaviWin->GetItemImageList(); @@ -1406,9 +1406,8 @@ namespace svxform // get our frame DBG_ASSERT( pBindings != NULL, "DataNavigatorWindow::LoadModels(): no SfxBindings; can't get frame" ); - m_xFrame = Reference<XFrame>( - pBindings->GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface(), - UNO_QUERY ); + m_xFrame.set( pBindings->GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface(), + UNO_QUERY ); DBG_ASSERT( m_xFrame.is(), "DataNavigatorWindow::LoadModels(): no frame" ); // add frameaction listener Reference< XFrameActionListener > xListener( @@ -1483,7 +1482,7 @@ namespace svxform { Any aAny = m_xDataContainer->getByName( sSelectedModel ); if ( aAny >>= xModel ) - xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( xModel, UNO_QUERY ); + xUIHelper.set( xModel, UNO_QUERY ); } catch ( Exception& ) { @@ -2799,7 +2798,7 @@ namespace svxform Reference< css::xforms::XModel > xModel; if ( ( m_xBinding->getPropertyValue( PN_BINDING_MODEL ) >>= xModel ) && xModel.is() ) - m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( xModel, UNO_QUERY ); + m_xUIHelper.set( xModel, UNO_QUERY ); } catch (const Exception&) { @@ -3196,7 +3195,7 @@ namespace svxform try { m_xNewSubmission = xModel->createSubmission(); - m_xSubmission = Reference< XPropertySet >( m_xNewSubmission, UNO_QUERY ); + m_xSubmission.set( m_xNewSubmission, UNO_QUERY ); } catch ( Exception& ) { diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index f33c0d1..6adbb55 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1878,8 +1878,8 @@ void FmFilterNavigatorWin::UpdateContent(FmFormShell* pFormShell) xParent.is(); xParent = xChild.is() ? xChild->getParent() : Reference< XInterface > ()) { - xContainer = Reference< XIndexAccess > (xParent, UNO_QUERY); - xChild = Reference< XChild > (xParent, UNO_QUERY); + xContainer.set(xParent, UNO_QUERY); + xChild.set(xParent, UNO_QUERY); } } m_pNavigator->UpdateContent(xContainer, xController); diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 6f1d367..6bdc2d7 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -194,7 +194,7 @@ FmEntryData::~FmEntryData() void FmEntryData::newObject( const css::uno::Reference< css::uno::XInterface >& _rxIFace ) { // do not just copy, normalize it - m_xNormalizedIFace = Reference< XInterface >( _rxIFace, UNO_QUERY ); + m_xNormalizedIFace.set( _rxIFace, UNO_QUERY ); m_xProperties.set(m_xNormalizedIFace, css::uno::UNO_QUERY); m_xChild.set(m_xNormalizedIFace, css::uno::UNO_QUERY); } diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 2cc0e15..6b4a14b 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -237,7 +237,7 @@ void FmFormObj::SetPage(SdrPage* _pNewPage) { if ( xSearch == xOldForms ) break; - xSearch = Reference< XChild >( xSearch->getParent(), UNO_QUERY ); + xSearch.set( xSearch->getParent(), UNO_QUERY ); } if ( xSearch.is() ) // implies xSearch == xOldForms, which means we're a valid part of our current page forms hierarchy { @@ -410,7 +410,7 @@ namespace Reference< css::form::XFormComponent> xChild(_xElement, UNO_QUERY); Reference< css::container::XIndexAccess> xParent; if (xChild.is()) - xParent = Reference< css::container::XIndexAccess>(xChild->getParent(), UNO_QUERY); + xParent.set(xChild->getParent(), UNO_QUERY); // while the current content is a form OUString sReturn; @@ -433,7 +433,7 @@ namespace // travel up xChild.set(xParent, css::uno::UNO_QUERY); if (xChild.is()) - xParent = Reference< css::container::XIndexAccess>(xChild->getParent(), UNO_QUERY); + xParent.set(xChild->getParent(), UNO_QUERY); } _rTopLevelElement = xParent; @@ -576,8 +576,8 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > // of left siblings with the same DSS, which counts for all their ancestors, too) // go down - xDestContainer = Reference< XIndexContainer > (xCurrentDestForm, UNO_QUERY); - xSourceContainer = Reference< XIndexContainer > (xSourceForm, UNO_QUERY); + xDestContainer.set(xCurrentDestForm, UNO_QUERY); + xSourceContainer.set(xSourceForm, UNO_QUERY); DBG_ASSERT(xDestContainer.is() && xSourceContainer.is(), "FmFormObj::ensureModelEnv : invalid container !"); } while ( nTokIndex >= 0 ); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 7ab848e..b125490 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -491,7 +491,7 @@ Reference< css::form::XForm > FmFormPageImpl::findPlaceInFormComponentHierarchy pModel->BegUndo(aUndoStr); } - xForm = Reference< css::form::XForm >(::comphelper::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), UNO_QUERY); + xForm.set(::comphelper::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), UNO_QUERY); // a form should always have the command type table as default Reference< css::beans::XPropertySet > xFormProps(xForm, UNO_QUERY); try { xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny(sal_Int32(CommandType::TABLE))); } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 09e5ac2..8bf812d 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1539,7 +1539,7 @@ void FmXFormShell::ExecuteSearch() Reference< XGridPeer> xGridPeer(xActiveControl->getPeer(), UNO_QUERY); Reference< XIndexAccess> xColumns; if (xGridPeer.is()) - xColumns = Reference< XIndexAccess>(xGridPeer->getColumns(),UNO_QUERY); + xColumns.set(xGridPeer->getColumns(),UNO_QUERY); sal_Int16 nViewCol = xGrid->getCurrentColumnPosition(); sal_Int16 nModelCol = GridView2ModelPos(xColumns, nViewCol); @@ -1664,7 +1664,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) if (!xCurrentForms.is()) { // im alive-Modus sind meine Forms nicht gesetzt, wohl aber die an der Page if (m_pShell->GetCurPage()) - xCurrentForms = Reference< XIndexAccess>( m_pShell->GetCurPage()->GetForms( false ), UNO_QUERY ); + xCurrentForms.set( m_pShell->GetCurPage()->GetForms( false ), UNO_QUERY ); } if (!xCurrentForms.is()) return; @@ -1852,7 +1852,7 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle // switch all nav dispatchers belonging to the form of the current nav controller to 'non active' Reference< XResultSet> xNavigationForm; if (m_xNavigationController.is()) - xNavigationForm = Reference< XResultSet>(m_xNavigationController->getModel(), UNO_QUERY); + xNavigationForm.set(m_xNavigationController->getModel(), UNO_QUERY); aGuard.clear(); m_bInActivate = true; @@ -1860,7 +1860,7 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle // check if the 2 controllers serve different forms Reference< XResultSet> xOldForm; if (m_xActiveController.is()) - xOldForm = Reference< XResultSet>(m_xActiveController->getModel(), UNO_QUERY); + xOldForm.set(m_xActiveController->getModel(), UNO_QUERY); Reference< XResultSet> xNewForm; if (xController.is()) xNewForm = Reference< XResultSet>(xController->getModel(), UNO_QUERY); @@ -1925,7 +1925,7 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle // activate all dispatchers belonging to form of the new navigation controller xNavigationForm = NULL; if (m_xNavigationController.is()) - xNavigationForm = Reference< XResultSet>(m_xNavigationController->getModel(), UNO_QUERY); + xNavigationForm.set(m_xNavigationController->getModel(), UNO_QUERY); m_bInActivate = false; @@ -2110,11 +2110,11 @@ void FmXFormShell::startListening() Reference< runtime::XFormController > xParent; while (xChild.is()) { - xChild = Reference< XChild>(xChild->getParent(), UNO_QUERY); - xParent = Reference< runtime::XFormController >(xChild, UNO_QUERY); + xChild.set(xChild->getParent(), UNO_QUERY); + xParent.set(xChild, UNO_QUERY); Reference< XPropertySet> xParentSet; if (xParent.is()) - xParentSet = Reference< XPropertySet>(xParent->getModel(), UNO_QUERY); + xParentSet.set(xParent->getModel(), UNO_QUERY); if (xParentSet.is()) { xParentSet->getPropertyValue(FM_PROP_NAVIGATION) >>= m_eNavigate; @@ -2143,7 +2143,7 @@ void FmXFormShell::startListening() Reference< XPropertySet> xNavigationSet; if (m_xNavigationController.is()) { - xNavigationSet = Reference< XPropertySet>(m_xNavigationController->getModel(), UNO_QUERY); + xNavigationSet.set(m_xNavigationController->getModel(), UNO_QUERY); if (xNavigationSet.is()) xNavigationSet->addPropertyChangeListener(FM_PROP_ROWCOUNT,this); } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index aae9551..d96ef93 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -91,7 +91,7 @@ void FmSearchThread::onTerminated() FmRecordCountListener::FmRecordCountListener(const Reference< css::sdbc::XResultSet > & dbcCursor) { - m_xListening = Reference< css::beans::XPropertySet > (dbcCursor, UNO_QUERY); + m_xListening.set(dbcCursor, UNO_QUERY); if (!m_xListening.is()) return; @@ -310,7 +310,7 @@ void FmSearchEngine::BuildAndInsertFieldInfo(const Reference< css::container::XI // die FieldInfo dazu aufbauen FieldInfo fiCurrent; - fiCurrent.xContents = Reference< css::sdb::XColumn > (xCurrentField, UNO_QUERY); + fiCurrent.xContents.set(xCurrentField, UNO_QUERY); fiCurrent.nFormatKey = ::comphelper::getINT32(xProperties->getPropertyValue(FM_PROP_FORMATKEY)); fiCurrent.bDoubleHandling = false; if (m_xFormatSupplier.is()) @@ -693,9 +693,8 @@ FmSearchEngine::FmSearchEngine(const Reference< XComponentContext >& _rxContext, ,m_nTransliterationFlags(0) { - m_xFormatter = Reference< css::util::XNumberFormatter >( - css::util::NumberFormatter::create( ::comphelper::getProcessComponentContext() ), - UNO_QUERY_THROW); + m_xFormatter.set( css::util::NumberFormatter::create( ::comphelper::getProcessComponentContext() ), + UNO_QUERY_THROW); m_xFormatter->attachNumberFormatsSupplier(m_xFormatSupplier); Init(sVisibleFields); @@ -1257,7 +1256,7 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, bool bForce) { Reference< css::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY); DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !"); - xFields = Reference< css::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY); + xFields.set(xSupplyCols->getColumns(), UNO_QUERY); BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[i]); } } @@ -1266,7 +1265,7 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, bool bForce) Reference< css::container::XIndexAccess > xFields; Reference< css::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY); DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !"); - xFields = Reference< css::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY); + xFields.set (xSupplyCols->getColumns(), UNO_QUERY); BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[static_cast< size_t >(nFieldIndex)]); } diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 646e39e..233cc82 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -262,9 +262,9 @@ void CursorWrapper::ImplConstruct(const Reference< css::sdbc::XResultSet>& _rxCu const CursorWrapper& CursorWrapper::operator=(const Reference< css::sdbc::XRowSet>& _rxCursor) { - m_xMoveOperations = Reference< css::sdbc::XResultSet>(_rxCursor, UNO_QUERY); - m_xBookmarkOperations = Reference< css::sdbcx::XRowLocate>(_rxCursor, UNO_QUERY); - m_xColumnsSupplier = Reference< css::sdbcx::XColumnsSupplier>(_rxCursor, UNO_QUERY); + m_xMoveOperations.set(_rxCursor, UNO_QUERY); + m_xBookmarkOperations.set(_rxCursor, UNO_QUERY); + m_xColumnsSupplier.set(_rxCursor, UNO_QUERY); if (!m_xMoveOperations.is() || !m_xBookmarkOperations.is() || !m_xColumnsSupplier.is()) { // all or nothing !! m_xMoveOperations = NULL; @@ -428,7 +428,7 @@ bool isRowSetAlive(const Reference< XInterface >& _rxRowSet) Reference< css::sdbcx::XColumnsSupplier> xSupplyCols(_rxRowSet, UNO_QUERY); Reference< css::container::XIndexAccess> xCols; if (xSupplyCols.is()) - xCols = Reference< css::container::XIndexAccess>(xSupplyCols->getColumns(), UNO_QUERY); + xCols.set(xSupplyCols->getColumns(), UNO_QUERY); if (xCols.is() && (xCols->getCount() > 0)) bIsAlive = true; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 7956ba1..925da1d 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -570,7 +570,7 @@ FormController::FormController(const Reference< css::uno::XComponentContext > & osl_atomic_increment(&m_refCount); { m_xTabController = TabController::create( m_xComponentContext ); - m_xAggregate = Reference< XAggregation >( m_xTabController, UNO_QUERY_THROW ); + m_xAggregate.set( m_xTabController, UNO_QUERY_THROW ); m_xAggregate->setDelegator( *this ); } osl_atomic_decrement(&m_refCount); @@ -1664,7 +1664,7 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException, s // zunaechst das Control fragen ob es das IFace unterstuetzt Reference< XBoundComponent > xBound(m_xCurrentControl, UNO_QUERY); if (!xBound.is() && m_xCurrentControl.is()) - xBound = Reference< XBoundComponent > (m_xCurrentControl->getModel(), UNO_QUERY); + xBound.set(m_xCurrentControl->getModel(), UNO_QUERY); // lock if we lose the focus during commit m_bCommitLock = true; @@ -1867,8 +1867,8 @@ void FormController::setModel(const Reference< XTabControllerModel > & Model) th // set the new model wait for the load event if (m_xTabController.is()) m_xTabController->setModel(Model); - m_xModelAsIndex = Reference< XIndexAccess > (Model, UNO_QUERY); - m_xModelAsManager = Reference< XEventAttacherManager > (Model, UNO_QUERY); + m_xModelAsIndex.set(Model, UNO_QUERY); + m_xModelAsManager.set(Model, UNO_QUERY); // only if both ifaces exit, the controller will work successful if (!m_xModelAsIndex.is() || !m_xModelAsManager.is()) @@ -2015,7 +2015,7 @@ void FormController::setContainer(const Reference< XControlContainer > & xContai ::osl::MutexGuard aGuard( m_aMutex ); Reference< XContainer > xCurrentContainer; if (m_xTabController.is()) - xCurrentContainer = Reference< XContainer > (m_xTabController->getContainer(), UNO_QUERY); + xCurrentContainer.set(m_xTabController->getContainer(), UNO_QUERY); if (xCurrentContainer.is()) { xCurrentContainer->removeContainerListener(this); @@ -2828,7 +2828,7 @@ void SAL_CALL FormController::elementInserted(const ContainerEvent& evt) throw( // are we in filtermode and a XModeSelector has inserted an element else if (m_bFiltering && Reference< XModeSelector > (evt.Source, UNO_QUERY).is()) { - xModel = Reference< XFormComponent > (evt.Source, UNO_QUERY); + xModel.set(evt.Source, UNO_QUERY); if (xModel.is() && m_xModelAsIndex == xModel->getParent()) { Reference< XPropertySet > xSet(xControl->getModel(), UNO_QUERY); diff --git a/svx/source/form/formdispatchinterceptor.cxx b/svx/source/form/formdispatchinterceptor.cxx index 16e774f..e2abd5b 100644 --- a/svx/source/form/formdispatchinterceptor.cxx +++ b/svx/source/form/formdispatchinterceptor.cxx @@ -157,7 +157,7 @@ namespace svxform if (xIntercepted.is()) xIntercepted->releaseDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this)); - // m_xIntercepted = Reference< XDispatchProviderInterception >(); + // m_xIntercepted.clear(); // Don't reset m_xIntercepted: It may be needed by our owner to check for which object we were // responsible. As we hold the object with a weak reference only, this should be no problem. // 88936 - 23.07.2001 - [email protected] diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index e19fa8e..b092887 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1108,9 +1108,9 @@ namespace svxform // position in DropParents, where to insert dropped entries if (pTargetData) - xContainer = Reference< XIndexContainer > (pTargetData->GetElement(), UNO_QUERY); + xContainer.set(pTargetData->GetElement(), UNO_QUERY); else - xContainer = Reference< XIndexContainer > (GetNavModel()->GetForms(), UNO_QUERY); + xContainer.set(GetNavModel()->GetForms(), UNO_QUERY); // always insert at the end nIndex = xContainer->getCount(); @@ -1135,7 +1135,7 @@ namespace svxform if (aEvts.getLength()) { - xManager = Reference< XEventAttacherManager > (xContainer, UNO_QUERY); + xManager.set(xContainer, UNO_QUERY); if (xManager.is()) xManager->registerScriptEvents(nIndex, aEvts); } diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 139cfb2..279932f 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -273,9 +273,9 @@ namespace svxform Reference< XIndexContainer > xContainer; if (pFolder) - xContainer = Reference< XIndexContainer > (pFolder->GetFormIface(), UNO_QUERY); + xContainer.set(pFolder->GetFormIface(), UNO_QUERY); else - xContainer = Reference< XIndexContainer > (GetForms(), UNO_QUERY); + xContainer.set(GetForms(), UNO_QUERY); bool bUndo = m_pFormModel->IsUndoEnabled(); diff --git a/svx/source/form/sdbdatacolumn.cxx b/svx/source/form/sdbdatacolumn.cxx index 0b028a4..d527287 100644 --- a/svx/source/form/sdbdatacolumn.cxx +++ b/svx/source/form/sdbdatacolumn.cxx @@ -38,8 +38,8 @@ namespace svxform DataColumn::DataColumn(const Reference< css::beans::XPropertySet>& _rxIFace) { m_xPropertySet = _rxIFace; - m_xColumn = Reference< css::sdb::XColumn>(_rxIFace, UNO_QUERY); - m_xColumnUpdate = Reference< css::sdb::XColumnUpdate>(_rxIFace, UNO_QUERY); + m_xColumn.set(_rxIFace, UNO_QUERY); + m_xColumnUpdate.set(_rxIFace, UNO_QUERY); if (!m_xPropertySet.is() || !m_xColumn.is()) { diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 4a639ef..46b6036 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -365,7 +365,7 @@ GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) : if ( xMonitor.is() ) { - mxProgressBar = uno::Reference< awt::XProgressBar >( xMonitor, uno::UNO_QUERY ); + mxProgressBar.set( xMonitor, uno::UNO_QUERY ); if( mxProgressBar.is() ) { diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index c04f0db..887b3bc 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -189,8 +189,7 @@ void GalApp::Init() uno::Reference<uno::XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); - xMSF = uno::Reference<lang::XMultiServiceFactory> - ( xComponentContext->getServiceManager(), uno::UNO_QUERY ); + xMSF.set( xComponentContext->getServiceManager(), uno::UNO_QUERY ); if( !xMSF.is() ) { fprintf( stderr, "Failed to bootstrap\n" ); diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index ea2667d..6c523cf 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -125,7 +125,7 @@ void SmartTagMgr::RecognizeTextRange(const Reference< text::XTextRange>& xRange, { Reference < smarttags::XSmartTagRecognizer > xRecognizer = maRecognizerList[i]; - Reference< smarttags::XRangeBasedSmartTagRecognizer > xRangeBasedRecognizer = Reference< smarttags::XRangeBasedSmartTagRecognizer >( xRecognizer, UNO_QUERY); + Reference< smarttags::XRangeBasedSmartTagRecognizer > xRangeBasedRecognizer( xRecognizer, UNO_QUERY); if (!xRangeBasedRecognizer.is()) continue; @@ -354,7 +354,7 @@ void SmartTagMgr::LoadLibraries() Reference< lang::XServiceInfo > xsInfo; if (a >>= xsInfo) - xSCF = Reference< lang::XSingleComponentFactory >(xsInfo, UNO_QUERY); + xSCF.set(xsInfo, UNO_QUERY); else continue; @@ -381,7 +381,7 @@ void SmartTagMgr::LoadLibraries() Reference< lang::XSingleComponentFactory > xSCF; if (a >>= xsInfo) - xSCF = Reference< lang::XSingleComponentFactory >(xsInfo, UNO_QUERY); + xSCF.set(xsInfo, UNO_QUERY); else continue; @@ -437,7 +437,7 @@ void SmartTagMgr::PrepareConfiguration( const OUString& rConfigurationGroupName if ( xConfigurationAccess.is() ) { - mxConfigurationSettings = Reference< beans::XPropertySet >( xConfigurationAccess, UNO_QUERY ); + mxConfigurationSettings.set( xConfigurationAccess, UNO_QUERY ); } } diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 6bfca26..00fc659 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -105,7 +105,7 @@ uno::Reference<awt::XControlContainer> SdrPageWindow::GetControlContainer( bool { // Printer and VirtualDevice, or rather: no OutDev uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - const_cast< SdrPageWindow* >( this )->mpImpl->mxControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance("com.sun.star.awt.UnoControlContainer"), uno::UNO_QUERY); + const_cast< SdrPageWindow* >( this )->mpImpl->mxControlContainer.set(xFactory->createInstance("com.sun.star.awt.UnoControlContainer"), uno::UNO_QUERY); uno::Reference< awt::XControlModel > xModel(xFactory->createInstance("com.sun.star.awt.UnoControlContainerModel"), uno::UNO_QUERY); uno::Reference< awt::XControl > xControl(mpImpl->mxControlContainer, uno::UNO_QUERY); if (xControl.is()) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 456cd00..c03e0e9 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -428,7 +428,7 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine() const aArgument[ 0 ] <<= aPropValues; Reference< XInterface > xInterface( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( aEngine, aArgument, xContext ) ); if ( xInterface.is() ) - mxCustomShapeEngine = Reference< XCustomShapeEngine >( xInterface, UNO_QUERY ); + mxCustomShapeEngine.set( xInterface, UNO_QUERY ); } return mxCustomShapeEngine; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 574a4f56..268fccd 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -303,8 +303,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::saveObject() throw embed::ObjectSaveVetoException(); // the common persistence is supported by objects and links - xPersist = uno::Reference< embed::XCommonEmbedPersist >( mpObj->GetObjRef(), uno::UNO_QUERY_THROW ); - xModifiable = uno::Reference< util::XModifiable >( mpObj->GetParentXModel(), uno::UNO_QUERY ); + xPersist.set( mpObj->GetObjRef(), uno::UNO_QUERY_THROW ); + xModifiable.set( mpObj->GetParentXModel(), uno::UNO_QUERY ); } xPersist->storeOwn(); @@ -342,7 +342,7 @@ uno::Reference< util::XCloseable > SAL_CALL SdrLightEmbeddedClient_Impl::getComp SolarMutexGuard aGuard; if ( mpObj ) - xResult = uno::Reference< util::XCloseable >( mpObj->GetParentXModel(), uno::UNO_QUERY ); + xResult.set( mpObj->GetParentXModel(), uno::UNO_QUERY ); return xResult; } diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index b430648..e5c9513 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -458,7 +458,7 @@ void SdrUnoObj::CreateUnoControlModel(const OUString& rModelName) uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); if (!aUnoControlModelTypeName.isEmpty() ) { - xModel = uno::Reference< awt::XControlModel >(xContext->getServiceManager()->createInstanceWithContext( + xModel.set(xContext->getServiceManager()->createInstanceWithContext( aUnoControlModelTypeName, xContext), uno::UNO_QUERY); if (xModel.is()) @@ -478,8 +478,7 @@ void SdrUnoObj::CreateUnoControlModel(const OUString& rModelName, uno::Reference< awt::XControlModel > xModel; if (!aUnoControlModelTypeName.isEmpty() && rxSFac.is() ) { - xModel = uno::Reference< awt::XControlModel >(rxSFac->createInstance( - aUnoControlModelTypeName), uno::UNO_QUERY); + xModel.set(rxSFac->createInstance(aUnoControlModelTypeName), uno::UNO_QUERY); if (xModel.is()) SetChanged(); diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 158be7d..4f67b59 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -258,7 +258,7 @@ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet() } // Create a copy of the state set that may be modified by the // caller without affecting the current state set. - xStateSet = Reference<XAccessibleStateSet>(new ::utl::AccessibleStateSetHelper (*pStateSet)); + xStateSet.set(new ::utl::AccessibleStateSetHelper (*pStateSet)); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 7bcd976..b1658c1 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2137,7 +2137,7 @@ throw ( Exception, RuntimeException, std::exception) SID_STYLE_FAMILY_START + i, OUString::createFromAscii( StyleSlotToStyleCommand[i] ), *this ); - m_xBoundItems[i] = Reference< XComponent >( static_cast< OWeakObject* >( pBoundItems[i] ), UNO_QUERY ); + m_xBoundItems[i].set( static_cast< OWeakObject* >( pBoundItems[i] ), UNO_QUERY ); pFamilyState[i] = NULL; } } diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 7d9ab48..333ec3a 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -481,7 +481,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( vcl::Window* pParent ) //get dictionaries { if(!m_xContext.is()) - m_xContext = Reference< XComponentContext >( ::cppu::defaultBootstrap_InitialComponentContext() ); + m_xContext.set( ::cppu::defaultBootstrap_InitialComponentContext() ); if(m_xContext.is()) { Reference< linguistic2::XConversionDictionaryList > xDictionaryList = linguistic2::ConversionDictionaryList::create(m_xContext); @@ -496,30 +496,30 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( vcl::Window* pParent ) aLocale.Language = "zh"; if( xContainer->hasByName( aNameTo_Simplified ) ) - xDictionary_To_Simplified = Reference< linguistic2::XConversionDictionary >( + xDictionary_To_Simplified.set( xContainer->getByName( aNameTo_Simplified ), UNO_QUERY ); else { aLocale.Country = "TW"; - xDictionary_To_Simplified = Reference< linguistic2::XConversionDictionary >( + xDictionary_To_Simplified.set( xDictionaryList->addNewDictionary( aNameTo_Simplified - , aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE - ), UNO_QUERY ); + , aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE + ), UNO_QUERY ); } if (xDictionary_To_Simplified.is()) xDictionary_To_Simplified->setActive( sal_True ); if( xContainer->hasByName( aNameTo_Traditional ) ) - xDictionary_To_Traditional = Reference< linguistic2::XConversionDictionary >( + xDictionary_To_Traditional.set( xContainer->getByName( aNameTo_Traditional ), UNO_QUERY ); else { aLocale.Country = "CN"; - xDictionary_To_Traditional = Reference< linguistic2::XConversionDictionary >( + xDictionary_To_Traditional.set( xDictionaryList->addNewDictionary( aNameTo_Traditional - , aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE - ), UNO_QUERY ); + ,aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE), + UNO_QUERY ); } if (xDictionary_To_Traditional.is()) xDictionary_To_Traditional->setActive( sal_True ); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index b3548ea..dbd32b3 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1067,7 +1067,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes Any aInteraction; Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations(1); ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove(); - lContinuations[0] = Reference< XInteractionContinuation >(static_cast< XInteractionContinuation* >(pApprove), UNO_QUERY); + lContinuations[0].set(static_cast< XInteractionContinuation* >(pApprove), UNO_QUERY); GraphicFilterRequest aErrorCode; aErrorCode.ErrCode = nStatus; @@ -1098,9 +1098,9 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon // any break inside this one loop while will throw a IllegalArgumentException do { - mxPage = Reference< XDrawPage >::query( xComponent ); - mxShapes = Reference< XShapes >::query( xComponent ); - mxShape = Reference< XShape >::query( xComponent ); + mxPage.set( xComponent, UNO_QUERY ); + mxShapes.set( xComponent, UNO_QUERY ); + mxShape.set( xComponent, UNO_QUERY ); // Step 1: try a generic XShapes if( !mxPage.is() && !mxShape.is() && mxShapes.is() ) @@ -1132,9 +1132,9 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon do { xInt = xChild->getParent(); - mxPage = Reference< XDrawPage >::query( xInt ); + mxPage.set( xInt, UNO_QUERY ); if( !mxPage.is() ) - xChild = Reference< XChild >::query( xInt ); + xChild.set( xInt, UNO_QUERY ); } while( !mxPage.is() && xChild.is() ); diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 6296941..de6a352 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -712,7 +712,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewBy pPage = new SdrPage(*mrModel.mpDoc); mrModel.mpDoc->InsertPage( pPage, (sal_uInt16)nIndex ); - xDrawPage = uno::Reference< drawing::XDrawPage >::query( pPage->getUnoPage() ); + xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY ); } return xDrawPage; diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 9db5d91..65ec234 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -452,7 +452,7 @@ Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); if( pObj ) - xShapeGroup = Reference< drawing::XShapeGroup >::query( pObj->getUnoShape() ); + xShapeGroup.set( pObj->getUnoShape(), UNO_QUERY ); } mpView->HideSdrPage(); commit 3fdbf5935e0aff6350e861e868c7e0a12dd1bc8f Author: Noel Grandin <[email protected]> Date: Thu Nov 5 09:30:03 2015 +0200 use uno::Reference::set method instead of assignment Change-Id: I6cb508e392d5e194c80fc6d0927c86414e4ab05b diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 671fffa..dc1a17a 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1553,7 +1553,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati xRegistry = xReg; } else { - Reference < XPropertySet > xPropSet = Reference< XPropertySet >::query( m_xSMgr ); + Reference < XPropertySet > xPropSet( m_xSMgr, UNO_QUERY ); if( xPropSet.is() ) { try { Any aAny = xPropSet->getPropertyValue( spool().Registry ); diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 175354c..aedda92 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -886,7 +886,7 @@ Reference<XElementAccess> ImplIntrospectionAccess::getXElementAccess() if( !mxObjElementAccess.is() ) { aGuard.clear(); - Reference<XElementAccess> xElementAccess = Reference<XElementAccess>::query( mxIface ); + Reference<XElementAccess> xElementAccess( mxIface, UNO_QUERY ); aGuard.reset(); if( !mxObjElementAccess.is() ) mxObjElementAccess = xElementAccess; @@ -901,18 +901,18 @@ void ImplIntrospectionAccess::cacheXNameContainer() Reference<XNameAccess> xNameAccess; if (mpStaticImpl->mbNameContainer) { - xNameContainer = Reference<XNameContainer>::query( mxIface ); - xNameReplace = Reference<XNameReplace>::query( xNameContainer ); - xNameAccess = Reference<XNameAccess>::query( xNameContainer ); + xNameContainer.set( mxIface, UNO_QUERY ); + xNameReplace.set( xNameContainer, UNO_QUERY ); + xNameAccess.set( xNameContainer, UNO_QUERY ); } else if (mpStaticImpl->mbNameReplace) { - xNameReplace = Reference<XNameReplace>::query( mxIface ); - xNameAccess = Reference<XNameAccess>::query( xNameReplace ); + xNameReplace.set( mxIface, UNO_QUERY ); + xNameAccess.set( xNameReplace, UNO_QUERY ); } else if (mpStaticImpl->mbNameAccess) { - xNameAccess = Reference<XNameAccess>::query( mxIface ); + xNameAccess.set( mxIface, UNO_QUERY ); } { @@ -969,18 +969,18 @@ void ImplIntrospectionAccess::cacheXIndexContainer() Reference<XIndexAccess> xIndexAccess; if (mpStaticImpl->mbIndexContainer) { - xIndexContainer = Reference<XIndexContainer>::query( mxIface ); - xIndexReplace = Reference<XIndexReplace>::query( xIndexContainer ); - xIndexAccess = Reference<XIndexAccess>::query( xIndexContainer ); + xIndexContainer.set( mxIface, UNO_QUERY ); + xIndexReplace.set( xIndexContainer, UNO_QUERY ); + xIndexAccess.set( xIndexContainer, UNO_QUERY ); } else if (mpStaticImpl->mbIndexReplace) { - xIndexReplace = Reference<XIndexReplace>::query( mxIface ); - xIndexAccess = Reference<XIndexAccess>::query( xIndexReplace ); + xIndexReplace.set( mxIface, UNO_QUERY ); + xIndexAccess.set( xIndexReplace, UNO_QUERY ); } else if (mpStaticImpl->mbIndexAccess) { - xIndexAccess = Reference<XIndexAccess>::query( mxIface ); + xIndexAccess.set( mxIface, UNO_QUERY ); } { @@ -1037,7 +1037,7 @@ Reference<XEnumerationAccess> ImplIntrospectionAccess::getXEnumerationAccess() if( !mxObjEnumerationAccess.is() ) { aGuard.clear(); - Reference<XEnumerationAccess> xEnumerationAccess = Reference<XEnumerationAccess>::query( mxIface ); + Reference<XEnumerationAccess> xEnumerationAccess( mxIface, UNO_QUERY ); aGuard.reset(); if( !mxObjEnumerationAccess.is() ) mxObjEnumerationAccess = xEnumerationAccess; @@ -1052,7 +1052,7 @@ Reference<XIdlArray> ImplIntrospectionAccess::getXIdlArray() if( !mxObjIdlArray.is() ) { aGuard.clear(); - Reference<XIdlArray> xIdlArray = Reference<XIdlArray>::query( mxIface ); + Reference<XIdlArray> xIdlArray( mxIface, UNO_QUERY ); aGuard.reset(); if( !mxObjIdlArray.is() ) mxObjIdlArray = xIdlArray; @@ -1763,7 +1763,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( // Look for interfaces XTypeProvider and PropertySet if( eType == TypeClass_INTERFACE ) { - xTypeProvider = Reference<XTypeProvider>::query( x ); + xTypeProvider.set( x, UNO_QUERY ); if( xTypeProvider.is() ) { SupportedTypesSeq = xTypeProvider->getTypes(); @@ -1775,7 +1775,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( { if( pTypes[i].getTypeName() == "com.sun.star.beans.XPropertySet" ) { - xPropSet = Reference<XPropertySet>::query( x ); + xPropSet.set( x, UNO_QUERY ); break; } } @@ -1786,7 +1786,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( "object of type \"" << aToInspectObj.getValueTypeName() << "\" lacks XTypeProvider"); SupportedTypesSeq = Sequence<Type>(&aToInspectObj.getValueType(), 1); - xPropSet = Reference<XPropertySet>::query( x ); + xPropSet.set( x, UNO_QUERY ); } // Now try to get the PropertySetInfo @@ -1856,7 +1856,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( if( xPropSet.is() && xPropSetInfo.is() ) { // Is there also a FastPropertySet? - Reference<XFastPropertySet> xDummy = Reference<XFastPropertySet>::query( x ); + Reference<XFastPropertySet> xDummy( x, UNO_QUERY ); bool bFast = pAccess->mbFastPropSet = xDummy.is(); Sequence<Property> aPropSeq = xPropSetInfo->getProperties(); diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 42657ba..494fa40 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -351,12 +351,12 @@ Any Invocation_Impl::getMaterial() throw(RuntimeException, std::exception) Reference<XMaterialHolder> xMaterialHolder; if( _xDirect.is() ) { - xMaterialHolder = Reference<XMaterialHolder>::query( _xDirect ); + xMaterialHolder.set( _xDirect, UNO_QUERY ); //_xDirect->queryInterface( XMaterialHolder::getSmartUik(), xMaterialHolder ); } else if( _xIntrospectionAccess.is() ) { - xMaterialHolder = Reference<XMaterialHolder>::query( _xIntrospectionAccess ); + xMaterialHolder.set( _xIntrospectionAccess, UNO_QUERY ); //_xIntrospectionAccess->queryInterface( XMaterialHolder::getSmartUik(), xMaterialHolder ); } if( xMaterialHolder.is() ) @@ -377,21 +377,21 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _aMaterial = rMaterial; // First do this outside the guard - _xDirect = Reference<XInvocation>::query( xObj ); + _xDirect.set( xObj, UNO_QUERY ); if( _xDirect.is() ) { // Consult object directly - _xElementAccess = Reference<XElementAccess>::query( _xDirect ); - _xEnumerationAccess = Reference<XEnumerationAccess>::query( _xDirect ); - _xIndexAccess = Reference<XIndexAccess>::query( _xDirect ); - _xIndexReplace = Reference<XIndexReplace>::query( _xDirect ); - _xIndexContainer = Reference<XIndexContainer>::query( _xDirect ); - _xNameAccess = Reference<XNameAccess>::query( _xDirect ); - _xNameReplace = Reference<XNameReplace>::query( _xDirect ); - _xNameContainer = Reference<XNameContainer>::query( _xDirect ); - _xENDirect = Reference<XExactName>::query( _xDirect ); - _xDirect2 = Reference<XInvocation2>::query( _xDirect ); + _xElementAccess.set( _xDirect, UNO_QUERY ); + _xEnumerationAccess.set( _xDirect, UNO_QUERY ); + _xIndexAccess.set( _xDirect, UNO_QUERY ); + _xIndexReplace.set( _xDirect, UNO_QUERY ); + _xIndexContainer.set( _xDirect, UNO_QUERY ); + _xNameAccess.set( _xDirect, UNO_QUERY ); + _xNameReplace.set( _xDirect, UNO_QUERY ); + _xNameContainer.set( _xDirect, UNO_QUERY ); + _xENDirect.set( _xDirect, UNO_QUERY ); + _xDirect2.set( _xDirect, UNO_QUERY ); // only once!!! //_xIntrospectionAccess = XIntrospectionAccessRef(); @@ -405,52 +405,51 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _xIntrospectionAccess = xIntrospection->inspect( _aMaterial ); if( _xIntrospectionAccess.is() ) { - _xElementAccess = Reference<XElementAccess>::query( + _xElementAccess.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XElementAccess>::get()) ); + cppu::UnoType<XElementAccess>::get()), UNO_QUERY ); if( _xElementAccess.is() ) { - _xEnumerationAccess = Reference<XEnumerationAccess>::query( + _xEnumerationAccess.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XEnumerationAccess>::get()) ); + cppu::UnoType<XEnumerationAccess>::get()), UNO_QUERY ); - _xIndexAccess = Reference<XIndexAccess>::query( + _xIndexAccess.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XIndexAccess>::get()) ); + cppu::UnoType<XIndexAccess>::get()), UNO_QUERY ); if( _xIndexAccess.is() ) { - _xIndexReplace = Reference<XIndexReplace>::query( + _xIndexReplace.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XIndexReplace>::get()) ); + cppu::UnoType<XIndexReplace>::get()), UNO_QUERY ); - _xIndexContainer = Reference<XIndexContainer>::query( + _xIndexContainer.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XIndexContainer>::get()) ); + cppu::UnoType<XIndexContainer>::get()), UNO_QUERY ); } - _xNameAccess = Reference<XNameAccess>::query( + _xNameAccess.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XNameAccess>::get()) ); + cppu::UnoType<XNameAccess>::get()), UNO_QUERY ); if( _xNameAccess.is() ) { - _xNameReplace = Reference<XNameReplace>::query( + _xNameReplace.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XNameReplace>::get()) ); + cppu::UnoType<XNameReplace>::get()), UNO_QUERY ); - _xNameContainer = Reference<XNameContainer>::query( + _xNameContainer.set( _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XNameContainer>::get()) ); + cppu::UnoType<XNameContainer>::get()), UNO_QUERY ); } } - _xPropertySet = Reference<XPropertySet>::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType<XPropertySet>::get()) ); + _xPropertySet.set( _xIntrospectionAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), + UNO_QUERY ); - _xENIntrospection = Reference<XExactName>::query( _xIntrospectionAccess ); + _xENIntrospection.set( _xIntrospectionAccess, UNO_QUERY ); } } /* only once !!! @@ -1114,7 +1113,7 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx , mxSMgr( xCtx->getServiceManager() ) , xCoreReflection( css::reflection::theCoreReflection::get(mxCtx) ) { - xTypeConverter = Reference<XTypeConverter>( + xTypeConverter.set( mxSMgr->createInstanceWithContext( "com.sun.star.script.Converter", xCtx ), UNO_QUERY ); xIntrospection = theIntrospection::get(xCtx); @@ -1169,7 +1168,7 @@ Reference<XInterface> InvocationService::createInstanceWithArguments( Reference<XInterface> SAL_CALL InvocationService_CreateInstance( const Reference<XComponentContext> & xCtx ) throw( RuntimeException ) { - Reference<XInterface> xService = Reference< XInterface > ( *new InvocationService( xCtx ) ); + Reference<XInterface> xService( *new InvocationService( xCtx ) ); return xService; } diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 684d967..a602619 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -247,8 +247,7 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL throw RuntimeException( "javaloader error - no type information for XImplementationLoader"); - m_javaLoader = css::uno::Reference<XImplementationLoader>(static_cast<XImplementationLoader *>( - java_curr.mapInterface(joJavaLoader, pType_XImplementationLoader))); + m_javaLoader.set(static_cast<XImplementationLoader *>(java_curr.mapInterface(joJavaLoader, pType_XImplementationLoader))); pJNIEnv->DeleteLocalRef( joJavaLoader ); if(!m_javaLoader.is()) throw RuntimeException( diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 9d15711..0bcad2c 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -152,8 +152,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::getSingleton( { if (m_bDisposed) throw css::lang::DisposedException(); - xComponent = css::uno::Reference< css::lang::XComponent >( - rContext, css::uno::UNO_QUERY_THROW); + xComponent.set( rContext, css::uno::UNO_QUERY_THROW); m_xSingleton = static_cast< cppu::OWeakObject * >( new JavaVirtualMachine(rContext)); } @@ -183,8 +182,7 @@ void SingletonFactory::dispose() css::uno::Reference< css::lang::XComponent > xComponent; { osl::MutexGuard aGuard(m_aMutex); - xComponent = css::uno::Reference< css::lang::XComponent >( - m_xSingleton, css::uno::UNO_QUERY); + xComponent.set( m_xSingleton, css::uno::UNO_QUERY); m_xSingleton.clear(); m_bDisposed = true; } @@ -1349,8 +1347,7 @@ void JavaVirtualMachine::registerConfigChangesListener() css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); - m_xInetConfiguration - = css::uno::Reference< css::container::XContainer >( + m_xInetConfiguration.set( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArguments), @@ -1373,8 +1370,7 @@ void JavaVirtualMachine::registerConfigChangesListener() css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); - m_xJavaConfiguration - = css::uno::Reference< css::container::XContainer >( + m_xJavaConfiguration.set( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArguments2), diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 16ffe39..021a806 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -381,8 +381,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse( css::uno::makeAny(e)); //TODO: preserve type of e } if (service.is()) { - parser = css::uno::Reference< css::uri::XUriSchemeParser >( - service, css::uno::UNO_QUERY_THROW); + parser.set( service, css::uno::UNO_QUERY_THROW); } } } diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx index 39a6305..b8dd381 100644 --- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx +++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx @@ -94,13 +94,13 @@ void SAL_CALL InteractionHandler::handle( const Reference< XInteractionRequest > for (sal_Int32 i= 0; i < seqCont.getLength(); i++) { - abort= Reference<XInteractionAbort>::query( seqCont[i]); + abort.set( seqCont[i], UNO_QUERY ); if(abort.is()) break; } for (sal_Int32 i= 0; i < seqCont.getLength(); i++) { - retry= Reference<XInteractionRetry>::query( seqCont[i]); + retry.set( seqCont[i], UNO_QUERY ); if(retry.is()) break; } diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx index f6fd898..359c4b7 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx +++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx @@ -151,8 +151,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) OUString( "com.sun.star.uno.XComponentContext::getValueByName"))); css::uno::Reference< css::reflection::XCompoundTypeDescription > exception; - exception - = css::uno::Reference< css::reflection::XCompoundTypeDescription >( + exception.set( provider->getByHierarchicalName( OUString( "com.sun.star.uno.Exception")), css::uno::UNO_QUERY_THROW); @@ -160,8 +159,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) assertEqual( OUString( "com.sun.star.uno.Exception"), exception->getName()); assertFalse(exception->getBaseType().is()); - exception - = css::uno::Reference< css::reflection::XCompoundTypeDescription >( + exception.set( provider->getByHierarchicalName( OUString( "com.sun.star.uno.RuntimeException")), css::uno::UNO_QUERY_THROW); @@ -173,7 +171,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::reflection::XStructTypeDescription > structure; - structure = css::uno::Reference< css::reflection::XStructTypeDescription >( + structure.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct2")), css::uno::UNO_QUERY_THROW); @@ -192,7 +190,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); assertEqual< sal_Int32 >(0, structure->getTypeArguments().getLength()); - structure = css::uno::Reference< css::reflection::XStructTypeDescription >( + structure.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct3")), css::uno::UNO_QUERY_THROW); @@ -221,7 +219,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) structure->getTypeParameters()[1]); assertEqual< sal_Int32 >(0, structure->getTypeArguments().getLength()); - structure = css::uno::Reference< css::reflection::XStructTypeDescription >( + structure.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct4")), css::uno::UNO_QUERY_THROW); @@ -248,8 +246,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > interface; - interface - = css::uno::Reference< css::reflection::XInterfaceTypeDescription2 >( + interface.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.XTest1")), css::uno::UNO_QUERY_THROW); @@ -289,9 +286,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > method; - attribute = css::uno::Reference< - css::reflection::XInterfaceAttributeTypeDescription2 >( - members[0], css::uno::UNO_QUERY_THROW); + attribute.set( members[0], css::uno::UNO_QUERY_THROW); assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( @@ -311,9 +306,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) setExceptions = attribute->getSetExceptions(); assertEqual< sal_Int32 >(0, setExceptions.getLength()); - attribute = css::uno::Reference< - css::reflection::XInterfaceAttributeTypeDescription2 >( - members[1], css::uno::UNO_QUERY_THROW); + attribute.set( members[1], css::uno::UNO_QUERY_THROW); assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( @@ -345,9 +338,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) OUString( "com.sun.star.lang.WrappedTargetException"), setExceptions[1]->getName()); - attribute = css::uno::Reference< - css::reflection::XInterfaceAttributeTypeDescription2 >( - members[2], css::uno::UNO_QUERY_THROW); + attribute.set( members[2], css::uno::UNO_QUERY_THROW); assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( @@ -371,9 +362,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) setExceptions = attribute->getSetExceptions(); assertEqual< sal_Int32 >(0, setExceptions.getLength()); - method = css::uno::Reference< - css::reflection::XInterfaceMethodTypeDescription >( - members[3], css::uno::UNO_QUERY_THROW); + method.set( members[3], css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); assertEqual( OUString( "test.registrytdprovider.XTest1::f1"), @@ -398,9 +387,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) OUString( "com.sun.star.uno.RuntimeException"), method->getExceptions()[0]->getName()); - method = css::uno::Reference< - css::reflection::XInterfaceMethodTypeDescription >( - members[4], css::uno::UNO_QUERY_THROW); + method.set( members[4], css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); assertEqual( OUString( "test.registrytdprovider.XTest1::f2"), @@ -413,8 +400,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) assertEqual< sal_Int32 >(0, method->getParameters().getLength()); assertEqual< sal_Int32 >(0, method->getExceptions().getLength()); - interface - = css::uno::Reference< css::reflection::XInterfaceTypeDescription2 >( + interface.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.XTest2")), css::uno::UNO_QUERY_THROW); @@ -431,7 +417,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::reflection::XServiceTypeDescription2 > service; - service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( + service.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Service1")), css::uno::UNO_QUERY_THROW); @@ -483,7 +469,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) OUString( "com.sun.star.uno.RuntimeException"), service->getConstructors()[1]->getExceptions()[0]->getName()); - service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( + service.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Service2")), css::uno::UNO_QUERY_THROW); @@ -505,7 +491,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) assertFalse(service->getInterface().is()); assertEqual< sal_Int32 >(0, service->getConstructors().getLength()); - service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( + service.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Service3")), css::uno::UNO_QUERY_THROW); @@ -528,8 +514,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::reflection::XSingletonTypeDescription2 > singleton; - singleton = css::uno::Reference< - css::reflection::XSingletonTypeDescription2 >( + singleton.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Singleton1")), css::uno::UNO_QUERY_THROW); @@ -545,8 +530,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) "test.registrytdprovider.XTest1"), singleton->getInterface()->getName()); - singleton = css::uno::Reference< - css::reflection::XSingletonTypeDescription2 >( + singleton.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Singleton2")), css::uno::UNO_QUERY_THROW); @@ -562,8 +546,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) assertEqual< bool >(false, singleton->isInterfaceBased()); assertFalse(singleton->getInterface().is()); - singleton = css::uno::Reference< - css::reflection::XSingletonTypeDescription2 >( + singleton.set( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Singleton3")), css::uno::UNO_QUERY_THROW); @@ -580,7 +563,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) singleton->getInterface()->getName()); css::uno::Reference< css::reflection::XPublished > published; - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Enum1")), @@ -588,7 +571,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Enum2")), @@ -596,7 +579,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct1")), @@ -604,7 +587,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct2")), @@ -612,7 +595,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct3")), @@ -620,14 +603,14 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XStructTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct3")), css::uno::UNO_QUERY_THROW)->getMemberTypes()[0], css::uno::UNO_QUERY); assertFalse(published.is()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Struct3a")), @@ -635,7 +618,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Exception1")), @@ -643,7 +626,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Exception2")), @@ -651,7 +634,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.XTest1")), @@ -659,7 +642,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.XTest2")), @@ -667,7 +650,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Typedef1")), @@ -675,7 +658,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Typedef2")), @@ -687,7 +670,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) // test.registrytdprovider.Const2 (unpublished), and // test.registrytdprovider.Consts1.C (no XPublished), which are not // accessible via provider->getByHierarchicalName (see #i31428) - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Consts1")), @@ -695,7 +678,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Consts2")), @@ -703,14 +686,14 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertFalse(published.is()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Service1")), @@ -718,7 +701,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertTrue(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Service2")), @@ -726,7 +709,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) css::uno::UNO_QUERY); assertTrue(published.is()); assertFalse(published->isPublished()); - published = css::uno::Reference< css::reflection::XPublished >( + published.set( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( OUString( "test.registrytdprovider.Singleton2")), ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
