summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2020-06-28 22:03:02 +0200
committerAndras Timar <andras.timar@collabora.com>2020-06-29 08:31:41 +0200
commitc098b50953d2428a7cebdfb32f9bfc1939cb8d65 (patch)
tree398049e5ed2bebc0b889ade74ec0a5757119c7d3
parenteb467d73304cc4ddc4b7fcda685ebadf6d4ea8d1 (diff)
LOKit: do not show 'Add to Dictionary' button for Online
Because user profiles (user dictionaries) are not persistent. Change-Id: I78261cccc068cfc1cc9fb2ddecd085ac58ff31c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97308 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--cui/source/dialogs/SpellDialog.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 2286093f380f..449e18056788 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -53,6 +53,7 @@
#include <svtools/langtab.hxx>
#include <sal/log.hxx>
#include <i18nlangtag/languagetag.hxx>
+#include <comphelper/lok.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -323,8 +324,8 @@ void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
m_xLanguageLB->set_sensitive( bShowChangeAll );
m_xIgnoreAllPB->set_visible( bShowChangeAll );
- m_xAddToDictMB->set_visible( bShowChangeAll && nDicts > 1);
- m_xAddToDictPB->set_visible( bShowChangeAll && nDicts <= 1);
+ m_xAddToDictMB->set_visible( bShowChangeAll && nDicts > 1 && !comphelper::LibreOfficeKit::isActive());
+ m_xAddToDictPB->set_visible( bShowChangeAll && nDicts <= 1 && !comphelper::LibreOfficeKit::isActive());
m_xIgnoreRulePB->set_visible( !bShowChangeAll );
m_xIgnoreRulePB->set_sensitive(bSpellErrorDescription && !aSpellErrorDescription.sRuleId.isEmpty());
m_xAutoCorrPB->set_visible( bShowChangeAll && rParent.HasAutoCorrection() );
@@ -817,8 +818,8 @@ int SpellDialog::InitUserDicts()
int nDicts = nItemId-1;
- m_xAddToDictMB->set_visible( nDicts > 1 );
- m_xAddToDictPB->set_visible( nDicts <= 1 );
+ m_xAddToDictMB->set_visible(nDicts > 1 && !comphelper::LibreOfficeKit::isActive());
+ m_xAddToDictPB->set_visible(nDicts <= 1 && !comphelper::LibreOfficeKit::isActive());
return nDicts;
}