diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-03-11 22:40:32 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-13 22:49:17 +0100 |
commit | ed901c336ff0b99291ffe53be6bd762abcccf55c (patch) | |
tree | 8f51dbc782410a9a75e5268e584b7e872404de22 /sfx2/source | |
parent | 1634a6d926c6cfd8fe92be1f3ae6083d2fb80f5e (diff) |
Make the Help URL configurable
When the Help URL is blank, the Help
buttons are hidden LOK (but not desktop).
Change-Id: Ibd76452108d1e3a92fb43f2c0af0586b0cbed073
Reviewed-on: https://gerrit.libreoffice.org/69071
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/69142
Tested-by: Jenkins
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index f305c3a04ee6..ab7ca70a950b 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -71,6 +71,7 @@ #include <comphelper/lok.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <sfx2/viewsh.hxx> +#include <officecfg/Office/Common.hxx> #include "newhelp.hxx" #include <sfx2/objsh.hxx> @@ -691,12 +692,11 @@ bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget) /// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org static bool impl_showOnlineHelp( const OUString& rURL ) { - OUString aInternal( "vnd.sun.star.help://" ); + static const OUString aInternal("vnd.sun.star.help://"); if ( rURL.getLength() <= aInternal.getLength() || !rURL.startsWith(aInternal) ) return false; - OUString aHelpLink( "https://help.libreoffice.org/help.html?" ); - + OUString aHelpLink = officecfg::Office::Common::Help::HelpRootURL::get(); OUString aTarget = "Target=" + rURL.copy(aInternal.getLength()); aTarget = aTarget.replaceAll("%2F", "/").replaceAll("?", "&"); aHelpLink += aTarget; |