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 /svl | |
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 'svl')
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 6 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index bb70c8c7a1a8..01cb71453c5c 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -1016,8 +1016,7 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() if ( !GetContent() ) throw io::IOException(); // TODO: error handling - uno::Sequence< OUString > aProps( 1 ); - aProps[0] = "Title"; + uno::Sequence<OUString> aProps { "Title" }; ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; sal_Int32 nSize = 0; @@ -1122,8 +1121,7 @@ sal_Bool SAL_CALL FSStorage::hasElements() if ( !GetContent() ) throw io::IOException(); // TODO: error handling - uno::Sequence< OUString > aProps( 1 ); - aProps[0] = "TargetURL"; + uno::Sequence<OUString> aProps { "TargetURL" }; ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude ); diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 2c41772352c8..fde28a2195c7 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -265,8 +265,7 @@ void StorageItem::setUseStorage( bool bUse ) bool StorageItem::useStorage() { - Sequence< OUString > aNodeNames( 1 ); - aNodeNames[0] = "UseStorage"; + Sequence<OUString> aNodeNames { "UseStorage" }; Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames ); |