[Libreoffice-commits] core.git: sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 30 15:36:11 UTC 2018


 sfx2/source/appl/sfxhelp.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit eac4bd8e3c84ba4afe153e42cc82b263f62b5e11
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 30 13:45:12 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 30 17:35:47 2018 +0200

    tdf#119579 skip floating windows as potential parent for missing help dialog
    
    Change-Id: Ibcee9a6aab0b04bf52f3e75a46f52d98864eee4c
    Reviewed-on: https://gerrit.libreoffice.org/59808
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 14d9fb4e10d3..8092367eafce 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -726,6 +726,21 @@ static bool impl_showOfflineHelp( const OUString& rURL )
     return false;
 }
 
+namespace
+{
+    // tdf#119579 skip floating windows as potential parent for missing help dialog
+    const vcl::Window* GetBestParent(const vcl::Window* pWindow)
+    {
+        while (pWindow)
+        {
+            if (pWindow->IsSystemWindow() && pWindow->GetType() != WindowType::FLOATINGWINDOW)
+                break;
+            pWindow = pWindow->GetParent();
+        }
+        return pWindow;
+    }
+}
+
 bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword)
 {
     OUStringBuffer aHelpRootURL("vnd.sun.star.help://");
@@ -831,6 +846,8 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
             SvtHelpOptions aHelpOptions;
             bool bShowOfflineHelpPopUp = aHelpOptions.IsOfflineHelpPopUp();
 
+            pWindow = GetBestParent(pWindow);
+
             if(bShowOfflineHelpPopUp)
             {
                 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pWindow ? pWindow->GetFrameWeld() : nullptr, "sfx/ui/helpmanual.ui"));


More information about the Libreoffice-commits mailing list