diff options
author | Noel Grandin <noel@peralex.com> | 2012-03-08 11:44:02 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-08 12:57:49 +0200 |
commit | 14ca52086ba3cdba0f767f69f9de9fa5fb9e5668 (patch) | |
tree | 31e2a6ef2a74a8e3b0a58b078a87df5155fb67d8 /sw | |
parent | rtftok: get rid of unnecessary lcl_getNumPr() (diff) | |
download | core-14ca52086ba3cdba0f767f69f9de9fa5fb9e5668.tar.gz core-14ca52086ba3cdba0f767f69f9de9fa5fb9e5668.zip |
Fix bug in commit ad9960ffeb25f31ce4b1f819f909f1eb9ad6d7dd
My previous patch converting SvPtrarr usage to std::vector had a bug,
(spotted by Ivan timofeev.i.s@gmail.com) where it called multimap.find
instead of multimap.equal_range.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 751743cc5af3..c0f780ea58b7 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -464,17 +464,18 @@ sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, OSL_ENSURE( rArr.empty(), "es sind noch Eintraege vorhanden" ); sal_uLong nNd = rNd.GetIndex(); - SwBookmarkNodeTable::const_iterator it = m_pImpl->aBkmkNodePos.find( nNd ); - if( it != m_pImpl->aBkmkNodePos.end() ) + std::pair<SwBookmarkNodeTable::const_iterator, SwBookmarkNodeTable::const_iterator> aIterPair + = m_pImpl->aBkmkNodePos.equal_range( nNd ); + if( aIterPair.first != aIterPair.second ) { // there exist some bookmarks, search now all which is in the range if( !nStt && nEnd == rNd.Len() ) // all - for( ; it != m_pImpl->aBkmkNodePos.end(); ++it ) + for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it ) rArr.push_back( it->second ); else { - for( ; it != m_pImpl->aBkmkNodePos.end(); ++it ) + for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it ) { const ::sw::mark::IMark& rBkmk = *(it->second); xub_StrLen nCntnt; |