diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-02-13 07:38:54 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-02-14 15:21:51 +0100 |
commit | 1283044a47277e8b3de51c712cd72a0ffec06024 (patch) | |
tree | 351103e1e476e5396d59eed6da2157c6d1acc439 /vcl | |
parent | cd4e5916347b4578d1dea77759386666d60a3ec8 (diff) |
tdf#130325 Fix listbox used as dropdown
In this case, the listbox is not used as a static widget,
also not as a combobox with dropdown.
Instead the listbox is placed in a popup to choose values from.
Need to handle this case similiar to the combobox dropdown
(Cursor movement only travels through items, Return selects one item).
Regression from 7de9417d5f65d35227c7f80f6d587c2a56bde4e0
Change-Id: Idadc3da5847e12e1408203b13ab59eb53fe14eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88581
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit d92463c88a557eea7a439def39659b1409772583)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88503
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/listbox.hxx | 3 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 8faed20374e8..970fe1364981 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -220,7 +220,8 @@ private: bool mbCenter : 1; ///< center Text output bool mbRight : 1; ///< right align Text output bool mbEdgeBlending : 1; - bool mbIsComboboxDropdown : 1; + /// Listbox is actually a dropdown (either combobox, or popup window treated as dropdown) + bool mbIsDropdown : 1; Link<ImplListBoxWindow*,void> maScrollHdl; Link<LinkParamNone*,void> maSelectHdl; diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index e87281447bf1..dee65a2c2a80 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -483,7 +483,7 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle ) mbCenter = ( nWinStyle & WB_CENTER ); mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ); mbSort = ( nWinStyle & WB_SORT ); - mbIsComboboxDropdown = ( nWinStyle & WB_DROPDOWN ); + mbIsDropdown = ( nWinStyle & WB_DROPDOWN ) || ( nWinStyle & WB_LISTBOX_POPUP ); mbEdgeBlending = false; // pb: #106948# explicit mirroring for calc @@ -1635,7 +1635,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange)) { // tdf#129043 Correctly deliver events when changing values with arrow keys in combobox - if (mbIsComboboxDropdown && IsReallyVisible()) + if (mbIsDropdown && IsReallyVisible()) mbTravelSelect = true; mnSelectModifier = rKEvt.GetKeyCode().GetModifier(); ImplCallSelect(); |