[Libreoffice-commits] core.git: editeng/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 19 08:56:54 UTC 2019
editeng/source/editeng/edtspell.cxx | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
New commits:
commit 6e619198cbd132300a9219c1de64a4750ca5a092
Author: Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Tue Feb 19 09:24:29 2019 +0300
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Feb 19 09:56:29 2019 +0100
Simplify ranges overlapping condition
Using conjuction and disjuction distributivity and assuming
that for each range r: r.mnStart <= r.mnEnd.
Change-Id: Ifbd156426617ebf225b1b1139e17e4967a228cd6
Reviewed-on: https://gerrit.libreoffice.org/68003
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 63b402ffad53..81143ce33b5a 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -508,12 +508,7 @@ bool WrongList::DbgIsBuggy() const
{
for (WrongList::const_iterator j = i + 1; !bError && (j != maRanges.end()); ++j)
{
- // 1) Start before, End after the second Start
- if (i->mnStart <= j->mnStart && i->mnEnd >= j->mnStart)
- bError = true;
- // 2) Start after the second Start, but still before the second End
- else if (i->mnStart >= j->mnStart && i->mnStart <= j->mnEnd)
- bError = true;
+ bError = i->mnStart <= j->mnEnd && j->mnStart <= i->mnEnd;
}
}
return bError;
More information about the Libreoffice-commits
mailing list