diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 12:54:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-12 10:06:05 +0100 |
commit | ce83d1f448ae28f30c98a607a83ff3e012538d36 (patch) | |
tree | bfe3ace12a98eecf3e23e2cb6015e811c7efeaab /include | |
parent | 14d1f276b488b0a7cad107e3fb9612d96d4e764d (diff) |
use preferred variant when window arg is null
Change-Id: I8fad194b6f147b40ecee6fff9fbbe947e7faa014
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112345
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sfxhelp.hxx | 7 | ||||
-rw-r--r-- | include/vcl/help.hxx | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 7f4d687b102d..f07c2017287f 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -30,14 +30,15 @@ class SFX2_DLLPUBLIC SfxHelp final : public Help bool bIsDebug; private: - SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword ); SAL_DLLPRIVATE static bool Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUString& rKeyword); SAL_DLLPRIVATE virtual void SearchKeyword( const OUString& rKeyWord ) override; - SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const vcl::Window* pWindow ) override; - SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* pWidget) override; + SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* pWidget = nullptr) override; SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(const OUString &rHelpId); SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName ); + SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword ); + SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const vcl::Window* pWindow ) override; + public: SfxHelp(); virtual ~SfxHelp() override; diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index 83b2bdbe569f..7dc848a42e0c 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -63,12 +63,13 @@ public: Help(); virtual ~Help(); - virtual bool Start(const OUString& rHelpId, const vcl::Window* pWindow); - virtual bool Start(const OUString& rHelpId, weld::Widget* pWidget); + virtual bool Start(const OUString& rHelpId, weld::Widget* pWidget = nullptr); virtual void SearchKeyword( const OUString& rKeyWord ); - virtual OUString GetHelpText(const OUString& aHelpURL, const vcl::Window* pWindow); virtual OUString GetHelpText(const OUString& aHelpURL, const weld::Widget* pWidget); + virtual bool Start(const OUString& rHelpId, const vcl::Window* pWindow); + virtual OUString GetHelpText(const OUString& aHelpURL, const vcl::Window* pWindow); + static void EnableContextHelp(); static void DisableContextHelp(); static bool IsContextHelpEnabled(); |