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-12 13:44:08 +0100 |
commit | e5a0bafa330c58d6c9352d3acbe4e97fafa1ad56 (patch) | |
tree | 099192880087ea92589323def40c64c367d71ea2 /svtools | |
parent | ab71569a7c1e1a262bfbfac998cf4acb092ed383 (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>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/accessibilityoptions.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 98f5eb96a452..23c06d4a0d3a 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -65,6 +65,7 @@ public: sal_Int16 GetListBoxMaximumLineCount() const; sal_Int16 GetColorValueSetColumnCount() const; bool GetPreviewUsesCheckeredBackground() const; + OUString GetHelpURL() const; }; // initialization of static members -------------------------------------- @@ -134,6 +135,24 @@ bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const return bRet; } +OUString SvtAccessibilityOptions_Impl::GetHelpURL() const +{ + css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); + OUString sRet; + + try + { + if(xNode.is()) + xNode->getPropertyValue("HelpURL") >>= sRet; + } + catch(const css::uno::Exception& ex) + { + SAL_WARN("svtools.config", "Caught unexpected: " << ex); + } + + return sRet; +} + bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); @@ -304,6 +323,7 @@ void SvtAccessibilityOptions_Impl::SetVCLSettings() bool StyleSettingsChanged(false); aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT); + aHelpSettings.SetHelpURL(GetHelpURL()); aAllSettings.SetHelpSettings(aHelpSettings); const sal_Int16 nEdgeBlendingCountA(GetEdgeBlending()); |