diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 8 | ||||
-rw-r--r-- | desktop/source/app/check_ext_deps.cxx | 4 | ||||
-rw-r--r-- | desktop/source/app/dispatchwatcher.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_extensionmanager.cxx | 3 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 3 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_update.cxx | 3 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_backenddb.cxx | 6 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 8 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 16 | ||||
-rw-r--r-- | desktop/source/migration/services/oo3extensionmigration.cxx | 2 | ||||
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 4 |
12 files changed, 30 insertions, 39 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 60e2605cb000..c9b7d137856d 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2143,8 +2143,7 @@ void Desktop::PreloadConfigurationData() } // preload filter configuration - xNameAccess = Reference< XNameAccess >( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext), + xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext), UNO_QUERY ); if ( xNameAccess.is() ) { @@ -2158,8 +2157,7 @@ void Desktop::PreloadConfigurationData() } // preload type detection configuration - xNameAccess = Reference< XNameAccess >( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext), + xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext), UNO_QUERY ); if ( xNameAccess.is() ) { @@ -2728,7 +2726,7 @@ void Desktop::OpenSplashScreen() aSeq[0] <<= bVisible; aSeq[1] <<= aAppName; css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - m_rSplashScreen = Reference<XStatusIndicator>( + m_rSplashScreen.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aSplashService, aSeq, xContext), UNO_QUERY); diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 38b7d2135ade..359ee1c7b8f2 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -331,7 +331,7 @@ static void impl_setNeedsCompatCheck() beans::NamedValue v( OUString("nodepath"), makeAny( OUString("org.openoffice.Setup/Office") ) ); theArgs[0] <<= v; - Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >( + Reference< beans::XPropertySet > pset( theConfigProvider->createInstanceWithArguments( aAccessSrvc, theArgs ), UNO_QUERY_THROW ); Any value = makeAny( OUString("never") ); @@ -362,7 +362,7 @@ static bool impl_needsCompatCheck() beans::NamedValue v( OUString("nodepath"), makeAny( OUString("org.openoffice.Setup/Office") ) ); theArgs[0] <<= v; - Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >( + Reference< beans::XPropertySet > pset( theConfigProvider->createInstanceWithArguments( OUString(aAccessSrvc), theArgs ), UNO_QUERY_THROW ); Any result = pset->getPropertyValue("LastCompatibilityCheckID"); diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 3bf045c6a527..bac549950724 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -455,7 +455,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism. try { - xDoc = Reference < XPrintable >( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY ); + xDoc.set( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY ); } catch (const css::lang::IllegalArgumentException& iae) { diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 3689b6f2cd77..cd34cd4d108c 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -66,18 +66,20 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > & beans::PropertyValue aValue( OUString("nodepath"), 0, uno::Any( OUString("/org.openoffice.Office.OptionsDialog/Nodes") ), beans::PropertyState_DIRECT_VALUE ); args[0] <<= aValue; - m_xNameAccessNodes = uno::Reference< container::XNameAccess >( + m_xNameAccessNodes.set( xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", - uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW); + uno::Sequence< uno::Any >( args, 1 )), + uno::UNO_QUERY_THROW); // get the 'get more extensions here' url uno::Reference< container::XNameAccess > xNameAccessRepositories; beans::PropertyValue aValue2( OUString("nodepath"), 0, uno::Any( OUString("/org.openoffice.Office.ExtensionManager/ExtensionRepositories") ), beans::PropertyState_DIRECT_VALUE ); args[0] <<= aValue2; - xNameAccessRepositories = uno::Reference< container::XNameAccess > ( + xNameAccessRepositories.set( xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", - uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW); + uno::Sequence< uno::Any >( args, 1 )), + uno::UNO_QUERY_THROW); try { //throws css::container::NoSuchElementException, css::lang::WrappedTargetException uno::Any value = xNameAccessRepositories->getByName("WebsiteLink"); diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index e662c31165b7..8913224efbfe 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -596,8 +596,7 @@ bool ExtensionManager::doChecksForAddExtension( if (licenseAttributes && licenseAttributes->suppressIfRequired && props.isSuppressedLicense()) - _xCmdEnv = Reference<ucb::XCommandEnvironment>( - new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler())); + _xCmdEnv.set(new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler())); bCanInstall = xTmpExtension->checkPrerequisites( xAbortChannel, _xCmdEnv, xOldExtension.is() || props.isExtensionUpdate()) == 0; diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index a27c1718eb9a..ae0d56e8e50c 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -227,8 +227,7 @@ ExtensionDescription::ExtensionDescription( sDescriptionUri + " does not contain the root element <description>.", 0); } - m_xRoot = Reference<css::xml::dom::XNode>( - xRoot, css::uno::UNO_QUERY_THROW); + m_xRoot.set(xRoot, css::uno::UNO_QUERY_THROW); OUString nsDescription = xRoot->getNamespaceURI(); //check if this namespace is supported diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 4ec7b373a61c..35bdd1701e6c 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -115,8 +115,7 @@ void getOwnUpdateInfos( if (*id2 == id) { i->second.version = infoset.getVersion(); - i->second.info = Reference< xml::dom::XNode >( - infos[j], UNO_QUERY_THROW); + i->second.info.set(infos[j], UNO_QUERY_THROW); } break; } diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index 3f607ae04b0c..a2c03235d855 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -170,7 +170,7 @@ void BackendDb::revokeEntry(OUString const & url) { try { - Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY); + Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY); if (entry.is()) { entry->setAttribute("revoked", "true"); @@ -191,7 +191,7 @@ bool BackendDb::activateEntry(OUString const & url) try { bool ret = false; - Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY); + Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY); if (entry.is()) { //no attribute "active" means it is active, that is, registered. @@ -215,7 +215,7 @@ bool BackendDb::hasActiveEntry(OUString const & url) try { bool ret = false; - Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY); + Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY); if (entry.is()) { OUString sActive = entry->getAttribute("revoked"); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 32b01012d4ed..d9a3fdd42425 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1285,13 +1285,7 @@ static bool initialize_uno(const OUString& aAppProgramURL) return false; } - xSFactory = uno::Reference<lang::XMultiServiceFactory>(xFactory, uno::UNO_QUERY_THROW); - if (!xSFactory.is()) - { - gImpl->maLastExceptionMsg = "XMultiServiceFactory could not be created"; - SAL_INFO("lok", "XMultiServiceFactory could not be created"); - return false; - } + xSFactory.set(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); SAL_INFO("lok", "Uno initialized - " << xContext.is()); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 37ce482b014f..1f8e9999ff69 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -279,7 +279,7 @@ bool MigrationImpl::doMigration() if (vModulesInfo[i].bHasMenubar) { - uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xOldVersionMenuSettings(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY); uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName); OUString sParent; compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL); @@ -294,7 +294,7 @@ bool MigrationImpl::doMigration() OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; - uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); OUString sParent; compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); @@ -878,7 +878,7 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa // access the provider uno::Sequence< uno::Any > theArgs(1); theArgs[ 0 ] <<= sConfigURL; - xNameAccess = uno::Reference< XNameAccess > ( + xNameAccess.set( theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), uno::UNO_QUERY_THROW ); } @@ -966,7 +966,7 @@ void MigrationImpl::runServices() seqArguments[2] = uno::makeAny(NamedValue("ExtensionBlackList", uno::makeAny( seqExtBlackList ))); - xMigrationJob = uno::Reference< XJob >( + xMigrationJob.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(i_mig->service, seqArguments, xContext), uno::UNO_QUERY_THROW); @@ -1008,11 +1008,11 @@ void MigrationImpl::runServices() embed::FileSystemStorageFactory::create(comphelper::getProcessComponentContext())); uno::Reference< embed::XStorage > xModules; - xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + xModules.set(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); if (!xModules.is()) return vModulesInfo; - uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY); + uno::Reference< container::XNameAccess > xAccess(xModules, uno::UNO_QUERY); uno::Sequence< OUString > lNames = xAccess->getElementNames(); sal_Int32 nLength = lNames.getLength(); for (sal_Int32 i=0; i<nLength; ++i) @@ -1026,7 +1026,7 @@ void MigrationImpl::runServices() uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ); if (xMenubar.is()) { - uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY); + uno::Reference< container::XNameAccess > xNameAccess(xMenubar, uno::UNO_QUERY); if (xNameAccess->getElementNames().getLength() > 0) { aModuleInfo.sModuleShortName = sModuleShortName; @@ -1040,7 +1040,7 @@ void MigrationImpl::runServices() const OUString RESOURCEURL_CUSTOM_ELEMENT("custom_"); sal_Int32 nCustomLen = 7; - uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY); + uno::Reference< container::XNameAccess > xNameAccess(xToolbar, uno::UNO_QUERY); ::uno::Sequence< OUString > lToolbars = xNameAccess->getElementNames(); for (sal_Int32 j=0; j<lToolbars.getLength(); ++j) { diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index eb1b0052f085..726a192c362c 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -209,7 +209,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU { if ( !m_xDocBuilder.is() ) { - m_xDocBuilder = uno::Reference< xml::dom::XDocumentBuilder >( xml::dom::DocumentBuilder::create(m_ctx) ); + m_xDocBuilder.set( xml::dom::DocumentBuilder::create(m_ctx) ); } if ( !m_xSimpleFileAccess.is() ) diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 7378033f01c9..2320851d3410 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -236,7 +236,7 @@ Reference<XInterface> AccInstanceProvider::getInstance (const OUString& aName ) if ( aName == "StarOffice.ServiceManager" ) { - rInstance = Reference< XInterface >( m_rContext->getServiceManager() ); + rInstance.set( m_rContext->getServiceManager() ); } else if ( aName == "StarOffice.ComponentContext" ) { @@ -279,7 +279,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL offacc_component_getFactory(char const *pIm if (desktop::Acceptor::impl_getImplementationName().equalsAscii( pImplementationName ) ) { - xFactory = Reference< XSingleServiceFactory >( cppu::createSingleFactory( + xFactory.set( cppu::createSingleFactory( xServiceManager, desktop::Acceptor::impl_getImplementationName(), desktop::Acceptor::impl_getInstance, desktop::Acceptor::impl_getSupportedServiceNames()) ); } |