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 /svtools/source | |
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 'svtools/source')
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 3 | ||||
-rw-r--r-- | svtools/source/config/extcolorcfg.cxx | 3 | ||||
-rw-r--r-- | svtools/source/control/vclxaccessibleheaderbaritem.cxx | 3 | ||||
-rw-r--r-- | svtools/source/uno/fpicker.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/wizard/unowizard.cxx | 3 |
5 files changed, 6 insertions, 12 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index f08cd6ffdf3a..38eb93d7cf29 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -332,8 +332,7 @@ bool ColorConfig_Impl::AddScheme(const OUString& rScheme) bool ColorConfig_Impl::RemoveScheme(const OUString& rScheme) { - uno::Sequence< OUString > aElements(1); - aElements.getArray()[0] = rScheme; + uno::Sequence< OUString > aElements { rScheme }; return ClearNodeElements("ColorSchemes", aElements); } diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 9c1e0a66ed72..85855328076b 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -505,8 +505,7 @@ bool ExtendedColorConfig_Impl::AddScheme(const OUString& rScheme) bool ExtendedColorConfig_Impl::RemoveScheme(const OUString& rScheme) { - uno::Sequence< OUString > aElements(1); - aElements.getArray()[0] = rScheme; + uno::Sequence< OUString > aElements { rScheme }; return ClearNodeElements("ExtendedColorScheme/ColorSchemes", aElements); } diff --git a/svtools/source/control/vclxaccessibleheaderbaritem.cxx b/svtools/source/control/vclxaccessibleheaderbaritem.cxx index fd4fe47d9268..4979614f2f8e 100644 --- a/svtools/source/control/vclxaccessibleheaderbaritem.cxx +++ b/svtools/source/control/vclxaccessibleheaderbaritem.cxx @@ -125,8 +125,7 @@ sal_Bool VCLXAccessibleHeaderBarItem::supportsService( const OUString& rServiceN Sequence< OUString > VCLXAccessibleHeaderBarItem::getSupportedServiceNames() throw (RuntimeException, std::exception) { - Sequence< OUString > aNames(1); - aNames[0] = "com.sun.star.awt.AccessibleHeaderBarItem"; + Sequence< OUString > aNames { "com.sun.star.awt.AccessibleHeaderBarItem" }; return aNames; } diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx index f1cff13f2242..bed1a8c7f17c 100644 --- a/svtools/source/uno/fpicker.cxx +++ b/svtools/source/uno/fpicker.cxx @@ -106,8 +106,7 @@ OUString SAL_CALL FilePicker_getImplementationName() Sequence< OUString > FilePicker_getSupportedServiceNames() { - Sequence< OUString > aServiceNames(1); - aServiceNames.getArray()[0] = "com.sun.star.ui.dialogs.FilePicker"; + Sequence< OUString > aServiceNames { "com.sun.star.ui.dialogs.FilePicker" }; return aServiceNames; } @@ -176,8 +175,7 @@ OUString SAL_CALL FolderPicker_getImplementationName() Sequence< OUString > FolderPicker_getSupportedServiceNames() { - Sequence< OUString > aServiceNames(1); - aServiceNames.getArray()[0] = "com.sun.star.ui.dialogs.FolderPicker"; + Sequence< OUString > aServiceNames { "com.sun.star.ui.dialogs.FolderPicker" }; return aServiceNames; } diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index c88f10a83a79..d3b5d7bc30f1 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -294,8 +294,7 @@ namespace { Sequence< OUString > SAL_CALL Wizard::getSupportedServiceNames() throw(RuntimeException, std::exception) { - Sequence< OUString > aServices(1); - aServices[0] = "com.sun.star.ui.dialogs.Wizard"; + Sequence< OUString > aServices { "com.sun.star.ui.dialogs.Wizard" }; return aServices; } |