From 96c26b0d9d10fa9bac3695222980d7145f0342d7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 13:17:00 +0200 Subject: use initialiser for Sequence using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx | 3 +-- odk/examples/cpp/complextoolbarcontrols/exports.cxx | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'odk/examples') diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx index a1950a492791..671fbd26794d 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx @@ -88,8 +88,7 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( ) { /// which service is supported /// for more information @see com.sun.star.sdbc.Driver - Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); + Sequence aSNS { ::rtl::OUString("com.sun.star.sdbc.Driver") }; return aSNS; } diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx index 35a4f3910128..f66191eca316 100644 --- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx @@ -39,14 +39,12 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa if (sImplName == MYLISTENER_IMPLEMENTATIONNAME) { - css::uno::Sequence< ::rtl::OUString > lNames(1); - lNames[0] = MYLISTENER_IMPLEMENTATIONNAME; + css::uno::Sequence lNames { MYLISTENER_IMPLEMENTATIONNAME }; xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyListener::st_createInstance, lNames); } else if (sImplName == MYPROTOCOLHANDLER_IMPLEMENTATIONNAME) { - css::uno::Sequence< ::rtl::OUString > lNames(1); - lNames[0] = MYPROTOCOLHANDLER_SERVICENAME; + css::uno::Sequence lNames { MYPROTOCOLHANDLER_SERVICENAME }; xFactory = ::cppu::createSingleComponentFactory(MyProtocolHandler_createInstance, sImplName, lNames); } -- cgit