svtools/source/config/languagetoolcfg.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
New commits: commit 1af03aaa35dc9758a9702cddf48d9aad02ec7a94 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jan 31 11:48:13 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 31 19:57:41 2023 +0000 language tool warnings in console on start up with language tool not configured warn: languagetool:3333070:3333070:lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx:372: CURL request returned with error: 3 warn: languagetool:3333070:3333070:lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx:372: CURL request returned with error: 3 Change-Id: I67de3351c6f01ed8274b4a282b45ded9f5cea5c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146418 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svtools/source/config/languagetoolcfg.cxx b/svtools/source/config/languagetoolcfg.cxx index b7bc2a56bd37..bc18e23980db 100644 --- a/svtools/source/config/languagetoolcfg.cxx +++ b/svtools/source/config/languagetoolcfg.cxx @@ -62,9 +62,19 @@ void SvxLanguageToolOptions::setUsername(const OUString& rVal) SetModified(); } -OUString SvxLanguageToolOptions::getLocaleListURL() const { return pImpl->sBaseURL + "/languages"; } +OUString SvxLanguageToolOptions::getLocaleListURL() const +{ + if (pImpl->sBaseURL.isEmpty()) + return OUString(); + return pImpl->sBaseURL + "/languages"; +} -OUString SvxLanguageToolOptions::getCheckerURL() const { return pImpl->sBaseURL + "/check"; } +OUString SvxLanguageToolOptions::getCheckerURL() const +{ + if (pImpl->sBaseURL.isEmpty()) + return OUString(); + return pImpl->sBaseURL + "/check"; +} const OUString& SvxLanguageToolOptions::getApiKey() const { return pImpl->sApiKey; }