sc/source/ui/view/spellcheckcontext.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 32a99d53ef6c9f2406351e85d3acfbe2bf8c06b7 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Mar 23 13:02:29 2022 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Mar 24 09:55:12 2022 +0100 Use correct language for spellchecking in calc Fixes the problem of not applied spellchecking language change in calc. 1. Open spreadsheet with German text but with English UI language 2. Change spellchecking language to German result: no difference expected: spellchecking should be performed and mark words correctly Visible in both LOK and desktop. Regression introduced in: commit bdd149b1ff3d43b94cadc0d43365100c287c7639 Author: Dennis Francis <dennis.fran...@collabora.com> Date: Sun Oct 4 12:47:46 2020 +0530 Improve spell checking performance and impl. in several ways: Change-Id: I679b1181af118e9894a3f5240523d4945af8ccf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131965 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx index 971fa481c04f..91bc0f0d2d0b 100644 --- a/sc/source/ui/view/spellcheckcontext.cxx +++ b/sc/source/ui/view/spellcheckcontext.cxx @@ -330,12 +330,14 @@ void SpellCheckContext::ensureResults(SCCOL nCol, SCROW nRow) } // Cache miss, the cell needs spell-check.. - mpEngine->SetDefaultItem(SvxLanguageItem(eCellLang, EE_CHAR_LANGUAGE)); if (eType == CELLTYPE_STRING) mpEngine->SetText(aCell.mpString->getString()); else mpEngine->SetText(*aCell.mpEditText); + // it has to happen after we set text + mpEngine->SetDefaultItem(SvxLanguageItem(eCellLang, EE_CHAR_LANGUAGE)); + mpStatus->mbModified = false; mpEngine->CompleteOnlineSpelling(); std::unique_ptr<MisspellType> pRanges;