| commit | 1021d7a635b5567a62f0711263eed3c3011ec687 | [log] |
|---|---|---|
| author | Noel Grandin <noel.grandin@collabora.co.uk> | Thu Nov 28 10:50:20 2019 +0200 |
| committer | Caolán McNamara <caolanm@redhat.com> | Fri Nov 29 11:39:54 2019 +0100 |
| tree | 9c676a6962ceddfbfc95494c6732155d0b946517 | |
| parent | 45b4e2f00c5d085e198a6b65d4e79f52ce05fc02 [diff] |
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@libreoffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 208ca3d33d4e6dff9e70a3efa098628b02151729) Reviewed-on: https://gerrit.libreoffice.org/83992 (cherry picked from commit d16962fb59e7326b2868f794bb6246e12e98ce0f) Reviewed-on: https://gerrit.libreoffice.org/84017 Reviewed-by: V Stuart Foote <vstuart.foote@utsa.edu> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit c883980f994208e4c1b47d1f09828f661b42258f) Reviewed-on: https://gerrit.libreoffice.org/84019 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 5857301..bc9d1f8 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx
@@ -2663,7 +2663,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;