diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-12 11:21:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-28 11:23:34 +0200 |
commit | 9348b322a5c230dfcc2231661b73e480b130fcd9 (patch) | |
tree | 2c81a97d6f54229c87c5e2a37c73935ffc2527ac /scripting/source/vbaevents | |
parent | 5bcd18461b8cb63b477dbb74025374b4c963161a (diff) |
clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a
Reviewed-on: https://gerrit.libreoffice.org/36450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/vbaevents')
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 96b4ee53ba7a..ea1128344ec4 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -87,18 +87,12 @@ static const sal_Int32 DELIMLEN = strlen(DELIM); bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params ) { - if ( !( params.getLength() > 0 ) || - !( params[ 0 ] >>= evt ) ) - return false; - return true; + return ( params.getLength() > 0 ) && ( params[ 0 ] >>= evt ); } bool isMouseEventOk( awt::MouseEvent& evt, const Sequence< Any >& params ) { - if ( !( params.getLength() > 0 ) || - !( params[ 0 ] >>= evt ) ) - return false; - return true; + return ( params.getLength() > 0 ) && ( params[ 0 ] >>= evt ); } Sequence< Any > ooMouseEvtToVBADblClick( const Sequence< Any >& params ) @@ -793,14 +787,7 @@ bool DenyMouseDrag(const ScriptEvent& evt, void const * ) { awt::MouseEvent aEvent; evt.Arguments[ 0 ] >>= aEvent; - if (aEvent.Buttons == 0 ) - { - return true; - } - else - { - return false; - } + return aEvent.Buttons == 0; } |