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 /package | |
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 'package')
-rw-r--r-- | package/source/xstor/xstorage.cxx | 3 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 3 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 5a275fc177c5..0ce08dffbd84 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -118,8 +118,7 @@ void OStorage_Impl::completeStorageStreamCopy_Impl( // TODO: headers of encripted streams should be copied also ::comphelper::OStorageHelper::CopyInputToOutput( xSourceInStream, xDestOutStream ); - uno::Sequence< OUString > aPropNames( 1 ); - aPropNames[0] = "Compressed"; + uno::Sequence<OUString> aPropNames { "Compressed" }; if ( nStorageType == embed::StorageFormats::PACKAGE ) { diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index f0b61e64cdec..1fe2cffbae9e 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1634,8 +1634,7 @@ OUString ZipPackage::static_getImplementationName() Sequence< OUString > ZipPackage::static_getSupportedServiceNames() { - uno::Sequence< OUString > aNames( 1 ); - aNames[0] = "com.sun.star.packages.Package"; + uno::Sequence<OUString> aNames { "com.sun.star.packages.Package" }; return aNames; } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index f99fbda5bbc3..0b4cf3f5990f 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -1382,8 +1382,7 @@ OUString ZipPackageStream::getImplementationName() Sequence< OUString > ZipPackageStream::getSupportedServiceNames() throw ( RuntimeException, std::exception ) { - Sequence< OUString > aNames( 1 ); - aNames[0] = "com.sun.star.packages.PackageStream"; + Sequence<OUString> aNames { "com.sun.star.packages.PackageStream" }; return aNames; } |