[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/inc vcl/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 16 14:07:31 UTC 2019


 vcl/inc/listbox.hxx                |    1 +
 vcl/source/control/combobox.cxx    |    2 +-
 vcl/source/control/imp_listbox.cxx |    5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 00404ef77ab1a6a4c0e10be54c14649a8a66edbe
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 27 16:43:19 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Dec 16 15:06:52 2019 +0100

    tdf#129043 Correctly deliver combo box events when used with keyboard
    
    Change-Id: I82186f999e74be4aebd59d77666390a7d5e8ad81
    Reviewed-on: https://gerrit.libreoffice.org/83923
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 7de9417d5f65d35227c7f80f6d587c2a56bde4e0)
    Reviewed-on: https://gerrit.libreoffice.org/83982
    (cherry picked from commit e9ced64ffac0752e2bbd2879ea267116502606fc)
    Reviewed-on: https://gerrit.libreoffice.org/85200
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 1ee124423fc1..8faed20374e8 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -220,6 +220,7 @@ private:
     bool mbCenter : 1;           ///< center Text output
     bool mbRight : 1;            ///< right align Text output
     bool mbEdgeBlending : 1;
+    bool mbIsComboboxDropdown : 1;
 
     Link<ImplListBoxWindow*,void>  maScrollHdl;
     Link<LinkParamNone*,void>      maSelectHdl;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 31f8a0373f52..311830cfd2e5 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -748,7 +748,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt )
 
             case KEY_RETURN:
             {
-                if ((rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && IsInDropDown())
+                if (rNEvt.GetWindow() == m_pImpl->m_pSubEdit)
                 {
                     m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
                     bDone = true;
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 037fe20299f5..bddae5569d15 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -488,6 +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 );
     mbEdgeBlending      = false;
 
     // pb: #106948# explicit mirroring for calc
@@ -1638,7 +1639,9 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
         mnCurrentPos = nSelect;
         if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
         {
-            mbTravelSelect = true;
+            // tdf#129043 Correctly deliver events when changing values with arrow keys in combobox
+            if (mbIsComboboxDropdown && IsReallyVisible())
+                mbTravelSelect = true;
             mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
             ImplCallSelect();
             mbTravelSelect = false;


More information about the Libreoffice-commits mailing list