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