[Libreoffice-commits] core.git: vcl/inc vcl/jsdialog vcl/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 26 09:34:50 UTC 2020


 vcl/inc/salvtables.hxx           |   17 +++++++++++++++++
 vcl/jsdialog/jsdialogbuilder.cxx |    5 +++++
 vcl/source/app/salvtables.cxx    |   20 --------------------
 3 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit e013d21d80893279e9f4148e5e55fae63ab028f2
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Nov 12 14:28:47 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Nov 26 10:33:53 2020 +0100

    jsdialog: signal when treeview element is toggled
    
    Change-Id: If69eac02db386fd94420aff5a8b082281e913c15
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106658
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 343da9cf79f0..298f52f53637 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1300,6 +1300,23 @@ public:
     virtual ~SalInstanceTextView() override;
 };
 
+struct SalInstanceTreeIter : public weld::TreeIter
+{
+    SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
+        : iter(pOrig ? pOrig->iter : nullptr)
+    {
+    }
+    SalInstanceTreeIter(SvTreeListEntry* pIter)
+        : iter(pIter)
+    {
+    }
+    virtual bool equal(const TreeIter& rOther) const override
+    {
+        return iter == static_cast<const SalInstanceTreeIter&>(rOther).iter;
+    }
+    SvTreeListEntry* iter;
+};
+
 class SalInstanceTreeView : public SalInstanceContainer, public virtual weld::TreeView
 {
 protected:
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 1ad0f6e73e90..b72dae272500 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -749,7 +749,12 @@ void JSTreeView::set_toggle(int pos, TriState eState, int col)
         pEntry = m_xTreeView->Next(pEntry);
 
     if (pEntry)
+    {
         SalInstanceTreeView::set_toggle(pEntry, eState, col);
+        signal_toggled(iter_col(SalInstanceTreeIter(pEntry), col));
+
+        notifyDialogState();
+    }
 }
 
 void JSTreeView::select(int pos)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4483e087c1e5..c4ee05c86b84 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3263,26 +3263,6 @@ IMPL_LINK(SalInstanceEntry, CursorListener, VclWindowEvent&, rEvent, void)
 
 IMPL_LINK_NOARG(SalInstanceEntry, ActivateHdl, Edit&, bool) { return m_aActivateHdl.Call(*this); }
 
-namespace
-{
-struct SalInstanceTreeIter : public weld::TreeIter
-{
-    SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
-        : iter(pOrig ? pOrig->iter : nullptr)
-    {
-    }
-    SalInstanceTreeIter(SvTreeListEntry* pIter)
-        : iter(pIter)
-    {
-    }
-    virtual bool equal(const TreeIter& rOther) const override
-    {
-        return iter == static_cast<const SalInstanceTreeIter&>(rOther).iter;
-    }
-    SvTreeListEntry* iter;
-};
-}
-
 class SalInstanceTreeView;
 
 static SalInstanceTreeView* g_DragSource;


More information about the Libreoffice-commits mailing list