From 1f08bff31238d5818c54a0b86570689644dff087 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 May 2018 17:14:18 +0200 Subject: new loplugin:shouldreturnbool look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins Reviewed-by: Noel Grandin --- forms/source/richtext/richtextimplcontrol.cxx | 6 +++--- forms/source/richtext/richtextimplcontrol.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'forms') diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 9059870ebdd5..52c0a0b6b707 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -552,7 +552,7 @@ namespace frm } } - long RichTextControlImpl::HandleCommand( const CommandEvent& _rEvent ) + bool RichTextControlImpl::HandleCommand( const CommandEvent& _rEvent ) { if ( ( _rEvent.GetCommand() == CommandEventId::Wheel ) || ( _rEvent.GetCommand() == CommandEventId::StartAutoScroll ) @@ -560,9 +560,9 @@ namespace frm ) { m_pAntiImpl->HandleScrollCommand( _rEvent, m_pHScroll, m_pVScroll ); - return 1; + return true; } - return 0; + return false; } diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index cac441a1ed83..635799baeb40 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -145,7 +145,7 @@ namespace frm void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize ); /// handles command events arrived at the anti-impl control - long HandleCommand( const CommandEvent& _rEvent ); + bool HandleCommand( const CommandEvent& _rEvent ); private: // updates the cache with the state provided by the given attribute handler -- cgit