diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-28 16:05:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-29 11:51:17 +0200 |
commit | 652e2136984a5b023b5551914cb9786a0d8f1540 (patch) | |
tree | 35c97066b96e5ba9277e4df34e162d699d9fc1a5 /dbaccess | |
parent | 7f8f7e7284e29cc0e8a0f282761abea428d0eb33 (diff) |
change TreeView toggle signal to provide an iter instead of a row index
Change-Id: Ib611780816d170daa40f394b9798640ff6284d68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95056
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/tabletree.hxx | 4 |
4 files changed, 7 insertions, 11 deletions
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index b3170487ed32..a1e3d872e840 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -485,7 +485,7 @@ void OTableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry) implEmphasize(_pEntry, SvButtonState::Checked == eState); } -void TableTreeListBox::checkedButton_noBroadcast(weld::TreeIter& rEntry) +void TableTreeListBox::checkedButton_noBroadcast(const weld::TreeIter& rEntry) { if (!m_bShowToggles) return; @@ -564,7 +564,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked, } } -void TableTreeListBox::implEmphasize(weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants, bool _bUpdateAncestors) +void TableTreeListBox::implEmphasize(const weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants, bool _bUpdateAncestors) { // special emphasizing handling for the "all objects" entry bool bAllObjectsEntryAffected = haveVirtualRoot() && (getAllObjectsEntry()->equal(rEntry)); diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 586cf77bf8a4..eb39f0b27bf7 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -330,12 +330,9 @@ namespace dbaui return nResult; } - IMPL_LINK_NOARG(OTableSubscriptionPage, OnTreeEntryChecked, const row_col&, void) + IMPL_LINK(OTableSubscriptionPage, OnTreeEntryChecked, const weld::TreeView::iter_col&, rRowCol, void) { - weld::TreeView& rTreeView = m_xTablesList->GetWidget(); - std::unique_ptr<weld::TreeIter> xEntry(rTreeView.make_iterator()); - if (rTreeView.get_cursor(xEntry.get())) - m_xTablesList->checkedButton_noBroadcast(*xEntry); + m_xTablesList->checkedButton_noBroadcast(rRowCol.first); callModifiedHdl(); } diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 0eb1273d1eb7..34618a0432be 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -54,8 +54,7 @@ namespace dbaui virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override; virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override; - typedef std::pair<int, int> row_col; - DECL_LINK(OnTreeEntryChecked, const row_col&, void); + DECL_LINK(OnTreeEntryChecked, const weld::TreeView::iter_col&, void); /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg> */ diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 9be6310cd59f..58a6bba4322e 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -200,11 +200,11 @@ public: void CheckButtons(); // make the button states consistent (bottom-up) - void checkedButton_noBroadcast(weld::TreeIter& rEntry); + void checkedButton_noBroadcast(const weld::TreeIter& rEntry); private: TriState implDetermineState(weld::TreeIter& rEntry); - void implEmphasize(weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants = true, bool _bUpdateAncestors = true); + void implEmphasize(const weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants = true, bool _bUpdateAncestors = true); /** adds the given entry to our list @precond |