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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 1546fb1fd0e8..8dbb24fc91ee 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -1474,7 +1474,7 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point SwTwips& rPointX = aRectFnSet.IsVert() ? aPt.Y() : aPt.X(); SwTwips& rPointY = aRectFnSet.IsVert() ? aPt.X() : aPt.Y(); - const SwTwips nXDiff = aRectFnSet.XDiff( nLeft, rPointX ) * ( bRTL ? (-1) : 1 ); + const SwTwips nXDiff = aRectFnSet.XDiff( nLeft, rPointX ) * ( bRTL ? -1 : 1 ); const SwTwips nYDiff = aRectFnSet.YDiff( nTop, rPointY ); bCloseToRow = nXDiff >= 0 && nXDiff < nFuzzy; diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index b72a02ce5ab9..8c61f32042d4 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -606,7 +606,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) aRectFnSet.GetLeft(rCF.pFrame->getFrameArea()) ) && nHeight == aRectFnSet.GetHeight(rCF.pFrame->getFrameArea()) ) { - nXPos += ( bRTL ? (-1) : 1 ) * + nXPos += ( bRTL ? -1 : 1 ) * aRectFnSet.GetWidth(rCF.pFrame->getFrameArea()); ++nCellCnt; } @@ -1509,7 +1509,7 @@ static SwTwips lcl_CalcWish( const SwLayoutFrame *pCell, long nWish, pTmp = static_cast<const SwLayoutFrame*>(pTmp->GetPrev()); sal_Int64 nTmp = pTmp->GetFormat()->GetFrameSize().GetWidth(); // multiply in 64-bit to avoid overflow here! - nRet += ( bRTL ? ( -1 ) : 1 ) * nTmp * nAct / nWish; + nRet += ( bRTL ? -1 : 1 ) * nTmp * nAct / nWish; } pTmp = pTmp->GetUpper()->GetUpper(); if ( pTmp && !pTmp->IsCellFrame() ) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index a517dffe03ea..0e70d550f67f 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2865,7 +2865,7 @@ void WW8TabDesc::FinishSwTable() { const long nRowSpanSet = (n == 0) && (i == 0) ? nRowSpan : - ((-1) * (nRowSpan - n)); + (-1 * (nRowSpan - n)); SwTableBox* pCurrentBox = rRow[i]; pCurrentBox->setRowSpan(nRowSpanSet); diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 09bced48737c..6275fc7f9421 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -229,7 +229,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) short int nFirstLineOffset = aParaMargin.GetTextFirstLineOfst(); aParaMargin.SetTextLeft( aParaMargin.GetTextLeft() + nFirstLineOffset ); aParaMargin.SetRight( aParaMargin.GetRight() ); - aParaMargin.SetTextFirstLineOfst( nFirstLineOffset * (-1) ); + aParaMargin.SetTextFirstLineOfst( nFirstLineOffset * -1 ); aNewAttr.Put(aParaMargin); rReq.Done(); } diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 773c3aeef388..dd2ac2be7bd5 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -662,7 +662,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) SvxLRSpaceItem aNewMargin( RES_LR_SPACE ); aNewMargin.SetTextLeft( aParaMargin.GetTextLeft() + aParaMargin.GetTextFirstLineOfst() ); aNewMargin.SetRight( aParaMargin.GetRight() ); - aNewMargin.SetTextFirstLineOfst( (aParaMargin.GetTextFirstLineOfst()) * (-1) ); + aNewMargin.SetTextFirstLineOfst( (aParaMargin.GetTextFirstLineOfst()) * -1 ); rSh.SetAttrItem( aNewMargin ); break; |