summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoidx.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-05 14:57:19 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 08:13:49 +0100
commitdb601f697acff89e216228f2d5828b1563e58aa0 (patch)
tree109c256e249cc270480c7130807699c51d8b75cf /sw/source/core/unocore/unoidx.cxx
parent9476ecb71b1acc66506a768a5fe0c123afd46b93 (diff)
Simplify containers iterations in sw/source/core/[t-v]*
Use range-based loop or replace with STL functions Change-Id: Ib4a0da0c452dbfa00a1d7ec79f9570e41eda0d41 Reviewed-on: https://gerrit.libreoffice.org/62893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore/unoidx.cxx')
-rw-r--r--sw/source/core/unocore/unoidx.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 9f2eae93fbed..ab2bae1d8aeb 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -2933,17 +2933,15 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 nIndex)
// #i21237#
SwFormTokens aPattern = rTOXBase.GetTOXForm().
GetPattern(static_cast<sal_uInt16>(nIndex));
- SwFormTokens::iterator aIt = aPattern.begin();
sal_Int32 nTokenCount = 0;
uno::Sequence< beans::PropertyValues > aRetSeq;
OUString aProgCharStyle;
- while(aIt != aPattern.end()) // #i21237#
+ for(const SwFormToken& aToken : aPattern) // #i21237#
{
nTokenCount++;
aRetSeq.realloc(nTokenCount);
beans::PropertyValues* pTokenProps = aRetSeq.getArray();
- SwFormToken aToken = *aIt; // #i21237#
uno::Sequence< beans::PropertyValue >& rCurTokenSeq =
pTokenProps[nTokenCount-1];
@@ -3157,8 +3155,6 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 nIndex)
default:
;
}
-
- ++aIt; // #i21237#
}
uno::Any aRet;