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 /extensions | |
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 'extensions')
18 files changed, 22 insertions, 44 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 586b9b617c7b..d89df18482c4 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -206,8 +206,7 @@ css::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedSer { // return only top level services ... // base services are included there and should be asked by uno-rtti. - css::uno::Sequence< OUString > lNames(1); - lNames[0] = "com.sun.star.frame.Bibliography"; + css::uno::Sequence< OUString > lNames { "com.sun.star.frame.Bibliography" }; return lNames; } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 4db4a39ab177..3f23ca06d487 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -183,8 +183,7 @@ namespace dbp OUString sStatement = "SELECT " + OUString( getSettings().sListContentField ) + ", " + OUString( getSettings().sLinkedListField ) + " FROM " + OUString( getSettings().sListContentTable ); - Sequence< OUString > aListSource(1); - aListSource[0] = sStatement; + Sequence< OUString > aListSource { sStatement }; getContext().xObjectModel->setPropertyValue("ListSource", makeAny(aListSource)); } else diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx index d7169df6809e..52bcf33f6f0b 100644 --- a/extensions/source/dbpilots/wizardservices.cxx +++ b/extensions/source/dbpilots/wizardservices.cxx @@ -63,8 +63,7 @@ namespace dbp Sequence< OUString > OGroupBoxSI::getServiceNames() { - Sequence< OUString > aReturn(1); - aReturn[0] = "com.sun.star.sdb.GroupBoxAutoPilot"; + Sequence< OUString > aReturn { "com.sun.star.sdb.GroupBoxAutoPilot" }; return aReturn; } @@ -76,8 +75,7 @@ namespace dbp Sequence< OUString > OListComboSI::getServiceNames() { - Sequence< OUString > aReturn(1); - aReturn[0] = "com.sun.star.sdb.ListComboBoxAutoPilot"; + Sequence< OUString > aReturn { "com.sun.star.sdb.ListComboBoxAutoPilot" }; return aReturn; } @@ -89,8 +87,7 @@ namespace dbp Sequence< OUString > OGridSI::getServiceNames() { - Sequence< OUString > aReturn(1); - aReturn[0] = "com.sun.star.sdb.GridControlAutoPilot"; + Sequence< OUString > aReturn { "com.sun.star.sdb.GridControlAutoPilot" }; return aReturn; } diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index ed2584396ac3..e5db0639468e 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -288,8 +288,7 @@ namespace logging Sequence< OUString > SAL_CALL ConsoleHandler::getSupportedServiceNames_static() { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "com.sun.star.logging.ConsoleHandler"; + Sequence< OUString > aServiceNames { "com.sun.star.logging.ConsoleHandler" }; return aServiceNames; } diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx index 1d3a45936b60..87503f3f8283 100644 --- a/extensions/source/logging/csvformatter.cxx +++ b/extensions/source/logging/csvformatter.cxx @@ -333,8 +333,7 @@ namespace logging Sequence< OUString > SAL_CALL CsvFormatter::getSupportedServiceNames_static() { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "com.sun.star.logging.CsvFormatter"; + Sequence< OUString > aServiceNames { "com.sun.star.logging.CsvFormatter" }; return aServiceNames; } diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index 0a0b71f8b433..52c4c368aa50 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -386,8 +386,7 @@ namespace logging Sequence< OUString > SAL_CALL FileHandler::getSupportedServiceNames_static() { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "com.sun.star.logging.FileHandler"; + Sequence< OUString > aServiceNames { "com.sun.star.logging.FileHandler" }; return aServiceNames; } diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index 2bafe5a625a8..e9b2944257b6 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -248,8 +248,7 @@ namespace logging Sequence< OUString > SAL_CALL EventLogger::getSupportedServiceNames() throw(RuntimeException, std::exception) { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "com.sun.star.logging.Logger"; + Sequence< OUString > aServiceNames { "com.sun.star.logging.Logger" }; return aServiceNames; } @@ -280,8 +279,7 @@ namespace logging Sequence< OUString > SAL_CALL LoggerPool::getSupportedServiceNames_static() { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = getSingletonName_static(); + Sequence< OUString > aServiceNames { getSingletonName_static() }; return aServiceNames; } diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx index 70844f6a862a..585b5e864ff3 100644 --- a/extensions/source/logging/plaintextformatter.cxx +++ b/extensions/source/logging/plaintextformatter.cxx @@ -171,8 +171,7 @@ namespace logging Sequence< OUString > SAL_CALL PlainTextFormatter::getSupportedServiceNames_static() { - Sequence< OUString > aServiceNames(1); - aServiceNames[0] = "com.sun.star.logging.PlainTextFormatter"; + Sequence< OUString > aServiceNames { "com.sun.star.logging.PlainTextFormatter" }; return aServiceNames; } diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index beda2073a375..3276503eb7e1 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -89,8 +89,7 @@ namespace pcr Sequence< OUString > DefaultFormComponentInspectorModel::getSupportedServiceNames_static( ) throw(RuntimeException) { - Sequence< OUString > aSupported(1); - aSupported[0] = "com.sun.star.form.inspection.DefaultFormComponentInspectorModel"; + Sequence< OUString > aSupported { "com.sun.star.form.inspection.DefaultFormComponentInspectorModel" }; return aSupported; } diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx index 79f73213f8fe..414d6008f416 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.cxx +++ b/extensions/source/propctrlr/defaulthelpprovider.cxx @@ -77,8 +77,7 @@ namespace pcr Sequence< OUString > DefaultHelpProvider::getSupportedServiceNames_static( ) throw(RuntimeException) { - Sequence< OUString > aSupported(1); - aSupported[0] = "com.sun.star.inspection.DefaultHelpProvider"; + Sequence< OUString > aSupported { "com.sun.star.inspection.DefaultHelpProvider" }; return aSupported; } diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx index 9a6006441983..0853c3c44aed 100644 --- a/extensions/source/propctrlr/formcontroller.cxx +++ b/extensions/source/propctrlr/formcontroller.cxx @@ -137,8 +137,7 @@ namespace pcr Sequence< OUString > FormController::getSupportedServiceNames_static( ) throw(RuntimeException) { - Sequence< OUString > aSupported(1); - aSupported[0] = "com.sun.star.form.PropertyBrowserController"; + Sequence< OUString > aSupported { "com.sun.star.form.PropertyBrowserController" }; return aSupported; } @@ -265,8 +264,7 @@ namespace pcr Sequence< OUString > DialogController::getSupportedServiceNames_static( ) throw(RuntimeException) { - Sequence< OUString > aSupported(1); - aSupported[0] = "com.sun.star.awt.PropertyBrowserController"; + Sequence< OUString > aSupported { "com.sun.star.awt.PropertyBrowserController" }; return aSupported; } diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 8c05b4cecdf3..3370c443ee54 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -507,8 +507,7 @@ namespace pcr Sequence< OUString > SAL_CALL FormGeometryHandler::getActuatingProperties( ) throw (RuntimeException, std::exception) { - Sequence< OUString > aInterestedIn(1); - aInterestedIn[0] = PROPERTY_TEXT_ANCHOR_TYPE; + Sequence< OUString > aInterestedIn { PROPERTY_TEXT_ANCHOR_TYPE }; return aInterestedIn; } diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index bcf766ebd61e..80a24fdd3abd 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -583,8 +583,7 @@ namespace pcr Sequence< OUString > OPropertyBrowserController::getSupportedServiceNames_static( ) throw(RuntimeException) { - Sequence< OUString > aSupported(1); - aSupported[0] = "com.sun.star.inspection.ObjectInspector"; + Sequence< OUString > aSupported { "com.sun.star.inspection.ObjectInspector" }; return aSupported; } diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 310e0c8dd20c..1be13ed9f42b 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -625,8 +625,7 @@ OUString SAL_CALL _getImplementationName() { uno::Sequence< OUString > SAL_CALL _getSupportedServiceNames() { - uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.inspection.StringRepresentation"; + uno::Sequence< OUString > s { "com.sun.star.inspection.StringRepresentation" }; return s; } diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index e8b29d784b6d..f0254c51994f 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -494,8 +494,7 @@ UpdateCheckConfig::clearUpdateFound() uno::Sequence< OUString > UpdateCheckConfig::getServiceNames() { - uno::Sequence< OUString > aServiceList(1); - aServiceList[0] = "com.sun.star.setup.UpdateCheckConfig"; + uno::Sequence< OUString > aServiceList { "com.sun.star.setup.UpdateCheckConfig" }; return aServiceList; } diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 1b3c2272ff0c..b2051c86ceba 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -162,8 +162,7 @@ UpdateCheckJob::~UpdateCheckJob() uno::Sequence< OUString > UpdateCheckJob::getServiceNames() { - uno::Sequence< OUString > aServiceList(1); - aServiceList[0] = "com.sun.star.setup.UpdateCheck"; + uno::Sequence< OUString > aServiceList { "com.sun.star.setup.UpdateCheck" }; return aServiceList; }; diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index bbf21be7a85a..47b23c7d7d5c 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -719,8 +719,7 @@ UpdateInformationProvider::getInteractionHandler() uno::Sequence< OUString > UpdateInformationProvider::getServiceNames() { - uno::Sequence< OUString > aServiceList(1); - aServiceList[0] = "com.sun.star.deployment.UpdateInformationProvider"; + uno::Sequence< OUString > aServiceList { "com.sun.star.deployment.UpdateInformationProvider" }; return aServiceList; }; diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index a9335156d968..a168e5e8acec 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -69,8 +69,7 @@ using namespace ::com::sun::star; static uno::Sequence< OUString > getServiceNames() { - uno::Sequence< OUString > aServiceList(1); - aServiceList[0] = "com.sun.star.setup.UpdateCheckUI"; + uno::Sequence< OUString > aServiceList { "com.sun.star.setup.UpdateCheckUI" }; return aServiceList; } |