From 7f832dbb5bc585acf5d1855cc5349599c077c7b5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 9 Feb 2021 16:50:22 +0000 Subject: Revert "on SelMouseButtonDown check if window pointer is not null" because there is no pWin for the cases where an EditEngine is hosted in a native widget, e.g. comment in a sidebar in writer or format header/footer in calc's format page, header/footer, edit... and with change applied clicking doesn't move the cursor This reverts commit 0a2fa32f8756b3c99975df6d98736a8e9abb625a. Change-Id: Ie1da24d22b6d298f0c074f7bf187c5d891b78368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110648 Reviewed-by: Pranam Lashkari Tested-by: Jenkins (cherry picked from commit 2d154d55db925dfa20358faa0302d4d942496aee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110677 Tested-by: Jenkins CollaboraOffice --- vcl/source/window/seleng.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 85719192aedb..41d0d5f89ec9 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 || rMEvt.GetClicks() > 1 || !pWin ) + if ( !pFunctionSet || rMEvt.GetClicks() > 1 ) return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; -- cgit