diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-21 12:14:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-25 13:53:21 +0200 |
commit | 4583911575edf98ccd5b15af8eafa6a3a7b64034 (patch) | |
tree | f3f33e53c45dd870f19e7e42db9bb5b4bf1f23bf /scripting | |
parent | 1942182a3d1817bc539229d7fda3af69f7e295b8 (diff) |
improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/provider/ActiveMSPList.cxx | 3 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 9 | ||||
-rw-r--r-- | scripting/source/provider/URIHelper.cxx | 9 |
3 files changed, 3 insertions, 18 deletions
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx index 5411b5a474ef..3cf34551d52c 100644 --- a/scripting/source/provider/ActiveMSPList.cxx +++ b/scripting/source/provider/ActiveMSPList.cxx @@ -242,8 +242,7 @@ ActiveMSPList::addActiveMSP( const Reference< uno::XInterface >& xComponent, // should probably throw from this method!!, reexamine try { - Reference< lang::XComponent > xBroadcaster = - Reference< lang::XComponent >( xComponent, UNO_QUERY_THROW ); + Reference< lang::XComponent > xBroadcaster( xComponent, UNO_QUERY_THROW ); xBroadcaster->addEventListener( this ); } catch ( const Exception& ) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 57f66b1e0995..1e933df231f7 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -714,14 +714,7 @@ static Reference< XInterface > urihelper_create( static Sequence< OUString > urihelper_getSupportedServiceNames( ) { - OUString serviceNameList[] = { - OUString( - "com.sun.star.script.provider.ScriptURIHelper" ) }; - - Sequence< OUString > serviceNames = Sequence < - OUString > ( serviceNameList, 1 ); - - return serviceNames; + return { "com.sun.star.script.provider.ScriptURIHelper" }; } static OUString urihelper_getImplementationName( ) diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index 2a09e8dbe5ae..172f0ac0ae66 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -252,14 +252,7 @@ ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName ) uno::Sequence< OUString > SAL_CALL ScriptingFrameworkURIHelper::getSupportedServiceNames() { - OUString serviceNameList[] = { - OUString( - "com.sun.star.script.provider.ScriptURIHelper" ) }; - - uno::Sequence< OUString > serviceNames = uno::Sequence < - OUString > ( serviceNameList, 1 ); - - return serviceNames; + return { "com.sun.star.script.provider.ScriptURIHelper" }; } } |