diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 08:43:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 10:13:08 +0000 |
commit | 8e234c5b7d5bae66c544e581bee5770f3f83dd81 (patch) | |
tree | 7d78f03ce2231de4f727d1135449aeb8cba74e99 /stoc | |
parent | 3bdd176731c351638f541a37b94094124f3c9f52 (diff) |
use initialiser syntax for Sequence<OUString>
replaced using the script:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi
-e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"
Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 3 | ||||
-rw-r--r-- | stoc/source/defaultregistry/defaultregistry.cxx | 3 | ||||
-rw-r--r-- | stoc/source/implementationregistration/implreg.cxx | 3 | ||||
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 3 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 3 | ||||
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 3 | ||||
-rw-r--r-- | stoc/source/namingservice/namingservice.cxx | 3 | ||||
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 3 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 3 | ||||
-rw-r--r-- | stoc/source/uriproc/ExternalUriReferenceTranslator.cxx | 3 | ||||
-rw-r--r-- | stoc/source/uriproc/UriReferenceFactory.cxx | 3 | ||||
-rw-r--r-- | stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx | 3 | ||||
-rw-r--r-- | stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 3 | ||||
-rw-r--r-- | stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx | 3 |
14 files changed, 14 insertions, 28 deletions
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index fc077043f219..09461f4107c7 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -48,8 +48,7 @@ static const sal_Int32 CACHE_SIZE = 256; static Sequence< OUString > core_getSupportedServiceNames() { - Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = "com.sun.star.reflection.CoreReflection"; + Sequence< OUString > seqNames { "com.sun.star.reflection.CoreReflection" }; return seqNames; } diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index a77906f323d3..c57b8c8e4eb8 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -1196,8 +1196,7 @@ sal_Bool SAL_CALL NestedRegistryImpl::supportsService( const OUString& ServiceNa Sequence<OUString> SAL_CALL NestedRegistryImpl::getSupportedServiceNames( ) throw(RuntimeException, std::exception) { - Sequence< OUString > seqNames(1); - seqNames[0] = "com.sun.star.registry.NestedRegistry"; + Sequence< OUString > seqNames { "com.sun.star.registry.NestedRegistry" }; return seqNames; } diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 08bf4a8fafcb..886ead94c8b4 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1301,8 +1301,7 @@ sal_Bool ImplementationRegistration::supportsService(const OUString& ServiceName // XServiceInfo Sequence< OUString > ImplementationRegistration::getSupportedServiceNames() throw(RuntimeException, std::exception) { - Sequence< OUString > seqNames(1); - seqNames[0] = "com.sun.star.registry.ImplementationRegistration"; + Sequence< OUString > seqNames { "com.sun.star.registry.ImplementationRegistration" }; return seqNames; } diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 74d3f1decad9..acb08095ffec 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -69,8 +69,7 @@ namespace stoc_inv { static Sequence< OUString > inv_getSupportedServiceNames() { - Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = SERVICENAME; + Sequence< OUString > seqNames { SERVICENAME }; return seqNames; } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 8e39086c7874..081f10636477 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -61,8 +61,7 @@ namespace stoc_invadp static Sequence< OUString > invadp_getSupportedServiceNames() { - Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = "com.sun.star.script.InvocationAdapterFactory"; + Sequence< OUString > seqNames { "com.sun.star.script.InvocationAdapterFactory" }; return seqNames; } diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 2af460369720..0062ef1e0922 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -102,8 +102,7 @@ sal_Bool SAL_CALL DllComponentLoader::supportsService( const OUString& ServiceNa Sequence<OUString> SAL_CALL DllComponentLoader::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) { - Sequence< OUString > seqNames(1); - seqNames[0] = "com.sun.star.loader.SharedLibrary"; + Sequence< OUString > seqNames { "com.sun.star.loader.SharedLibrary" }; return seqNames; } diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index e276b1ed1aef..99426ea03151 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -52,8 +52,7 @@ namespace stoc_namingservice static Sequence< OUString > ns_getSupportedServiceNames() { - Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = SERVICENAME; + Sequence< OUString > seqNames { SERVICENAME }; return seqNames; } diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 31c74862f79d..5c4f7abf0047 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -103,8 +103,7 @@ private: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > names(1); - names[0] = "com.sun.star.registry.SimpleRegistry"; + css::uno::Sequence< OUString > names { "com.sun.star.registry.SimpleRegistry" }; return names; } diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 46c06225f920..9ee51a6e3fad 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -283,8 +283,7 @@ sal_Bool TypeConverter_Impl::supportsService(const OUString& ServiceName) throw( // XServiceInfo Sequence< OUString > TypeConverter_Impl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = "com.sun.star.script.Converter"; + Sequence< OUString > seqNames { "com.sun.star.script.Converter" }; return seqNames; } diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index 0737c8544f17..3dde5b31539c 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -88,8 +88,7 @@ sal_Bool Translator::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > Translator::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.uri.ExternalUriReferenceTranslator"; + css::uno::Sequence< OUString > s { "com.sun.star.uri.ExternalUriReferenceTranslator" }; return s; } diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 2c5a34a415fc..e8d3c6acb86f 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -321,8 +321,7 @@ sal_Bool Factory::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > Factory::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.uri.UriReferenceFactory"; + css::uno::Sequence< OUString > s { "com.sun.star.uri.UriReferenceFactory" }; return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx index ac0ceececa94..263795825bc5 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx @@ -193,8 +193,7 @@ sal_Bool Parser::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > Parser::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand"; + css::uno::Sequence< OUString > s { "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand" }; return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index b6811f8a27c0..b2f6c6da2b3a 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -413,8 +413,7 @@ sal_Bool Parser::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > Parser::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"; + css::uno::Sequence< OUString > s { "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript" }; return s; } diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index 48f36f79215c..5bb9fb09b868 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -88,8 +88,7 @@ sal_Bool Factory::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > Factory::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"; + css::uno::Sequence< OUString > s { "com.sun.star.uri.VndSunStarPkgUrlReferenceFactory" }; return s; } |