diff options
author | Andras Timar <andras.timar@collabora.com> | 2023-05-14 18:19:18 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-10 17:31:52 +0200 |
commit | a6c68549d0132d76a04d21c146a48345742c451f (patch) | |
tree | ff7d474bf3950321623654d5ba3e370e6174da20 /desktop | |
parent | 564af6b066b71aa48cca9bb843668a2fb47d999c (diff) |
lok: set help root URL
Change-Id: Id4089027f095daebb69942eb3315d516cfb14779
(cherry picked from commit 2239e4c1b2dcf06650316a106e5bd883ceefb6c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157750
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a2399b125b94..67957a370751 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7678,6 +7678,25 @@ static void activateNotebookbar(std::u16string_view rApp) } } +void setHelpRootURL() +{ + const char* pHelpRootURL = ::getenv("LOK_HELP_URL"); + if (pHelpRootURL) + { + OUString aHelpRootURL = OStringToOUString(pHelpRootURL, RTL_TEXTENCODING_UTF8); + try + { + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Help::HelpRootURL::set(aHelpRootURL, batch); + batch->commit(); + } + catch (uno::Exception const& rException) + { + SAL_WARN("lok", "Failed to set the help root URL: " << rException.Message); + } + } +} + void setCertificateDir() { const char* pEnvVarString = ::getenv("LO_CERTIFICATE_DATABASE_PATH"); @@ -8106,6 +8125,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char } #endif + + setHelpRootURL(); setCertificateDir(); setDeeplConfig(); setLanguageToolConfig(); |