diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-30 07:17:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-30 19:29:21 +0100 |
commit | b15f79a8f8de27c9d186ae1fbd0c86f194aed0ac (patch) | |
tree | 3c4dc647e8ccf78c41f66e4993f3a0490c15a137 /editeng | |
parent | 32efde5cef2b8516a9decd0bf7091d7def1da971 (diff) |
loplugin:unnecessaryparen: signed numeric literals
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64
Reviewed-on: https://gerrit.libreoffice.org/45549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editdoc.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 8 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index a46330c9badf..59ebecc11a32 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -430,7 +430,7 @@ public: sal_Unicode GetExtraValue() const { return nExtraValue; } void SetExtraValue( sal_Unicode n ) { nExtraValue = n; } - bool HasValidSize() const { return aOutSz.Width() != (-1); } + bool HasValidSize() const { return aOutSz.Width() != -1; } ExtraPortionInfo* GetExtraInfos() const { return xExtraInfos.get(); } void SetExtraInfos( ExtraPortionInfo* p ) { xExtraInfos.reset(p); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 0b24721a93c7..acd94199875e 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1454,7 +1454,7 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM ) if ( aBoundary.startPos >= nCurrentPos ) aBoundary = _xBI->previousWord( aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES); - aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? aBoundary.startPos : 0 ); + aNewPaM.SetIndex( ( aBoundary.startPos != -1 ) ? aBoundary.startPos : 0 ); } return aNewPaM; @@ -1674,7 +1674,7 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara ) short nScriptType = _xBI->getScriptType( aText, nPos ); rTypes.emplace_back( nScriptType, nPos, nTextLen ); nPos = _xBI->endOfScript( aText, nPos, nScriptType ); - while ( ( nPos != (-1) ) && ( nPos < nTextLen ) ) + while ( ( nPos != -1 ) && ( nPos < nTextLen ) ) { rTypes.back().nEndPos = nPos; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 6953b98df9fa..ee2dac949f40 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -934,7 +934,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) nTmpWidth -= rPrev.GetSize().Width(); nTmpPos = nTmpPos - rPrev.GetLen(); rPrev.SetLen(rPrev.GetLen() + nTmpLen); - rPrev.GetSize().Width() = (-1); + rPrev.GetSize().Width() = -1; } DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "No more Portions left!" ); @@ -2384,7 +2384,7 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos } } else - pTextPortion->GetSize().Width() = (-1); + pTextPortion->GetSize().Width() = -1; return nSplitPortion; } @@ -2523,7 +2523,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta FindPortion( nStartPos, nPortionStart ); TextPortion& rTP = pParaPortion->GetTextPortions()[ nTP ]; rTP.SetLen( rTP.GetLen() + nNewChars ); - rTP.GetSize().Width() = (-1); + rTP.GetSize().Width() = -1; } } else @@ -2589,7 +2589,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta TextPortion& rPrev = pParaPortion->GetTextPortions()[nLastPortion - 1]; DBG_ASSERT( rPrev.GetKind() == PortionKind::TEXT, "Portion?!" ); rPrev.SetLen( rPrev.GetLen() + pTP->GetLen() ); - rPrev.GetSize().Width() = (-1); + rPrev.GetSize().Width() = -1; } pParaPortion->GetTextPortions().Remove( nLastPortion ); } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 4e24d2023c70..22299ee40f42 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -152,13 +152,13 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window const * pFra ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TitleObject ) && ( bSelection || !aSel.nStartPos ) ) { - Indent( aKeyCode.IsShift() ? (-1) : (+1) ); + Indent( aKeyCode.IsShift() ? -1 : +1 ); bKeyProcessed = true; } else if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) && !bSelection && !aSel.nEndPos && pOwner->ImplHasNumberFormat( aSel.nEndPara ) ) { - Indent( aKeyCode.IsShift() ? (-1) : (+1) ); + Indent( aKeyCode.IsShift() ? -1 : +1 ); bKeyProcessed = true; } } |