sw/source/filter/writer/writer.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 14ca52086ba3cdba0f767f69f9de9fa5fb9e5668 Author: Noel Grandin <n...@peralex.com> Date: Thu Mar 8 11:44:02 2012 +0200 Fix bug in commit ad9960ffeb25f31ce4b1f819f909f1eb9ad6d7dd My previous patch converting SvPtrarr usage to std::vector had a bug, (spotted by Ivan timofeev....@gmail.com) where it called multimap.find instead of multimap.equal_range. diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 751743c..c0f780e 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; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits