summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/doclay.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/doclay.cxx')
-rw-r--r--sw/source/core/doc/doclay.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 6e35170c25d3..57248bd9b84d 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1533,18 +1533,17 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
checkFmts.push_back( pFmt );
}
#endif
- SwFrmFmtAnchorMap::const_iterator_pair range = GetFrmFmtAnchorMap()->equal_range( SwNodeIndex( *pFlyNd ));
- SwFrmFmtAnchorMap::const_iterator it;
- for( it = range.first;
- it != range.second;
- ++it )
+ std::vector<SwFrmFmt*> const*const pFlys(pFlyNd->GetAnchoredFlys());
+ bool bFound(false);
+ for (size_t i = 0; pFlys && i < pFlys->size(); ++i)
{
- const SwFrmFmt* pFmt = it->second;
+ const SwFrmFmt *const pFmt = (*pFlys)[i];
const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
if( pIdx && pFlyNd == &pIdx->GetNode() )
{
#if OSL_DEBUG_LEVEL > 0
- std::list<const SwFrmFmt*>::iterator checkPos = std::find( checkFmts.begin(), checkFmts.end(), pFmt );
+ std::list<const SwFrmFmt*>::iterator checkPos = std::find(
+ checkFmts.begin(), checkFmts.end(), pFmt );
assert( checkPos != checkFmts.end());
checkFmts.erase( checkPos );
#endif
@@ -1557,12 +1556,13 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
pNd = &rAnchor.GetCntntAnchor()->nNode.GetNode();
pFlyNd = pNd->FindFlyStartNode();
+ bFound = true;
break;
}
}
- if( it == range.second )
+ if (!bFound)
{
- OSL_ENSURE( mbInReading, "Found a FlySection but not a Format!" );
+ OSL_ENSURE(mbInReading, "Found a FlySection but not a Format!");
return false;
}
}