summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-28 16:05:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-29 11:51:17 +0200
commit652e2136984a5b023b5551914cb9786a0d8f1540 (patch)
tree35c97066b96e5ba9277e4df34e162d699d9fc1a5 /cui
parent7f8f7e7284e29cc0e8a0f282761abea428d0eb33 (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')
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx5
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx4
-rw-r--r--cui/source/dialogs/multipat.cxx4
-rw-r--r--cui/source/inc/SvxNotebookbarConfigPage.hxx3
-rw-r--r--cui/source/inc/SvxToolbarConfigPage.hxx3
-rw-r--r--cui/source/inc/multipat.hxx3
-rw-r--r--cui/source/inc/optlingu.hxx8
-rw-r--r--cui/source/options/certpath.cxx4
-rw-r--r--cui/source/options/certpath.hxx3
-rw-r--r--cui/source/options/optjava.cxx4
-rw-r--r--cui/source/options/optjava.hxx3
-rw-r--r--cui/source/options/optlingu.cxx20
12 files changed, 28 insertions, 36 deletions
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 584767d6af5a..3903a3366eb6 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -546,9 +546,10 @@ void SvxNotebookbarEntriesListBox::ChangedVisibility(int nRow)
sfx2::SfxNotebookBar::ReloadNotebookBar(sUIPath);
}
-IMPL_LINK(SvxNotebookbarEntriesListBox, CheckButtonHdl, const row_col&, rRowCol, void)
+IMPL_LINK(SvxNotebookbarEntriesListBox, CheckButtonHdl, const weld::TreeView::iter_col&, rRowCol,
+ void)
{
- ChangedVisibility(rRowCol.first);
+ ChangedVisibility(m_xControl->get_iter_index_in_parent(rRowCol.first));
}
IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 7bc2115b36fa..5efa3283498b 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -865,9 +865,9 @@ void SvxToolbarEntriesListBox::ChangedVisibility(int nRow)
}
}
-IMPL_LINK(SvxToolbarEntriesListBox, CheckButtonHdl, const row_col&, rRowCol, void)
+IMPL_LINK(SvxToolbarEntriesListBox, CheckButtonHdl, const weld::TreeView::iter_col&, rRowCol, void)
{
- ChangedVisibility(rRowCol.first);
+ ChangedVisibility(m_xControl->get_iter_index_in_parent(rRowCol.first));
}
IMPL_LINK(SvxToolbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 48dc545f93ea..5b38d584d76f 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -70,9 +70,9 @@ void SvxMultiPathDialog::HandleEntryChecked(int nRow)
}
}
-IMPL_LINK(SvxMultiPathDialog, CheckHdl_Impl, const row_col&, rRowCol, void)
+IMPL_LINK(SvxMultiPathDialog, CheckHdl_Impl, const weld::TreeView::iter_col&, rRowCol, void)
{
- HandleEntryChecked(rRowCol.first);
+ HandleEntryChecked(m_xRadioLB->get_iter_index_in_parent(rRowCol.first));
}
void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId)
diff --git a/cui/source/inc/SvxNotebookbarConfigPage.hxx b/cui/source/inc/SvxNotebookbarConfigPage.hxx
index 47870949d9aa..7e417463ab30 100644
--- a/cui/source/inc/SvxNotebookbarConfigPage.hxx
+++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx
@@ -75,8 +75,7 @@ public:
class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox
{
void ChangedVisibility(int nRow);
- typedef std::pair<int, int> row_col;
- DECL_LINK(CheckButtonHdl, const row_col&, void);
+ DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
public:
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
index 5902cdf4b268..00672453df1b 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -77,8 +77,7 @@ class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox
{
void ChangedVisibility(int nRow);
- typedef std::pair<int, int> row_col;
- DECL_LINK(CheckButtonHdl, const row_col&, void);
+ DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
public:
diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
index 67832c1e8cae..fcc60bb08693 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -44,8 +44,7 @@ private:
DECL_LINK(AddHdl_Impl, weld::Button&, void);
DECL_LINK(DelHdl_Impl, weld::Button&, void);
DECL_LINK(SelectHdl_Impl, weld::TreeView&, 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);
public:
SvxMultiPathDialog(weld::Window* pParent);
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index bc12d3991daa..35d34eb101db 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -67,8 +67,7 @@ class SvxEditModulesDlg : public weld::GenericDialogController
DECL_LINK( ClickHdl_Impl, weld::Button&, void );
DECL_LINK( BackHdl_Impl, weld::Button&, void );
DECL_LINK( LangSelectListBoxHdl_Impl, weld::ComboBox&, void );
- typedef std::pair<int, int> row_col;
- DECL_LINK( BoxCheckButtonHdl_Impl, const row_col&, void );
+ DECL_LINK( BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
public:
@@ -125,9 +124,8 @@ private:
DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
DECL_LINK( ClickHdl_Impl, weld::Button&, void );
DECL_LINK( BoxDoubleClickHdl_Impl, weld::TreeView&, bool );
- typedef std::pair<int, int> row_col;
- DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const row_col&, void );
- DECL_LINK( DicsBoxCheckButtonHdl_Impl, const row_col&, void );
+ DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
+ DECL_LINK( DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
DECL_LINK( PostDblClickHdl_Impl, void *, void);
void UpdateModulesBox_Impl();
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());