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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/inc/optload.hxx | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 97f24f093336..b5e1a1aa0bc3 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -768,9 +768,9 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl, weld::TreeView&, void) m_nPrevSelectedEntry = m_xCheckLB->get_selected_index(); } -IMPL_LINK(SwCaptionOptPage, ToggleEntryHdl, const row_col&, rRowCol, void) +IMPL_LINK(SwCaptionOptPage, ToggleEntryHdl, const weld::TreeView::iter_col&, rRowCol, void) { - UpdateEntry(rRowCol.first); + UpdateEntry(m_xCheckLB->get_iter_index_in_parent(rRowCol.first)); } void SwCaptionOptPage::SaveEntry(int nEntry) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index f428406b27b4..91e41c7a8b2e 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -478,8 +478,7 @@ class SwAddStylesDlg_Impl : public SfxDialogController DECL_LINK(LeftRightHdl, weld::Button&, void); DECL_LINK(KeyInput, const KeyEvent&, bool); DECL_LINK(TreeSizeAllocHdl, const Size&, void); - typedef std::pair<int, int> row_col; - DECL_LINK(RadioToggleOnHdl, const row_col&, void); + DECL_LINK(RadioToggleOnHdl, const weld::TreeView::iter_col&, void); public: SwAddStylesDlg_Impl(weld::Window* pParent, SwWrtShell const & rWrtSh, OUString rStringArr[]); @@ -596,7 +595,7 @@ IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void) m_xHeaderTree->set_column_fixed_widths(aWidths); } -IMPL_LINK(SwAddStylesDlg_Impl, RadioToggleOnHdl, const row_col&, rRowCol, void) +IMPL_LINK(SwAddStylesDlg_Impl, RadioToggleOnHdl, const weld::TreeView::iter_col&, rRowCol, void) { for (sal_uInt16 i = 0; i <= MAXLEVEL; ++i) { diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 1db4fcbf59e5..22fef4bcd5ea 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -164,15 +164,13 @@ private: std::unique_ptr<weld::CheckButton> m_xApplyBorderCB; std::unique_ptr<weld::CustomWeld> m_xPreview; - typedef std::pair<int, int> row_col; - DECL_LINK(SelectHdl, weld::ComboBox&, void); DECL_LINK(SelectListBoxHdl, weld::ComboBox&, void); DECL_LINK(ModifyEntryHdl, weld::Entry&, void); DECL_LINK(ModifyComboHdl, weld::ComboBox&, void); DECL_LINK(OrderHdl, weld::ComboBox&, void ); DECL_LINK(ShowEntryHdl, weld::TreeView&, void); - DECL_LINK(ToggleEntryHdl, const row_col&, void); + DECL_LINK(ToggleEntryHdl, const weld::TreeView::iter_col&, void); DECL_LINK(TextFilterHdl, OUString&, bool); void ModifyHdl(); |