diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:18:55 +0000 |
commit | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch) | |
tree | 846cce228d7ff120abc40b7767b251c2e04b2a30 /reportdesign | |
parent | 35f5833ca35dc170b67ed9f8e288302eb06eb972 (diff) |
use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"
Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/Group.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/core/api/Section.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/dbloader2.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/statusbarcontroller.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/toolboxcontroller.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx index bf218eade1cf..fb62e431630d 100644 --- a/reportdesign/source/core/api/Group.cxx +++ b/reportdesign/source/core/api/Group.cxx @@ -66,8 +66,7 @@ OUString SAL_CALL OGroup::getImplementationName( ) throw(uno::RuntimeException, uno::Sequence< OUString> OGroup::getSupportedServiceNames_Static() throw( uno::RuntimeException ) { - uno::Sequence< OUString> aSupported(1); - aSupported.getArray()[0] = SERVICE_GROUP; + uno::Sequence<OUString> aSupported { SERVICE_GROUP }; return aSupported; } diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index e5f1534f4799..f203f890fe4b 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -179,8 +179,7 @@ OUString SAL_CALL OSection::getImplementationName( ) throw(uno::RuntimeExceptio uno::Sequence< OUString> OSection::getSupportedServiceNames_Static() throw( uno::RuntimeException ) { - uno::Sequence< OUString> aSupported(1); - aSupported.getArray()[0] = SERVICE_SECTION; + uno::Sequence<OUString> aSupported { SERVICE_SECTION }; return aSupported; } diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx index b193f60b2b97..27cf78f34dd1 100644 --- a/reportdesign/source/filter/xml/dbloader2.cxx +++ b/reportdesign/source/filter/xml/dbloader2.cxx @@ -106,8 +106,7 @@ Sequence< OUString > SAL_CALL ORptTypeDetection::getSupportedServiceNames() thro // ORegistryServiceManager_Static Sequence< OUString > ORptTypeDetection::getSupportedServiceNames_Static() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.document.ExtendedTypeDetection"; + Sequence<OUString> aSNS { "com.sun.star.document.ExtendedTypeDetection" }; return aSNS; } diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index 4bd397eba5b7..4d3a5fd67de7 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -52,8 +52,7 @@ OUString OStatusbarController::getImplementationName_Static() throw( RuntimeExce Sequence< OUString> OStatusbarController::getSupportedServiceNames_Static() throw( RuntimeException ) { - Sequence< OUString> aSupported(1); - aSupported[0] = "com.sun.star.frame.StatusbarController"; + Sequence<OUString> aSupported { "com.sun.star.frame.StatusbarController" }; return aSupported; } diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index d13d1956e848..6589bf28e5ec 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -66,8 +66,7 @@ OUString OToolboxController::getImplementationName_Static() throw( RuntimeExcept Sequence< OUString> OToolboxController::getSupportedServiceNames_Static() throw( RuntimeException ) { - Sequence< OUString> aSupported(1); - aSupported[0] = "com.sun.star.report.ReportToolboxController"; + Sequence<OUString> aSupported { "com.sun.star.report.ReportToolboxController" }; return aSupported; } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 3235aa69fafb..15b667931407 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -267,8 +267,7 @@ OUString OReportController::getImplementationName_Static() throw( RuntimeExcepti Sequence< OUString> OReportController::getSupportedServiceNames_Static() throw( RuntimeException ) { - Sequence< OUString> aSupported(1); - aSupported[0] = "com.sun.star.sdb.ReportDesign"; + Sequence<OUString> aSupported { "com.sun.star.sdb.ReportDesign" }; return aSupported; } |