From 8e234c5b7d5bae66c544e581bee5770f3f83dd81 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 08:43:35 +0200 Subject: use initialiser syntax for Sequence 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 Reviewed-by: Noel Grandin --- odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx | 3 +-- odk/examples/cpp/custompanel/ctp_factory.cxx | 3 +-- odk/examples/cpp/remoteclient/remoteclient.cxx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'odk') diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx index b9cf6f17b49b..5278d586bff1 100644 --- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx +++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx @@ -52,8 +52,7 @@ namespace my_sc_impl Sequence< OUString > SAL_CALL getSupportedServiceNames_MyService1Impl() { - Sequence< OUString > names(1); - names[0] = "my_module.MyService1"; + Sequence< OUString > names { "my_module.MyService1" }; return names; } diff --git a/odk/examples/cpp/custompanel/ctp_factory.cxx b/odk/examples/cpp/custompanel/ctp_factory.cxx index f6723f52afcf..0999666406ba 100644 --- a/odk/examples/cpp/custompanel/ctp_factory.cxx +++ b/odk/examples/cpp/custompanel/ctp_factory.cxx @@ -118,8 +118,7 @@ namespace sd { namespace colortoolpanel Sequence< OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames_static() throw (RuntimeException) { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "org.openoffice.example.colorpanel.ToolPanelFactory"; + Sequence< OUString > aServiceNames { "org.openoffice.example.colorpanel.ToolPanelFactory" }; return aServiceNames; } diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx index 373efaee8a24..1c9d043e4a7f 100644 --- a/odk/examples/cpp/remoteclient/remoteclient.cxx +++ b/odk/examples/cpp/remoteclient/remoteclient.cxx @@ -209,8 +209,7 @@ Sequence< OUString > getSupportedServiceNames() MutexGuard guard( Mutex::getGlobalMutex() ); if( !pNames ) { - static Sequence< OUString > seqNames(1); - seqNames[0] = "com.sun.star.bridge.example.RemoteClientSample"; + static Sequence< OUString > seqNames { "com.sun.star.bridge.example.RemoteClientSample" }; pNames = &seqNames; } } -- cgit