summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2022-07-04 19:52:49 +0300
committerHenry Castro <hcastro@collabora.com>2023-01-30 22:12:03 +0000
commit1fb964276c184b0fb052503fe7dbc05bf0331211 (patch)
tree780afc0573b9407aa1bc2d4b05e1216d2b868e13 /svtools
parented68634db25103cd7d2adc29f3973f80fbaec324 (diff)
Added option to disable ssl verification for languagetool
This will allow to use self-signed certificates with local run languagetool APIs Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145594 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/languagetoolcfg.cxx24
1 files changed, 20 insertions, 4 deletions
diff --git a/svtools/source/config/languagetoolcfg.cxx b/svtools/source/config/languagetoolcfg.cxx
index 9f81c8e787f1..fbc48d70fde7 100644
--- a/svtools/source/config/languagetoolcfg.cxx
+++ b/svtools/source/config/languagetoolcfg.cxx
@@ -32,15 +32,14 @@ struct LanguageToolOptions_Impl
OUString sUsername;
OUString sApiKey;
bool bEnabled;
+ bool bSSLCertVerificatrionEnabled;
};
const Sequence<OUString>& SvxLanguageToolOptions::GetPropertyNames()
{
static Sequence<OUString> const aNames{
- "LanguageTool/BaseURL",
- "LanguageTool/Username",
- "LanguageTool/ApiKey",
- "LanguageTool/IsEnabled",
+ "LanguageTool/BaseURL", "LanguageTool/Username", "LanguageTool/ApiKey",
+ "LanguageTool/IsEnabled", "LanguageTool/SSLCertVerify",
};
return aNames;
}
@@ -75,6 +74,17 @@ void SvxLanguageToolOptions::setApiKey(const OUString& rVal)
bool SvxLanguageToolOptions::getEnabled() const { return pImpl->bEnabled; }
+bool SvxLanguageToolOptions::getSSLVerification() const
+{
+ return pImpl->bSSLCertVerificatrionEnabled;
+}
+
+void SvxLanguageToolOptions::setSSLVerification(bool bEnabled)
+{
+ pImpl->bSSLCertVerificatrionEnabled = bEnabled;
+ SetModified();
+}
+
void SvxLanguageToolOptions::setEnabled(bool bEnabled)
{
pImpl->bEnabled = bEnabled;
@@ -129,6 +139,9 @@ void SvxLanguageToolOptions::Load(const css::uno::Sequence<OUString>& aNames)
case 3:
pValues[nProp] >>= pImpl->bEnabled;
break;
+ case 4:
+ pValues[nProp] >>= pImpl->bSSLCertVerificatrionEnabled;
+ break;
default:
break;
}
@@ -156,6 +169,9 @@ void SvxLanguageToolOptions::ImplCommit()
case 3:
pValues[nProp] <<= pImpl->bEnabled;
break;
+ case 4:
+ pValues[nProp] <<= pImpl->bSSLCertVerificatrionEnabled;
+ break;
default:
break;
}