135360
From 702edb07b785e27cfaf45f4feee9e07d7b9402e7 Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Tue, 6 Oct 2015 12:05:14 +0200
135360
Subject: [PATCH 184/398] Disable spellcheck when LOK is active
135360
135360
It's not useful when viewing, and for editing probably a dedicated
135360
overlay would be better (like the one we have for cursor/selections
135360
already).
135360
135360
Disable for sw/sd explicitly, sc had it disabled implicitly already.
135360
135360
Change-Id: I7134f5d1a1546787c22019e6b1abdc0dd887f888
135360
(cherry picked from commit c92ebc850345924619a12327f36cc6ac9c0b09d1)
135360
---
135360
 sd/source/core/drawdoc.cxx          | 4 +++-
135360
 sw/source/uibase/config/viewopt.cxx | 3 +++
135360
 2 files changed, 6 insertions(+), 1 deletion(-)
135360
135360
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
135360
index fcf678ec669f..f820fabaab81 100644
135360
--- a/sd/source/core/drawdoc.cxx
135360
+++ b/sd/source/core/drawdoc.cxx
135360
@@ -97,6 +97,7 @@
135360
 
135360
 #include <tools/tenccvt.hxx>
135360
 #include <vcl/settings.hxx>
135360
+#include <comphelper/lok.hxx>
135360
 
135360
 using namespace ::sd;
135360
 using namespace ::com::sun::star;
135360
@@ -229,7 +230,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
135360
         SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CTL,
135360
             ::com::sun::star::i18n::ScriptType::COMPLEX), EE_CHAR_LANGUAGE_CTL );
135360
 
135360
-        mbOnlineSpell = aOptions.bIsSpellAuto;
135360
+        if (!comphelper::LibreOfficeKit::isActive())
135360
+            mbOnlineSpell = aOptions.bIsSpellAuto;
135360
     }
135360
 
135360
     LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
135360
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
135360
index c5080e84abd4..77c716af839d 100644
135360
--- a/sw/source/uibase/config/viewopt.cxx
135360
+++ b/sw/source/uibase/config/viewopt.cxx
135360
@@ -314,6 +314,9 @@ bool SwViewOption::IsAutoCompleteWords()
135360
 
135360
 void SwViewOption::SetOnlineSpell(bool b)
135360
 {
135360
+    if (comphelper::LibreOfficeKit::isActive())
135360
+        return;
135360
+
135360
     b ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL);
135360
 }
135360
 
135360
-- 
135360
2.12.0
135360