summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2023-05-14 18:19:18 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-15 21:38:51 +0200
commit2239e4c1b2dcf06650316a106e5bd883ceefb6c1 (patch)
tree7db1cc761af6c8e1a33a9c0cd5cac0b75295801a /desktop
parent4c04779cfdac58eebffb2fabc4a500e000bd437a (diff)
lok: set help root URL
Change-Id: Id4089027f095daebb69942eb3315d516cfb14779
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2d1ad0e5a89c..b771b99b3b55 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7417,6 +7417,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");
@@ -7834,6 +7853,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
#endif
+
+ setHelpRootURL();
setCertificateDir();
setDeeplConfig();
setLanguageToolConfig();