diff options
Diffstat (limited to 'sw/source/filter/writer')
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index c374d261ce65..aa5c9eab397c 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -183,13 +183,9 @@ bool Writer::CopyNextPam( SwPaM ** ppPam ) sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const { const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); - const IDocumentMarkAccess::const_iterator_t ppBkmk = std::lower_bound( - pMarkAccess->getAllMarksBegin(), - pMarkAccess->getAllMarksEnd(), - rPos, - sw::mark::CompareIMarkStartsBefore()); // find the first Mark that does not start before - if(ppBkmk != pMarkAccess->getAllMarksEnd()) - return ppBkmk - pMarkAccess->getAllMarksBegin(); + const IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findFirstBookmarkStartsAfter(rPos); + if(ppBkmk != pMarkAccess->getBookmarksEnd()) + return ppBkmk - pMarkAccess->getBookmarksBegin(); return -1; } |