From aa51774e6a309f277e71ca3a3b9d5d5b4b3dbf1a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 Feb 2019 12:56:52 +0200 Subject: loplugin:simplifybool, check for !(!a op !b) Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/presenter/PresenterScrollBar.cxx | 2 +- sdext/source/presenter/PresenterTextView.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index bd156861c44f..9be3b86776e2 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -185,7 +185,7 @@ void PresenterScrollBar::SetThumbPosition ( { nPosition = ValidateThumbPosition(nPosition); - if (!(nPosition != mnThumbPosition && ! mbIsNotificationActive)) + if (nPosition == mnThumbPosition || mbIsNotificationActive) return; mnThumbPosition = nPosition; diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 4feb8d92ad21..eb995dd935b3 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -1096,8 +1096,8 @@ void PresenterTextCaret::SetPosition ( const sal_Int32 nParagraphIndex, const sal_Int32 nCharacterIndex) { - if (!(mnParagraphIndex != nParagraphIndex - || mnCharacterIndex != nCharacterIndex)) + if (mnParagraphIndex == nParagraphIndex + && mnCharacterIndex == nCharacterIndex) return; if (mnParagraphIndex >= 0) -- cgit