diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-04 15:36:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 07:41:29 +0200 |
commit | 0eb9f56db5dad711f12283d097e1d56a801ba526 (patch) | |
tree | 5f3d939447347f8b44921ce23f8d0b261e64ead2 /scripting/source/provider | |
parent | a17cfe9de14d83c28cae142a64782387dcaa4864 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I2b592fd3327f4bbe4685e84711dc9d6f19222a97
Diffstat (limited to 'scripting/source/provider')
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 7 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 4 | ||||
-rw-r--r-- | scripting/source/provider/ProviderCache.cxx | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 74a6abfe5d6f..75072a244a3c 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -308,8 +308,8 @@ Sequence< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Reference< { xFac = provider::theMasterScriptProviderFactory::get( xCtx ); - locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( OUString("user") ) ), UNO_QUERY_THROW ); - locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( xFac->createScriptProvider( makeAny( OUString("share") ) ), UNO_QUERY_THROW ); + locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("user") ) ), UNO_QUERY_THROW ); + locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("share") ) ), UNO_QUERY_THROW ); } // TODO proper exception handling, should throw catch( const Exception& e ) @@ -339,8 +339,7 @@ Sequence< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Reference< { Reference< document::XEmbeddedScripts > xScripts( model, UNO_QUERY ); if ( xScripts.is() ) - locnBNs[ mspIndex++ ] = Reference< browse::XBrowseNode >( - xFac->createScriptProvider( makeAny( model ) ), UNO_QUERY_THROW ); + locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( model ) ), UNO_QUERY_THROW ); } } } diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index b1934e01354c..1b6fea093de0 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -436,12 +436,12 @@ MasterScriptProvider::getChildNodes() sal_Int32 provIndex = 0; for ( ; provIndex < providers.getLength(); provIndex++ ) { - children[ provIndex ] = Reference< browse::XBrowseNode >( providers[ provIndex ], UNO_QUERY ); + children[ provIndex ].set( providers[ provIndex ], UNO_QUERY ); } if ( hasPkgs ) { - children[ provIndex ] = Reference< browse::XBrowseNode >( pkgProv, UNO_QUERY ); + children[ provIndex ].set( pkgProv, UNO_QUERY ); } diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 6a133e15de6b..854b8235163f 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -140,7 +140,7 @@ ProviderCache::populateCache() throw ( RuntimeException ) { OUString languageProviderName( "com.sun.star.script.provider.LanguageScriptProvider" ); - Reference< container::XContentEnumerationAccess > xEnumAccess = Reference< container::XContentEnumerationAccess >( m_xMgr, UNO_QUERY_THROW ); + Reference< container::XContentEnumerationAccess > xEnumAccess( m_xMgr, UNO_QUERY_THROW ); Reference< container::XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName ); while ( xEnum->hasMoreElements() ) |