[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/vcl sfx2/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 12 07:56:57 UTC 2019


 include/vcl/waitobj.hxx      |    4 ++--
 sfx2/source/appl/sfxhelp.cxx |    6 ++++++
 vcl/source/window/dialog.cxx |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit fbcaaaab0603825b31c4679d4713c0b3530c5dec
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 9 12:39:35 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Aug 12 09:55:48 2019 +0200

    Resolves: tdf#126790 use TopLevelWindowLocker in welded help path
    
    Change-Id: I4340d021b63609189d3179a7bcff7fac4fcef69d
    Reviewed-on: https://gerrit.libreoffice.org/77196
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/include/vcl/waitobj.hxx b/include/vcl/waitobj.hxx
index a136a73b455a..682153a1e892 100644
--- a/include/vcl/waitobj.hxx
+++ b/include/vcl/waitobj.hxx
@@ -26,7 +26,7 @@
 #include <stack>
 #include <vector>
 
-namespace weld { class Window; }
+namespace weld { class Widget; }
 
 class VCL_DLLPUBLIC WaitObject
 {
@@ -48,7 +48,7 @@ private:
     std::stack<std::vector<VclPtr<vcl::Window>>> m_aBusyStack;
 public:
     // lock all toplevels, except the argument
-    void incBusy(const weld::Window* pIgnore);
+    void incBusy(const weld::Widget* pIgnore);
     // unlock previous lock
     void decBusy();
     bool isBusy() const { return !m_aBusyStack.empty(); }
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 275b55172630..672308ecc2de 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -1263,8 +1263,11 @@ bool SfxHelp::Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUSt
             SvtHelpOptions aHelpOptions;
             bool bShowOfflineHelpPopUp = aHelpOptions.IsOfflineHelpPopUp();
 
+            TopLevelWindowLocker aBusy;
+
             if(bShowOfflineHelpPopUp)
             {
+                aBusy.incBusy(pWidget);
                 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pWidget, "sfx/ui/helpmanual.ui"));
                 std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("onlinehelpmanual"));
                 std::unique_ptr<weld::CheckButton> m_xHideOfflineHelpCB(xBuilder->weld_check_button("hidedialog"));
@@ -1275,6 +1278,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUSt
                 short OnlineHelpBox = xQueryBox->run();
                 bShowOfflineHelpPopUp = OnlineHelpBox != RET_OK;
                 aHelpOptions.SetOfflineHelpPopUp(!m_xHideOfflineHelpCB->get_state());
+                aBusy.decBusy();
             }
             if(!bShowOfflineHelpPopUp)
             {
@@ -1282,8 +1286,10 @@ bool SfxHelp::Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUSt
                     return true;
                 else
                 {
+                    aBusy.incBusy(pWidget);
                     NoHelpErrorBox aErrBox(pWidget);
                     aErrBox.run();
+                    aBusy.decBusy();
                     return false;
                 }
             }
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 961cd28ee614..1f1c3721583d 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1591,7 +1591,7 @@ void Dialog::Activate()
     SystemWindow::Activate();
 }
 
-void TopLevelWindowLocker::incBusy(const weld::Window* pIgnore)
+void TopLevelWindowLocker::incBusy(const weld::Widget* pIgnore)
 {
     // lock any toplevel windows from being closed until busy is over
     std::vector<VclPtr<vcl::Window>> aTopLevels;


More information about the Libreoffice-commits mailing list