diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 13:13:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 14:52:50 +0200 |
commit | 447a013299d148df12ff17306fff77bb7f85eba1 (patch) | |
tree | d577aabfb9b650bc46fdcf2289aae2b1561f1e4e /editeng | |
parent | 78098b8494be7123bc4a8b50faa13445e5afd8ce (diff) |
clang-tidy readability-simplify-boolean-expr in dbaccess..framework
Change-Id: I96e1bd4000f4ade6ccfac53c57653772b249df99
Reviewed-on: https://gerrit.libreoffice.org/36678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/eehtml.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 5 |
3 files changed, 4 insertions, 13 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0a4c315bf970..33e04c4961c3 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2694,13 +2694,9 @@ bool EditEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) bool EditEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent ) { - if( EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) && + return EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) && ( KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) && - ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) ) - { - return true; - } - return false; + ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ); } bool EditEngine::HasValidData( const css::uno::Reference< css::datatransfer::XTransferable >& rTransferable ) diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 06db8143e594..ca0d8a3d8b9a 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -740,9 +740,7 @@ bool EditHTMLParser::ThrowAwayBlank() // A blank must be thrown away if the new text begins with a Blank and // if the current paragraph is empty or ends with a Blank... ContentNode* pNode = aCurSel.Max().GetNode(); - if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) ) - return false; - return true; + return !(pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' )); } bool EditHTMLParser::HasTextInCurrentPara() diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index e18a660e5df3..bd55ed046413 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -510,10 +510,7 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxIt case EE_PARA_NUMBULLET: { uno::Reference< container::XIndexReplace > xRule; - if( !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()) ) - return true; - - return false; + return !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()); } case WID_NUMLEVEL: |