diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-05 16:11:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-08 20:21:35 +0200 |
commit | cd384e2d31f74223948ea70d8aa3c318d3ceeb50 (patch) | |
tree | 49ae5191c2bd4b13c3cd547951933fbc37cda0fa /cui/source/dialogs/srchxtra.cxx | |
parent | c3669c8bd62ecf5eaa6b5e95289825bc11b2688a (diff) |
rework treeview initial toggle button col to be like expander col
cause this assumption is baked into the vcl one making it hard
to adapt remaining cases
Change-Id: I75dd5264c65b1ffbf4d26c9a86f6d4d08b400d90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95622
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/dialogs/srchxtra.cxx')
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 2a68293f00cf..513501700970 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -114,9 +114,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, m_xAttrLB->set_size_request(m_xAttrLB->get_approximate_digit_width() * 50, m_xAttrLB->get_height_rows(12)); - std::vector<int> aWidths; - aWidths.push_back(m_xAttrLB->get_checkbox_column_width()); - m_xAttrLB->set_column_fixed_widths(aWidths); + m_xAttrLB->enable_toggle_buttons(weld::ColumnToggleType::Check); m_xOKBtn->connect_clicked(LINK( this, SvxSearchAttributeDialog, OKHdl)); @@ -150,8 +148,8 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, { m_xAttrLB->append(); const int nRow = m_xAttrLB->n_children() - 1; - m_xAttrLB->set_toggle(nRow, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE, 0); - m_xAttrLB->set_text(nRow, SvxAttrNameTable::GetString(nId), 1); + m_xAttrLB->set_toggle(nRow, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); + m_xAttrLB->set_text(nRow, SvxAttrNameTable::GetString(nId), 0); m_xAttrLB->set_id(nRow, OUString::number(nSlot)); } else @@ -176,7 +174,7 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) for (int i = 0, nCount = m_xAttrLB->n_children(); i < nCount; ++i) { sal_uInt16 nSlot = m_xAttrLB->get_id(i).toUInt32(); - bool bChecked = m_xAttrLB->get_toggle(i, 0) == TRISTATE_TRUE; + bool bChecked = m_xAttrLB->get_toggle(i) == TRISTATE_TRUE; sal_uInt16 j; for ( j = rList.Count(); j; ) |