[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - editeng/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 28 15:11:59 UTC 2019
editeng/source/misc/svxacorr.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit d16962fb59e7326b2868f794bb6246e12e98ce0f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 28 10:50:20 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 28 16:11:19 2019 +0100
tdf#128659 Cannot add AutoCorrect entries
regression from
commit 77dec7588c9141b03f8ec0139eb96c298b26f261
tdf#109158 improve sorting when loading large autocorrect file
The insert operation in the maSortedVector case had the "check for
duplicates" operation the wrong way around
Change-Id: Id8a9d044c661668e74f01eb15635c35ca70da540
Reviewed-on: https://gerrit.libreoffice.org/83344
Tested-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 208ca3d33d4e6dff9e70a3efa098628b02151729)
Reviewed-on: https://gerrit.libreoffice.org/83992
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8d0d34648540..d871b78f7f27 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2696,7 +2696,8 @@ const SvxAutocorrWord* SvxAutocorrWordList::Insert(SvxAutocorrWord aWord) const
else
{
auto it = std::lower_bound(mpImpl->maSortedVector.begin(), mpImpl->maSortedVector.end(), aWord, CompareSvxAutocorrWordList());
- if (it != mpImpl->maSortedVector.end() && !CompareSvxAutocorrWordList()(aWord, *it))
+ CollatorWrapper& rCmp = ::GetCollatorWrapper();
+ if (it == mpImpl->maSortedVector.end() || rCmp.compareString( aWord.GetShort(), it->GetShort() ) != 0)
{
it = mpImpl->maSortedVector.insert(it, std::move(aWord));
return &*it;
More information about the Libreoffice-commits
mailing list