Kaydet (Commit) e14c61e6 authored tarafından Caolán McNamara's avatar Caolán McNamara

allow SelMouseButton[Down|Up] without pWin

Change-Id: If5031390ac4a0cdd3dad3b43b23f4319c2dfc53a
Reviewed-on: https://gerrit.libreoffice.org/70217
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3259c105
...@@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) ...@@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 )
bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{ {
nFlags &= ~SelectionEngineFlags::CMDEVT; nFlags &= ~SelectionEngineFlags::CMDEVT;
if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) if ( !pFunctionSet || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
return false; return false;
sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
...@@ -237,7 +237,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) ...@@ -237,7 +237,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
{ {
aWTimer.Stop(); aWTimer.Stop();
if( !pFunctionSet || !pWin ) if (!pFunctionSet)
{ {
const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL; const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL;
nFlags &= ~nMask; nFlags &= ~nMask;
...@@ -349,7 +349,7 @@ void SelectionEngine::Reset() ...@@ -349,7 +349,7 @@ void SelectionEngine::Reset()
void SelectionEngine::Command( const CommandEvent& rCEvt ) void SelectionEngine::Command( const CommandEvent& rCEvt )
{ {
// Timer aWTimer is active during enlarging a selection // Timer aWTimer is active during enlarging a selection
if ( !pFunctionSet || !pWin || aWTimer.IsActive() ) if ( !pFunctionSet || aWTimer.IsActive() )
return; return;
aWTimer.Stop(); aWTimer.Stop();
if ( rCEvt.GetCommand() == CommandEventId::StartDrag ) if ( rCEvt.GetCommand() == CommandEventId::StartDrag )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment