From 208ca3d33d4e6dff9e70a3efa098628b02151729 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 28 Nov 2019 10:50:20 +0200 Subject: tdf#128659 Cannot add AutoCorrect entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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í Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/misc/svxacorr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editeng') diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 48d6676b26f2..7e4273203183 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2699,7 +2699,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; -- cgit e='distro/cib/libreoffice-6-2'>distro/cib/libreoffice-6-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2013-04-25 15:55:53 +0200
committerAndras Timar <atimar@suse.com>2013-04-25 15:55:53 +0200
commit467748ef3d900ef42ca95df1715879335673341d (patch)
tree5c0faea9060ecf520b57a93d2d80c006db16a94c /stoc/Library_invocation.mk
parentaf6299687ef968a3731cbfa24c3820f5006b2823 (diff)
Bump for 3.6-20