[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-2' - include/sfx2 sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 24 13:49:05 UTC 2021
include/sfx2/sfxhelp.hxx | 1 +
sfx2/source/appl/sfxhelp.cxx | 19 +++++++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
New commits:
commit 497610cfa5aea65d7f95966a54498b279f598631
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 16:16:36 2021 +0000
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Wed Mar 24 14:48:29 2021 +0100
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/+/112804
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
(cherry picked from commit c83fc23a69949a8408c9e4ad8dc19ee9fa9d82a1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112807
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 7f4d687b102d..ed44309888ed 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -28,6 +28,7 @@
class SFX2_DLLPUBLIC SfxHelp final : public Help
{
bool bIsDebug;
+ bool bLaunchingHelp; // tdf#140539 don't allow help to be re-launched during help launch
private:
SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword );
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index b4f31d914a9c..7d81085fa651 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
More information about the Libreoffice-commits
mailing list