summaryrefslogtreecommitdiff
path: root/package/source/zippackage/ZipPackage.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-02-15 00:08:43 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 12:21:28 +0100
commit9d7620613d3ea2feb45a7ff57c4d2544bb1c6fe6 (patch)
tree20e56cfbe9a0bc07974fb14861556da74f3ecddc /package/source/zippackage/ZipPackage.cxx
parent177747c44557489760cc00473daecacd99995427 (diff)
Simplify containers iterations in oox, opencl, package
Use range-based loop or replace with STL functions Change-Id: I91405920d91383bc6cf13b9497d262b1f6f0a84d Reviewed-on: https://gerrit.libreoffice.org/67848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source/zippackage/ZipPackage.cxx')
-rw-r--r--package/source/zippackage/ZipPackage.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index b22b83ec7be0..42c78532a2db 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1103,20 +1103,17 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
uno::Sequence< beans::StringPair > aOverridesSequence(aManList.size());
sal_Int32 nOverSeqLength = 0;
- for ( vector< uno::Sequence< beans::PropertyValue > >::const_iterator aIter = aManList.begin(),
- aEnd = aManList.end();
- aIter != aEnd;
- ++aIter)
+ for (const auto& rMan : aManList)
{
OUString aPath;
OUString aType;
- OSL_ENSURE( ( *aIter )[PKG_MNFST_MEDIATYPE].Name == "MediaType" && ( *aIter )[PKG_MNFST_FULLPATH].Name == "FullPath",
+ OSL_ENSURE( rMan[PKG_MNFST_MEDIATYPE].Name == "MediaType" && rMan[PKG_MNFST_FULLPATH].Name == "FullPath",
"The mediatype sequence format is wrong!" );
- ( *aIter )[PKG_MNFST_MEDIATYPE].Value >>= aType;
+ rMan[PKG_MNFST_MEDIATYPE].Value >>= aType;
if ( !aType.isEmpty() )
{
// only nonempty type makes sense here
- ( *aIter )[PKG_MNFST_FULLPATH].Value >>= aPath;
+ rMan[PKG_MNFST_FULLPATH].Value >>= aPath;
//FIXME: For now we have no way of differentiating defaults from others.
aOverridesSequence[nOverSeqLength].First = "/" + aPath;
aOverridesSequence[nOverSeqLength].Second = aType;