From 93e55876615bcf6eef3b11a7741cf47caa322101 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 14 Aug 2020 10:02:41 +0200 Subject: improve dodgy code adding together constants like this is not safe Change-Id: I6c92b591e623fed9adcf76c08fcd1fb136f8d423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100724 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/docvw/edtwin.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 49d759d89aaa..f35cf8705d21 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4285,9 +4285,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) else { if( !rMEvt.IsSynthetic() && - !(( MOUSE_LEFT + KEY_MOD1 == - rMEvt.GetModifier() + rMEvt.GetButtons() ) && - rSh.Is_FnDragEQBeginDrag() && !rSh.IsAddMode() )) + !( MOUSE_LEFT == rMEvt.GetButtons() && + KEY_MOD1 == rMEvt.GetModifier() && + rSh.Is_FnDragEQBeginDrag() && + !rSh.IsAddMode() ) ) { rSh.Drag( &aDocPt, false ); -- cgit