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 /cui/source/options | |
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 'cui/source/options')
-rw-r--r-- | cui/source/options/certpath.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/certpath.hxx | 3 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optjava.hxx | 3 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 20 |
5 files changed, 15 insertions, 19 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index b98811dc4827..3f2359a5ac50 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -155,9 +155,9 @@ CertPathDialog::~CertPathDialog() { } -IMPL_LINK(CertPathDialog, CheckHdl_Impl, const row_col&, rRowCol, void) +IMPL_LINK(CertPathDialog, CheckHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void) { - HandleEntryChecked(rRowCol.first); + HandleEntryChecked(m_xCertPathList->get_iter_index_in_parent(rRowCol.first)); } void CertPathDialog::HandleEntryChecked(int nRow) diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx index 7ab30955dff6..75d53ae10100 100644 --- a/cui/source/options/certpath.hxx +++ b/cui/source/options/certpath.hxx @@ -20,8 +20,7 @@ class CertPathDialog : public weld::GenericDialogController OUString m_sManualLabel; OUString m_sManualPath; - typedef std::pair<int, int> row_col; - DECL_LINK(CheckHdl_Impl, const row_col&, void); + DECL_LINK(CheckHdl_Impl, const weld::TreeView::iter_col&, void); DECL_LINK(ManualHdl_Impl, weld::Button&, void); DECL_LINK(OKHdl_Impl, weld::Button&, void); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 0eeaec393c6d..2d4df6cb3069 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -141,9 +141,9 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, EnableHdl_Impl, weld::Button&, void) m_xJavaList->set_sensitive(bEnable); } -IMPL_LINK(SvxJavaOptionsPage, CheckHdl_Impl, const row_col&, rRowCol, void) +IMPL_LINK(SvxJavaOptionsPage, CheckHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void) { - HandleCheckEntry(rRowCol.first); + HandleCheckEntry(m_xJavaList->get_iter_index_in_parent(rRowCol.first)); } IMPL_LINK_NOARG(SvxJavaOptionsPage, SelectHdl_Impl, weld::TreeView&, void) diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index f117746ebeec..0bfae107948f 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -82,8 +82,7 @@ private: std::unique_ptr<weld::Widget> m_xJavaFrame; DECL_LINK(EnableHdl_Impl, weld::Button&, void); - typedef std::pair<int, int> row_col; - DECL_LINK(CheckHdl_Impl, const row_col&, void); + DECL_LINK(CheckHdl_Impl, const weld::TreeView::iter_col&, void); DECL_LINK(SelectHdl_Impl, weld::TreeView&, void); DECL_LINK(AddHdl_Impl, weld::Button&, void); DECL_LINK(ParameterHdl_Impl, weld::Button&, void); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 3a45faab808e..525a2607824f 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1302,21 +1302,19 @@ IMPL_LINK_NOARG(SvxLinguTabPage, PostDblClickHdl_Impl, void*, void) ClickHdl_Impl(*m_xLinguModulesEditPB); } -IMPL_LINK(SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl, const row_col&, rRowCol, void) +IMPL_LINK(SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void) { if (!pLinguData) return; - auto nPos = rRowCol.first; - pLinguData->Reconfigure(m_xLinguModulesCLB->get_text(nPos, 1), - m_xLinguModulesCLB->get_toggle(nPos, 0) == TRISTATE_TRUE); + pLinguData->Reconfigure(m_xLinguModulesCLB->get_text(rRowCol.first, 1), + m_xLinguModulesCLB->get_toggle(rRowCol.first, 0) == TRISTATE_TRUE); } -IMPL_LINK(SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl, const row_col&, rRowCol, void) +IMPL_LINK(SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void) { - auto nPos = rRowCol.first; - const uno::Reference<XDictionary> &rDic = aDics.getConstArray()[ nPos ]; + const uno::Reference<XDictionary> &rDic = aDics.getConstArray()[m_xLinguDicsCLB->get_iter_index_in_parent(rRowCol.first)]; if (LinguMgr::GetIgnoreAllList() == rDic) - m_xLinguDicsCLB->set_toggle(nPos, TRISTATE_TRUE, 0); + m_xLinguDicsCLB->set_toggle(rRowCol.first, TRISTATE_TRUE, 0); } IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void) @@ -1621,15 +1619,15 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, weld::TreeView&, rBox, void ) m_xPrioDownPB->set_sensitive(!bDisableDown); } -IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, const row_col&, rRowCol, void ) +IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void ) { - auto nPos = rRowCol.first; - ModuleUserData_Impl* pData = reinterpret_cast<ModuleUserData_Impl*>(m_xModulesCLB->get_id(nPos).toInt64()); + ModuleUserData_Impl* pData = reinterpret_cast<ModuleUserData_Impl*>(m_xModulesCLB->get_id(rRowCol.first).toInt64()); if (pData->IsParent() || pData->GetType() != TYPE_HYPH) return; // make hyphenator checkboxes function as radio-buttons // (at most one box may be checked) + auto nPos = m_xModulesCLB->get_iter_index_in_parent(rRowCol.first); for (int i = 0, nEntryCount = m_xModulesCLB->n_children(); i < nEntryCount; ++i) { pData = reinterpret_cast<ModuleUserData_Impl*>(m_xModulesCLB->get_id(i).toInt64()); |