summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-07-24 23:00:23 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-07-25 09:47:51 +0200
commit41c5d4c4f83b09f2fedb53bb8e63caaf9a210986 (patch)
treeec842c7454cc72b1718eb61d7c74838e8325b236 /sw
parent0a861cc83fad0e3bcae21b15d8ef04f416a8a262 (diff)
use a BOOST_FOREACH here
Change-Id: Ibea1bc9aba21916ad25f41463ddf4466a8fb5b33
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docbm.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 38a6f24ac626..2007d6f6f921 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1626,11 +1626,13 @@ void CntntIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt,
return; // if we have a layout and no DrawObjs, we can skip this
}
MarkEntry aSave;
- for( aSave.m_nIdx = pDoc->GetSpzFrmFmts()->size(); aSave.m_nIdx ; )
+ BOOST_FOREACH(const SwFrmFmt* pFrmFmt, *pDoc->GetSpzFrmFmts())
{
- SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --aSave.m_nIdx ];
if ( RES_FLYFRMFMT != pFrmFmt->Which() && RES_DRAWFRMFMT != pFrmFmt->Which() )
+ {
+ ++aSave.m_nIdx;
continue;
+ }
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
@@ -1647,11 +1649,15 @@ void CntntIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt,
if( SAVEFLY_SPLIT == nSaveFly )
aSave.m_bOther = true;
else
+ {
+ ++aSave.m_nIdx;
continue;
+ }
}
}
m_aFlyEntries.push_back(aSave);
}
+ ++aSave.m_nIdx;
}
}