diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-18 21:17:01 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2024-05-19 20:33:05 +0200 |
commit | 07e6ed881032d1df3ec96c93f5e6c502e021eeb6 (patch) | |
tree | 83a2e8e117759bd39097c2793d770ae7a2f0379c /svx | |
parent | b01d89eaf473870281f6ecbdeb12aa3fcd79f9bb (diff) |
Resolves: tdf#157453 support FM_PROP_LINECOUNT for combobox dropdow rows
Change-Id: I3d18ed505c2eea7305903f9a476c332db0148113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167814
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index e8c56fb0ac38..2f17f7f3a490 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2629,9 +2629,16 @@ void DbListBox::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCurso DbCellControl::Init( rParent, xCursor ); } -void DbListBox::implAdjustGenericFieldSetting( const Reference< XPropertySet >& /*rxModel*/ ) +void DbListBox::implAdjustGenericFieldSetting(const Reference<XPropertySet>& _rxModel) { - // ignore FM_PROP_LINECOUNT + DBG_ASSERT( m_pWindow, "DbListBox::implAdjustGenericFieldSetting: not to be called without window!" ); + DBG_ASSERT( _rxModel.is(), "DbListBox::implAdjustGenericFieldSetting: invalid model!" ); + if ( m_pWindow && _rxModel.is() ) + { + sal_Int16 nLines = getINT16( _rxModel->getPropertyValue( FM_PROP_LINECOUNT ) ); + weld::ComboBox& rComboBox = static_cast<ListBoxControl*>(m_pWindow.get())->get_widget(); + rComboBox.set_max_drop_down_rows(nLines); + } } CellControllerRef DbListBox::CreateController() const |