summaryrefslogtreecommitdiff
path: root/svtools/source/config/languagetoolcfg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/config/languagetoolcfg.cxx')
-rw-r--r--svtools/source/config/languagetoolcfg.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/svtools/source/config/languagetoolcfg.cxx b/svtools/source/config/languagetoolcfg.cxx
index fbc48d70fde7..56d4a2431056 100644
--- a/svtools/source/config/languagetoolcfg.cxx
+++ b/svtools/source/config/languagetoolcfg.cxx
@@ -31,6 +31,7 @@ struct LanguageToolOptions_Impl
OUString sBaseURL;
OUString sUsername;
OUString sApiKey;
+ OUString sRestProtocol;
bool bEnabled;
bool bSSLCertVerificatrionEnabled;
};
@@ -39,7 +40,7 @@ const Sequence<OUString>& SvxLanguageToolOptions::GetPropertyNames()
{
static Sequence<OUString> const aNames{
"LanguageTool/BaseURL", "LanguageTool/Username", "LanguageTool/ApiKey",
- "LanguageTool/IsEnabled", "LanguageTool/SSLCertVerify",
+ "LanguageTool/IsEnabled", "LanguageTool/SSLCertVerify", "LanguageTool/RestProtocol"
};
return aNames;
}
@@ -66,12 +67,23 @@ OUString SvxLanguageToolOptions::getCheckerURL() const { return pImpl->sBaseURL
const OUString& SvxLanguageToolOptions::getApiKey() const { return pImpl->sApiKey; }
+const OUString& SvxLanguageToolOptions::getRestProtocol() const { return pImpl->sRestProtocol; }
+
void SvxLanguageToolOptions::setApiKey(const OUString& rVal)
{
pImpl->sApiKey = rVal;
SetModified();
}
+void SvxLanguageToolOptions::setRestProtocol(const OUString& rVal)
+{
+ if (pImpl->sRestProtocol != rVal)
+ {
+ pImpl->sRestProtocol = rVal;
+ SetModified();
+ }
+}
+
bool SvxLanguageToolOptions::getEnabled() const { return pImpl->bEnabled; }
bool SvxLanguageToolOptions::getSSLVerification() const
@@ -142,6 +154,9 @@ void SvxLanguageToolOptions::Load(const css::uno::Sequence<OUString>& aNames)
case 4:
pValues[nProp] >>= pImpl->bSSLCertVerificatrionEnabled;
break;
+ case 5:
+ pValues[nProp] >>= pImpl->sRestProtocol;
+ break;
default:
break;
}
@@ -172,9 +187,12 @@ void SvxLanguageToolOptions::ImplCommit()
case 4:
pValues[nProp] <<= pImpl->bSSLCertVerificatrionEnabled;
break;
+ case 5:
+ pValues[nProp] <<= pImpl->sRestProtocol;
+ break;
default:
break;
}
}
PutProperties(aNames, aValues);
-} \ No newline at end of file
+}