summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/txtnode/thints.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index c74a17563efd..1e482684edb7 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -663,6 +663,10 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
continue;
sal_Int32 nOtherStart = pOther->GetStart();
+ if (nThisEnd < nOtherStart)
+ break;
+ if (nThisStart < nOtherStart)
+ continue;
const sal_Int32 nOtherEnd = *pOther->GetEnd();
// Check if start of new attribute overlaps with pOther:
@@ -734,6 +738,10 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
continue;
const sal_Int32 nOtherStart = pOther->GetStart();
+ if (nThisEnd < nOtherStart)
+ break;
+ if (nThisStart < nOtherStart)
+ continue;
const sal_Int32 nOtherEnd = *pOther->End();
if (nThisStart <= nOtherStart && nOtherStart <= nThisEnd)