summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-03-11 22:40:32 -0400
committerAndras Timar <andras.timar@collabora.com>2019-03-13 22:49:17 +0100
commited901c336ff0b99291ffe53be6bd762abcccf55c (patch)
tree8f51dbc782410a9a75e5268e584b7e872404de22 /vcl
parent1634a6d926c6cfd8fe92be1f3ae6083d2fb80f5e (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 'vcl')
-rw-r--r--vcl/source/control/button.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 4749d68bca05..f2b7849b30cc 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -46,6 +46,8 @@
#include <osl/diagnose.h>
#include <comphelper/dispatchcommand.hxx>
+#include <comphelper/lok.hxx>
+#include <officecfg/Office/Common.hxx>
using namespace css;
@@ -1811,6 +1813,16 @@ void HelpButton::Click()
PushButton::Click();
}
+void HelpButton::StateChanged( StateChangedType nStateChange )
+{
+ // Hide when we have no help URL.
+ if (comphelper::LibreOfficeKit::isActive() &&
+ officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
+ Hide();
+ else
+ PushButton::StateChanged(nStateChange);
+}
+
void RadioButton::ImplInitRadioButtonData()
{
mbChecked = false;