sfx2/source/sidebar/Deck.cxx     |    4 +++-
 vcl/jsdialog/jsdialogbuilder.cxx |    4 +++-
 vcl/source/window/window.cxx     |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit e5bfb1f0c4c29e34cf4647557230e740692efb43
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Jun 8 15:28:41 2021 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Jul 20 11:48:19 2021 +0200

    jsdialog: sidebar: dump visibility state for widgets
    
    we need this to build all the widgets on the client side
    and alow then show/hide widgets
    
    Change-Id: Ib3d8fc673cc787925e19a6e9df673e923ed7ecef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116841
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119198
    Tested-by: Jenkins

diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 394c767001c2..700fb19251bf 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -134,10 +134,12 @@ void Deck::Resize()
  */
 void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
 {
-    rJsonWriter.put("id", get_id());  // TODO could be missing - sort out
+    rJsonWriter.put("id", get_id().isEmpty() ? msId : get_id());
     rJsonWriter.put("type", "deck");
     rJsonWriter.put("text", GetText());
     rJsonWriter.put("enabled", IsEnabled());
+    if (!IsVisible())
+        rJsonWriter.put("visible", false);
 
     auto childrenNode = rJsonWriter.startArray("children");
     for (auto &it : maPanels)
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 72dd9d17b424..88a2b24e1b35 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3350,13 +3350,15 @@ void Window::DumpAsPropertyTree(tools::JsonWriter& 
rJsonWriter)
     rJsonWriter.put("type", windowTypeName(GetType()));
     rJsonWriter.put("text", GetText());
     rJsonWriter.put("enabled", IsEnabled());
+    if (!IsVisible())
+        rJsonWriter.put("visible", false);
 
     if (vcl::Window* pChild = mpWindowImpl->mpFirstChild)
     {
         auto childrenNode = rJsonWriter.startArray("children");
         while (pChild)
         {
-            if (pChild->IsVisible()) {
+            {
                 auto childNode = rJsonWriter.startStruct();
                 pChild->DumpAsPropertyTree(rJsonWriter);
                 sal_Int32 nLeft = pChild->get_grid_left_attach();
commit 002cd0c0c7a80a5ad488e40d3601b8e9d6aa5b19
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jun 9 10:57:41 2021 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Jul 20 11:48:06 2021 +0200

    jsdialog: don't send update if not changed checkbox state
    
    to avoid infinite updates in find & replace dialog
    
    Change-Id: If9d26cec66f2b4475c89ba394b9597bc23881341
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116886
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119197
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 3b7f84ca6b95..fd9d152ae6ed 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1083,8 +1083,10 @@ JSCheckButton::JSCheckButton(JSDialogSender* pSender, 
::CheckBox* pCheckBox,
 
 void JSCheckButton::set_active(bool active)
 {
+    bool bWasActive = get_active();
     SalInstanceCheckButton::set_active(active);
-    sendUpdate();
+    if (bWasActive != active)
+        sendUpdate();
 }
 
 JSDrawingArea::JSDrawingArea(JSDialogSender* pSender, VclDrawingArea* 
pDrawingArea,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to