summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/docbm.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 5fe3a250da5d..ba2279853128 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -225,6 +225,13 @@ namespace
return false;
}
+ bool lcl_MarkEqualByStart(const IDocumentMarkAccess::pMark_t& rpFirst,
+ const IDocumentMarkAccess::pMark_t& rpSecond)
+ {
+ return !lcl_MarkOrderingByStart(rpFirst, rpSecond) &&
+ !lcl_MarkOrderingByStart(rpSecond, rpFirst);
+ }
+
IDocumentMarkAccess::iterator_t lcl_FindMark(
IDocumentMarkAccess::container_t& rMarks,
const IDocumentMarkAccess::pMark_t& rpMarkToFind)
@@ -235,7 +242,7 @@ namespace
// since there are usually not too many marks on the same start
// position, we are not doing a bisect search for the upper bound
// but instead start to iterate from pMarkLow directly
- while(ppCurrentMark != rMarks.end() && **ppCurrentMark == *rpMarkToFind)
+ while (ppCurrentMark != rMarks.end() && lcl_MarkEqualByStart(*ppCurrentMark, rpMarkToFind))
{
if(ppCurrentMark->get() == rpMarkToFind.get())
{