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 /chart2 | |
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 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 3 | ||||
-rw-r--r-- | chart2/source/model/template/GL3DBarChartType.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/Scaling.cxx | 12 | ||||
-rw-r--r-- | chart2/source/view/axes/DateScaling.cxx | 3 |
4 files changed, 7 insertions, 14 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index b9631018f251..e969b51f9446 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1460,8 +1460,7 @@ uno::Sequence< OUString > SAL_CALL ChartController::getAvailableServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aServiceNames(1); - aServiceNames[0] = CHART_ACCESSIBLE_TEXT_SERVICE_NAME; + uno::Sequence< OUString > aServiceNames { CHART_ACCESSIBLE_TEXT_SERVICE_NAME }; return aServiceNames; } diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx index b4dbd06cfaf9..09d62f2280b2 100644 --- a/chart2/source/model/template/GL3DBarChartType.cxx +++ b/chart2/source/model/template/GL3DBarChartType.cxx @@ -142,8 +142,7 @@ OUString SAL_CALL GL3DBarChartType::getChartType() uno::Sequence<OUString> GL3DBarChartType::getSupportedPropertyRoles() throw (::com::sun::star::uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aPropRoles(1); - aPropRoles[0] = "FillColor"; + uno::Sequence< OUString > aPropRoles { "FillColor" }; return aPropRoles; } diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx index 87237d0154af..d61b359a99ab 100644 --- a/chart2/source/tools/Scaling.cxx +++ b/chart2/source/tools/Scaling.cxx @@ -79,8 +79,7 @@ OUString SAL_CALL LogarithmicScaling::getServiceName() uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSeq(1); - aSeq.getArray()[0] = lcl_aServiceName_Logarithmic; + uno::Sequence< OUString > aSeq { lcl_aServiceName_Logarithmic }; return aSeq; } @@ -148,8 +147,7 @@ OUString SAL_CALL ExponentialScaling::getServiceName() uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSeq(1); - aSeq.getArray()[0] = lcl_aServiceName_Exponential; + uno::Sequence< OUString > aSeq { lcl_aServiceName_Exponential }; return aSeq; } @@ -221,8 +219,7 @@ OUString SAL_CALL LinearScaling::getServiceName() uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSeq(1); - aSeq.getArray()[0] = lcl_aServiceName_Linear; + uno::Sequence< OUString > aSeq { lcl_aServiceName_Linear }; return aSeq; } @@ -293,8 +290,7 @@ PowerScaling::getServiceName() uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSeq(1); - aSeq.getArray()[0] = lcl_aServiceName_Power; + uno::Sequence< OUString > aSeq { lcl_aServiceName_Power }; return aSeq; } diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx index 52d8ef7890a0..d1ee1d9c6e53 100644 --- a/chart2/source/view/axes/DateScaling.cxx +++ b/chart2/source/view/axes/DateScaling.cxx @@ -106,8 +106,7 @@ OUString SAL_CALL DateScaling::getServiceName() uno::Sequence< OUString > DateScaling::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSeq(1); - aSeq.getArray()[0] = lcl_aServiceName_DateScaling; + uno::Sequence< OUString > aSeq { lcl_aServiceName_DateScaling }; return aSeq; } |