diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-06 17:07:05 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-08 21:23:39 +0200 |
commit | 3e8989d47e3116a99d4b9f6d03800464ff235de8 (patch) | |
tree | 5e687f16a46c4fe52d18fdb5d7f856a601c1cc71 /sw/qa/extras/inc/swmodeltestbase.hxx | |
parent | 1458d43690684c5ce6ed4409bef34a23cfbab7f2 (diff) |
Simplify Sequence iterations in sw/qa/* and sw/source/core/*
Use range-based loops, STL and comphelper functions
Change-Id: I5bd910a86bd80c553cd4a0c044a8eb61084f77ae
Reviewed-on: https://gerrit.libreoffice.org/75167
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sw/qa/extras/inc/swmodeltestbase.hxx')
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index fac758a30ccf..db18b5d9b9be 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -603,15 +603,10 @@ protected: { uno::Sequence< beans::PropertyValue > aPropertyValue; xLevels->getByIndex(nNumberingLevel) >>= aPropertyValue; - for( int j = 0 ; j< aPropertyValue.getLength() ; ++j) - { - beans::PropertyValue aProp= aPropertyValue[j]; - if (aProp.Name == "NumberingType") - { - nNumberingType = aProp.Value.get<sal_Int16>(); - break; - } - } + auto pProp = std::find_if(aPropertyValue.begin(), aPropertyValue.end(), + [](const beans::PropertyValue& rProp) { return rProp.Name == "NumberingType"; }); + if (pProp != aPropertyValue.end()) + nNumberingType = pProp->Value.get<sal_Int16>(); } } return nNumberingType; |