summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-21 08:18:57 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-21 10:37:43 +0200
commitaaf8eb1cb09a5072de620269d2474eec622393d1 (patch)
tree8d9f8969edf9b05d872404c21fcbca49ce1d2061 /sw
parent74ac65c49cc1d53b1aa93c2b7c720255867aace2 (diff)
sw: use range-based for loop in textboxhelper
Change-Id: I5275e4bd9e812a1b1229ad67fba671fdb23d2b37
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/textboxhelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 227302d6b2f2..c9959b8200c2 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -172,9 +172,9 @@ sal_Int32 SwTextBoxHelper::getCount(const SwDoc* pDoc)
{
sal_Int32 nRet = 0;
const SwFrameFormats& rSpzFrameFormats = *pDoc->GetSpzFrameFormats();
- for (SwFrameFormats::const_iterator it = rSpzFrameFormats.begin(); it != rSpzFrameFormats.end(); ++it)
+ for (const auto pFormat : rSpzFrameFormats)
{
- if (isTextBox(*it, RES_FLYFRMFMT))
+ if (isTextBox(pFormat, RES_FLYFRMFMT))
++nRet;
}
return nRet;
@@ -531,9 +531,8 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
void SwTextBoxHelper::saveLinks(const SwFrameFormats& rFormats, std::map<const SwFrameFormat*, const SwFrameFormat*>& rLinks)
{
- for (std::size_t i = 0; i < rFormats.size(); ++i)
+ for (const auto pFormat : rFormats)
{
- const SwFrameFormat* pFormat = rFormats[i];
if (SwFrameFormat* pTextBox = getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT))
rLinks[pFormat] = pTextBox;
}