summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabview5.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-10-22 19:45:16 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-28 13:08:15 +0100
commit65f42a4540d495a11d255af63c7ee15397b57bfa (patch)
treef57537ed3aa864ca8843ce0820192ac23e9b7aff /sc/source/ui/view/tabview5.cxx
parent7a09d67e1c76db7cb6a87a2ceaa6de7325342b75 (diff)
tdf#136694 - share spelling context across all ScGridWindows.
Adding new ScGridWindows later (as we do for split panes) didn't call EnableAutoSpell on them; also duplicating the spell-checking cache looks wasteful, so share it. Change-Id: Ieb67bb292590a097bb5a59d369416a094c54c954 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/tabview5.cxx')
-rw-r--r--sc/source/ui/view/tabview5.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 73727a0f13d4..c41f08b0aca1 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -46,6 +46,7 @@
#include <docsh.hxx>
#include <viewuno.hxx>
#include <postit.hxx>
+#include <spellcheckcontext.hxx>
#include <vcl/settings.hxx>
@@ -193,6 +194,10 @@ ScTabView::~ScTabView()
pSelEngine.reset();
+ if (mpSpellCheckCxt)
+ mpSpellCheckCxt->dispose();
+ mpSpellCheckCxt.reset();
+
mxInputHintOO.reset();
for (i=0; i<4; i++)
pGridWin[i].disposeAndClear();
@@ -268,9 +273,9 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
if (pDrawView)
{
pDrawView->AddWindowToPaintView(pWin, nullptr);
-
pWin->DrawLayerCreated();
}
+ pWin->SetAutoSpellContext(mpSpellCheckCxt);
}
void ScTabView::TabChanged( bool bSameTabButMoved )