diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 16:16:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 21:00:55 +0100 |
commit | 60dd4825ba8fbab211fbb31961ea11873406a280 (patch) | |
tree | cb7d021e293a6e7c6630149507c4147be130c2a3 /sfx2 | |
parent | cb0dfff9a49530f348223e1df54762a3da61aa51 (diff) |
tdf#140539 don't allow help to be relaunched during launch
its fine once it is launched to fire help again, just not during
the launch itself via the yield-call done during html load that
probably exists to let the progress bar redraw
Change-Id: I42e0bf670023d91f70cb1de3fa0fda23e82d0678
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112921
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 6732fb5b0e63..e16d5cab7865 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -338,8 +338,9 @@ OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& return SfxContentHelper::GetActiveHelpString( aHelpURL.makeStringAndClear() ); } -SfxHelp::SfxHelp() : - bIsDebug( false ) +SfxHelp::SfxHelp() + : bIsDebug(false) + , bLaunchingHelp(false) { // read the environment variable "HELP_DEBUG" // if it's set, you will see debug output on active help @@ -691,12 +692,22 @@ void SfxHelp::SearchKeyword( const OUString& rKeyword ) bool SfxHelp::Start( const OUString& rURL, const vcl::Window* pWindow ) { - return Start_Impl( rURL, pWindow, OUString() ); + if (bLaunchingHelp) + return true; + bLaunchingHelp = true; + bool bRet = Start_Impl( rURL, pWindow, OUString() ); + bLaunchingHelp = false; + return bRet; } bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget) { - return Start_Impl(rURL, pWidget, OUString()); + if (bLaunchingHelp) + return true; + bLaunchingHelp = true; + bool bRet = Start_Impl(rURL, pWidget, OUString()); + bLaunchingHelp = false; + return bRet; } /// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org |