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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 4 08:30:50 UTC 2019


 vcl/source/window/seleng.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e14c61e617eb221653c176fb91c5ddc074459929
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 3 15:18:41 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 4 10:30:21 2019 +0200

    allow SelMouseButton[Down|Up] without pWin
    
    Change-Id: If5031390ac4a0cdd3dad3b43b23f4319c2dfc53a
    Reviewed-on: https://gerrit.libreoffice.org/70217
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 415999a80fa2..84481d6e1933 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 )
 bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
 {
     nFlags &= ~SelectionEngineFlags::CMDEVT;
-    if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
+    if ( !pFunctionSet || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
         return false;
 
     sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
@@ -237,7 +237,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
 bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
 {
     aWTimer.Stop();
-    if( !pFunctionSet || !pWin )
+    if (!pFunctionSet)
     {
         const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL;
         nFlags &= ~nMask;
@@ -349,7 +349,7 @@ void SelectionEngine::Reset()
 void SelectionEngine::Command( const CommandEvent& rCEvt )
 {
     // Timer aWTimer is active during enlarging a selection
-    if ( !pFunctionSet || !pWin || aWTimer.IsActive() )
+    if ( !pFunctionSet || aWTimer.IsActive() )
         return;
     aWTimer.Stop();
     if ( rCEvt.GetCommand() == CommandEventId::StartDrag )


More information about the Libreoffice-commits mailing list