diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-04 11:20:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-05 07:49:30 +0100 |
commit | e4472d3c139294499f4c0caeebd9d4e995958eb0 (patch) | |
tree | 3e62a6530f8b758dddab18981ee38cc76ecaef9e /sc/source/ui | |
parent | 126e5a4d5b1d6c7ba5b313786793a38f99488b33 (diff) |
loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleTableBase.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/delcodlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/inscodlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/drawview.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 8 |
10 files changed, 19 insertions, 19 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx index 6b9705ec7bba..6257e1941f31 100644 --- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx @@ -311,8 +311,8 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleChildCount() // FIXME: representing rows & columns this way is a plain and simple madness. // this needs a radical re-think. - sal_Int64 nMax = (static_cast<sal_Int64>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) * - static_cast<sal_Int64>(maRange.aEnd.Col() - maRange.aStart.Col() + 1)); + sal_Int64 nMax = static_cast<sal_Int64>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) * + static_cast<sal_Int64>(maRange.aEnd.Col() - maRange.aStart.Col() + 1); if (nMax > SAL_MAX_INT32) nMax = SAL_MAX_INT32; if (nMax < 0) diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx index 28b1169f22e9..e6e6d3389356 100644 --- a/sc/source/ui/miscdlgs/delcodlg.cxx +++ b/sc/source/ui/miscdlgs/delcodlg.cxx @@ -22,9 +22,9 @@ #include <delcodlg.hxx> bool ScDeleteContentsDlg::bPreviousAllCheck = false; -InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = (InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | +InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::NOTE | InsertDeleteFlags::FORMULA | - InsertDeleteFlags::VALUE); + InsertDeleteFlags::VALUE; ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* pParent) : GenericDialogController(pParent, "modules/scalc/ui/deletecontents.ui", "DeleteContentsDialog") diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 5f3343c7e716..33107ed575f8 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -22,7 +22,7 @@ #include <inscodlg.hxx> bool ScInsertContentsDlg::bPreviousAllCheck = false; -InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING); +InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING; ScPasteFunc ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::NONE; InsertContentsFlags ScInsertContentsDlg::nPreviousChecks2 = InsertContentsFlags::NONE; sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 6f502c8880dd..57d61297d842 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1285,7 +1285,7 @@ uno::Reference< excel::XRange > SAL_CALL ScVbaApplication::Union( double ScVbaApplication::InchesToPoints( double Inches ) { - double result = ( Inches * 72.0 ); + double result = Inches * 72.0; return result; } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index b9a648c79b76..cf4e19e68487 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -2078,8 +2078,8 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut RangeHelper thisRange( mxRange ); table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) ); - ScRefFlags const ROW_ABS = ( ScRefFlags::ROW_ABS | ScRefFlags::ROW2_ABS ); - ScRefFlags const COL_ABS = ( ScRefFlags::COL_ABS | ScRefFlags::COL2_ABS ); + ScRefFlags const ROW_ABS = ScRefFlags::ROW_ABS | ScRefFlags::ROW2_ABS; + ScRefFlags const COL_ABS = ScRefFlags::COL_ABS | ScRefFlags::COL2_ABS; if ( RowAbsolute.hasValue() ) { @@ -5387,7 +5387,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) // need to process each area, gather the results and // create a new range from those std::vector< table::CellRangeAddress > rangeResults; - sal_Int32 nItems = ( m_Areas->getCount() + 1 ); + sal_Int32 nItems = m_Areas->getCount() + 1; for ( sal_Int32 index=1; index <= nItems; ++index ) { uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); @@ -5395,7 +5395,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) ScVbaRange* pRange = getImplementation( xRange ); if ( xRange.is() && pRange ) { - sal_Int32 nElems = ( pRange->m_Areas->getCount() + 1 ); + sal_Int32 nElems = pRange->m_Areas->getCount() + 1; for ( sal_Int32 nArea = 1; nArea < nElems; ++nArea ) { uno::Reference< excel::XRange > xTmpRange( m_Areas->Item( uno::makeAny( nArea ), uno::Any() ), uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index e0498cb7a73a..91bcc5d2be87 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -818,7 +818,7 @@ sal_Int32 SAL_CALL ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); - double fConvertFactor = (getDevice()->getInfo().PixelPerMeterX/100000); + double fConvertFactor = getDevice()->getInfo().PixelPerMeterX/100000; return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } @@ -826,7 +826,7 @@ sal_Int32 SAL_CALL ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); - double fConvertFactor = (getDevice()->getInfo().PixelPerMeterY/100000); + double fConvertFactor = getDevice()->getInfo().PixelPerMeterY/100000; return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index a19d7ce48c84..9cd2db49bd17 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -964,7 +964,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj ) // find position of same point on the screen ( e.g. grid ) Point aCurPos = pViewData->GetScrPos( aOldStt.Col(), aOldStt.Row(), eWhich, true ); Point aCurPosHmm = pGridWin->PixelToLogic(aCurPos, aDrawMode ); - Point aGridOff = ( aCurPosHmm - aOldPos ); + Point aGridOff = aCurPosHmm - aOldPos; // fdo#63878 Fix the X position for RTL Sheet if( pDoc->IsNegativePage( GetTab() ) ) aGridOff.setX( aCurPosHmm.getX() + aOldPos.getX() ); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index bdb25193d89f..ddf6e6020caf 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -585,7 +585,7 @@ void ScDrawStringsVars::RepeatToFill( long nColWidth ) nTextWidth = pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width(); } - long nSpaceToFill = ( nColWidth - nTextWidth ); + long nSpaceToFill = nColWidth - nTextWidth; if ( nSpaceToFill <= nCharWidth ) return; diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 2785c8097dcf..2778d5d79c90 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -147,7 +147,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode ) bFirst = false; } else - rFuncStr += ("; " + aStr); + rFuncStr += "; " + aStr; } } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 565fa987e0e3..a20e0ae05641 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1454,8 +1454,8 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR } typedef const std::vector<editeng::MisspellRanges>* MisspellRangesType; - SCROW nRowRepeatSize = (nEndRow - nStartRow + 1); - SCCOL nColRepeatSize = (nEndCol - nStartCol + 1); + SCROW nRowRepeatSize = nEndRow - nStartRow + 1; + SCCOL nColRepeatSize = nEndCol - nStartCol + 1; SCROW nTillRow = 0; SCCOL nTillCol = 0; std::vector<std::vector<MisspellRangesType>> aSourceSpellRanges(nRowRepeatSize, std::vector<MisspellRangesType>(nColRepeatSize)); @@ -1472,7 +1472,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR { for ( SCROW nRowItr = nEndRow + 1; nRowItr <= nTillRow; ++nRowItr ) { - size_t nSourceRowIdx = ( ( nRowItr - nEndRow - 1 ) % nRowRepeatSize ); + size_t nSourceRowIdx = ( nRowItr - nEndRow - 1 ) % nRowRepeatSize; MisspellRangesType pRanges = aSourceSpellRanges[nSourceRowIdx][nColItr - nStartCol]; if ( !pRanges ) continue; @@ -1500,7 +1500,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR nTillCol = nEndCol + nCount; for ( SCCOL nColItr = nEndCol + 1; nColItr <= nTillCol; ++nColItr ) { - size_t nSourceColIdx = ( ( nColItr - nEndCol - 1 ) % nColRepeatSize ); + size_t nSourceColIdx = ( nColItr - nEndCol - 1 ) % nColRepeatSize; for ( SCROW nRowItr = nStartRow; nRowItr <= nEndRow; ++nRowItr ) { MisspellRangesType pRanges = aSourceSpellRanges[nRowItr - nStartRow][nSourceColIdx]; |