diff options
author | Aron Budea <aron.budea@collabora.com> | 2023-01-09 04:10:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-01-10 11:38:04 +0000 |
commit | 0a2b048482e079e4e83307ad00ba7704a4cc815e (patch) | |
tree | 42989cdeee5b22fa27a71e9c77d5a5d05da346d1 /sw | |
parent | b00c1ea3c41aabd47f4965620e60462627f8ed26 (diff) |
Make DeepL translator experimental for now
Needs documentation.
Change-Id: If77436a37b5ec40f3eb08a32f0315c1696428c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145184
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index df519ed9782b..3a5a706c901f 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -106,6 +106,8 @@ #include <authfld.hxx> #include <config_wasm_strip.h> #if !ENABLE_WASM_STRIP_EXTRA +#include <officecfg/Office/Common.hxx> +#include <svl/visitem.hxx> #include <translatelangselect.hxx> #include <svtools/deeplcfg.hxx> #endif // ENABLE_WASM_STRIP_EXTRA @@ -2211,6 +2213,12 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case SID_FM_TRANSLATE: { #if !ENABLE_WASM_STRIP_EXTRA + if (!officecfg::Office::Common::Misc::ExperimentalMode::get() + && !comphelper::LibreOfficeKit::isActive()) + { + rSet.Put(SfxVisibilityItem(nWhich, false)); + break; + } const SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); if (rDeeplOptions.getAPIUrl().isEmpty() || rDeeplOptions.getAuthKey().isEmpty()) { |