summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/afmtuno.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-01-06 15:02:59 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-07 07:24:05 +0100
commit892a5cfe557edb405ec0037676f02a1c24dd76ec (patch)
treebb023d0858cd0f34ded726e2b54933a2481cc6b1 /sc/source/ui/unoobj/afmtuno.cxx
parent4cd19e16ce24cd244e3a5a3c23add91a8f980790 (diff)
Simplify containers iterations in sc/source/ui/{unoobj,vba}
Use range-based loop or replace with STL functions Change-Id: Ia8a8cfb71047e5612aa62c817c76ae0dfb7b3fa2 Reviewed-on: https://gerrit.libreoffice.org/65903 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/afmtuno.cxx')
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 83533d2715d9..81aee84f9a3d 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -333,10 +333,11 @@ uno::Sequence<OUString> SAL_CALL ScAutoFormatsObj::getElementNames()
ScAutoFormat* pFormats = ScGlobal::GetOrCreateAutoFormat();
uno::Sequence<OUString> aSeq(pFormats->size());
OUString* pAry = aSeq.getArray();
- ScAutoFormat::const_iterator it = pFormats->begin(), itEnd = pFormats->end();
- for (size_t i = 0; it != itEnd; ++it, ++i)
+ size_t i = 0;
+ for (const auto& rEntry : *pFormats)
{
- pAry[i] = it->second->GetName();
+ pAry[i] = rEntry.second->GetName();
+ ++i;
}
return aSeq;
}