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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 8 | ||||
-rw-r--r-- | svx/source/engine3d/scene3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 6 | ||||
-rw-r--r-- | svx/source/table/tablemodel.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 |
9 files changed, 19 insertions, 19 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index aaeac95f71db..eed455440237 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1284,8 +1284,8 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex } const double fDX = fPos1 - fXRef; fAngle = -basegfx::rad2deg(atan2(-fPos2 + fYRef, (fDX == 0.0) ? 0.000000001 : fDX)); - double fX = ( fPos1 - fXRef ); - double fY = ( fPos2 - fYRef ); + double fX = fPos1 - fXRef; + double fY = fPos2 - fYRef; double fRadius = sqrt( fX * fX + fY * fY ); if ( aHandle.nFlags & HandleFlags::RADIUS_RANGE_MINIMUM ) { diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index c35be6e0f47b..3310dcdd343f 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -719,7 +719,7 @@ static void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2 GetPoint( rOutlinePoly, vDistances, fM1, fx1, fy1 ); GetPoint( rOutlinePoly, vDistances, fM2, fx2, fy2 ); - double fvx = ( fy2 - fy1 ); + double fvx = fy2 - fy1; double fvy = - ( fx2 - fx1 ); fx1 = fx1 + ( ( fx2 - fx1 ) * 0.5 ); fy1 = fy1 + ( ( fy2 - fy1 ) * 0.5 ); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index e86d1f4e9847..91f62a0eebae 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1360,8 +1360,8 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) pSearchItem->SetUseAsianOptions(GetCheckBoxValue(m_pJapOptionsCB)); TransliterationFlags nFlags = GetTransliterationFlags(); if( !pSearchItem->IsUseAsianOptions()) - nFlags &= (TransliterationFlags::IGNORE_CASE | - TransliterationFlags::IGNORE_WIDTH ); + nFlags &= TransliterationFlags::IGNORE_CASE | + TransliterationFlags::IGNORE_WIDTH; if (GetNegatedCheckBoxValue(m_pIncludeDiacritics)) nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL; if (GetNegatedCheckBoxValue(m_pIncludeKashida)) @@ -2337,8 +2337,8 @@ void SvxSearchDialog::SaveToModule_Impl() TransliterationFlags nFlags = GetTransliterationFlags(); if( !pSearchItem->IsUseAsianOptions()) - nFlags &= (TransliterationFlags::IGNORE_CASE | - TransliterationFlags::IGNORE_WIDTH ); + nFlags &= TransliterationFlags::IGNORE_CASE | + TransliterationFlags::IGNORE_WIDTH; if (GetNegatedCheckBoxValue(m_pIncludeDiacritics)) nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL; if (GetNegatedCheckBoxValue(m_pIncludeKashida)) diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 3eeb76cbc679..45c9fbc8a5a1 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -574,7 +574,7 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs) } Size Differenz; - Point DiffPoint = (NewCenter - Center); + Point DiffPoint = NewCenter - Center; Differenz.setWidth( DiffPoint.X() ); Differenz.setHeight( -DiffPoint.Y() ); // Note that the Y-axis is counted ad positive downward. NbcMove (Differenz); // Actually executes the coordinate transformation. diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 9155b04bf8eb..cad58eaea61d 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1218,12 +1218,12 @@ namespace if ( _bHideScrollbars ) { - _rMode |= ( BrowserMode::NO_HSCROLL | BrowserMode::NO_VSCROLL ); + _rMode |= BrowserMode::NO_HSCROLL | BrowserMode::NO_VSCROLL; _rMode &= ~BrowserMode( BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL ); } else { - _rMode |= ( BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL ); + _rMode |= BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL; _rMode &= ~BrowserMode( BrowserMode::NO_HSCROLL | BrowserMode::NO_VSCROLL ); } diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index c9a8961eddab..0b24df689188 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -628,7 +628,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit ) auto iter( aOptimalColumns.begin() ); while( iter != aOptimalColumns.end() ) { - sal_Int32 nOptCol = (*iter++); + sal_Int32 nOptCol = *iter++; if( iter == aOptimalColumns.end() ) nDistribute = nLeft; @@ -788,7 +788,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) auto iter( aOptimalRows.begin() ); while( iter != aOptimalRows.end() ) { - sal_Int32 nOptRow = (*iter++); + sal_Int32 nOptRow = *iter++; if( iter == aOptimalRows.end() ) nDistribute = nLeft; @@ -1212,7 +1212,7 @@ void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, nAllHeight += maRows[nRow].mnSize; } - const sal_Int32 nRows = (nLastRow-nFirstRow+1); + const sal_Int32 nRows = nLastRow-nFirstRow+1; sal_Int32 nHeight = nAllHeight / nRows; if ( !bMinimize && nHeight < nMaxHeight ) diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 386d00b455b6..866d2cb514a1 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -124,11 +124,11 @@ TableModel::TableModel( SdrTableObj* pTableObj, const TableModelRef& xSourceTabl sal_Int32 nRows = nRowCount; while( nRows-- ) - (*maRows[nRows]) = (*xSourceTable->maRows[nRows]); + (*maRows[nRows]) = *xSourceTable->maRows[nRows]; sal_Int32 nColumns = nColCount; while( nColumns-- ) - (*maColumns[nColumns]) = (*xSourceTable->maColumns[nColumns]); + (*maColumns[nColumns]) = *xSourceTable->maColumns[nColumns]; // copy cells for( sal_Int32 nCol = 0; nCol < nColCount; ++nCol ) diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 779298d77ac5..bec59c3a6cc0 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -354,7 +354,7 @@ void PaletteManager::PopupColorPicker(weld::Window* pParent, const OUString& aCo if (aColorDlg.Execute(pParent) == RET_OK) { Color aLastColor = aColorDlg.GetColor(); - OUString sColorName = ("#" + aLastColor.AsRGBHexString().toAsciiUpperCase()); + OUString sColorName = "#" + aLastColor.AsRGBHexString().toAsciiUpperCase(); NamedColor aNamedColor = std::make_pair(aLastColor, sColorName); if (mpBtnUpdater) mpBtnUpdater->Update(aNamedColor); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 127e479d6e16..40957f46bb65 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1857,7 +1857,7 @@ void SvxColorWindow::SelectEntry(const NamedColor& rNamedColor) void SvxColorWindow::SelectEntry(const Color& rColor) { - OUString sColorName = ("#" + rColor.AsRGBHexString().toAsciiUpperCase()); + OUString sColorName = "#" + rColor.AsRGBHexString().toAsciiUpperCase(); SvxColorWindow::SelectEntry(std::make_pair(rColor, sColorName)); } @@ -1898,7 +1898,7 @@ void ColorWindow::SelectEntry(const NamedColor& rNamedColor) void ColorWindow::SelectEntry(const Color& rColor) { - OUString sColorName = ("#" + rColor.AsRGBHexString().toAsciiUpperCase()); + OUString sColorName = "#" + rColor.AsRGBHexString().toAsciiUpperCase(); ColorWindow::SelectEntry(std::make_pair(rColor, sColorName)); } @@ -3183,7 +3183,7 @@ void SvxColorToolBoxControl::execute(sal_Int16 /*nSelectModifier*/) dispatchCommand( aCommand, aArgs ); EnsurePaletteManager(); - OUString sColorName = ("#" + aColor.AsRGBHexString().toAsciiUpperCase()); + OUString sColorName = "#" + aColor.AsRGBHexString().toAsciiUpperCase(); m_xPaletteManager->AddRecentColor(aColor, sColorName); } |