summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-14 17:14:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-11 11:38:15 +0200
commit1f08bff31238d5818c54a0b86570689644dff087 (patch)
treed4d6f4b62a3c48ddeb85ba89818247c17f2578c8 /forms
parentff130af9661a57d290dbf89b54a4c0ce8d0f71ea (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx6
-rw-r--r--forms/source/richtext/richtextimplcontrol.hxx2
2 files changed, 4 insertions, 4 deletions
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