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 /xmlscript/source/xmlflat_imexp | |
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 'xmlscript/source/xmlflat_imexp')
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_import.cxx | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx index 79d4255c0917..99b1b8001fa1 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx @@ -48,8 +48,7 @@ namespace xmlscript Sequence< OUString > getSupportedServiceNames_XMLBasicExporter() { - Sequence< OUString > aNames(1); - aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter"; + Sequence< OUString > aNames { "com.sun.star.document.XMLBasicExporter" }; return aNames; } @@ -60,8 +59,7 @@ namespace xmlscript Sequence< OUString > getSupportedServiceNames_XMLOasisBasicExporter() { - Sequence< OUString > aNames(1); - aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter"; + Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicExporter" }; return aNames; } diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx index c1cf9b7c5a00..8dae8df85c1e 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx @@ -506,8 +506,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x Sequence< OUString > getSupportedServiceNames_XMLBasicImporter() { - Sequence< OUString > aNames(1); - aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter"; + Sequence< OUString > aNames { "com.sun.star.document.XMLBasicImporter" }; return aNames; } @@ -518,8 +517,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x Sequence< OUString > getSupportedServiceNames_XMLOasisBasicImporter() { - Sequence< OUString > aNames(1); - aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter"; + Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicImporter" }; return aNames; } |