summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-11-21 21:27:24 -0400
committerHenry Castro <hcastro@collabora.com>2022-12-02 12:22:16 +0000
commitb0ca71915096c2f094d741c19ab8d7ee67ee735e (patch)
tree3937a903fc3d292dbd2906ba36e1a47f8b64e460 /svtools
parentb188998893951e6e42dc710eb90e744419cbd97f (diff)
svtools: add new entry "RestProtocol"
Custom Rest API protocol Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: If2f72330f2ed9768f230dc88296df7f757be263a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143105 Reviewed-by: Ashod Nakashian <ash@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/languagetoolcfg.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/svtools/source/config/languagetoolcfg.cxx b/svtools/source/config/languagetoolcfg.cxx
index 3f48010141db..311cefb320f4 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;
};
@@ -43,6 +44,7 @@ const Sequence<OUString>& SvxLanguageToolOptions::GetPropertyNames()
"LanguageTool/ApiKey",
"LanguageTool/IsEnabled",
"LanguageTool/SSLCertVerify",
+ "LanguageTool/RestProtocol"
};
return aNames;
}
@@ -69,12 +71,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 { return pImpl->bSSLCertVerificatrionEnabled; }
@@ -142,6 +155,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 +188,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
+}