summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/wintypes.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--vcl/inc/listbox.hxx3
-rw-r--r--vcl/source/control/imp_listbox.cxx4
4 files changed, 7 insertions, 4 deletions
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 56b2e27c9362..1f981e3e351c 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -204,6 +204,8 @@ WinBits const WB_IGNORETAB = 0x20000000;
// Window-Bits for ListBox and MultiListBox
WinBits const WB_SIMPLEMODE = 0x20000000;
+// Special case where the listbox is used as a dropdown popup (not a combobox)
+WinBits const WB_LISTBOX_POPUP = 0x40000000;
// Window-Bits for FixedBitmap
WinBits const WB_SCALE = 0x08000000;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index aa62d67473cd..ee8f8a9d985f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -218,7 +218,7 @@ public:
// ListBox in a FloatingWindow (pParent)
ScFilterListBox::ScFilterListBox( vcl::Window* pParent, ScGridWindow* pGrid,
SCCOL nNewCol, SCROW nNewRow, ScFilterBoxMode eNewMode ) :
- ListBox( pParent, WB_AUTOHSCROLL ),
+ ListBox( pParent, WB_AUTOHSCROLL | WB_LISTBOX_POPUP ),
pGridWin( pGrid ),
nCol( nNewCol ),
nRow( nNewRow ),
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();