diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-18 21:17:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-19 16:44:09 +0200 |
commit | c5fb86f91c3d799cb3817706a5c9a344939a4f1e (patch) | |
tree | 545be15b9478d6c24043a3f33279d071ac090d64 /svx | |
parent | 445ee505b63686161962abfe7a2aaafe8a03b4be (diff) |
Resolves: tdf#157453 support FM_PROP_LINECOUNT for combobox dropdow rows
Change-Id: I3d18ed505c2eea7305903f9a476c332db0148113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167837
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.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 31128317f9cc..8d728384cd5c 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 |