[Libreoffice-commits] core.git: include/svx svx/source

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Aug 29 13:37:17 UTC 2017


 include/svx/listctrl.hxx       |    1 +
 svx/source/dialog/listctrl.cxx |   13 +++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit 492462a3e79a3d6577e4b3a543ae059a4850267a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Aug 28 22:32:36 2017 +0200

    handle scroll wheel scrolling in new ListControl
    
    Change-Id: I8dc68b674aabf446c4b949770ae066d41204efc3
    Reviewed-on: https://gerrit.libreoffice.org/41680
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/include/svx/listctrl.hxx b/include/svx/listctrl.hxx
index 6f303aa7dec9..ac88c7a1e32b 100644
--- a/include/svx/listctrl.hxx
+++ b/include/svx/listctrl.hxx
@@ -48,6 +48,7 @@ public:
     virtual Size GetOptimalSize() const override;
     virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
     virtual void Resize() override;
+    virtual bool EventNotify( NotifyEvent& rNEvt ) override;
 
     DECL_LINK( ScrollHdl, ScrollBar*, void );
 };
diff --git a/svx/source/dialog/listctrl.cxx b/svx/source/dialog/listctrl.cxx
index 29a8b14410d3..b1ecaf5b8972 100644
--- a/svx/source/dialog/listctrl.cxx
+++ b/svx/source/dialog/listctrl.cxx
@@ -142,4 +142,17 @@ void ListControl::deleteEntry(sal_uInt32 nPos)
     RecalcAll();
 }
 
+bool ListControl::EventNotify( NotifyEvent& rNEvt )
+{
+    if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
+    {
+        const CommandEvent* pEvent = rNEvt.GetCommandEvent();
+        if (pEvent && pEvent->GetCommand() == CommandEventId::Wheel)
+        {
+            HandleScrollCommand(*pEvent, nullptr, mpScrollBar.get());
+        }
+    }
+    return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list