summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}