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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 15 20:33:22 UTC 2019


 include/vcl/GestureEvent.hxx |   19 +++++++++++++++++++
 vcl/source/app/svapp.cxx     |    4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit fc3081a9c4e92229ebcd07b6326f1fc49f21e029
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 15 19:55:59 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 15 22:31:37 2019 +0200

    cid#1448245 uninit scalar field
    
    and
    
    cid#1448340 uninit scalar field
    
    Change-Id: Idfd0944c1a6765593e334b1db56a80e144aedd5e
    Reviewed-on: https://gerrit.libreoffice.org/75651
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/GestureEvent.hxx b/include/vcl/GestureEvent.hxx
index 2070fc76d39a..7b6f25719c7a 100644
--- a/include/vcl/GestureEvent.hxx
+++ b/include/vcl/GestureEvent.hxx
@@ -35,6 +35,25 @@ public:
 
     sal_Int32 mnOffset;
     PanningOrientation meOrientation;
+
+    GestureEvent()
+        : mnX(0)
+        , mnY(0)
+        , meEventType(GestureEventType::PanningBegin)
+        , mnOffset(0)
+        , meOrientation(PanningOrientation::Horizontal)
+    {
+    }
+
+    GestureEvent(sal_Int32 nX, sal_Int32 nY, GestureEventType eEventType, sal_Int32 nOffset,
+                 PanningOrientation eOrientation)
+        : mnX(nX)
+        , mnY(nY)
+        , meEventType(eEventType)
+        , mnOffset(nOffset)
+        , meOrientation(eOrientation)
+    {
+    }
 };
 
 #endif // INCLUDED_VCL_GESTUREEVENT_HXX
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5c4e6157cb9b..4967144e38e4 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -847,13 +847,13 @@ ImplSVEvent* Application::PostGestureEvent(VclEventId nEvent, vcl::Window* pWin,
         aTransformedPosition.AdjustX(pWin->GetOutOffXPixel());
         aTransformedPosition.AdjustY(pWin->GetOutOffYPixel());
 
-        const GestureEvent aGestureEvent{
+        const GestureEvent aGestureEvent(
             sal_Int32(aTransformedPosition.X()),
             sal_Int32(aTransformedPosition.Y()),
             pGestureEvent->meEventType,
             pGestureEvent->mnOffset,
             pGestureEvent->meOrientation
-        };
+        );
 
         std::unique_ptr<ImplPostEventData> pPostEventData(new ImplPostEventData(nEvent, pWin, aGestureEvent));
 


More information about the Libreoffice-commits mailing list