[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 4 15:09:17 UTC 2021


 vcl/inc/jsdialog/jsdialogbuilder.hxx |   30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 3e8018d8336dc1a34530142a917ccaeb8100fe5a
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Dec 30 09:57:00 2020 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Feb 4 16:08:31 2021 +0100

    jsdialog: support for freeze/thaw
    
    Change-Id: Ia3ca2c3c06a95e295e400780540c176cd9606ee7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108498
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109905
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index f254a5ea3592..08218512fa2b 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -71,7 +71,9 @@ public:
     {
     }
 
-    void notifyDialogState(bool bForce = false);
+    virtual ~JSDialogSender() = default;
+
+    virtual void notifyDialogState(bool bForce = false);
     void sendClose();
     virtual void sendUpdate(VclPtr<vcl::Window> pWindow);
 };
@@ -198,6 +200,7 @@ class JSWidget : public BaseInstanceClass, public JSDialogSender
 {
 protected:
     rtl::Reference<JSDropTarget> m_xDropTarget;
+    bool m_bIsFreezed;
 
 public:
     JSWidget(VclPtr<vcl::Window> aNotifierWindow, VclPtr<vcl::Window> aContentWindow,
@@ -205,6 +208,7 @@ public:
              std::string sTypeOfJSON)
         : BaseInstanceClass(pObject, pBuilder, bTakeOwnership)
         , JSDialogSender(aNotifierWindow, aContentWindow, sTypeOfJSON)
+        , m_bIsFreezed(false)
     {
     }
 
@@ -234,6 +238,30 @@ public:
 
         return m_xDropTarget.get();
     }
+
+    virtual void freeze() override
+    {
+        BaseInstanceClass::freeze();
+        m_bIsFreezed = true;
+    }
+
+    virtual void thaw() override
+    {
+        BaseInstanceClass::thaw();
+        m_bIsFreezed = false;
+    }
+
+    virtual void sendUpdate(VclPtr<vcl::Window> pWindow) override
+    {
+        if (!m_bIsFreezed)
+            JSDialogSender::sendUpdate(pWindow);
+    }
+
+    virtual void notifyDialogState(bool bForce = false) override
+    {
+        if (!m_bIsFreezed || bForce)
+            JSDialogSender::notifyDialogState(bForce);
+    }
 };
 
 class VCL_DLLPUBLIC JSDialog : public JSWidget<SalInstanceDialog, ::Dialog>


More information about the Libreoffice-commits mailing list