[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/tools sc/source vcl/inc vcl/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 14 14:22:44 UTC 2020
include/tools/wintypes.hxx | 2 ++
sc/source/ui/view/gridwin.cxx | 2 +-
vcl/inc/listbox.hxx | 3 ++-
vcl/source/control/imp_listbox.cxx | 4 ++--
4 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit f475d0574a2df630b2940f0204bb13199f823706
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Feb 13 07:38:54 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Feb 14 15:22:13 2020 +0100
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 at cib.de>
(cherry picked from commit d92463c88a557eea7a439def39659b1409772583)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88504
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index f3ac3956d9ee..730f35c15826 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -202,6 +202,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 f26f3c77e1cc..cf118dc46a96 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -234,7 +234,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 bddae5569d15..6a4219c78fa2 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -488,7 +488,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
@@ -1640,7 +1640,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();
More information about the Libreoffice-commits
mailing list