summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/spellcheckcontext.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-03-23 13:02:29 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-03-23 15:31:07 +0100
commitdd25fd6bf9b9637d4f1efcfcc642efa4be7f62b1 (patch)
treea9a34eed54636770a455e30b65f0dd6e98e8baeb /sc/source/ui/view/spellcheckcontext.cxx
parent66dea2b9ba257c8e3e1baec9adbc37afd0eca910 (diff)
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.francis@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/+/131870 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sc/source/ui/view/spellcheckcontext.cxx')
-rw-r--r--sc/source/ui/view/spellcheckcontext.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx
index 634747df929c..1d39fe5125da 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -327,12 +327,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;