diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-08-17 21:02:20 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-08-17 22:16:38 +0200 |
commit | c5be21da5072a78525ee07bb16dfcf391b8dbf32 (patch) | |
tree | 1fdeeee0c1075cce00137f92d161ce6c472dd1ab /scripting | |
parent | cc70a9dec7730661aacd5fe7ed62f0a29ebf1084 (diff) |
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in scaddins, scripting
Change-Id: I92e6380f535aec12c1f1c5c51d8b544c8a7d9611
Reviewed-on: https://gerrit.libreoffice.org/77650
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/dlgprov/dlgprov.cxx | 8 | ||||
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 5 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 13 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProviderFactory.cxx | 8 | ||||
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 6 |
5 files changed, 12 insertions, 28 deletions
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 59bfbdfe041f..ef5673bafbfd 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -166,11 +166,9 @@ namespace dlgprov static Sequence< OUString > getSupportedServiceNames_DialogProviderImpl() { - Sequence< OUString > aNames(3); - aNames[0] = "com.sun.star.awt.DialogProvider"; - aNames[1] = "com.sun.star.awt.DialogProvider2"; - aNames[2] = "com.sun.star.awt.ContainerWindowProvider"; - return aNames; + return { "com.sun.star.awt.DialogProvider", + "com.sun.star.awt.DialogProvider2", + "com.sun.star.awt.ContainerWindowProvider" }; } diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index e89452c3c971..92ce1be6c273 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -623,10 +623,7 @@ BrowseNodeFactoryImpl::getOrganizerHierarchy() Sequence< OUString > bnf_getSupportedServiceNames( ) { - OUString str_name( - "com.sun.star.script.browse.BrowseNodeFactory"); - - return Sequence< OUString >( &str_name, 1 ); + return { "com.sun.star.script.browse.BrowseNodeFactory" }; } OUString diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index ca84b2599888..8fb19dc8ac09 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -688,13 +688,9 @@ static Reference< XInterface > sp_create( static Sequence< OUString > sp_getSupportedServiceNames( ) { - OUString names[3]; - - names[0] = "com.sun.star.script.provider.MasterScriptProvider"; - names[1] = "com.sun.star.script.browse.BrowseNode"; - names[2] = "com.sun.star.script.provider.ScriptProvider"; - - return Sequence< OUString >( names, 3 ); + return { "com.sun.star.script.provider.MasterScriptProvider", + "com.sun.star.script.browse.BrowseNode", + "com.sun.star.script.provider.ScriptProvider" }; } @@ -718,8 +714,7 @@ static Sequence< OUString > urihelper_getSupportedServiceNames( ) static OUString urihelper_getImplementationName( ) { - return - "com.sun.star.script.provider.ScriptURIHelper"; + return "com.sun.star.script.provider.ScriptURIHelper"; } static const struct cppu::ImplementationEntry s_entries [] = diff --git a/scripting/source/provider/MasterScriptProviderFactory.cxx b/scripting/source/provider/MasterScriptProviderFactory.cxx index 3a6d74ac9598..fd93894b6e94 100644 --- a/scripting/source/provider/MasterScriptProviderFactory.cxx +++ b/scripting/source/provider/MasterScriptProviderFactory.cxx @@ -64,16 +64,12 @@ MasterScriptProviderFactory::getActiveMSPList() const Sequence< OUString > mspf_getSupportedServiceNames( ) { - OUString str_name( - "com.sun.star.script.provider.MasterScriptProviderFactory"); - - return Sequence< OUString >( &str_name, 1 ); + return { "com.sun.star.script.provider.MasterScriptProviderFactory" }; } OUString mspf_getImplementationName( ) { - return - "com.sun.star.script.provider.MasterScriptProviderFactory"; + return "com.sun.star.script.provider.MasterScriptProviderFactory"; } Reference< XInterface > diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 7696956fdcc2..c6ba9161a549 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -585,8 +585,7 @@ public: css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - const OUString strName( getImplementationName() ); - return Sequence< OUString >( &strName, 1 ); + return { getImplementationName() }; } protected: @@ -931,8 +930,7 @@ public: css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - const OUString strName( getImplementationName() ); - return Sequence< OUString >( &strName, 1 ); + return { getImplementationName() }; } }; |