diff options
Diffstat (limited to 'sc/source/ui/view/tabview.cxx')
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 2c6dd86e368d..1f924ddaf8f9 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -45,6 +45,7 @@ #include <viewuno.hxx> #include <appoptio.hxx> #include <attrib.hxx> +#include <spellcheckcontext.hxx> #include <comphelper/lok.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <sfx2/lokhelper.hxx> @@ -2237,12 +2238,19 @@ void ScTabView::EnableRefInput(bool bFlag) void ScTabView::EnableAutoSpell( bool bEnable ) { + if (bEnable) + mpSpellCheckCxt.reset( + new sc::SpellCheckContext(aViewData.GetDocument(), + aViewData.GetTabNo())); + else + mpSpellCheckCxt.reset(); + for (VclPtr<ScGridWindow> & pWin : pGridWin) { if (!pWin) continue; - pWin->EnableAutoSpell(bEnable); + pWin->SetAutoSpellContext(mpSpellCheckCxt); } } |