[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Sep 21 08:40:40 UTC 2016
sw/source/core/doc/textboxhelper.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit aaf8eb1cb09a5072de620269d2474eec622393d1
Author: Miklos Vajna <vmiklos at 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;
}
More information about the Libreoffice-commits
mailing list