sw/source/core/doc/textboxhelper.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit aaf8eb1cb09a5072de620269d2474eec622393d1 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Sep 21 08:18:57 2016 +0200 sw: use range-based for loop in textboxhelper Change-Id: I5275e4bd9e812a1b1229ad67fba671fdb23d2b37 diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 227302d..c9959b8 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits