[Libreoffice-commits] core.git: basegfx/source basic/source chart2/source codemaker/source comphelper/source compilerplugins/clang connectivity/source cppu/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source framework/source hwpfilter/source i18nlangtag/source i18npool/source include/comphelper include/cppcanvas include/unotools libreofficekit/source lingucomponent/source linguistic/source lotuswordpro/source mysqlc/source oox/source registry/source reportdesign/source rsc/source sal/osl sal/rtl sal/textenc scaddins/source sc/source sdext/source sd/source sfx2/source starmath/source store/source svl/source svtools/source svx/source sw/source toolkit/source ucb/source unodevtools/source unoxml/source vcl/inc vcl/opengl vcl/source vcl/unx vcl/workben writerfilter/source writerperfect/source xmloff/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Jul 10 07:58:02 UTC 2017
basegfx/source/polygon/b2dpolygontools.cxx | 10 -
basegfx/source/polygon/b3dpolypolygontools.cxx | 8 -
basegfx/source/raster/rasterconvert3d.cxx | 2
basic/source/runtime/runtime.cxx | 2
basic/source/sbx/sbxint.cxx | 2
basic/source/sbx/sbxlng.cxx | 2
chart2/source/controller/dialogs/dlg_DataEditor.cxx | 2
chart2/source/controller/main/DragMethod_RotateDiagram.cxx | 2
chart2/source/model/main/ChartModel_Persistence.cxx | 4
chart2/source/view/charttypes/BarChart.cxx | 6 -
chart2/source/view/main/ShapeFactory.cxx | 4
codemaker/source/cppumaker/cpputype.cxx | 10 -
codemaker/source/javamaker/javatype.cxx | 6 -
comphelper/source/streaming/memorystream.cxx | 2
compilerplugins/clang/test/unnecessaryparen.cxx | 15 ++
compilerplugins/clang/unnecessaryparen.cxx | 52 ++++++++++
connectivity/source/drivers/dbase/DTable.cxx | 6 -
cppu/source/uno/constr.hxx | 2
cui/source/dialogs/colorpicker.cxx | 26 ++---
cui/source/dialogs/hlinettp.cxx | 2
cui/source/options/optlingu.cxx | 2
dbaccess/source/ui/app/AppController.cxx | 4
dbaccess/source/ui/misc/DExport.cxx | 10 -
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2
dbaccess/source/ui/querydesign/querycontroller.cxx | 2
desktop/source/app/app.cxx | 4
editeng/source/editeng/eeobj.cxx | 2
editeng/source/editeng/impedit3.cxx | 2
editeng/source/items/numitem.cxx | 2
editeng/source/items/textitem.cxx | 2
extensions/source/bibliography/bibload.cxx | 4
extensions/source/logging/loggerconfig.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 2
extensions/source/propctrlr/taborder.cxx | 2
filter/source/config/cache/filtercache.cxx | 6 -
filter/source/graphicfilter/icgm/cgm.cxx | 2
filter/source/msfilter/escherex.cxx | 8 -
filter/source/msfilter/util.cxx | 2
filter/source/svg/units.cxx | 2
framework/source/accelerators/acceleratorconfiguration.cxx | 17 ---
framework/source/accelerators/presethandler.cxx | 2
framework/source/dispatch/closedispatcher.cxx | 10 -
framework/source/fwe/interaction/preventduplicateinteraction.cxx | 10 -
framework/source/helper/persistentwindowstate.cxx | 7 -
framework/source/helper/titlebarupdate.cxx | 15 --
framework/source/inc/pattern/window.hxx | 5
framework/source/loadenv/loadenv.cxx | 5
framework/source/services/autorecovery.cxx | 10 -
framework/source/services/desktop.cxx | 20 ---
framework/source/services/frame.cxx | 5
hwpfilter/source/hwpreader.cxx | 6 -
i18nlangtag/source/isolang/inunx.cxx | 2
i18npool/source/localedata/localedata.cxx | 4
i18npool/source/transliteration/transliterationImpl.cxx | 2
include/comphelper/newarray.hxx | 2
include/cppcanvas/color.hxx | 4
include/unotools/charclass.hxx | 4
libreofficekit/source/gtk/lokdocview.cxx | 2
lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 2
lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2
linguistic/source/misc.cxx | 2
lotuswordpro/source/filter/lwpfribframe.cxx | 2
lotuswordpro/source/filter/lwpfribtable.cxx | 2
mysqlc/source/mysqlc_connection.cxx | 2
oox/source/core/fragmenthandler2.cxx | 2
oox/source/ppt/slidepersist.cxx | 2
registry/source/registry.cxx | 6 -
reportdesign/source/ui/dlg/CondFormat.cxx | 2
rsc/source/rscpp/cpp3.c | 4
sal/osl/unx/file.cxx | 4
sal/rtl/alloc_arena.cxx | 4
sal/rtl/alloc_cache.cxx | 8 -
sal/rtl/random.cxx | 2
sal/textenc/tcvtutf7.cxx | 2
sc/source/core/data/document.cxx | 2
sc/source/core/data/global.cxx | 4
sc/source/core/tool/chgtrack.cxx | 4
sc/source/core/tool/interpr1.cxx | 4
sc/source/core/tool/reffind.cxx | 2
sc/source/filter/excel/excrecds.cxx | 2
sc/source/filter/lotus/lotform.cxx | 4
sc/source/filter/starcalc/scflt.cxx | 6 -
sc/source/ui/docshell/docfunc.cxx | 2
sc/source/ui/undo/undoblk.cxx | 4
sc/source/ui/undo/undoblk3.cxx | 4
sc/source/ui/undo/undodat.cxx | 2
sc/source/ui/unoobj/cellsuno.cxx | 6 -
sc/source/ui/view/tabview.cxx | 4
sc/source/ui/view/tabview5.cxx | 4
sc/source/ui/view/viewdata.cxx | 2
scaddins/source/analysis/analysishelper.cxx | 2
sd/source/core/sdpage.cxx | 2
sd/source/filter/eppt/eppt.cxx | 4
sd/source/filter/eppt/pptexanimations.cxx | 2
sd/source/filter/eppt/pptx-epptooxml.cxx | 2
sd/source/filter/eppt/pptx-text.cxx | 4
sd/source/ui/animations/CustomAnimationDialog.cxx | 4
sd/source/ui/animations/CustomAnimationPane.cxx | 4
sd/source/ui/docshell/docshel4.cxx | 2
sd/source/ui/table/TableDesignPane.cxx | 4
sd/source/ui/view/outlview.cxx | 6 -
sdext/source/minimizer/optimizerdialogcontrols.cxx | 4
sfx2/source/appl/sfxpicklist.cxx | 4
sfx2/source/control/request.cxx | 2
sfx2/source/control/templatelocalview.cxx | 2
sfx2/source/doc/guisaveas.cxx | 6 -
sfx2/source/doc/objstor.cxx | 4
sfx2/source/doc/templatedlg.cxx | 8 -
sfx2/source/view/sfxbasecontroller.cxx | 2
starmath/source/mathtype.cxx | 4
starmath/source/parse.cxx | 2
store/source/storcach.hxx | 2
store/source/stortree.cxx | 2
svl/source/items/itemset.cxx | 8 -
svl/source/items/poolio.cxx | 4
svl/source/numbers/numfmuno.cxx | 4
svl/source/numbers/zforfind.cxx | 2
svtools/source/contnr/imivctl1.cxx | 2
svtools/source/graphic/grfmgr2.cxx | 8 -
svtools/source/misc/transfer2.cxx | 4
svx/source/customshapes/EnhancedCustomShape2d.cxx | 6 -
svx/source/dialog/svxruler.cxx | 2
svx/source/svdraw/svdhdl.cxx | 2
svx/source/svdraw/svdmrkv.cxx | 2
svx/source/tbxctrls/lboxctrl.cxx | 2
svx/source/xoutdev/xattr.cxx | 2
sw/source/core/crsr/pam.cxx | 2
sw/source/core/doc/doccorr.cxx | 8 -
sw/source/core/draw/dcontact.cxx | 2
sw/source/core/layout/anchoreddrawobject.cxx | 2
sw/source/core/layout/atrfrm.cxx | 2
sw/source/core/layout/calcmove.cxx | 2
sw/source/core/layout/flycnt.cxx | 2
sw/source/core/layout/frmtool.cxx | 4
sw/source/core/layout/movedfwdfrmsbyobjpos.cxx | 2
sw/source/core/layout/objectformatter.cxx | 4
sw/source/core/layout/objstmpconsiderwrapinfl.cxx | 2
sw/source/core/layout/paintfrm.cxx | 14 +-
sw/source/core/layout/tabfrm.cxx | 2
sw/source/core/text/pormulti.cxx | 9 -
sw/source/core/tox/txmsrt.cxx | 2
sw/source/core/txtnode/ndtxt.cxx | 2
sw/source/core/txtnode/thints.cxx | 6 -
sw/source/core/unocore/unoobj.cxx | 2
sw/source/core/unocore/unoobj2.cxx | 2
sw/source/core/unocore/unoport.cxx | 2
sw/source/core/view/pagepreviewlayout.cxx | 6 -
sw/source/filter/ww8/docxsdrexport.cxx | 4
sw/source/filter/ww8/wrtw8nds.cxx | 4
sw/source/filter/ww8/ww8atr.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 2
sw/source/ui/envelp/envprt.cxx | 2
sw/source/ui/envelp/labfmt.cxx | 4
sw/source/ui/vba/vbaparagraphformat.cxx | 2
sw/source/ui/vba/vbarows.cxx | 2
sw/source/ui/vba/vbaselection.cxx | 4
sw/source/uibase/shells/drwtxtsh.cxx | 2
sw/source/uibase/shells/tabsh.cxx | 2
sw/source/uibase/uiview/formatclipboard.cxx | 2
sw/source/uibase/uiview/viewtab.cxx | 2
sw/source/uibase/wrtsh/delete.cxx | 2
toolkit/source/controls/unocontrol.cxx | 2
ucb/source/core/FileAccess.cxx | 2
ucb/source/ucp/cmis/cmis_datasupplier.cxx | 2
unodevtools/source/skeletonmaker/skeletoncommon.cxx | 6 -
unoxml/source/dom/element.cxx | 2
vcl/inc/unx/salframe.h | 2
vcl/opengl/RenderList.cxx | 2
vcl/source/control/button.cxx | 2
vcl/source/control/edit.cxx | 2
vcl/source/control/fixed.cxx | 2
vcl/source/filter/sgvtext.cxx | 2
vcl/source/fontsubset/sft.cxx | 2
vcl/source/gdi/CommonSalLayout.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 4
vcl/source/gdi/print2.cxx | 2
vcl/source/outdev/gradient.cxx | 4
vcl/source/outdev/text.cxx | 4
vcl/source/outdev/transparent.cxx | 2
vcl/source/window/accessibility.cxx | 2
vcl/source/window/paint.cxx | 2
vcl/source/window/seleng.cxx | 2
vcl/source/window/syswin.cxx | 2
vcl/source/window/toolbox.cxx | 2
vcl/source/window/window2.cxx | 4
vcl/unx/generic/app/saldisp.cxx | 2
vcl/unx/generic/gdi/cairotextrender.cxx | 2
vcl/unx/generic/window/salframe.cxx | 2
vcl/unx/gtk/gtksalframe.cxx | 2
vcl/unx/gtk/salnativewidgets-gtk.cxx | 6 -
vcl/unx/gtk/salprn-gtk.cxx | 2
vcl/workben/outdevgrind.cxx | 2
writerfilter/source/dmapper/ThemeTable.cxx | 6 -
writerperfect/source/common/WPXSvInputStream.cxx | 2
xmloff/source/chart/PropertyMaps.cxx | 2
195 files changed, 394 insertions(+), 398 deletions(-)
New commits:
commit 4250b25c6ae361359300ab6ccde27230f8e01039
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Jul 6 14:49:15 2017 +0200
teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 14276926db69..80f3da07d50b 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -573,7 +573,7 @@ namespace basegfx
{
// if fDistance >= fLength decrement with multiple of fLength
sal_uInt32 nCount(sal_uInt32(fDistance / fLength));
- fDistance -= (double)(nCount) * fLength;
+ fDistance -= (double)nCount * fLength;
}
else
{
@@ -2444,10 +2444,10 @@ namespace basegfx
const double fRelativeY((rCandidate.getY() - rOriginal.getMinY()) / rOriginal.getHeight());
const double fOneMinusRelativeX(1.0 - fRelativeX);
const double fOneMinusRelativeY(1.0 - fRelativeY);
- const double fNewX((fOneMinusRelativeY) * ((fOneMinusRelativeX) * rTopLeft.getX() + fRelativeX * rTopRight.getX()) +
- fRelativeY * ((fOneMinusRelativeX) * rBottomLeft.getX() + fRelativeX * rBottomRight.getX()));
- const double fNewY((fOneMinusRelativeX) * ((fOneMinusRelativeY) * rTopLeft.getY() + fRelativeY * rBottomLeft.getY()) +
- fRelativeX * ((fOneMinusRelativeY) * rTopRight.getY() + fRelativeY * rBottomRight.getY()));
+ const double fNewX(fOneMinusRelativeY * (fOneMinusRelativeX * rTopLeft.getX() + fRelativeX * rTopRight.getX()) +
+ fRelativeY * (fOneMinusRelativeX * rBottomLeft.getX() + fRelativeX * rBottomRight.getX()));
+ const double fNewY(fOneMinusRelativeX * (fOneMinusRelativeY * rTopLeft.getY() + fRelativeY * rBottomLeft.getY()) +
+ fRelativeX * (fOneMinusRelativeY * rTopRight.getY() + fRelativeY * rBottomRight.getY()));
return B2DPoint(fNewX, fNewY);
}
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index c147df888ac8..04408dee4721 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -267,12 +267,12 @@ namespace basegfx
for(a = nLoopVerInit; a < nLoopVerLimit; a++)
{
- const double fVer(fVerStart + ((double)(a) * fVerDiffPerStep));
+ const double fVer(fVerStart + ((double)a * fVerDiffPerStep));
B3DPolygon aNew;
for(b = 0; b < nLoopHorLimit; b++)
{
- const double fHor(fHorStart + ((double)(b) * fHorDiffPerStep));
+ const double fHor(fHorStart + ((double)b * fHorDiffPerStep));
aNew.append(getPointFromCartesian(fHor, fVer));
}
@@ -283,7 +283,7 @@ namespace basegfx
// create vertical half-rings
for(a = 0; a < nLoopHorLimit; a++)
{
- const double fHor(fHorStart + ((double)(a) * fHorDiffPerStep));
+ const double fHor(fHorStart + ((double)a * fHorDiffPerStep));
B3DPolygon aNew;
if(bVerFromTop)
@@ -293,7 +293,7 @@ namespace basegfx
for(b = nLoopVerInit; b < nLoopVerLimit; b++)
{
- const double fVer(fVerStart + ((double)(b) * fVerDiffPerStep));
+ const double fVer(fVerStart + ((double)b * fVerDiffPerStep));
aNew.append(getPointFromCartesian(fHor, fVer));
}
diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index 859ed47721e8..951cdbd65ebd 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -101,7 +101,7 @@ namespace basegfx
aCurrentEntry->incrementRasterConversionLineEntry3D(nStep, *this);
}
- aCurrentLine.push_back(&(*(aCurrentEntry)));
+ aCurrentLine.push_back(&(*aCurrentEntry));
}
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 6038dadd736e..47903f72cadf 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -4027,7 +4027,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
}
p = refParams->Get( i );
- if( p->GetType() == SbxERROR && ( i ) )
+ if( p->GetType() == SbxERROR && i )
{
// if there's a parameter missing, it can be OPTIONAL
bool bOpt = false;
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 8c7760bcbb46..8a6527614190 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -96,7 +96,7 @@ start:
SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
- nRes = (sal_Int16) (tstVal);
+ nRes = (sal_Int16) tstVal;
break;
}
case SbxSALINT64:
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index db0f2504d173..9c906f631e40 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.cxx
@@ -76,7 +76,7 @@ start:
case SbxCURRENCY:
{
sal_Int64 tstVal = p->nInt64 / CURRENCY_FACTOR;
- nRes = (sal_Int32) (tstVal);
+ nRes = (sal_Int32) tstVal;
if( tstVal < SbxMINLNG || SbxMAXLNG < tstVal ) SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
if( SbxMAXLNG < tstVal ) nRes = SbxMAXLNG;
if( tstVal < SbxMINLNG ) nRes = SbxMINLNG;
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index b4af99629772..8b7f777f6411 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -215,7 +215,7 @@ void DataEditor::notifySystemWindow(
if ( pParent && pParent->IsSystemWindow())
{
SystemWindow* pSystemWindow = static_cast< SystemWindow* >( pParent );
- rMemFunc( pSystemWindow->GetTaskPaneList(),( pToRegister ));
+ rMemFunc( pSystemWindow->GetTaskPaneList(), pToRegister );
}
}
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index b32609dae846..3dbfa1810cd4 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -196,7 +196,7 @@ void DragMethod_RotateDiagram::CreateOverlayGeometry(sdr::overlay::OverlayManage
else
{
ThreeDHelper::adaptRadAnglesForRightAngledAxes( fResultX, fResultY );
- aCurrentTransform.shearXY(fResultY,-(fResultX));
+ aCurrentTransform.shearXY(fResultY,-fResultX);
}
if(m_aWireframePolyPolygon.count() && m_pScene)
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 77aba167c4c6..9529e4e8a1ab 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -513,7 +513,7 @@ void SAL_CALL ChartModel::load(
Sequence< uno::Any > aStorageArgs( 2 );
aStorageArgs[0] <<= aMDHelper.Stream;
// todo: check if stream is read-only
- aStorageArgs[1] <<= (embed::ElementModes::READ); //WRITE | embed::ElementModes::NOCREATE);
+ aStorageArgs[1] <<= embed::ElementModes::READ; //WRITE | embed::ElementModes::NOCREATE);
xStorage.set( xStorageFact->createInstanceWithArguments( aStorageArgs ),
uno::UNO_QUERY_THROW );
@@ -524,7 +524,7 @@ void SAL_CALL ChartModel::load(
// convert XInputStream to XStorage via the storage factory
Sequence< uno::Any > aStorageArgs( 2 );
aStorageArgs[0] <<= aMDHelper.InputStream;
- aStorageArgs[1] <<= (embed::ElementModes::READ);
+ aStorageArgs[1] <<= embed::ElementModes::READ;
xStorage.set( xStorageFact->createInstanceWithArguments( aStorageArgs ),
uno::UNO_QUERY_THROW );
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 1cb6196d5915..08b9d5a6c6bb 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -690,10 +690,10 @@ void BarChart::createShapes()
double fHeight = fCompleteHeight-fLowerYValue;
if(!bPositive)
fHeight = fCompleteHeight-fUpperYValue;
- fLogicBarWidth = fLogicBaseWidth*fHeight/(fCompleteHeight);
+ fLogicBarWidth = fLogicBaseWidth*fHeight/fCompleteHeight;
if(fLogicBarWidth<=0.0)
fLogicBarWidth=fLogicBaseWidth;
- fLogicBarDepth = fLogicBarDepth*fHeight/(fCompleteHeight);
+ fLogicBarDepth = fLogicBarDepth*fHeight/fCompleteHeight;
if(fLogicBarDepth<=0.0)
fLogicBarDepth*=-1.0;
}
@@ -833,7 +833,7 @@ void BarChart::createShapes()
{
if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && fCompleteHeight!=0.0 )
{
- double fOuterBarDepth = fLogicBarDepth * (fTopHeight)/(fabs(fCompleteHeight));
+ double fOuterBarDepth = fLogicBarDepth * fTopHeight/(fabs(fCompleteHeight));
fLowerBarDepth = (fBaseValue < fUpperYValue) ? fabs(fLogicBarDepth) : fabs(fOuterBarDepth);
fUpperBarDepth = (fBaseValue < fUpperYValue) ? fabs(fOuterBarDepth) : fabs(fLogicBarDepth);
}
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 58f62548d6e0..ff26c60e366b 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -271,7 +271,7 @@ uno::Any createPolyPolygon_Cone( double fHeight, double fRadius, double fTopHeig
double r1= 0.0, r2 = fRadius;
if(bTopless)
// #i63212# fHeight may be negative, fTopHeight is always positive -> use fabs(fHeight)
- r1 = fRadius * (fTopHeight)/(fabs(fHeight)+fTopHeight);
+ r1 = fRadius * fTopHeight/(fabs(fHeight)+fTopHeight);
nVerticalSegmentCount=1;
drawing::PolyPolygonShape3D aPP;
@@ -478,7 +478,7 @@ uno::Reference<drawing::XShape>
aBottomP3.PositionZ += fDepth;
aBottomP4.PositionZ += fDepth;
- const double fTopFactor = (fTopHeight)/(fabs(fHeight)+fTopHeight);
+ const double fTopFactor = fTopHeight/(fabs(fHeight)+fTopHeight);
drawing::Position3D aTopP1( rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ - fDepth*fTopFactor/2.0 );
if(bRotateZ)
{
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index a29c6610bfa3..a8ac2ba4822c 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -1238,8 +1238,8 @@ void InterfaceType::dumpMethods(FileStream & out)
bool isConst;
bool isRef;
if (j->direction
- == (unoidl::InterfaceTypeEntity::Method::Parameter::
- DIRECTION_IN)) {
+ == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
+ {
isConst = passByReference(j->type);
isRef = isConst;
} else {
@@ -1510,13 +1510,11 @@ void InterfaceType::dumpCppuMethods(FileStream & out, sal_uInt32 & index)
<< m << "].pTypeName = sParamType" << m << ".pData;\n"
<< indent() << "aParameters[" << m << "].bIn = "
<< ((param.direction
- == (unoidl::InterfaceTypeEntity::Method::Parameter::
- DIRECTION_OUT))
+ == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_OUT)
? "sal_False" : "sal_True")
<< ";\n" << indent() << "aParameters[" << m << "].bOut = "
<< ((param.direction
- == (unoidl::InterfaceTypeEntity::Method::Parameter::
- DIRECTION_IN))
+ == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
? "sal_False" : "sal_True")
<< ";\n";
++m;
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 2da2e5f925f2..1092557e888d 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -1937,11 +1937,9 @@ void handleInterfaceType(
for (const unoidl::InterfaceTypeEntity::Method::Parameter& param : method.parameters)
{
bool in = param.direction
- != (unoidl::InterfaceTypeEntity::Method::Parameter::
- DIRECTION_OUT);
+ != unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_OUT;
bool out = param.direction
- != (unoidl::InterfaceTypeEntity::Method::Parameter::
- DIRECTION_IN);
+ != unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN;
PolymorphicUnoType polymorphicUnoType;
SpecialType specialType = desc.addParameter(
param.type, out, true, &polymorphicUnoType);
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 9702a9dce81d..61afcdc85391 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -126,7 +126,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_
if( nBytesToRead )
{
sal_Int8* pData = &(*maData.begin());
- sal_Int8* pCursor = &((pData)[mnCursor]);
+ sal_Int8* pCursor = &(pData[mnCursor]);
memcpy( static_cast<void*>(aData.getArray()), static_cast<void*>(pCursor), nBytesToRead );
mnCursor += nBytesToRead;
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 77cb6bb87168..85be13848b22 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -9,6 +9,8 @@
bool foo(int);
+enum class EFoo { Bar };
+
int main()
{
int x = 1;
@@ -17,6 +19,19 @@ int main()
if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if statement [loplugin:unnecessaryparen]}}
foo((1)); // expected-error {{parentheses immediately inside single-arg call [loplugin:unnecessaryparen]}}
+
+ int y = (x); // expected-error {{unnecessary parentheses around identifier [loplugin:unnecessaryparen]}}
+ (void)y;
+
+ // lots of our code uses this style, which I'm loathe to bulk-fix as yet
+ EFoo foo = EFoo::Bar;
+ switch (foo) {
+ case (EFoo::Bar): break;
+ }
+
+ // lots of our code uses this style, which I'm loathe to bulk-fix as yet
+ int z = (y) ? 1 : 0;
+ (void)z;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index 55dac9523870..40faa88b3157 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -56,16 +56,50 @@ public:
bool VisitWhileStmt(const WhileStmt *);
bool VisitSwitchStmt(const SwitchStmt *);
bool VisitCallExpr(const CallExpr *);
+ bool TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *);
+ bool TraverseCaseStmt(CaseStmt *);
+ bool TraverseConditionalOperator(ConditionalOperator *);
private:
void VisitSomeStmt(const Stmt *parent, const Expr* cond, StringRef stmtName);
+ Expr* insideCaseStmt = nullptr;
+ Expr* insideConditionalOperator = nullptr;
};
+bool UnnecessaryParen::TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *)
+{
+ // for some reason, the parentheses in an expression like "sizeof(x)" actually show up
+ // in the AST, so just ignore that part of the AST
+ return true;
+}
+
+bool UnnecessaryParen::TraverseCaseStmt(CaseStmt * caseStmt)
+{
+ auto old = insideCaseStmt;
+ insideCaseStmt = caseStmt->getLHS()->IgnoreImpCasts();
+ bool ret = RecursiveASTVisitor::TraverseCaseStmt(caseStmt);
+ insideCaseStmt = old;
+ return ret;
+}
+
+bool UnnecessaryParen::TraverseConditionalOperator(ConditionalOperator * conditionalOperator)
+{
+ auto old = insideConditionalOperator;
+ insideConditionalOperator = conditionalOperator->getCond()->IgnoreImpCasts();
+ bool ret = RecursiveASTVisitor::TraverseConditionalOperator(conditionalOperator);
+ insideConditionalOperator = old;
+ return ret;
+}
+
bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
{
if (ignoreLocation(parenExpr))
return true;
if (parenExpr->getLocStart().isMacroID())
return true;
+ if (insideCaseStmt && parenExpr == insideCaseStmt)
+ return true;
+ if (insideConditionalOperator && parenExpr == insideConditionalOperator)
+ return true;
auto subParenExpr = dyn_cast<ParenExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
if (subParenExpr) {
@@ -76,6 +110,24 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
parenExpr->getLocStart())
<< parenExpr->getSourceRange();
}
+
+ auto declRefExpr = dyn_cast<DeclRefExpr>(parenExpr->getSubExpr()->IgnoreImpCasts());
+ if (declRefExpr) {
+ if (declRefExpr->getLocStart().isMacroID())
+ return true;
+
+ // hack for BAD_CAST macro
+ SourceManager& SM = compiler.getSourceManager();
+ const char *p1 = SM.getCharacterData( declRefExpr->getLocStart().getLocWithOffset(-10) );
+ const char *p2 = SM.getCharacterData( declRefExpr->getLocStart() );
+ if ( std::string(p1, p2 - p1).find("BAD_CAST") != std::string::npos )
+ return true;
+
+ report(
+ DiagnosticsEngine::Warning, "unnecessary parentheses around identifier",
+ parenExpr->getLocStart())
+ << parenExpr->getSourceRange();
+ }
return true;
}
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index f4a84d75f4f5..7673fadad24a 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -183,7 +183,7 @@ void lcl_CalDate(sal_Int32 _nJulianDate,sal_Int32 _nJulianTime,css::util::DateTi
double d_s = _nJulianTime / 1000.0;
double d_m = d_s / 60.0;
double d_h = d_m / 60.0;
- _rDateTime.Hours = (sal_uInt16) (d_h);
+ _rDateTime.Hours = (sal_uInt16) d_h;
_rDateTime.Minutes = (sal_uInt16) d_m;
_rDateTime.Seconds = static_cast<sal_uInt16>(( d_m - (double) _rDateTime.Minutes ) * 60.0);
}
@@ -871,7 +871,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
if ( m_aScales[i-1] )
d = (nValue / pow(10.0,(int)m_aScales[i-1]));
else
- d = (double)(nValue);
+ d = (double)nValue;
}
else
{
@@ -1857,7 +1857,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
if ( m_aScales[i] )
nValue = (sal_Int64)(d * pow(10.0,(int)m_aScales[i]));
else
- nValue = (sal_Int64)(d);
+ nValue = (sal_Int64)d;
if (static_cast<size_t>(nLen) > sizeof(nValue))
return false;
memcpy(pData,&nValue,nLen);
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index 8c15a6fb0142..dd68c0437806 100644
--- a/cppu/source/uno/constr.hxx
+++ b/cppu/source/uno/constr.hxx
@@ -42,7 +42,7 @@ inline void _defaultConstructStruct(
defaultConstructStruct( pMem, pTypeDescr->pBaseTypeDescription );
}
- typelib_TypeDescriptionReference ** ppTypeRefs = (pTypeDescr)->ppTypeRefs;
+ typelib_TypeDescriptionReference ** ppTypeRefs = pTypeDescr->ppTypeRefs;
sal_Int32 * pMemberOffsets = pTypeDescr->pMemberOffsets;
sal_Int32 nDescr = pTypeDescr->nMembers;
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 548594aa1f9b..44c3d21c742b 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1177,7 +1177,7 @@ IMPL_LINK_NOARG(ColorPickerDialog, ColorFieldControlModifydl, ColorFieldControl&
break;
}
- update_color(UpdateFlags::All & ~(UpdateFlags::ColorChooser));
+ update_color(UpdateFlags::All & ~UpdateFlags::ColorChooser);
}
IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderControlModifyHdl, ColorSliderControl&, void)
@@ -1205,7 +1205,7 @@ IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderControlModifyHdl, ColorSliderContr
break;
}
- update_color(UpdateFlags::All & ~(UpdateFlags::ColorSlider));
+ update_color(UpdateFlags::All & ~UpdateFlags::ColorSlider);
}
IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)
@@ -1215,52 +1215,52 @@ IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)
if (&rEdit == mpMFRed)
{
setColorComponent( ColorComponent::Red, ((double)mpMFRed->GetValue()) / 255.0 );
- n = UpdateFlags::All & ~(UpdateFlags::RGB);
+ n = UpdateFlags::All & ~UpdateFlags::RGB;
}
else if (&rEdit == mpMFGreen)
{
setColorComponent( ColorComponent::Green, ((double)mpMFGreen->GetValue()) / 255.0 );
- n = UpdateFlags::All & ~(UpdateFlags::RGB);
+ n = UpdateFlags::All & ~UpdateFlags::RGB;
}
else if (&rEdit == mpMFBlue)
{
setColorComponent( ColorComponent::Blue, ((double)mpMFBlue->GetValue()) / 255.0 );
- n = UpdateFlags::All & ~(UpdateFlags::RGB);
+ n = UpdateFlags::All & ~UpdateFlags::RGB;
}
else if (&rEdit == mpMFHue)
{
setColorComponent( ColorComponent::Hue, (double)mpMFHue->GetValue() );
- n = UpdateFlags::All & ~(UpdateFlags::HSB);
+ n = UpdateFlags::All & ~UpdateFlags::HSB;
}
else if (&rEdit == mpMFSaturation)
{
setColorComponent( ColorComponent::Saturation, ((double)mpMFSaturation->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::HSB);
+ n = UpdateFlags::All & ~UpdateFlags::HSB;
}
else if (&rEdit == mpMFBrightness)
{
setColorComponent( ColorComponent::Brightness, ((double)mpMFBrightness->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::HSB);
+ n = UpdateFlags::All & ~UpdateFlags::HSB;
}
else if (&rEdit == mpMFCyan)
{
setColorComponent( ColorComponent::Cyan, ((double)mpMFCyan->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::CMYK);
+ n = UpdateFlags::All & ~UpdateFlags::CMYK;
}
else if (&rEdit == mpMFMagenta)
{
setColorComponent( ColorComponent::Magenta, ((double)mpMFMagenta->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::CMYK);
+ n = UpdateFlags::All & ~UpdateFlags::CMYK;
}
else if (&rEdit == mpMFYellow)
{
setColorComponent( ColorComponent::Yellow, ((double)mpMFYellow->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::CMYK);
+ n = UpdateFlags::All & ~UpdateFlags::CMYK;
}
else if (&rEdit == mpMFKey)
{
setColorComponent( ColorComponent::Key, ((double)mpMFKey->GetValue()) / 100.0 );
- n = UpdateFlags::All & ~(UpdateFlags::CMYK);
+ n = UpdateFlags::All & ~UpdateFlags::CMYK;
}
else if (&rEdit == mpEDHex)
{
@@ -1278,7 +1278,7 @@ IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void)
RGBtoHSV( mdRed, mdGreen, mdBlue, mdHue, mdSat, mdBri );
RGBtoCMYK( mdRed, mdGreen, mdBlue, mdCyan, mdMagenta, mdYellow, mdKey );
- n = UpdateFlags::All & ~(UpdateFlags::Hex);
+ n = UpdateFlags::All & ~UpdateFlags::Hex;
}
}
}
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index eb86a6629873..fe3f1ddd1abb 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -257,7 +257,7 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme)
{
//if rScheme is empty or unknown the default behaviour is like it where HTTP
bool bFTP = rScheme.startsWith(sFTPScheme);
- bool bInternet = !(bFTP);
+ bool bInternet = !bFTP;
//update protocol button selection:
m_pRbtLinktypFTP->Check(bFTP);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 4a65279ff477..a67c458e43ec 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -386,7 +386,7 @@ void OptionsUserData::SetNumericValue( sal_uInt8 nNumVal )
if (HasNumericValue() && (GetNumericValue() != nNumVal))
{
nVal &= 0xffffff00;
- nVal |= (nNumVal);
+ nVal |= nNumVal;
nVal |= (sal_uLong)1 << 11; // mark as modified
}
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 9532e54bd133..ef7070e2b720 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -390,8 +390,8 @@ void SAL_CALL OApplicationController::disposing()
// add to recent document list
if ( aURL.GetProtocol() == INetProtocol::File )
Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
- (pFilter) ? pFilter->GetMimeType() : OUString(),
- (pFilter) ? pFilter->GetServiceName() : OUString() );
+ pFilter ? pFilter->GetMimeType() : OUString(),
+ pFilter ? pFilter->GetServiceName() : OUString() );
}
}
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 45b514eed4d2..1e8cc8d585e7 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -297,9 +297,9 @@ void ODatabaseExport::insertValueIntoColumn()
if(pField)
{
sal_Int32 nNewPos = m_bIsAutoIncrement ? m_nColumnPos+1 : m_nColumnPos;
- OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumns.size()),"m_vColumns: Illegal index for vector");
+ OSL_ENSURE(nNewPos < static_cast<sal_Int32>(m_vColumns.size()),"m_vColumns: Illegal index for vector");
- if ( (nNewPos) < static_cast<sal_Int32>(m_vColumns.size() ) )
+ if ( nNewPos < static_cast<sal_Int32>(m_vColumns.size() ) )
{
sal_Int32 nPos = m_vColumns[nNewPos].first;
if ( nPos != COLUMN_POSITION_NOT_FOUND )
@@ -556,7 +556,7 @@ void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfo
Reference< XNumberFormats > xFormats = xSupplier->getNumberFormats();
TColumnVector::const_iterator aIter = _pList->begin();
TColumnVector::const_iterator aEnd = _pList->end();
- for(sal_Int32 i= 0;aIter != aEnd && (i) < static_cast<sal_Int32>(m_vNumberFormat.size()) && (i) < static_cast<sal_Int32>(m_vColumnSize.size()) ;++aIter,++i)
+ for(sal_Int32 i= 0;aIter != aEnd && i < static_cast<sal_Int32>(m_vNumberFormat.size()) && i < static_cast<sal_Int32>(m_vColumnSize.size()) ;++aIter,++i)
{
sal_Int32 nDataType;
sal_Int32 nLength(0),nScale(0);
@@ -761,8 +761,8 @@ void ODatabaseExport::adjustFormat()
if ( !m_sTextToken.isEmpty() )
{
sal_Int32 nNewPos = m_bIsAutoIncrement ? m_nColumnPos+1 : m_nColumnPos;
- OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumns.size()),"Illegal index for vector");
- if ( (nNewPos) < static_cast<sal_Int32>(m_vColumns.size()) )
+ OSL_ENSURE(nNewPos < static_cast<sal_Int32>(m_vColumns.size()),"Illegal index for vector");
+ if ( nNewPos < static_cast<sal_Int32>(m_vColumns.size()) )
{
sal_Int32 nColPos = m_vColumns[nNewPos].first;
if( nColPos != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND))
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 5eb1e3694875..7ad2edae340e 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1512,7 +1512,7 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn
ColumnMoved(pEntry->GetColumnId(),false);
}
- if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
+ if ( pEntry->GetFunctionType() & FKT_AGGREGATE )
{
OUString sFunctionName = pEntry->GetFunction();
if ( GetFunctionName(sal_uInt32(-1),sFunctionName) )
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 1f7647c1d994..f2a3300374e0 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1400,7 +1400,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
bool bNew = false;
try
{
- bNew = ( _bSaveAs )
+ bNew = _bSaveAs
|| ( !xElements->hasByName( m_sName ) );
Reference<XPropertySet> xQuery;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index d50df34bc43c..2c067883e358 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2174,8 +2174,8 @@ void Desktop::OpenClients()
if ( !bDisableRecovery &&
(
- ( bExistsRecoveryData ) || // => crash with files => recovery
- ( bCrashed ) // => crash without files => error report
+ bExistsRecoveryData || // => crash with files => recovery
+ bCrashed // => crash without files => error report
)
)
{
diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx
index 4105dd88800f..83055dd4b2fc 100644
--- a/editeng/source/editeng/eeobj.cxx
+++ b/editeng/source/editeng/eeobj.cxx
@@ -71,7 +71,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
else
{
datatransfer::UnsupportedFlavorException aException;
- throw( aException );
+ throw aException;
}
return aAny;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4862863ebb94..b836e18627b3 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4338,7 +4338,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara,
ComplexTextLayoutFlags nLayoutMode = pOutDev->GetLayoutMode();
// We always use the left position for DrawText()
- nLayoutMode &= ~(ComplexTextLayoutFlags::BiDiRtl);
+ nLayoutMode &= ~ComplexTextLayoutFlags::BiDiRtl;
if ( !bCTL && !bR2L)
{
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 56cdfe8fb73b..80b45f47ef73 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -592,7 +592,7 @@ SvxNumRule::SvxNumRule( SvxNumRuleFlags nFeatures,
}
else
{
- aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * (i) );
+ aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * i );
}
}
else
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 690b54a8d55e..aa1a478e887d 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -884,7 +884,7 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
short nTemp = (short)nProp;
nDiff = nTemp * 20;
if(!bCoreInTwip)
- nDiff = (short)convertTwipToMm100((long)(nDiff));
+ nDiff = (short)convertTwipToMm100((long)nDiff);
}
break;
case MapUnit::Map100thMM:
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 121641c5966f..830cd0a4295f 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -349,9 +349,9 @@ Reference< XNameAccess > const & BibliographyLoader::GetDataColumns() const
xResultSetProps->setPropertyValue("CommandType", aCommandType);
Any aTableName; aTableName <<= aBibDesc.sTableOrQuery;
xResultSetProps->setPropertyValue("Command", aTableName);
- Any aResultSetType; aResultSetType <<= (sal_Int32)(ResultSetType::SCROLL_INSENSITIVE);
+ Any aResultSetType; aResultSetType <<= (sal_Int32)ResultSetType::SCROLL_INSENSITIVE;
xResultSetProps->setPropertyValue("ResultSetType", aResultSetType);
- Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)(ResultSetConcurrency::UPDATABLE);
+ Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)ResultSetConcurrency::UPDATABLE;
xResultSetProps->setPropertyValue("ResultSetConcurrency", aResultSetCurrency);
bool bSuccess = false;
diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx
index 1d1938936cd0..02ddd0e52776 100644
--- a/extensions/source/logging/loggerconfig.cxx
+++ b/extensions/source/logging/loggerconfig.cxx
@@ -187,7 +187,7 @@ namespace logging
pSetting->Value = xServiceSettingsNode->getByName( *pSettingNames );
if ( _pSettingTranslation )
- (_pSettingTranslation)( _rxLogger, pSetting->Name, pSetting->Value );
+ _pSettingTranslation( _rxLogger, pSetting->Name, pSetting->Value );
}
}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b3d451142417..fefcf1173935 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -865,7 +865,7 @@ namespace pcr
case PROPERTY_ID_TABSTOP:
// BORDER and TABSTOP are normalized (see impl_normalizePropertyValue_nothrow)
// to not allow VOID values
- pProperty->Attributes &= ~( PropertyAttribute::MAYBEVOID );
+ pProperty->Attributes &= ~PropertyAttribute::MAYBEVOID;
break;
case PROPERTY_ID_LISTSOURCE:
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 5a68e8b42f1e..b78f8e49f80d 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -374,7 +374,7 @@ namespace pcr
if ( ( nThumbPos + nVisibleSize + 1 ) < (long)( nLastSelPos + 3 ) )
GetVScroll()->DoScrollAction(ScrollType::LineDown);
- else if((nThumbPos+nVisibleSize+1) >= (nFirstVisible))
+ else if((nThumbPos+nVisibleSize+1) >= nFirstVisible)
GetVScroll()->DoScrollAction(ScrollType::LineUp);
}
}
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index eb3121fee602..b9d9bdf395ba 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -971,12 +971,10 @@ void FilterCache::impl_validateAndOptimize()
if (
(
- (bSomeTypesShouldExist) &&
- (m_lTypes.empty())
+ bSomeTypesShouldExist && m_lTypes.empty()
) ||
(
- (bAllFiltersShouldExist) &&
- (m_lFilters.empty())
+ bAllFiltersShouldExist && m_lFilters.empty()
)
)
{
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 8a7226625beb..c841f7234a19 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -379,7 +379,7 @@ sal_uInt32 CGM::ImplGetBitmapColor( bool bDirect )
else
{
sal_uInt32 nIndex = ImplGetUI( pElement->nColorIndexPrecision );
- nTmp = pElement->aColorTable[ (sal_uInt8)( nIndex ) ] ;
+ nTmp = pElement->aColorTable[ (sal_uInt8)nIndex ] ;
}
return nTmp;
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 423b5d0ede45..c79056f9dbf2 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -321,7 +321,7 @@ sal_uInt32 EscherPropertyContainer::ImplGetColor( const sal_uInt32 nSOColor, boo
if ( bSwap )
{
sal_uInt32 nColor = nSOColor & 0xff00; // green
- nColor |= (sal_uInt8)( nSOColor ) << 16; // red
+ nColor |= (sal_uInt8) nSOColor << 16; // red
nColor |= (sal_uInt8)( nSOColor >> 16 ); // blue
return nColor;
}
@@ -1942,9 +1942,9 @@ bool EscherPropertyContainer::CreatePolygonProperties(
sal_uInt8* pSegmentBuf = new sal_uInt8[ nSegmentBufSize ];
sal_uInt8* pPtr = pVerticesBuf;
- *pPtr++ = (sal_uInt8)( nTotalPoints ); // Little endian
+ *pPtr++ = (sal_uInt8) nTotalPoints; // Little endian
*pPtr++ = (sal_uInt8)( nTotalPoints >> 8 );
- *pPtr++ = (sal_uInt8)( nTotalPoints );
+ *pPtr++ = (sal_uInt8) nTotalPoints;
*pPtr++ = (sal_uInt8)( nTotalPoints >> 8 );
*pPtr++ = (sal_uInt8)0xf0;
*pPtr++ = (sal_uInt8)0xff;
@@ -5313,7 +5313,7 @@ void EscherEx::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor )
{
sal_uInt32 nColor = nSOColor & 0xff00; // Green
- nColor |= (sal_uInt8)( nSOColor ) << 16; // Red
+ nColor |= (sal_uInt8) nSOColor << 16; // Red
nColor |= (sal_uInt8)( nSOColor >> 16 ); // Blue
return nColor;
}
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 8ad5d92a4fdf..9cf01a0929a3 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -48,7 +48,7 @@ sal_uInt32 BGRToRGB(sal_uInt32 nColor)
{
sal_uInt8
r(static_cast<sal_uInt8>(nColor&0xFF)),
- g(static_cast<sal_uInt8>(((nColor)>>8)&0xFF)),
+ g(static_cast<sal_uInt8>((nColor>>8)&0xFF)),
b(static_cast<sal_uInt8>((nColor>>16)&0xFF)),
t(static_cast<sal_uInt8>((nColor>>24)&0xFF));
nColor = (t<<24) + (r<<16) + (g<<8) + b;
diff --git a/filter/source/svg/units.cxx b/filter/source/svg/units.cxx
index 84b82e6e90d0..f602971a3a27 100644
--- a/filter/source/svg/units.cxx
+++ b/filter/source/svg/units.cxx
@@ -101,7 +101,7 @@ double convLength( const OUString& sValue, const State& rState, char dir )
// Begin grammar
(
//parse font-size keywords (ie: xx-large, medium )
- ( +(alpha_p) >> !(str_p("-") >> +alpha_p) )[assign_a(sVal)]
+ ( +alpha_p >> !(str_p("-") >> +alpha_p) )[assign_a(sVal)]
>> str_p("")[assign_a(eUnit,SVG_LENGTH_FONT_SIZE)] |
//take the first part and ignore the units
( +(anychar_p -
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index b09042600d45..ed13cb13cdad 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -458,10 +458,7 @@ AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(bool bWriteAcces
//create copy of our readonly-cache, if write access is forced ... but
//not still possible!
- if (
- (bWriteAccessRequested) &&
- (!m_pWriteCache )
- )
+ if ( bWriteAccessRequested && !m_pWriteCache )
{
m_pWriteCache = new AcceleratorCache(m_aReadCache);
}
@@ -730,7 +727,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
if (pPreferredKey != lKeys.end ())
{
css::uno::Any& rAny = lPreferredOnes[i];
- rAny <<= *(pPreferredKey);
+ rAny <<= *pPreferredKey;
}
}
@@ -1333,10 +1330,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(bool bPreferred,
{
//create copy of our readonly-cache, if write access is forced ... but
//not still possible!
- if (
- (bWriteAccessRequested) &&
- (!m_pPrimaryWriteCache )
- )
+ if ( bWriteAccessRequested && !m_pPrimaryWriteCache )
{
m_pPrimaryWriteCache = new AcceleratorCache(m_aPrimaryReadCache);
}
@@ -1353,10 +1347,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(bool bPreferred,
{
//create copy of our readonly-cache, if write access is forced ... but
//not still possible!
- if (
- (bWriteAccessRequested) &&
- (!m_pSecondaryWriteCache )
- )
+ if ( bWriteAccessRequested && !m_pSecondaryWriteCache )
{
m_pSecondaryWriteCache = new AcceleratorCache(m_aSecondaryReadCache);
}
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 13034b7ede1e..f1126d7c2afd 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -365,7 +365,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
// b) inside user layer we can (SOFT mode!) but sometimes we should not (HARD mode!)
// create new empty structures. We should preferr using of any existing structure.
sal_Int32 eShareMode = (css::embed::ElementModes::READ | css::embed::ElementModes::NOCREATE);
- sal_Int32 eUserMode = (css::embed::ElementModes::READWRITE );
+ sal_Int32 eUserMode = css::embed::ElementModes::READWRITE;
OUStringBuffer sRelPathBuf(1024);
OUString sRelPathShare;
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 38cb7f3e53eb..7302507ebbe5 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -401,10 +401,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void)
else if (bTerminateApp)
bSuccess = implts_terminateApplication();
- if (
- ( ! bSuccess ) &&
- ( bControllerSuspended )
- )
+ if ( ! bSuccess && bControllerSuspended )
{
css::uno::Reference< css::frame::XController > xController = xCloseFrame->getController();
if (xController.is())
@@ -596,10 +593,7 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig
// a simple XWindow using the toolkit only .-(
SolarMutexGuard aSolarLock;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if (
- (pWindow ) &&
- (pWindow->IsSystemWindow())
- )
+ if ( pWindow && pWindow->IsSystemWindow() )
return xTarget;
}
diff --git a/framework/source/fwe/interaction/preventduplicateinteraction.cxx b/framework/source/fwe/interaction/preventduplicateinteraction.cxx
index a019094d1484..910c0891f077 100644
--- a/framework/source/fwe/interaction/preventduplicateinteraction.cxx
+++ b/framework/source/fwe/interaction/preventduplicateinteraction.cxx
@@ -103,10 +103,7 @@ void SAL_CALL PreventDuplicateInteraction::handle(const css::uno::Reference< css
aLock.clear();
// <- SAFE
- if (
- (bHandleIt ) &&
- (xHandler.is())
- )
+ if ( bHandleIt && xHandler.is() )
{
xHandler->handle(xRequest);
}
@@ -158,10 +155,7 @@ sal_Bool SAL_CALL PreventDuplicateInteraction::handleInteractionRequest( const c
aLock.clear();
// <- SAFE
- if (
- (bHandleIt ) &&
- (xHandler.is())
- )
+ if ( bHandleIt && xHandler.is() )
{
return xHandler->handleInteractionRequest(xRequest);
}
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 30e3290cdbd2..60810826c941 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -211,12 +211,9 @@ OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
// check for system window is necessary to guarantee correct pointer cast!
- if (
- (pWindow ) &&
- (pWindow->IsSystemWindow())
- )
+ if ( pWindow && pWindow->IsSystemWindow() )
{
- WindowStateMask const nMask = WindowStateMask::All & ~(WindowStateMask::Minimized);
+ WindowStateMask const nMask = WindowStateMask::All & ~WindowStateMask::Minimized;
sWindowState = OStringToOUString(
static_cast<SystemWindow*>(pWindow.get())->GetWindowState(nMask),
RTL_TEXTENCODING_UTF8);
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index ea8120050863..c6d916a60f19 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -164,10 +164,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
- if (
- ( pWindow ) &&
- ( pWindow->GetType() == WindowType::WORKWINDOW )
- )
+ if ( pWindow && pWindow->GetType() == WindowType::WORKWINDOW )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
pWorkWindow->SetApplicationID( sApplicationID );
@@ -281,10 +278,7 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
- if (
- ( pWindow ) &&
- ( pWindow->GetType() == WindowType::WORKWINDOW )
- )
+ if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
pWorkWindow->SetIcon( (sal_uInt16)nIcon );
@@ -315,10 +309,7 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
- if (
- ( pWindow ) &&
- ( pWindow->GetType() == WindowType::WORKWINDOW )
- )
+ if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
pWorkWindow->SetText( sTitle );
diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx
index 2f2b21b21761..54ddce6e4119 100644
--- a/framework/source/inc/pattern/window.hxx
+++ b/framework/source/inc/pattern/window.hxx
@@ -54,10 +54,7 @@ static bool isTopWindow(const css::uno::Reference< css::awt::XWindow >& xWindow)
// a simple XWindow using the toolkit only .-(
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if (
- (pWindow ) &&
- (pWindow->IsSystemWindow())
- )
+ if ( pWindow && pWindow->IsSystemWindow() )
return true;
}
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c6fd863a4968..0bff7d4127ef 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1286,10 +1286,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded()
// They will be used as "last chance" if there is no visible frame pointing to the same model.
// Safe the result but continue with current loop might be looking for other visible frames.
bool bIsHidden = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false);
- if (
- ( bIsHidden ) &&
- ( ! xHiddenTask.is())
- )
+ if ( bIsHidden && ! xHiddenTask.is() )
{
xHiddenTask = xTask;
xTask.clear ();
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 3a9fdfdb546a..78237387d428 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1154,10 +1154,7 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems)
// operation. On the other side a crash reasoned by an invalid stl iterator
// will have the same effect .-)
- if (
- (m_rCacheLock > 0 ) &&
- (bLockForAddRemoveVectorItems)
- )
+ if ( (m_rCacheLock > 0) && bLockForAddRemoveVectorItems )
{
OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.");
throw css::uno::RuntimeException(
@@ -1483,10 +1480,7 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams)
/* SAFE */ {
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
m_eJob = E_NO_JOB;
- if (
- (bAllowAutoSaveReactivation) &&
- (bWasAutoSaveActive )
- )
+ if ( bAllowAutoSaveReactivation && bWasAutoSaveActive )
{
m_eJob |= AutoRecovery::E_AUTO_SAVE;
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index e96224815441..090c109318d6 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -271,10 +271,7 @@ sal_Bool SAL_CALL Desktop::terminate()
bool bTerminate = false;
try
{
- if(
- ( bAskQuickStart ) &&
- ( xQuickLauncher.is() )
- )
+ if( bAskQuickStart && xQuickLauncher.is() )
{
xQuickLauncher->queryTermination( aEvent );
lCalledTerminationListener.push_back( xQuickLauncher );
@@ -334,10 +331,7 @@ sal_Bool SAL_CALL Desktop::terminate()
Scheduler::ProcessEventsToIdle();
}
- if(
- ( bAskQuickStart ) &&
- ( xQuickLauncher.is() )
- )
+ if( bAskQuickStart && xQuickLauncher.is() )
{
xQuickLauncher->notifyTermination( aEvent );
}
@@ -1724,10 +1718,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
// Use it in case it was allowed from outside only.
bool bSuspended = false;
css::uno::Reference< css::frame::XController > xController( xFrame->getController(), css::uno::UNO_QUERY );
- if (
- ( bAllowUI ) &&
- ( xController.is() )
- )
+ if ( bAllowUI && xController.is() )
{
bSuspended = xController->suspend( true );
if ( ! bSuspended )
@@ -1760,10 +1751,7 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
// It can happen that XController.suspend() returned true ... but a registered close listener
// throwed these veto exception. Then the controller has to be reactivated. Otherwise
// these document doesn't work any more.
- if (
- (bSuspended ) &&
- (xController.is())
- )
+ if ( bSuspended && xController.is())
xController->suspend(false);
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a4e21ae052b8..76dddcafd4f8 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1528,10 +1528,7 @@ sal_Bool SAL_CALL Frame::setComponent(const css::uno::Reference< css::awt::XWind
// A new component window doesn't know anything about current active/focus states.
// Set this information on it!
- if (
- (bHadFocus ) &&
- (xComponentWindow.is())
- )
+ if ( bHadFocus && xComponentWindow.is() )
{
xComponentWindow->setFocus();
}
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 675f2222fcc4..eea0b5eb8697 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4056,8 +4056,8 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
rotate += PI;
for( i = 0 ; i < 3 ; i++){
- r_pt[i].x = (int)(pt[i].x * cos(-(rotate)) - pt[i].y * sin(-(rotate)));
- r_pt[i].y = (int)(pt[i].y * cos(-(rotate)) + pt[i].x * sin(-(rotate)));
+ r_pt[i].x = (int)(pt[i].x * cos(-rotate) - pt[i].y * sin(-rotate));
+ r_pt[i].y = (int)(pt[i].y * cos(-rotate) + pt[i].x * sin(-rotate));
}
/* 4 - Calculation of reflex angle */
@@ -4358,7 +4358,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
if ((drawobj->u.freeform.npt > 2) &&
(static_cast<size_t>(drawobj->u.freeform.npt) <
- ((::std::numeric_limits<int>::max)() / sizeof(double))))
+ (::std::numeric_limits<int>::max() / sizeof(double))))
{
int n, i;
n = drawobj->u.freeform.npt;
diff --git a/i18nlangtag/source/isolang/inunx.cxx b/i18nlangtag/source/isolang/inunx.cxx
index 46b5e5b6cb40..40e601d02f49 100644
--- a/i18nlangtag/source/isolang/inunx.cxx
+++ b/i18nlangtag/source/isolang/inunx.cxx
@@ -105,7 +105,7 @@ static void getPlatformSystemLanguageImpl( LanguageType& rSystemLanguage,
#endif
}
#else /* MACOSX */
- OString aUnxLang( (pGetLangFromEnv)() );
+ OString aUnxLang( pGetLangFromEnv() );
nLang = MsLangId::convertUnxByteStringToLanguage( aUnxLang );
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
rSystemLanguage = nLang;
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 4a349d4b30db..2a344cfdd2fe 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1194,7 +1194,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale )
sal_Int16 LCBreakIteratorRuleCount = 0;
sal_Unicode **LCBreakIteratorRulesArray = func(LCBreakIteratorRuleCount);
Sequence< OUString > seq(LCBreakIteratorRuleCount);
- for(int i = 0; i < (LCBreakIteratorRuleCount); i++) {
+ for(int i = 0; i < LCBreakIteratorRuleCount; i++) {
OUString elem(LCBreakIteratorRulesArray[i]);
seq[i] = elem;
}
@@ -1216,7 +1216,7 @@ LocaleDataImpl::getReservedWord( const Locale& rLocale )
sal_Int16 LCReservedWordsCount = 0;
sal_Unicode **LCReservedWordsArray = func(LCReservedWordsCount);
Sequence< OUString > seq(LCReservedWordsCount);
- for(int i = 0; i < (LCReservedWordsCount); i++) {
+ for(int i = 0; i < LCReservedWordsCount; i++) {
OUString elem(LCReservedWordsArray[i]);
seq[i] = elem;
}
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index eccc2088b7de..7b5478186671 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -281,7 +281,7 @@ TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 sType
}
}
r.realloc(n);
- return (r);
+ return r;
}
diff --git a/include/comphelper/newarray.hxx b/include/comphelper/newarray.hxx
index a28bff7477cb..a904f7d1ed0d 100644
--- a/include/comphelper/newarray.hxx
+++ b/include/comphelper/newarray.hxx
@@ -29,7 +29,7 @@ namespace comphelper {
template<typename T> T *
newArray_null(size_t const n) throw()
{
- if (((::std::numeric_limits<size_t>::max)() / sizeof(T)) <= n) {
+ if ((::std::numeric_limits<size_t>::max() / sizeof(T)) <= n) {
return 0;
}
return new (::std::nothrow) T[n];
diff --git a/include/cppcanvas/color.hxx b/include/cppcanvas/color.hxx
index 678e431d0846..0a5477cfa995 100644
--- a/include/cppcanvas/color.hxx
+++ b/include/cppcanvas/color.hxx
@@ -66,12 +66,12 @@ namespace cppcanvas
inline Color::IntSRGBA makeColor( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha )
{
- return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|(nAlpha);
+ return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|nAlpha;
}
inline sal_Int32 makeColorARGB( sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
{
- return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|(nBlue);
+ return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|nBlue;
}
}
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 20f9857d0ac0..bfcf05514fd7 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -101,7 +101,7 @@ public:
static bool isNumericType( sal_Int32 nType )
{
return ((nType & nCharClassNumericType) != 0) &&
- ((nType & ~(nCharClassNumericTypeMask)) == 0);
+ ((nType & ~nCharClassNumericTypeMask) == 0);
}
/// whether type is pure alphanumeric or not, e.g. return of getStringType
@@ -117,7 +117,7 @@ public:
static bool isLetterType( sal_Int32 nType )
{
return ((nType & nCharClassLetterType) != 0) &&
- ((nType & ~(nCharClassLetterTypeMask)) == 0);
+ ((nType & ~nCharClassLetterTypeMask) == 0);
}
/// whether type is pure letternumeric or not, e.g. return of getStringType
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index c484fea98bc6..0849b1a620d1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1679,7 +1679,7 @@ static const GdkRGBA& getDarkColor(int nViewId, LOKDocViewPrivate& priv)
{
const std::string& rName = rValue.second.get<std::string>("name");
guint32 nColor = rValue.second.get<guint32>("color");
- GdkRGBA aColor{((double)((guint8)((nColor)>>16)))/255, ((double)((guint8)(((guint16)(nColor)) >> 8)))/255, ((double)((guint8)(nColor)))/255, 0};
+ GdkRGBA aColor{((double)((guint8)(nColor>>16)))/255, ((double)((guint8)(((guint16)nColor) >> 8)))/255, ((double)((guint8)nColor))/255, 0};
auto itAuthorViews = g_aAuthorViews.find(rName);
if (itAuthorViews != g_aAuthorViews.end())
aColorMap[itAuthorViews->second] = aColor;
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 2296b24e06a4..836722c5000e 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -736,7 +736,7 @@ OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * p
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen))
+ if (pCC && tlen)
{
OUString bTemp = aTerm.copy(0,1);
if (tlen > 1)
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 3ea075716f88..e271689287de 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -563,7 +563,7 @@ OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pC
OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen))
+ if (pCC && tlen)
{
OUString bTemp = aTerm.copy(0,1);
if (tlen > 1)
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 860d8f16da04..bf9016dc37c2 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -607,7 +607,7 @@ bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, LanguageTyp
CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
{
sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen))
+ if (pCC && tlen)
{
sal_Int32 nc = 0;
for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
diff --git a/lotuswordpro/source/filter/lwpfribframe.cxx b/lotuswordpro/source/filter/lwpfribframe.cxx
index 5cbeb319265e..06a7179160c0 100644
--- a/lotuswordpro/source/filter/lwpfribframe.cxx
+++ b/lotuswordpro/source/filter/lwpfribframe.cxx
@@ -115,7 +115,7 @@ void LwpFribFrame::RegisterStyle(LwpFoundry* pFoundry)
else
{
XFParaStyle* pParaStyle = new XFParaStyle;
- *pParaStyle = *(pOldStyle);
+ *pParaStyle = *pOldStyle;
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
m_StyleName = pXFStyleManager->AddStyle(pParaStyle).m_pStyle->GetStyleName();
}
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index d14ea314b6f8..2be46311f52a 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -88,7 +88,7 @@ void LwpFribTable::RegisterNewStyle()
else
{
XFParaStyle* pParaStyle = new XFParaStyle;
- *pParaStyle = *(pOldStyle);
+ *pParaStyle = *pOldStyle;
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
m_StyleName = pXFStyleManager->AddStyle(pParaStyle).m_pStyle->GetStyleName();
}
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx
index aa6ef46e66b1..818d0f328306 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -163,7 +163,7 @@ void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyVa
connProps["userName"] = sql::ConnectPropertyVal(user_str);
connProps["password"] = sql::ConnectPropertyVal(pass_str);
connProps["schema"] = sql::ConnectPropertyVal(schema_str);
- connProps["port"] = sql::ConnectPropertyVal((int)(nPort));
+ connProps["port"] = sql::ConnectPropertyVal((int)nPort);
if (unixSocketPassed) {
sql::SQLString socket_str = rtl::OUStringToOString(sUnixSocket, m_settings.encoding).getStr();
connProps["socket"] = socket_str;
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx
index 4bd32f4e7a77..1e4c06ab1cf2 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -66,7 +66,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeLis
if (aMceState.empty() || aMceState.back() != MCE_STATE::Started)
return false;
- OUString aRequires = rAttribs.getString( (XML_Requires ), "none" );
+ OUString aRequires = rAttribs.getString( XML_Requires, "none" );
// At this point we can't access namespaces as the correct xml filter
// is long gone. For now let's decide depending on a list of supported
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index b8fd28e8e538..7621ed6d7094 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -173,7 +173,7 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
sal_Int32 nPhClr = maBackgroundColor.isUsed() ?
maBackgroundColor.getColor( rFilterBase.getGraphicHelper() ) : API_RGB_TRANSPARENT;
- oox::drawingml::ShapePropertyIds aPropertyIds = (oox::drawingml::ShapePropertyInfo::DEFAULT).mrPropertyIds;
+ oox::drawingml::ShapePropertyIds aPropertyIds = oox::drawingml::ShapePropertyInfo::DEFAULT.mrPropertyIds;
aPropertyIds[oox::drawingml::ShapeProperty::FillGradient] = PROP_FillGradientName;
oox::drawingml::ShapePropertyInfo aPropInfo( aPropertyIds, true, false, true, false );
oox::drawingml::ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper(), aPropInfo );
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 8a454545b37e..157887d9d28c 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -185,7 +185,7 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg)
RegError ret = RegError::NO_ERROR;
if (pReg->release() == 0)
{
- delete(pReg);
+ delete pReg;
hReg = nullptr;
}
else
@@ -217,7 +217,7 @@ static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg,
{
if (!registryName->length)
{
- delete(pReg);
+ delete pReg;
hReg = nullptr;
}
}
@@ -383,7 +383,7 @@ RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry)
if (hRegistry)
{
ORegistry* pReg = static_cast<ORegistry*>(hRegistry);
- delete(pReg);
+ delete pReg;
return RegError::NO_ERROR;
} else
{
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 32d81f7fa689..0a3b665085f5 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -515,7 +515,7 @@ namespace rptui
// determine whether the new focus window is part of an (currently invisible) condition
const vcl::Window* pConditionCandidate = pGetFocusWindow->GetParent();
const vcl::Window* pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : nullptr;
- while ( ( pPlaygroundCandidate )
+ while ( pPlaygroundCandidate
&& ( pPlaygroundCandidate != this )
&& ( pPlaygroundCandidate != m_pConditionPlayground )
)
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 41ef1efcbfcc..c26ef0b665b4 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -294,7 +294,7 @@ int dooptions(int argc, char** argv)
cerror( "Too many file arguments. Usage: cpp [input [output]]",
NULLST);
}
- return (j); /* Return new argc */
+ return j; /* Return new argc */
}
int readoptions(char* filename, char*** pfargv)
@@ -358,7 +358,7 @@ int readoptions(char* filename, char*** pfargv)
fclose(fp);
back=dooptions(fargc+1,pfa);
- return (back);
+ return back;
}
/*
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index d9d6710388db..41584c22f7dc 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -201,7 +201,7 @@ FileHandle_Impl::Allocator::~Allocator()
void FileHandle_Impl::Allocator::allocate(sal_uInt8 **ppBuffer, size_t *pnSize)
{
SAL_WARN_IF((!ppBuffer) || (!pnSize), "sal.osl", "FileHandle_Impl::Allocator::allocate(): contract violation");
- if ((ppBuffer) && (pnSize))
+ if (ppBuffer && pnSize)
{
*ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
*pnSize = m_bufsiz;
@@ -322,7 +322,7 @@ oslFileError FileHandle_Impl::setSize(sal_uInt64 uSize)
if (write(m_fd, "", (size_t)1) == -1)
{
/* Failure. Restore saved position */
- (void) lseek(m_fd, (off_t)(nCurPos), SEEK_SET);
+ (void) lseek(m_fd, (off_t)nCurPos, SEEK_SET);
return result;
}
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 882652bc91e2..a0b16d57ec83 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1147,9 +1147,9 @@ SAL_CALL rtl_machdep_alloc (
#endif
#if defined(SAL_UNX)
- addr = mmap (nullptr, (size_t)(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ addr = mmap (nullptr, (size_t)size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
#elif defined(SAL_W32)
- addr = VirtualAlloc (nullptr, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
+ addr = VirtualAlloc (nullptr, (SIZE_T)size, MEM_COMMIT, PAGE_READWRITE);
#endif /* (SAL_UNX || SAL_W32) */
if (addr != MAP_FAILED)
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index f310559c81e8..d2c5fc5c8745 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -893,7 +893,7 @@ rtl_cache_activate (
QUEUE_INSERT_TAIL_NAMED(&(g_cache_list.m_cache_head), cache, cache_);
RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
}
- return (cache);
+ return cache;
}
/** rtl_cache_deactivate()
@@ -1165,7 +1165,7 @@ SAL_CALL rtl_cache_alloc (
cache->m_cpu_stats.m_alloc += 1;
RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));
- return (obj);
+ return obj;
}
prev = cache->m_cpu_prev;
@@ -1205,7 +1205,7 @@ SAL_CALL rtl_cache_alloc (
obj = nullptr;
}
}
- return (obj);
+ return obj;
}
/** rtl_cache_free()
@@ -1326,7 +1326,7 @@ rtl_cache_wsupdate_wait (unsigned int seconds)
timespec wakeup;
gettimeofday(&now, nullptr);
- wakeup.tv_sec = now.tv_sec + (seconds);
+ wakeup.tv_sec = now.tv_sec + seconds;
wakeup.tv_nsec = now.tv_usec * 1000;
(void) pthread_cond_timedwait (
diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx
index 3168c9686e28..360ade3b7873 100644
--- a/sal/rtl/random.cxx
+++ b/sal/rtl/random.cxx
@@ -101,7 +101,7 @@ static double data (RandomData_Impl *pImpl)
((double)(pImpl->m_nY) / 30269.0) +
((double)(pImpl->m_nZ) / 30307.0) );
- random -= ((double)((sal_uInt32)(random)));
+ random -= ((double)((sal_uInt32)random));
return random;
}
diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx
index f9cae77633da..ab798d8b1ecb 100644
--- a/sal/textenc/tcvtutf7.cxx
+++ b/sal/textenc/tcvtutf7.cxx
@@ -275,7 +275,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
while ( (pDestBuf < pEndDestBuf) && (nBufferBits >= 16) )
{
nBitBufferTemp = nBitBuffer >> (32-16);
- *pDestBuf = (sal_Unicode)((nBitBufferTemp) & 0xFFFF);
+ *pDestBuf = (sal_Unicode)(nBitBufferTemp & 0xFFFF);
pDestBuf++;
nBitBuffer <<= 16;
nBufferBits -= 16;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 93e75ed8e4c1..b8c5db350e15 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2521,7 +2521,7 @@ void ScDocument::MergeNumberFormatter(ScDocument* pSrcDoc)
if (pOtherFormatter && pOtherFormatter != pThisFormatter)
{
SvNumberFormatterIndexTable* pExchangeList =
- pThisFormatter->MergeFormatter(*(pOtherFormatter));
+ pThisFormatter->MergeFormatter(*pOtherFormatter);
if (!pExchangeList->empty())
pFormatExchangeList = pExchangeList;
}
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index c8821157da4e..0bbe0c7fd0cf 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -859,13 +859,13 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
SvtSecurityOptions aSecOpt;
bool bCtrlClickHappened = (nScClickMouseModifier & KEY_MOD1);
bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
- if( bCtrlClickHappened && !( bCtrlClickSecOption ) )
+ if( bCtrlClickHappened && ! bCtrlClickSecOption )
{
// return since ctrl+click happened when the
// ctrl+click security option was disabled, link should not open
return;
}
- else if( !( bCtrlClickHappened ) && bCtrlClickSecOption )
+ else if( ! bCtrlClickHappened && bCtrlClickSecOption )
{
// ctrl+click did not happen; only click happened maybe with some
// other key combo. and security option is set, so return
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index cb9421ea5996..5d567b5bd464 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2058,12 +2058,12 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeTrackMsgInfo )
const SCROW ScChangeTrack::nContentRowsPerSlot = InitContentRowsPerSlot();
const SCSIZE ScChangeTrack::nContentSlots =
- (MAXROWCOUNT) / InitContentRowsPerSlot() + 2;
+ MAXROWCOUNT / InitContentRowsPerSlot() + 2;
SCROW ScChangeTrack::InitContentRowsPerSlot()
{
const SCSIZE nMaxSlots = 0xffe0 / sizeof( ScChangeActionContent* ) - 2;
- SCROW nRowsPerSlot = (MAXROWCOUNT) / nMaxSlots;
+ SCROW nRowsPerSlot = MAXROWCOUNT / nMaxSlots;
if ( nRowsPerSlot * nMaxSlots < sal::static_int_cast<SCSIZE>(MAXROWCOUNT) )
++nRowsPerSlot;
return nRowsPerSlot;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 59730d7d7185..35665811c462 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2210,7 +2210,7 @@ void ScInterpreter::ScCell()
}
else if( aInfoType == "ADDRESS" )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
- ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? (ScRefFlags::ADDR_ABS) : (ScRefFlags::ADDR_ABS_3D);
+ ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? ScRefFlags::ADDR_ABS : ScRefFlags::ADDR_ABS_3D;
OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention()));
PushString(aStr);
}
@@ -8795,7 +8795,7 @@ void ScInterpreter::ScSearch()
if (!bBool)
PushNoValue();
else
- PushDouble((double)(nPos) + 1);
+ PushDouble((double)nPos + 1);
}
}
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 463100359dfc..48e9c18dc358 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -219,7 +219,7 @@ static ScRefFlags lcl_NextFlags( ScRefFlags nOld )
{
const ScRefFlags Mask_ABS = (ScRefFlags::COL_ABS | ScRefFlags::ROW_ABS | ScRefFlags::TAB_ABS);
ScRefFlags nNew = nOld & Mask_ABS;
- nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)(nNew) - 1 ) & Mask_ABS; // weiterzaehlen
+ nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)nNew - 1 ) & Mask_ABS; // weiterzaehlen
if (!(nOld & ScRefFlags::TAB_3D))
nNew &= ~ScRefFlags::TAB_ABS; // not 3D -> never absolute!
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 9b2371200b27..fd0ce5977ddb 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -766,7 +766,7 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
{
if( fVal < 0 ) fVal = 0;
if( fVal >= 501 ) fVal = 500;
- nFlags |= (nNewFlags | (sal_uInt16)(fVal) << 7);
+ nFlags |= (nNewFlags | (sal_uInt16)fVal << 7);
}
// normal condition
else
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 790fc829ebcc..106c19e3218b 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -426,8 +426,8 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
return;
}
- eType = ( pIndexToType )( nOc );
- eOc = ( pIndexToToken)( nOc );
+ eType = pIndexToType( nOc );
+ eOc = pIndexToToken( nOc );
if( eOc == ocNoName )
pExtName = GetAddInName( nOc );
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 1a6ad39e0ff5..66b8876897c9 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1776,7 +1776,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
ScPatternAttr aScPattern(pDoc->GetPool());
if ((nValue1 & atBold) == atBold)
@@ -1800,7 +1800,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
ScPatternAttr aScPattern(pDoc->GetPool());
sal_uInt16 HorJustify = (nValue1 & 0x000F);
@@ -2072,7 +2072,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
sal_uLong nKey = 0;
sal_uInt16 nFormat = (nValue1 & 0x00FF);
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dd0576f281c3..2872bedc1ac2 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2875,7 +2875,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
positions (e.g. if source and destination range overlaps).*/
rDoc.CopyFromClip(
- aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~(InsertDeleteFlags::OBJECTS),
+ aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS,
pUndoDoc, pClipDoc.get(), true, false, bIncludeFiltered);
// skipped rows and merged cells don't mix
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index c62b497c9748..5d4444dd06b3 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -800,7 +800,7 @@ void ScUndoCut::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aExtendedRange, PaintPartFlags::Grid, nExtFlags );
if ( !bUndo ) // draw redo after updating row heights
@@ -1787,7 +1787,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
ShowTable( aWorkRange.aStart.Tab() );
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3aa7e90eb509..95f466ad6dd4 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -168,7 +168,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
+ if ( !( pViewShell && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
@@ -418,7 +418,7 @@ void ScUndoSelectionAttr::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
ShowTable( aRange );
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 372033807d84..c1a19e9ec490 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1883,7 +1883,7 @@ void ScUndoDataForm::DoChange( const bool bUndo )
nPaint |= PaintPartFlags::Left;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
+/*A*/ if (pViewShell && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 730142d36ae8..e08dda7d405c 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2492,7 +2492,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = rDoc.GetFormatTable()->
GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
- rAny <<= (sal_Int32)( nOldFormat );
+ rAny <<= (sal_Int32)nOldFormat;
}
break;
case ATTR_INDENT:
@@ -8647,7 +8647,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
sal_uInt16 nWidth = rDoc.GetOriginalWidth( nCol, nTab );
// property is 1/100mm, column width is twips
nWidth = (sal_uInt16) TwipsToHMM(nWidth);
- rAny <<= (sal_Int32)( nWidth );
+ rAny <<= (sal_Int32)nWidth;
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
@@ -8793,7 +8793,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
sal_uInt16 nHeight = rDoc.GetOriginalHeight( nRow, nTab );
// property is 1/100mm, row height is twips
nHeight = (sal_uInt16) TwipsToHMM(nHeight);
- rAny <<= (sal_Int32)( nHeight );
+ rAny <<= (sal_Int32)nHeight;
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b5d889b306b2..ec7c3bb0973a 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2370,7 +2370,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (pModelObj)
aOldSize = pModelObj->getDocumentSize();
- aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)(MAXTILEDROW)));
+ aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)MAXTILEDROW));
Size aNewSize(0, 0);
if (pModelObj)
@@ -2497,7 +2497,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (pModelObj)
aOldSize = pModelObj->getDocumentSize();
- aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)(MAXCOL)));
+ aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)MAXCOL));
Size aNewSize(0, 0);
if (pModelObj)
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index ff7ec2978608..88cba7440784 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -171,8 +171,8 @@ ScTabView::~ScTabView()
ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
for (int k = 0; k < 4; ++k)
{
- if (rOtherViewData.HasEditView((ScSplitPos)(k)))
- pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)(k));
+ if (rOtherViewData.HasEditView((ScSplitPos)k))
+ pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)k);
}
};
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index ae0247b2cf24..66af78052f74 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1505,7 +1505,7 @@ void ScViewData::ResetEditView()
{
if (bEditActive[i])
{
- lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)(i));
+ lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)i);
pEngine = pEditView[i]->GetEditEngine();
pEngine->RemoveView(pEditView[i]);
pEditView[i]->SetOutputArea( tools::Rectangle() );
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 45b96b5c4464..93707db0d0cb 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -1071,7 +1071,7 @@ double GetDuration( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, doub
double t;
for( t = 1.0 ; t < fNumOfCoups ; t++ )
- fDur += ( t + nDiff ) * ( fCoup ) / pow( fYield, t + nDiff );
+ fDur += ( t + nDiff ) * fCoup / pow( fYield, t + nDiff );
fDur += ( fNumOfCoups + nDiff ) * ( fCoup + f100 ) / pow( fYield, fNumOfCoups + nDiff );
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index e28162b9e786..65539844c4ed 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2268,7 +2268,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
- ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect(rRect);
+ pObj->AdjustToMaxRect(rRect);
pObj->SetUserCall(this);
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 5cb6a87a518f..bd19a80f2f08 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -230,8 +230,8 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
bool bNeedsSSSlideInfoAtom = !bVisible
|| ( mnDiaMode == 2 )
- || ( bIsSound )
- || ( bStopSound )
+ || bIsSound
+ || bStopSound
|| ( eFe != css::presentation::FadeEffect_NONE );
if ( bNeedsSSSlideInfoAtom )
{
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 09f0c8b6bf33..4c07402a1039 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -2044,7 +2044,7 @@ bool AnimationExporter::getColorAny( const Any& rAny, const sal_Int16 nColorSpac
{
rA = (sal_uInt8)( nColor >> 16 );
rB = (sal_uInt8)( nColor >> 8 );
- rC = (sal_uInt8)( nColor );
+ rC = (sal_uInt8) nColor;
}
else if ( rAny >>= aHSL ) // HSL
{
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e0691464bee1..5795a339ce23 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1343,7 +1343,7 @@ void PowerPointExport::WriteAnimationNode( const FSHelperPtr& pFS, const Referen
}
if( pMethod ) {
- (this->*(pMethod))( pFS, rXNode, xmlNodeType, bMainSeqChild );
+ (this->*pMethod)( pFS, rXNode, xmlNodeType, bMainSeqChild );
return;
}
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 5594d12f9504..f105358ec107 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -416,7 +416,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe
{
sal_uInt32 nSOColor = *( o3tl::doAccess<sal_uInt32>(mAny) );
mnCharColor = nSOColor & 0xff00ff00; // green and hibyte
- mnCharColor |= (sal_uInt8)( nSOColor ) << 16; // red and blue is switched
+ mnCharColor |= (sal_uInt8) nSOColor << 16; // red and blue is switched
mnCharColor |= (sal_uInt8)( nSOColor >> 16 );
}
meCharColor = ePropState;
@@ -864,7 +864,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
{
sal_uInt32 nSOColor = *o3tl::doAccess<sal_uInt32>(pPropValue[i].Value);
nBulletColor = nSOColor & 0xff00ff00; // green and hibyte
- nBulletColor |= (sal_uInt8)( nSOColor ) << 16; // red
+ nBulletColor |= (sal_uInt8) nSOColor << 16; // red
nBulletColor |= (sal_uInt8)( nSOColor >> 16 ) | 0xfe000000; // blue
}
else if ( aPropName == "BulletRelSize" )
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 0e268a95a08a..4a0aadfd7e02 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -689,7 +689,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
{
double fValue = 0.0;
rValue >>= fValue;
- long nValue = (long)(fValue);
+ long nValue = (long)fValue;
mpMetric->SetValue( nValue );
updateMenu();
}
@@ -1651,7 +1651,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
}
else
{
- mpCBXDuration->SetValue( (fDuration)*100.0 );
+ mpCBXDuration->SetValue( fDuration*100.0 );
}
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 2d362cb0ca80..6598d82377c6 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -675,7 +675,7 @@ void CustomAnimationPane::updateControls()
if( bHasSpeed )
{
- mpCBXDuration->SetValue( (fDuration)*100.0 );
+ mpCBXDuration->SetValue( fDuration*100.0 );
}
mpPBPropertyMore->Enable();
@@ -1826,7 +1826,7 @@ void CustomAnimationPane::onAdd()
pDescriptor = *static_cast< CustomAnimationPresetPtr* >( pEntryData );
const double fDuration = pDescriptor->getDuration();
- mpCBXDuration->SetValue( (fDuration)*100.0 );
+ mpCBXDuration->SetValue( fDuration*100.0 );
bool bHasSpeed = pDescriptor->getDuration() > 0.001;
mpCBXDuration->Enable( bHasSpeed );
mpFTDuration->Enable( bHasSpeed );
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index dacf464abea1..13f0db45e22a 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -858,7 +858,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
}
- return (bFound);
+ return bFound;
}
// If object is marked return true else return false.
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index acfd3a18515b..987af603506e 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -328,7 +328,7 @@ void TableValueSet::Resize()
if( !m_bModal )
{
- WinBits nStyle = GetStyle() & ~(WB_VSCROLL);
+ WinBits nStyle = GetStyle() & ~WB_VSCROLL;
if( nRowCount > nVisibleRowCount )
{
nStyle |= WB_VSCROLL;
@@ -758,7 +758,7 @@ void TableDesignWidget::FillDesignPreviewControl()
sal_Int32 nRows = (nCount+2)/3;
m_pValueSet->SetColCount(nCols);
m_pValueSet->SetLineCount(nRows);
- WinBits nStyle = m_pValueSet->GetStyle() & ~(WB_VSCROLL);
+ WinBits nStyle = m_pValueSet->GetStyle() & ~WB_VSCROLL;
m_pValueSet->SetStyle(nStyle);
Size aSize(m_pValueSet->GetOptimalSize());
aSize.Width() += (10 * nCols);
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 7e4e6f1062ed..e17bf1877ba8 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -428,7 +428,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
pPage->SetLayoutName(pExample->GetLayoutName());
// insert (page)
- mrDoc.InsertPage(pPage, (sal_uInt16)(nTarget) * 2 + 1);
+ mrDoc.InsertPage(pPage, (sal_uInt16)nTarget * 2 + 1);
if( isRecordingUndo() )
AddUndo(mrDoc.GetSdrUndoFactory().CreateUndoNewPage(*pPage));
@@ -467,7 +467,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
pNotesPage->SetPageKind(PageKind::Notes);
// insert (notes page)
- mrDoc.InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2);
+ mrDoc.InsertPage(pNotesPage, (sal_uInt16)nTarget * 2 + 2);
if( isRecordingUndo() )
AddUndo(mrDoc.GetSdrUndoFactory().CreateUndoNewPage(*pNotesPage));
@@ -1631,7 +1631,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void)
const float fImageRatio = (float)aImageSize.Height() / (float)aImageSize.Width();
aImageSize.Width() = (long)( fImageRatio * fImageHeight );
}
- aImageSize.Height() = (long)( fImageHeight );
+ aImageSize.Height() = (long)fImageHeight;
Point aImagePos( pInfo->mrStartPos );
aImagePos.X() += aOutSize.Width() - aImageSize.Width() - aOffset.Width() ;
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index c8ea1ec7fbf9..d0821cba0c9a 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -491,7 +491,7 @@ void OptimizerDialog::UpdateControlStatesPage2()
aResolutionText = OUString::number( nImageResolution );
setControlProperty( "RadioButton0Pg1", "State", Any( (sal_Int16)( !bJPEGCompression ) ) );
- setControlProperty( "RadioButton1Pg1", "State", Any( (sal_Int16)( bJPEGCompression ) ) );
+ setControlProperty( "RadioButton1Pg1", "State", Any( (sal_Int16) bJPEGCompression ) );
setControlProperty( "FixedText1Pg1", "Enabled", Any( bJPEGCompression ) );
setControlProperty( "FormattedField0Pg1", "Enabled", Any( bJPEGCompression ) );
setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( (double)nJPEGQuality ) );
@@ -593,7 +593,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
else
{
setControlProperty( "RadioButton0Pg4", "State", Any( (sal_Int16)( !bSaveAs ) ) );
- setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16)( bSaveAs ) ) );
+ setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16) bSaveAs ) );
}
setControlProperty( "ComboBox0Pg4", "Enabled", Any( false ) );
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index d0890d89f8fd..c1aceedb3663 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -178,8 +178,8 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh )
if ( aURL.GetProtocol() == INetProtocol::File )
Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
- (pFilter) ? pFilter->GetMimeType() : OUString(),
- (pFilter) ? pFilter->GetServiceName() : OUString() );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list