summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/spellcheckcontext.cxx
diff options
context:
space:
mode:
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 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;