diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-04 14:16:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-04 14:20:51 +0200 |
commit | fcb8df3bcf551fc3437e6c7c8ddb24dc5a09db02 (patch) | |
tree | b00511c71c3ea467e1f029cfdb80bb6ce72960b5 /linguistic | |
parent | 59b072e22b0610abc7ffdbc75873ef5cbba58de7 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I11822c50fa66d038a3d6f38054ab35c2e613f077
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/gciterator.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/hyphdsp.cxx | 7 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 17 | ||||
-rw-r--r-- | linguistic/source/spelldsp.cxx | 6 | ||||
-rw-r--r-- | linguistic/source/thesdsp.cxx | 3 |
5 files changed, 15 insertions, 20 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index eb6f90a45555..f6f6dc2cc157 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -1005,7 +1005,7 @@ uno::Reference< util::XChangesBatch > GrammarCheckingIterator::GetUpdateAccess() aValue.Value = uno::makeAny( OUString("org.openoffice.Office.Linguistic/ServiceManager") ); uno::Sequence< uno::Any > aProps(1); aProps[0] <<= aValue; - m_xUpdateAccess = uno::Reference< util::XChangesBatch >( + m_xUpdateAccess.set( xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationUpdateAccess", aProps ), uno::UNO_QUERY_THROW ); diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index ae0da9935c13..7f23cd6b7978 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -617,10 +617,9 @@ Reference< XPossibleHyphens > SAL_CALL // create specific service via it's implementation name try { - xHyph = Reference< XHyphenator >( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - pEntry->aSvcImplNames[0], aArgs, xContext ), - UNO_QUERY ); + xHyph.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + pEntry->aSvcImplNames[0], aArgs, xContext ), + UNO_QUERY ); } catch (uno::Exception &) { diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 75fda0ea6429..742544af131a 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -97,10 +97,9 @@ static uno::Sequence< lang::Locale > GetAvailLocales( uno::Reference< linguistic2::XSupportedLocales > xSuppLoc; try { - xSuppLoc = uno::Reference< linguistic2::XSupportedLocales >( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - pImplNames[i], aArgs, xContext ), - uno::UNO_QUERY ); + xSuppLoc.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + pImplNames[i], aArgs, xContext ), + uno::UNO_QUERY ); } catch (uno::Exception &) { @@ -490,7 +489,7 @@ LngSvcMgr::LngSvcMgr() } if (xExtensionManager.is()) { - xMB = uno::Reference<util::XModifyBroadcaster>(xExtensionManager, uno::UNO_QUERY_THROW); + xMB.set(xExtensionManager, uno::UNO_QUERY_THROW); uno::Reference<util::XModifyListener> xListener(this); xMB->addModifyListener( xListener ); @@ -1068,7 +1067,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl() { try { - xSvc = uno::Reference< linguistic2::XSpellChecker >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); + xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); } catch (const uno::Exception &) { @@ -1130,7 +1129,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl() { try { - xSvc = uno::Reference< linguistic2::XProofreader >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); + xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); } catch (const uno::Exception &) { @@ -1192,7 +1191,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl() { try { - xSvc = uno::Reference< linguistic2::XHyphenator >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); + xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); } catch (const uno::Exception &) { @@ -1253,7 +1252,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl() { try { - xSvc = uno::Reference< linguistic2::XThesaurus >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); + xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY ); } catch (const uno::Exception &) { diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index e77fd3063d38..745e0a900404 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -371,8 +371,7 @@ bool SpellCheckerDispatcher::isValid_Impl( Reference< XSpellChecker > xSpell; try { - xSpell = Reference< XSpellChecker >( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + xSpell.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( pImplNames[i], aArgs, xContext ), UNO_QUERY ); } @@ -557,8 +556,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( Reference< XSpellChecker > xSpell; try { - xSpell = Reference< XSpellChecker >( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + xSpell.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( pImplNames[i], aArgs, xContext ), UNO_QUERY ); } diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx index a0027a10c5cf..8676318f0c23 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -171,8 +171,7 @@ Sequence< Reference< XMeaning > > SAL_CALL Reference< XThesaurus > xThes; try { - xThes = Reference< XThesaurus >( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + xThes.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( pImplNames[i], aArgs, xContext ), UNO_QUERY ); } |