summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbunoobj.cxx12
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/sbxvalue.cxx2
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx14
-rw-r--r--chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx4
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx2
-rw-r--r--compilerplugins/clang/test/unnecessaryparen.cxx20
-rw-r--r--compilerplugins/clang/unnecessaryparen.cxx84
-rw-r--r--connectivity/source/commontools/dbconversion.cxx6
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx8
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx2
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx4
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx2
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
-rw-r--r--cppuhelper/source/propertysetmixin.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx4
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx4
-rw-r--r--dbaccess/source/core/api/View.cxx2
-rw-r--r--dbaccess/source/core/api/column.cxx9
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--desktop/source/app/dispatchwatcher.cxx2
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx2
-rw-r--r--desktop/source/splash/splash.cxx4
-rw-r--r--editeng/source/editeng/impedit.cxx5
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/rtf/svxrtf.cxx10
-rw-r--r--extensions/source/bibliography/framectr.cxx2
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx7
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx8
-rw-r--r--framework/source/recording/dispatchrecorder.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx4
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx4
-rw-r--r--include/svl/flagitem.hxx2
-rw-r--r--include/xmloff/nmspmap.hxx6
-rw-r--r--io/source/stm/odata.cxx4
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx6
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx8
-rw-r--r--mysqlc/source/mysqlc_resultset.cxx2
-rw-r--r--oox/source/export/chartexport.cxx4
-rw-r--r--package/source/xstor/owriteablestream.cxx4
-rw-r--r--package/source/zippackage/ZipPackage.cxx8
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
-rw-r--r--package/source/zippackage/zipfileaccess.cxx4
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx6
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx4
-rw-r--r--rsc/source/tools/rsctools.cxx2
-rw-r--r--sal/rtl/alloc_arena.cxx2
-rw-r--r--sal/rtl/strtmpl.cxx16
-rw-r--r--sal/textenc/textcvt.cxx2
-rw-r--r--sax/qa/cppunit/xmlimport.cxx2
-rw-r--r--sax/source/expatwrap/xml2utf.cxx2
-rw-r--r--sax/source/tools/converter.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/oox/pagesettings.cxx2
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx8
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx7
-rw-r--r--sc/source/filter/starcalc/scflt.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx2
-rw-r--r--sc/source/ui/vba/vbacondition.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx4
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx25
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx2
-rw-r--r--sd/source/ui/func/fuscale.cxx3
-rw-r--r--sd/source/ui/func/fusel.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/view/drviewsa.cxx3
-rw-r--r--sd/source/ui/view/drviewse.cxx2
-rw-r--r--sd/source/ui/view/drviewsj.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/iframe.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx6
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx4
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx2
-rw-r--r--slideshow/source/engine/slide/targetpropertiescreator.cxx2
-rw-r--r--slideshow/source/engine/tools.cxx24
-rw-r--r--solenv/CompilerTest_compilerplugins_clang.mk1
-rw-r--r--sot/source/sdstor/stgstrms.cxx2
-rw-r--r--starmath/source/mathmlimport.cxx4
-rw-r--r--starmath/source/mathtype.cxx7
-rw-r--r--starmath/source/smmod.cxx2
-rw-r--r--stoc/source/inspect/introspection.cxx24
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx10
-rw-r--r--svtools/source/contnr/ivctrl.cxx6
-rw-r--r--svtools/source/control/ruler.cxx4
-rw-r--r--svtools/source/graphic/descriptor.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx8
-rw-r--r--svx/source/dialog/dlgctrl.cxx4
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx2
-rw-r--r--svx/source/form/formcontroller.cxx5
-rw-r--r--svx/source/sidebar/nbdtmg.cxx6
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx4
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx2
-rw-r--r--svx/source/table/tablecontroller.cxx12
-rw-r--r--svx/source/table/tablelayouter.cxx2
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx4
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx6
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx7
-rw-r--r--sw/source/core/access/accmap.cxx4
-rw-r--r--sw/source/core/attr/calbck.cxx2
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx6
-rw-r--r--sw/source/core/doc/docedt.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/layout/calcmove.cxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx8
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/txtnode/atrfld.cxx10
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx9
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx9
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/vba/vbacolumns.cxx2
-rw-r--r--sw/source/ui/vba/vbalistgalleries.cxx2
-rw-r--r--sw/source/ui/vba/vbarows.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx6
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--tools/source/generic/poly.cxx6
-rw-r--r--ucb/source/ucp/package/pkguri.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx2
-rw-r--r--unoxml/source/rdf/CLiteral.cxx4
-rw-r--r--unoxml/source/rdf/CURI.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx2
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx4
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx2
-rw-r--r--vcl/source/filter/sgvtext.cxx2
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx4
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx2
-rw-r--r--vcl/source/font/PhysicalFontFamily.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/source/window/legacyaccessibility.cxx6
-rw-r--r--vcl/source/window/menu.cxx5
-rw-r--r--vcl/source/window/printdlg.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx2
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx2
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx8
-rw-r--r--vcl/unx/gtk/salprn-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx4
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx2
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx2
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx4
-rw-r--r--xmloff/source/draw/sdpropls.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/forms/layerimport.cxx5
-rw-r--r--xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx2
-rw-r--r--xmloff/source/style/xmlexppr.cxx4
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
209 files changed, 504 insertions, 407 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index ee745c711848..68e7f798956b 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -643,7 +643,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
{
ArrayWrapper aWrap;
NativeObjectWrapper aNativeObjectWrapper;
- if ( (aValue >>= aWrap) )
+ if ( aValue >>= aWrap )
{
SbxDimArray* pArray = nullptr;
Sequence< sal_Int32 > indices;
@@ -662,10 +662,10 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
pVar->PutEmpty();
break;
}
- else if ( (aValue >>= aNativeObjectWrapper) )
+ else if ( aValue >>= aNativeObjectWrapper )
{
sal_uInt32 nIndex = 0;
- if( (aNativeObjectWrapper.ObjectId >>= nIndex) )
+ if( aNativeObjectWrapper.ObjectId >>= nIndex )
{
SbxObject* pObj = lcl_getNativeObject( nIndex );
pVar->PutObject( pObj );
@@ -680,7 +680,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
if( pInst && pInst->IsCompatibility() )
{
oleautomation::Date aDate;
- if( (aValue >>= aDate) )
+ if( aValue >>= aDate )
{
pVar->PutDate( aDate.Value );
break;
@@ -688,7 +688,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
else
{
oleautomation::Decimal aDecimal;
- if( (aValue >>= aDecimal) )
+ if( aValue >>= aDecimal )
{
pVar->PutDecimal( aDecimal );
break;
@@ -696,7 +696,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
else
{
oleautomation::Currency aCurrency;
- if( (aValue >>= aCurrency) )
+ if( aValue >>= aCurrency )
{
pVar->PutCurrency( aCurrency.Value );
break;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index fcc14f684e73..996542c4b854 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -922,7 +922,7 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
if ( nArgCount >= 3 )
{
nStartPos = rPar.Get(3)->GetLong();
- if( (nStartPos <= 0 && nStartPos != -1))
+ if( nStartPos <= 0 && nStartPos != -1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
nStartPos = -1;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 998e61133fb3..41e3e8afd7e6 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1144,7 +1144,7 @@ void SbiRuntime::PushForEach()
// XEnumerationAccess?
Any aAny = pUnoObj->getUnoAny();
Reference< XEnumerationAccess > xEnumerationAccess;
- if( (aAny >>= xEnumerationAccess) )
+ if( aAny >>= xEnumerationAccess )
{
p->xEnumeration = xEnumerationAccess->createEnumeration();
p->eForType = ForType::EachXEnumeration;
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 89430af80530..1f79b69230ad 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1175,7 +1175,7 @@ Lbl_OpIsDouble:
// result is always a Date, if '-' the result is only
// a Date if one of lhs or rhs ( but not both ) is already
// a Date
- if( ( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) )
+ if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
{
if( eOp == SbxPLUS || ( ( eOp == SbxMINUS ) && ( GetType() != rOp.GetType() ) ) )
aL.eType = SbxDATE;
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index d5bed4381921..c0999bde33cf 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -67,7 +67,7 @@ namespace canvas
for( sal_Int32 i=0; i<rArgs.getLength(); ++i )
{
beans::PropertyValue aProp;
- if( (rArgs[i] >>= aProp) )
+ if( rArgs[i] >>= aProp )
{
if ( aProp.Name == "Colors" )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index c7cc2cf856da..c37e9f67c80b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -175,7 +175,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
rSubIncrements.realloc( 1 );
double fStepHelp = 0;
- if( (rOuterValue >>= fStepHelp) )
+ if( rOuterValue >>= fStepHelp )
{
double fStepMain = 0;
if( AxisHelper::isLogarithmic(aScaleData.Scaling) )
@@ -265,7 +265,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
case SCALE_PROP_AXIS_TYPE:
{
sal_Int32 nType = 0;
- if( (rOuterValue >>= nType) )
+ if( rOuterValue >>= nType )
{
if( nType == css::chart::ChartAxisType::AUTOMATIC )
{
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 629600d33625..ccd9bd099910 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -475,8 +475,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
switch( nWhichId )
{
case SCHATTR_AXIS_AUTO_MAX:
- if( (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() ))
+ if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Maximum.clear();
bSetScale = true;
@@ -500,8 +499,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
break;
case SCHATTR_AXIS_AUTO_MIN:
- if( (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() ))
+ if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Minimum.clear();
bSetScale = true;
@@ -528,8 +526,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
{
bool bWasLogarithm = AxisHelper::isLogarithmic( aScale.Scaling );
- if( (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() ))
+ if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
// logarithm is true
if( ! bWasLogarithm )
@@ -673,7 +670,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
break;
case SCHATTR_AXIS_AUTO_TIME_RESOLUTION:
- if( (static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue() ))
+ if( static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue() )
{
aScale.TimeIncrement.TimeResolution.clear();
bSetScale = true;
@@ -695,8 +692,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
case SCHATTR_AXIS_AUTO_ORIGIN:
{
- if( (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() ))
+ if( static_cast< const SfxBoolItem & >(rItemSet.Get( nWhichId )).GetValue() )
{
aScale.Origin.clear();
bSetScale = true;
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index b37123747c28..56a5e047454f 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -258,8 +258,8 @@ bool ErrorBarItemConverter::ApplySpecialItem(
bool bShowPos(false), bShowNeg(false);
lcl_getErrorIndicatorValues( xErrorBarProp, bShowPos, bShowNeg );
- if( ( bShowPos != bNewIndPos ||
- bShowNeg != bNewIndNeg ))
+ if( bShowPos != bNewIndPos ||
+ bShowNeg != bNewIndNeg )
{
xErrorBarProp->setPropertyValue( "ShowPositiveError" , uno::Any( bNewIndPos ));
xErrorBarProp->setPropertyValue( "ShowNegativeError" , uno::Any( bNewIndNeg ));
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 8a91a62ef1f9..1eecec9f67f9 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -1464,7 +1464,7 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, sal_uInt32 nColor)
sal_uInt32 nPreColor = maBarColorMap[nId];
maBarColorMap[nId] = nColor;
//if has manul event, just record the color and process manul event first
- if ((maRenderEvent != EVENT_NONE))
+ if (maRenderEvent != EVENT_NONE)
{
return;
}
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
new file mode 100644
index 000000000000..62b4b69d3271
--- /dev/null
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+bool foo(int);
+
+int main()
+{
+ int x = 1;
+ x = ((2)); // expected-error {{parentheses around parentheses [loplugin:unnecessaryparen]}}
+
+ if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if [loplugin:unnecessaryparen]}}
+};
+
+/* 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
new file mode 100644
index 000000000000..7c64b7077bee
--- /dev/null
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cassert>
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <set>
+
+#include <clang/AST/CXXInheritance.h>
+#include "compat.hxx"
+#include "plugin.hxx"
+
+/**
+look for unnecessary parentheses
+*/
+
+namespace {
+
+class UnnecessaryParen:
+ public RecursiveASTVisitor<UnnecessaryParen>, public loplugin::Plugin
+{
+public:
+ explicit UnnecessaryParen(InstantiationData const & data): Plugin(data) {}
+
+ virtual void run() override
+ {
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ }
+
+ bool VisitParenExpr(const ParenExpr *);
+ bool VisitIfStmt(const IfStmt *);
+};
+
+bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
+{
+ if (ignoreLocation(parenExpr))
+ return true;
+ if (parenExpr->getLocStart().isMacroID())
+ return true;
+
+ auto subParenExpr = dyn_cast<ParenExpr>(parenExpr->getSubExpr());
+ if (subParenExpr) {
+ if (subParenExpr->getLocStart().isMacroID())
+ return true;
+ report(
+ DiagnosticsEngine::Warning, "parentheses around parentheses",
+ parenExpr->getLocStart())
+ << parenExpr->getSourceRange();
+ }
+ return true;
+}
+
+bool UnnecessaryParen::VisitIfStmt(const IfStmt* ifStmt)
+{
+ if (ignoreLocation(ifStmt))
+ return true;
+
+ if (auto parenExpr = dyn_cast<ParenExpr>(ifStmt->getCond())) {
+ if (parenExpr->getLocStart().isMacroID())
+ return true;
+ // assignments need extra parentheses or they generate a compiler warning
+ auto binaryOp = dyn_cast<BinaryOperator>(parenExpr->getSubExpr());
+ if (binaryOp && binaryOp->getOpcode() == BO_Assign)
+ return true;
+ report(
+ DiagnosticsEngine::Warning, "parentheses immediately inside if",
+ ifStmt->getLocStart())
+ << ifStmt->getSourceRange();
+ }
+ return true;
+}
+
+loplugin::Plugin::Registration< UnnecessaryParen > X("unnecessaryparen", true);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 5be258a7e698..61abe27d84b8 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -151,10 +151,10 @@ namespace dbtools
static bool implIsLeapYear(sal_Int32 _nYear)
{
- return ( ( ((_nYear % 4) == 0)
- && ((_nYear % 100) != 0)
- )
+ return ( ((_nYear % 4) == 0)
+ && ((_nYear % 100) != 0)
)
+
|| ((_nYear % 400) == 0)
;
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index fa34331d85f9..24eee42a4cf2 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1175,17 +1175,17 @@ catch(const Exception&)
bool canInsert(const Reference< XPropertySet>& _rxCursorSet)
{
- return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0));
+ return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0);
}
bool canUpdate(const Reference< XPropertySet>& _rxCursorSet)
{
- return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0));
+ return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0);
}
bool canDelete(const Reference< XPropertySet>& _rxCursorSet)
{
- return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0));
+ return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0);
}
Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent)
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index e931026400ec..361eafcfc1bf 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -288,14 +288,14 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
OSQLParseNode* pLHS = parseTree->getChild( 0 );
OSQLParseNode* pRHS = parseTree->getChild( 2 );
- if ( ( !( SQL_ISRULE( pLHS, column_ref ) ) // on the LHS, we accept a column or a constant int value
+ if ( ( ! SQL_ISRULE( pLHS, column_ref ) // on the LHS, we accept a column or a constant int value
&& ( pLHS->getNodeType() != SQLNodeType::IntNum )
)
|| ( ( pRHS->getNodeType() != SQLNodeType::String ) // on the RHS, certain literals are acceptable
&& ( pRHS->getNodeType() != SQLNodeType::IntNum )
&& ( pRHS->getNodeType() != SQLNodeType::ApproxNum )
- && !( SQL_ISTOKEN( pRHS, TRUE ) )
- && !( SQL_ISTOKEN( pRHS, FALSE ) )
+ && ! SQL_ISTOKEN( pRHS, TRUE )
+ && ! SQL_ISTOKEN( pRHS, FALSE )
)
|| ( ( pLHS->getNodeType() == SQLNodeType::IntNum ) // an int on LHS requires an int on RHS
&& ( pRHS->getNodeType() != SQLNodeType::IntNum )
@@ -386,7 +386,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
// We currently can't handle a 'NOT LIKE' when there are '%'
m_pConnection->throwGenericSQLException(STR_QUERY_NOT_LIKE_TOO_COMPLEX,*this);
}
- else if( (aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) ) )
+ else if( aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) )
{ // One occurrence of '%' matches...
if ( aMatchString.startsWith(OUStringLiteral1(WILDCARD)) )
pResult = createTest( aColumnName, E_BOOK_QUERY_ENDS_WITH, aMatchString.copy( 1 ) );
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 6fccaeb6d6ad..756a370f57b3 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -365,7 +365,7 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1);
// Ascending or Descending?
- m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
+ m_aOrderbyAscending.push_back(SQL_ISTOKEN(pAscendingDescending,DESC) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
}
void OStatement_Base::construct(const OUString& sql)
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index c4e80d29f47d..1ed686ab645d 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -83,7 +83,7 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode)
pCompiler->execute( pColumnRef );
m_aSelectionEvaluations.push_back( TPredicates(pCompiler,pInterpreter) );
}
- else if ( ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 ) )
+ else if ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 )
{
m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,nullptr);
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 3682f4d9d528..be93f506805e 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -143,7 +143,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
{
execute(pPredicateNode->getChild(1));
}
- else if ((SQL_ISRULE(pPredicateNode,search_condition) || (SQL_ISRULE(pPredicateNode,boolean_term)))
+ else if ((SQL_ISRULE(pPredicateNode,search_condition) || SQL_ISRULE(pPredicateNode,boolean_term))
&& // AND/OR-linkage:
pPredicateNode->count() == 3)
{
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 3181b940bf84..7ff389c76bc0 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -291,7 +291,7 @@ namespace connectivity
{
OUString sStrippedName = removeOldURLPrefix(sOrgName);
- if ( ((_nMode & ElementModes::WRITE) != ElementModes::WRITE ) )
+ if ( (_nMode & ElementModes::WRITE) != ElementModes::WRITE )
{
bool bIsStream = true;
try
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 5a0ae000bee7..81f253fd3d2d 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -716,7 +716,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
analyseWhereClause( parseTree->getChild( 1 ), *subExpression );
queryExpression.addExpression( subExpression );
}
- else if ((SQL_ISRULE(parseTree,search_condition) || (SQL_ISRULE(parseTree,boolean_term)))
+ else if ((SQL_ISRULE(parseTree,search_condition) || SQL_ISRULE(parseTree,boolean_term))
&& parseTree->count() == 3) // Handle AND/OR
{
// TODO - Need to take care or AND, for now match is always OR
@@ -777,7 +777,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
{
OSL_ENSURE(parseTree->count() == 2, "Error parsing LIKE predicate");
- if ( !(SQL_ISRULE(parseTree->getChild(0), column_ref)) )
+ if ( !SQL_ISRULE(parseTree->getChild(0), column_ref) )
{
m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_INVALID_LIKE_COLUMN, *this );
}
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 13cb0d280073..d9aea80da5dc 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -466,7 +466,7 @@ void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef,
m_aOrderbyColumnNumber.push_back(xColLocate->findColumn(aColumnName));
// Ascending or Descending?
- m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
+ m_aOrderbyAscending.push_back(SQL_ISTOKEN(pAscendingDescending,DESC) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
}
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 2bb37029b583..db2a94e32178 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2008,7 +2008,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, bool
pPart2->replace(pNot, pNotNot);
delete pNot;
}
- else if(bNegate && (SQL_ISRULE(pSearchCondition,like_predicate)))
+ else if(bNegate && SQL_ISRULE(pSearchCondition,like_predicate))
{
OSQLParseNode* pNot = pSearchCondition->getChild( 1 )->getChild( 0 );
OSQLParseNode* pNotNot = nullptr;
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 741afb427cf3..111da6478601 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -949,8 +949,8 @@ void PropertySetMixinImpl::dispose() {
css::uno::Any PropertySetMixinImpl::queryInterface(css::uno::Type const & type)
{
- if (((m_impl->implements & IMPLEMENTS_PROPERTY_SET) != 0
- && type == css::beans::XPropertySet::static_type()))
+ if ((m_impl->implements & IMPLEMENTS_PROPERTY_SET) != 0
+ && type == css::beans::XPropertySet::static_type())
{
css::uno::Reference< css::uno::XInterface > ifc(
static_cast< css::beans::XPropertySet * >(this));
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 37567adb9591..effb212be761 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -576,8 +576,8 @@ void SfxConfigGroupListBox::FillScriptList(const css::uno::Reference< css::scrip
OUString uiName = theChild->getName();
if ( bIsRootNode )
{
- if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
- theChild->getName().equals( currentDocTitle ) ) ) )
+ if ( ! (theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
+ theChild->getName().equals( currentDocTitle ) ) )
{
bDisplay=false;
}
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index e29cf1f4e4f2..e51d87ac2458 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1287,7 +1287,7 @@ bool ORowSetCache::insertRow(std::vector< Any >& o_aBookmarks)
{
moveToBookmark(aBookmark);
// update the cached values
- ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
+ ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get();
ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
@@ -1343,7 +1343,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,std::vector<
if ( moveToBookmark(aBookmark) )
{
// update the cached values
- ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
+ ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get();
ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx
index 443fd1d6e320..883346bb2693 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -93,7 +93,7 @@ namespace dbaccess
const Type* pEnd = pIter + aTypes.getLength();
for(;pIter != pEnd ;++pIter)
{
- if( (*pIter != aAlterType || m_xViewAccess.is()) )
+ if( *pIter != aAlterType || m_xViewAccess.is() )
aOwnTypes.push_back(*pIter);
}
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index b46b5858dbc9..1c431420a34e 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -320,9 +320,12 @@ Sequence< Type > SAL_CALL OColumns::getTypes( )
}
else
{
- nSize = ((m_pTable && m_pTable->isNew()) ? 0 :
- ((m_bDropColumn ?
- (m_bAddColumn ? 0 : 1) : (m_bAddColumn ? 1 : 2))));
+ if (m_pTable && m_pTable->isNew())
+ nSize = 0;
+ else if (m_bDropColumn)
+ nSize = m_bAddColumn ? 0 : 1;
+ else
+ nSize = m_bAddColumn ? 1 : 2;
bDropFound = (m_pTable && m_pTable->isNew()) || m_bDropColumn;
bAppendFound = (m_pTable && m_pTable->isNew()) || m_bAddColumn;
}
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 2c641e67abab..f40850961bef 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1028,7 +1028,7 @@ void SbaXDataBrowserController::disposing(const EventObject& Source)
removeModelListeners(getControlModel());
// the form's model ?
- if ((getRowSet() == Source.Source))
+ if (getRowSet() == Source.Source)
disposingFormModel(Source);
// from a single column model ?
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 782bfdbea876..5df2a564d76c 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1755,7 +1755,9 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
if (xDataSource.is())
{
sal_Int32 nType = ::comphelper::getINT32(xDataSource->getPropertyValue(PROPERTY_COMMAND_TYPE));
- aReturn.bEnabled = aReturn.bEnabled && ((::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) || (nType == css::sdb::CommandType::QUERY)));
+ aReturn.bEnabled = aReturn.bEnabled &&
+ ( ::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) ||
+ (nType == css::sdb::CommandType::QUERY) );
}
}
catch(DisposedException&)
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 0a6ce4981b70..0874d383086c 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -214,7 +214,7 @@ namespace dbaui
long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
- bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
+ bool bRet = !( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1))
|| (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0)));
return bRet && EditBrowseBox::IsTabAllowed(bForward);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 9e09847c7572..5eb1e3694875 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1678,7 +1678,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo )
if (aIter == rFields.end())
{
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false );
- if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo
+ if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy is inherited from rInfo
pTmp->SetGroupBy(false);
}
}
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 9ae3c5fdd89c..4ad0049a1eef 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -152,7 +152,7 @@ void SAL_CALL LimitBoxController::statusChanged(
{
m_pLimitBox->Enable();
sal_Int64 nLimit = 0;
- if ( (rEvent.State >>= nLimit) )
+ if ( rEvent.State >>= nLimit )
{
m_pLimitBox->SetValue( nLimit );
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 118dd30d837e..91aae8d61b3c 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1613,7 +1613,7 @@ static std::vector< CommentStrip > getComment( const OUString& rQuery )
{
if ((pCopy[i]=='-' && pCopy[i+1]=='-') || (pCopy[i]=='/' && pCopy[i+1]=='/'))
bComment = true;
- else if ((pCopy[i]=='/' && pCopy[i+1]=='*'))
+ else if (pCopy[i]=='/' && pCopy[i+1]=='*')
bComment2 = true;
}
}
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 7d7f8fac8401..edf87ca25833 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -420,7 +420,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
aDispatches.push_back( DispatchHolder( aURL, xDispatcher ));
}
}
- else if ( ( aName.startsWith( "service:" ) ) )
+ else if ( aName.startsWith( "service:" ) )
{
// TODO: the dispatch has to be done for loadComponentFromURL as well. Please ask AS for more details.
URL aURL ;
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 5b19b59a0472..00136d7f7db0 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -117,7 +117,7 @@ bool IsUserWordbook( const OUString& rFile )
static std::size_t nVerOOo7Len = sal::static_int_cast< std::size_t >(strlen( pVerOOo7 ));
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
pMagicHeader[ nVerOOo7Len ] = '\0';
- if ((pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len))
+ if (pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len)
{
if ( !strcmp(pMagicHeader, pVerOOo7) )
bRet = true;
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index e8f9320ebddd..60efbf57d979 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -598,8 +598,8 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
aDrawRect.Bottom() += (nProgressHeight - pSpl->_barheight)/2;
}
- if ((rRenderContext.DrawNativeControl(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,
- ControlState::ENABLED, aValue, pSpl->_sProgressText)))
+ if (rRenderContext.DrawNativeControl(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,
+ ControlState::ENABLED, aValue, pSpl->_sProgressText))
{
return;
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index bc0cfe7f2450..7bfc830731e8 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -980,11 +980,10 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
long nOnePixel = pOutWin->PixelToLogic( Size( 1, 0 ) ).Width();
- if ( /* pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() || */
- ( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
+ if ( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
( aEditCursor.Bottom() - nOnePixel <= GetVisDocBottom() ) &&
( aEditCursor.Left() + nOnePixel >= GetVisDocLeft() ) &&
- ( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) ) )
+ ( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) )
{
tools::Rectangle aCursorRect = GetWindowPos( aEditCursor );
GetCursor()->SetPos( aCursorRect.TopLeft() );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index c9da3379184b..695bc15af8fc 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4133,7 +4133,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
pPortion->nFirstLineOffset = nUpper;
}
- if ( ( nPortion != (GetParaPortions().Count()-1) ) )
+ if ( nPortion != (GetParaPortions().Count()-1) )
{
pPortion->nHeight += GetYValue( rULItem.GetLower() ); // not in the last
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 0ce4ef391aba..4862863ebb94 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3471,7 +3471,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
|| ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) )
{
- if ( nEsc && ( ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) ) )
+ if ( nEsc && ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) )
{
// Paint the high/low without underline,
// Display the Underline on the
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index b31de7889ac3..4e284d35e82f 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1490,7 +1490,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
bool bIsStart = false;
if ( bMultipleDoc )
bIsStart = true; // Accessible from the front or from behind ...
- else if ( ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart ) )
+ else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(),
@@ -1857,7 +1857,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
{
if ( aCurSel.Max().GetNode() == pLastNode )
{
- if ( ( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
+ if ( aCurSel.Max().GetIndex() >= pLastNode->Len() )
break;
}
}
@@ -2363,7 +2363,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
EditPaM aLastEnd( aSel.Max() );
aSel = WordRight( aSel.Max(), i18n::WordType::DICTIONARY_WORD );
if ( bChanged && ( aSel.Min().GetNode() == pNode ) &&
- ( ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) ) )
+ ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) )
{
// If two words are separated by more than one blank, it
// can happen that when splitting a Wrongs the start of
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 28c56dcd3bf6..a18747e067d6 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1800,7 +1800,7 @@ SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& r
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
// fdo#46112: double does not necessarily mean symmetric
// for backwards compatibility
- bGuessWidth = ((SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle)) &&
+ bGuessWidth = (SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle) &&
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 681eee47f567..56cdfe8fb73b 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -783,7 +783,7 @@ void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, bool bI
{
DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
- if( (i < SVX_MAX_NUM) )
+ if( i < SVX_MAX_NUM )
{
bool bReplace = !aFmtsSet[i];
if (!bReplace)
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index bc3f25ff9fca..c93841466570 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -279,9 +279,8 @@ INSINGLECHAR:
break;
default:
{
- if( /*( '{' == GetStackPtr( -1 )->nTokenId ) ||*/
- ( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
- '{' == GetStackPtr( -2 )->nTokenId ) )
+ if( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
+ '{' == GetStackPtr( -2 )->nTokenId )
SkipGroup();
}
break;
@@ -890,10 +889,9 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
bCrsrBack = nNd != pInsPos->GetNodeIdx();
}
- if( ( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
+ if( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
( pOld->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
- pOld->nSttCnt <= pInsPos->GetCntIdx() ))
- )
+ pOld->nSttCnt <= pInsPos->GetCntIdx() ) )
{
if( !bCrsrBack )
{
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 5e786a87e00e..131fec773caf 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -330,7 +330,7 @@ bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet)
{
sal_Int32 nPriv = 0;
_rxCursorSet->getPropertyValue("Privileges") >>= nPriv;
- return ((_rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0));
+ return _rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0;
}
bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XFormController>& xController)
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index 81c7ba7c70c1..0a4e231bf5fa 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -256,7 +256,7 @@ namespace pcr
void SAL_CALL OFileUrlControl::setValue( const Any& _rValue )
{
OUString sURL;
- if ( ( _rValue >>= sURL ) )
+ if ( _rValue >>= sURL )
{
if ( sURL.startsWith( "vnd.sun.star.GraphicObject:" ) )
getTypedControlWindow()->DisplayURL( getTypedControlWindow()->GetPlaceHolder() );
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index a2d844fb3723..88702b5acfb9 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -358,7 +358,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
nFontType = pFontEntry->nFontType;
aFontDescriptor.Name = OUString::createFromAscii( reinterpret_cast<char*>(pFontEntry->pFontName) );
}
- aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * 1.50 ) );
+ aFontDescriptor.Height = sal_Int16( mpCGM->pElement->nCharacterHeight * 1.50 );
if ( nFontType & 1 )
aFontDescriptor.Slant = awt::FontSlant_ITALIC;
if ( nFontType & 2 )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 148a8977959c..6cce2634a9d3 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6193,10 +6193,9 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
&& (
( eShapeType == mso_sptTextSimple )
|| ( eShapeType == mso_sptTextBox )
- || ( ( ( eShapeType == mso_sptRectangle )
- || ( eShapeType == mso_sptRoundRectangle )
- )
- ) ) )
+ || ( eShapeType == mso_sptRectangle )
+ || ( eShapeType == mso_sptRoundRectangle )
+ ) )
{
aInfo.bReplaceByFly = true;
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 53511043376d..b2a7b7b27bfb 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -808,7 +808,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
// try to load some ppt text
PPTTextObj aTextObj( rSt, static_cast<SdrPowerPointImport&>(*this), rPersistEntry, &rObjData );
- if ( ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) )
+ if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
{
bool bVerticalText = false;
// and if the text object is not empty, it must be applied to pRet, the object we
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 75fe00dce7f6..a4d3fe17c06e 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1994,11 +1994,11 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
if( nType == MetaActionType::COMMENT )
{
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
- if( ( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") ) )
+ if( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") )
{
bIsTextShapeStarted = true;
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
+ else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) )
{
bIsTextShapeStarted = false;
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index a9b9dbbc5e87..b5795870d8ad 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -3345,7 +3345,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
else if( !mrExport.IsUsePositionedCharacters() && ( nWriteFlags & SVGWRITER_WRITE_TEXT ) )
{
- if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_BEGIN" ) ) )
+ if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_BEGIN" ) )
{
if( pxShape )
{
@@ -3380,11 +3380,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
+ else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) )
{
maTextWriter.endTextShape();
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOP" ) ) )
+ else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOP" ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == MetaActionType::COMMENT ) &&
@@ -3417,7 +3417,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOL" ) ) )
+ else if( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOL" ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == MetaActionType::COMMENT ) &&
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 160da94acde2..387988b5bc39 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -259,7 +259,7 @@ void SAL_CALL DispatchRecorder::AppendToBuffer( const css::uno::Any& aValue, OUS
{
// character variables are recorded as strings, back conversion must be handled in client code
aArgumentBuffer.append("\"");
- if ( (*nVal == '\"') )
+ if ( *nVal == '\"' )
// encode \" to \"\"
aArgumentBuffer.append(*nVal);
aArgumentBuffer.append(*nVal);
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 76b8182dca29..928a1fbf0c36 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -762,8 +762,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
// There is no dispatch mechanism for the special window list menu items,
// because they are handled directly through XFrame->activate!!!
// Don't update dispatches for special file menu items.
- if ( !(( pMenuItemHandler->nItemId >= START_ITEMID_WINDOWLIST &&
- pMenuItemHandler->nItemId < END_ITEMID_WINDOWLIST )))
+ if ( !( pMenuItemHandler->nItemId >= START_ITEMID_WINDOWLIST &&
+ pMenuItemHandler->nItemId < END_ITEMID_WINDOWLIST ) )
{
Reference< XDispatch > xMenuItemDispatch;
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 2c4971562a7b..57da598c76e1 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -323,7 +323,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text,
sal_uInt32 ch=0;
while (numberOfChange > 0 && iterateCodePoints(Text, nStartPos, -1, ch) >= 0) {
- if ((((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch))))
+ if (((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch)))
numberOfChange--;
else if (nStartPos == 0) {
return -1;
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 8464775b2b2d..55ad5b730463 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -944,8 +944,8 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START;
nNext < cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES; ++nNext)
{
- sal_Int16 nHere = ::std::min( ((aIter != aFormatIndexSet.end() ? *aIter :
- cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES)),
+ sal_Int16 nHere = ::std::min( (aIter != aFormatIndexSet.end() ? *aIter :
+ cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES),
cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES);
if (aIter != aFormatIndexSet.end()) ++aIter;
for ( ; nNext < nHere; ++nNext)
diff --git a/include/svl/flagitem.hxx b/include/svl/flagitem.hxx
index 3edb95e3a935..34c5b67a2cd5 100644
--- a/include/svl/flagitem.hxx
+++ b/include/svl/flagitem.hxx
@@ -50,7 +50,7 @@ public:
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nVal = nNewVal;
}
- bool GetFlag( sal_uInt8 nFlag ) const { return ( (nVal & ( 1<<nFlag))); }
+ bool GetFlag( sal_uInt8 nFlag ) const { return (nVal & ( 1<<nFlag)); }
};
#endif
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index 71360832c512..7dd1c002d9fc 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -34,9 +34,9 @@
#include <limits.h>
-const sal_uInt16 XML_NAMESPACE_XMLNS = (USHRT_MAX-2);
-const sal_uInt16 XML_NAMESPACE_NONE = (USHRT_MAX-1);
-const sal_uInt16 XML_NAMESPACE_UNKNOWN = (USHRT_MAX);
+const sal_uInt16 XML_NAMESPACE_XMLNS = (USHRT_MAX-2);
+const sal_uInt16 XML_NAMESPACE_NONE = (USHRT_MAX-1);
+const sal_uInt16 XML_NAMESPACE_UNKNOWN = USHRT_MAX;
const sal_uInt16 XML_NAMESPACE_UNKNOWN_FLAG = 0x8000;
class NameSpaceEntry : public cppu::OWeakObject
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index e88a6bcb82fa..ed6402e5ed8d 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -335,7 +335,7 @@ OUString ODataInputStream::readUTF()
char2 = (sal_uInt8)readByte();
char3 = (sal_uInt8)readByte();
- if( (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) ) {
+ if( ((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80) ) {
throw WrongFormatException( );
}
pStr[nStrLen++] = (sal_Unicode(c & 0x0F) << 12) |
@@ -1155,7 +1155,7 @@ Reference< XPersistObject > OObjectInputStream::readObject()
// Read the length of the object
sal_Int32 nObjLen = readLong();
- if( ( 0 == nId && 0 != nObjLen ) )
+ if( 0 == nId && 0 != nObjLen )
{
throw WrongFormatException();
}
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 19df22f7481b..10efc6981962 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -205,7 +205,7 @@ void LwpGraphicObject::Read()
void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
{
- if ((m_sServerContextFormat[1]=='s'&&m_sServerContextFormat[2]=='d'&&m_sServerContextFormat[3]=='w'))
+ if (m_sServerContextFormat[1]=='s'&&m_sServerContextFormat[2]=='d'&&m_sServerContextFormat[3]=='w')
{
std::vector< rtl::Reference<XFFrame> >::iterator iter;
for (iter = m_vXFDrawObjects.begin(); iter != m_vXFDrawObjects.end(); ++iter)
@@ -239,7 +239,7 @@ void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
pCont->Add(pImage);
}
- else if((m_sServerContextFormat[1]=='t'&&m_sServerContextFormat[2]=='e'&&m_sServerContextFormat[3]=='x'))
+ else if(m_sServerContextFormat[1]=='t'&&m_sServerContextFormat[2]=='e'&&m_sServerContextFormat[3]=='x')
{
XFConvertEquation(pCont);
}
@@ -603,7 +603,7 @@ void LwpGraphicObject::CreateGrafObject()
fBottom = fB;
}
};
- LwpRect aFrameRect(-fOffsetX, (fDisFrameWidth-fOffsetX), (-fOffsetY), ((fDisFrameHeight-fOffsetY)));
+ LwpRect aFrameRect(-fOffsetX, (fDisFrameWidth-fOffsetX), (-fOffsetY), (fDisFrameHeight-fOffsetY));
LwpRect aImageRect(0, fSclGrafWidth, 0, fSclGrafHeight);
LwpRect aCropRect;
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 04f0f29ead13..d6921ef0e341 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -332,10 +332,10 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
rtl::Reference<LwpVirtualLayout> xFrameLayout(dynamic_cast<LwpVirtualLayout*>(xLayout->GetChildHead().obj().get()));
while (xFrameLayout.is())
{
- if((xFrameLayout->IsAnchorPage()
- &&(xFrameLayout->IsFrame()
- || xFrameLayout->IsSuperTable()
- || xFrameLayout->IsGroupHead())))
+ if( xFrameLayout->IsAnchorPage()
+ && (xFrameLayout->IsFrame()
+ || xFrameLayout->IsSuperTable()
+ || xFrameLayout->IsGroupHead()) )
{
xFrameLayout->DoXFConvert(pCont);
}
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx
index d0c3a8303887..f66723c65966 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -1043,7 +1043,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getProp
void OResultSet::checkColumnIndex(sal_Int32 index)
{
- if ((index < 1 || index > (int) fieldCount)) {
+ if (index < 1 || index > (int) fieldCount) {
/* static object for efficiency or thread safety is a problem ? */
throw SQLException("index out of range", *this, rtl::OUString(), 1, Any());
}
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 196bf9264928..b1ac3f1b5415 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1412,7 +1412,7 @@ void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
uno::Any rValue = xBitmap->getByName( sFillBitmapName );
OUString sBitmapURL;
- if( (rValue >>= sBitmapURL) )
+ if( rValue >>= sBitmapURL )
{
WriteBlipFill( xPropSet, sBitmapURL, XML_a, true, true );
}
@@ -1438,7 +1438,7 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
{
uno::Reference< container::XNameAccess > xGradient( xFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY );
uno::Any rValue = xGradient->getByName( sFillGradientName );
- if( (rValue >>= aGradient) )
+ if( rValue >>= aGradient )
{
mpFS->startElementNS( XML_a, XML_gradFill, FSEND );
WriteGradientFill( aGradient );
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 7c5d67400fd4..e072c0b58b8d 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -165,7 +165,7 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
bool bHasMember = false;
uno::Sequence< sal_Int8 > aMember1;
sal_Int32 nMember1 = 0;
- if ( ( aSequence1[nInd].Value >>= aMember1 ) )
+ if ( aSequence1[nInd].Value >>= aMember1 )
{
for ( sal_Int32 nInd2 = 0; nInd2 < aSequence2.getLength(); nInd2++ )
{
@@ -179,7 +179,7 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
}
}
}
- else if ( ( aSequence1[nInd].Value >>= nMember1 ) )
+ else if ( aSequence1[nInd].Value >>= nMember1 )
{
for ( sal_Int32 nInd2 = 0; nInd2 < aSequence2.getLength(); nInd2++ )
{
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 841d559af6d8..d414588f0f1b 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -552,7 +552,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
for( int ind = 0; ind < aArguments.getLength(); ind++ )
{
OUString aParamUrl;
- if ( ( aArguments[ind] >>= aParamUrl ))
+ if ( aArguments[ind] >>= aParamUrl )
{
m_eMode = e_IMode_URL;
try
@@ -615,17 +615,17 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
bHaveZipFile = false;
}
}
- else if ( ( aArguments[ind] >>= m_xStream ) )
+ else if ( aArguments[ind] >>= m_xStream )
{
// a writable stream can implement both XStream & XInputStream
m_eMode = e_IMode_XStream;
m_xContentStream = m_xStream->getInputStream();
}
- else if ( ( aArguments[ind] >>= m_xContentStream ) )
+ else if ( aArguments[ind] >>= m_xContentStream )
{
m_eMode = e_IMode_XInputStream;
}
- else if ( ( aArguments[ind] >>= aNamedValue ) )
+ else if ( aArguments[ind] >>= aNamedValue )
{
if ( aNamedValue.Name == "RepairPackage" )
aNamedValue.Value >>= m_bForceRecovery;
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index a65d56cb1a5f..af4b1c9d56dc 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -173,7 +173,7 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno::
{
uno::Reference < XUnoTunnel > xRef;
aElement >>= xRef;
- if ( ( aElement >>= xRef ) )
+ if ( aElement >>= xRef )
{
sal_Int64 nTest;
ZipPackageEntry *pEntry;
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 8607f4a2c583..fcec2f09d982 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1219,7 +1219,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
if ( !( aValue >>= aNewKey ) )
{
OUString sTempString;
- if ( ( aValue >>= sTempString ) )
+ if ( aValue >>= sTempString )
{
sal_Int32 nPathLength = sTempString.getLength();
Sequence < sal_Int8 > aSequence ( nPathLength );
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 1e5cb165af4b..8f0979f5f748 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -198,11 +198,11 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
}
};
- if ( ( aArguments[0] >>= aParamURL ) )
+ if ( aArguments[0] >>= aParamURL )
{
openInputStream();
}
- else if ( (aArguments[0] >>= xStream ) )
+ else if ( aArguments[0] >>= xStream )
{
// a writable stream can implement both XStream & XInputStream
m_xContentStream = xStream->getInputStream();
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 8c0a7414b724..e74bc17e0913 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -584,11 +584,11 @@ void ODesignView::alignMarkedObjects(ControlModification _nControlModification,b
bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent)
{
- if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
+ if ( m_pPropWin && m_pPropWin->HasChildPathFocus() )
return false;
- if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
+ if ( m_pAddField && m_pAddField->HasChildPathFocus() )
return false;
- if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
+ if ( m_pReportExplorer && m_pReportExplorer->HasChildPathFocus() )
return false;
return m_aScrollWindow->handleKeyEvent(_rEvent);
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 9bf691aa4087..d67c94d55909 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -328,9 +328,9 @@ bool OScrollWindowHelper::EventNotify( NotifyEvent& rNEvt )
{
const CommandEvent* pCommandEvent = rNEvt.GetCommandEvent();
if ( pCommandEvent &&
- ( ((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
+ ((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
(pCommandEvent->GetCommand() == CommandEventId::StartAutoScroll) ||
- (pCommandEvent->GetCommand() == CommandEventId::AutoScroll))) )
+ (pCommandEvent->GetCommand() == CommandEventId::AutoScroll)) )
{
ScrollBar* pHScrBar = nullptr;
ScrollBar* pVScrBar = nullptr;
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 1482f28142b4..e65874a10b0e 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -89,7 +89,7 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc )
{
if( '@' == **(ppArgv +i) ){ // when @, then response file
if( nullptr == (fFile = fopen( (*(ppArgv +i)) +1, "r" )) )
- return( (*(ppArgv +i)) );
+ return *(ppArgv +i);
nItems = fread( &szBuffer[ 0 ], 1, sizeof( char ), fFile );
while( nItems )
{
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 42cd84433ba2..882652bc91e2 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1045,7 +1045,7 @@ SAL_CALL rtl_arena_free (
prev = segment->m_sprev;
/* entire span free when prev is a span, and next is either a span or a list head */
- if (((prev->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN)) &&
+ if ((prev->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN) &&
((next->m_type == RTL_ARENA_SEGMENT_TYPE_SPAN) ||
(next->m_type == RTL_ARENA_SEGMENT_TYPE_HEAD)) )
{
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index 60712731e186..62bb76ddfdd1 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -101,8 +101,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare )( const IMPL_RTL_STRCODE* pStr1,
else
{
sal_Int32 nRet;
- while ( ((nRet = ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr1)))-
- ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr2)))) == 0) &&
+ while ( ((nRet = ((sal_Int32)IMPL_RTL_USTRCODE(*pStr1))-
+ ((sal_Int32)IMPL_RTL_USTRCODE(*pStr2))) == 0) &&
*pStr2 )
{
pStr1++;
@@ -148,8 +148,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare_WithLength )( const IMPL_RTL_STRCOD
while( (--nCount >= 0) && (*++pStr1 == *++pStr2) ) ;
if( nCount >= 0 )
- nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1 )))
- - ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2 )));
+ nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ))
+ - ((sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ));
return nRet;
}
@@ -193,8 +193,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( shortenedCompare_WithLength )( const IMPL_R
while ( (nShortenedLength > 0) &&
(pStr1 < pStr1End) && (pStr2 < pStr2End) )
{
- nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1 )))-
- ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2 )));
+ nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ))-
+ ((sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ));
if ( nRet )
return nRet;
@@ -227,8 +227,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( reverseCompare_WithLength )( const IMPL_RTL
{
pStr1Run--;
pStr2Run--;
- nRet = ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr1Run )))-
- ((sal_Int32)(IMPL_RTL_USTRCODE( *pStr2Run )));
+ nRet = ((sal_Int32)IMPL_RTL_USTRCODE( *pStr1Run ))-
+ ((sal_Int32)IMPL_RTL_USTRCODE( *pStr2Run ));
if ( nRet )
return nRet;
}
diff --git a/sal/textenc/textcvt.cxx b/sal/textenc/textcvt.cxx
index 3bd377d2f80d..d654ca5ecb04 100644
--- a/sal/textenc/textcvt.cxx
+++ b/sal/textenc/textcvt.cxx
@@ -73,7 +73,7 @@ static sal_Size ImplUnicodeToDummy( const sal_Unicode* pSrcBuf, sal_Size nSrcCha
char* pEndDestBuf;
const sal_Unicode* pEndSrcBuf;
- if ( ((nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_MASK) == RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR) )
+ if ( (nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_MASK) == RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR )
{
*pInfo |= RTL_UNICODETOTEXT_INFO_ERROR |
RTL_UNICODETOTEXT_INFO_UNDEFINED;
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index f6f320696d3d..543de556b8e8 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -287,7 +287,7 @@ const OString DummyTokenHandler::namespacePrefixes[] = { "", "w", "Player" };
Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken )
{
OString aUtf8Token;
- if ( ( ( nToken & 0xffff0000 ) != 0 ) ) //namespace
+ if ( ( nToken & 0xffff0000 ) != 0 ) //namespace
{
sal_uInt32 nNamespaceToken = ( nToken >> 16 ) - 1;
if ( nNamespaceToken < SAL_N_ELEMENTS(namespacePrefixes) )
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index f11062c3bc32..64d21ca88c70 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -182,7 +182,7 @@ bool XMLFile2UTFConverter::isEncodingRecognizable( const Sequence< sal_Int8 > &s
bCheckIfFirstClosingBracketExsists = true;
}
else if( ('<' == pSource[0] || '<' == pSource[2] ) &&
- ( ('?' == pSource[4] || '?' == pSource[6] ) ) )
+ ('?' == pSource[4] || '?' == pSource[6] ) )
{
// check for utf-16
bCheckIfFirstClosingBracketExsists = true;
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 6144fac70dee..b1e7344ebf74 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1063,7 +1063,7 @@ readDurationComponent(const OUString & rString,
sal_Int32 & io_rnPos, sal_Int32 & io_rnTemp, bool & io_rbTimePart,
sal_Int32 & o_rnTarget, const sal_Unicode c)
{
- if ((io_rnPos < rString.getLength()))
+ if (io_rnPos < rString.getLength())
{
if (c == rString[io_rnPos])
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 178237899f52..cc433f9ceb8a 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1135,7 +1135,7 @@ XclImpDecrypterRef lclReadFilepass8_Strong(XclImpStream& rStream)
sal_uInt32 nHeaderSize = rStream.ReaduInt32();
sal_uInt32 actualHeaderSize = sizeof(info.header);
- if( (nHeaderSize < actualHeaderSize) )
+ if( nHeaderSize < actualHeaderSize )
return xDecr;
info.header.flags = rStream.ReaduInt32();
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index f8455ba868b7..8a8403f9b9e4 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2269,7 +2269,7 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const
XclImpCheckBoxObj::DoProcessControl( rPropSet );
// TODO: grouping
XclImpOptionButtonObj* pTbxObj = dynamic_cast< XclImpOptionButtonObj* >( GetObjectManager().GetSheetDrawing( GetTab() ).FindDrawObj( mnNextInGroup ).get() );
- if ( ( pTbxObj && pTbxObj->mnFirstInGroup ) )
+ if ( pTbxObj && pTbxObj->mnFirstInGroup )
{
// Group has terminated
// traverse each RadioButton in group and
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index fe5ff212e341..eb40ec2e40e5 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -927,7 +927,7 @@ void PageSettingsConverter::writePageSettingsProperties(
awt::Size aSize;
bool bValid = false;
- if( (0 < rModel.mnPaperSize) )
+ if( 0 < rModel.mnPaperSize )
{
const msfilter::util::ApiPaperSize& rPaperSize = msfilter::util::PaperSizeConv::getApiSizeForMSPaperSizeIndex( rModel.mnPaperSize );
aSize = awt::Size( rPaperSize.mnWidth, rPaperSize.mnHeight );
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index b0acfa840f7e..779b470d878c 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1379,10 +1379,10 @@ ApiBorderData::ApiBorderData() :
bool ApiBorderData::hasAnyOuterBorder() const
{
return
- ( ( lcl_isBorder( maTop ) && maTop.OuterLineWidth > 0 ) ) ||
- ( ( lcl_isBorder( maBottom ) && maBottom.OuterLineWidth > 0 ) ) ||
- ( ( lcl_isBorder( maLeft ) && maLeft.OuterLineWidth > 0 ) ) ||
- ( ( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 ) );
+ ( lcl_isBorder( maTop ) && maTop.OuterLineWidth > 0 ) ||
+ ( lcl_isBorder( maBottom ) && maBottom.OuterLineWidth > 0 ) ||
+ ( lcl_isBorder( maLeft ) && maLeft.OuterLineWidth > 0 ) ||
+ ( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 );
}
namespace {
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 523b2ef32c54..a846b4aee99b 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -66,14 +66,13 @@ ErrCode ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL )
{
ScEEParseEntry* pE = maList.back();
if ( // Completely empty
- ( ( pE->aSel.nStartPara == pE->aSel.nEndPara
+ ( pE->aSel.nStartPara == pE->aSel.nEndPara
&& pE->aSel.nStartPos == pE->aSel.nEndPos
- )
+ )
|| // Empty paragraph
- ( pE->aSel.nStartPara + 1 == pE->aSel.nEndPara
+ ( pE->aSel.nStartPara + 1 == pE->aSel.nEndPara
&& pE->aSel.nStartPos == pEdit->GetTextLen( pE->aSel.nStartPara )
&& pE->aSel.nEndPos == 0
- )
)
)
{ // Don't take over the last paragraph
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 5a190339f550..1a6ad39e0ff5 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1203,7 +1203,7 @@ void Sc10Import::LoadPatternCollection()
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
sal_Int16 Margin = std::max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
- if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) )
+ if( ( OJustify & ojBottomTop ) == ojBottomTop )
rItemSet.Put( SvxMarginItem( 20, Margin, 20, Margin, ATTR_MARGIN ) );
else
rItemSet.Put( SvxMarginItem( Margin, 20, Margin, 20, ATTR_MARGIN ) );
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index d7e9f3107b75..da912fa76523 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1195,7 +1195,7 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos,
}
if( cellExists(rCurrentPos) )
{
- if( ( !(bIsCovered) || isEmptyOrNote(rXMLImport.GetDocument(), rCurrentPos) ) )
+ if( !bIsCovered || isEmptyOrNote(rXMLImport.GetDocument(), rCurrentPos) )
{
switch (nCellType)
{
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 439a2d55838c..8cdfb63c1d05 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4931,7 +4931,7 @@ void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uIn
if( nullptr != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown(static_cast<const SvXMLAttrContainerItem *>(pItem));
- if( (pUnknown->GetAttrCount() > 0) )
+ if( pUnknown->GetAttrCount() > 0 )
{
sal_uInt16 nIdx(pUnknown->GetFirstNamespaceIndex());
while( USHRT_MAX != nIdx )
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index fd501a44030b..c514f914c2bd 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -146,7 +146,7 @@ struct ScShapeDataLess
{
uno::Any aPropAny = xProps->getPropertyValue(msLayerId);
sal_Int16 nLayerID = 0;
- if( (aPropAny >>= nLayerID) )
+ if( aPropAny >>= nLayerID )
{
if (SdrLayerID(nLayerID) == SC_LAYER_BACK)
bResult = true;
@@ -1557,7 +1557,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpChildrenShapes)
mpChildrenShapes->SetDrawBroadcaster();
}
- else if ((rHint.GetId() == SfxHintId::ScAccEnterEditMode)) // this event comes only on creating edit field of a cell
+ else if (rHint.GetId() == SfxHintId::ScAccEnterEditMode) // this event comes only on creating edit field of a cell
{
if (mpViewShell->GetViewData().GetEditActivePart() == meSplitPos)
{
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index ff54e3168981..f7f709add1f5 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1435,7 +1435,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
{
xAccessible = GetNotesChildren()->GetChild(nIndex - aCount.nBackShapes - aCount.nHeaders);
}
- else if ( (nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters) )
+ else if ( nIndex < aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters )
{
if ( !mpFooter.is() )
{
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index d2c0a234bb55..6ab862b62556 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -218,7 +218,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
{
SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
if (pOleObj->GetObjRef().is() &&
- ((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
+ (pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
//TODO/LATER: why different slots in Draw and Calc?
rSet.DisableItem(SID_ORIGINALSIZE);
}
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index fc795d64b720..2083c97dda0c 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -69,7 +69,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno:
throw uno::RuntimeException("Object failure, can't access chart implementation" );
uno::Reference< beans::XPropertySet > xAxisPropertySet;
- if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue)))
+ if ((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue))
{
if ((nAxisGroup != xlPrimary) && (nAxisGroup != xlSecondary))
DebugHelper::runtimeexception(ERRCODE_BASIC_METHOD_FAILED);
diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx
index 17e2fc901c2b..08ca695e4d6d 100644
--- a/sc/source/ui/vba/vbacondition.cxx
+++ b/sc/source/ui/vba/vbacondition.cxx
@@ -41,7 +41,7 @@ ScVbaCondition< Ifc... >::retrieveAPIOperator( const uno::Any& _aOperator)
{
sheet::ConditionOperator aRetAPIOperator = sheet::ConditionOperator_NONE;
sal_Int32 nOperator = 0;
- if ( (_aOperator >>= nOperator ) )
+ if ( _aOperator >>= nOperator )
{
switch(nOperator)
{
@@ -96,7 +96,7 @@ void
ScVbaCondition< Ifc... >::setFormula1( const uno::Any& _aFormula1)
{
OUString sFormula;
- if ( (_aFormula1 >>= sFormula ))
+ if ( _aFormula1 >>= sFormula )
{
mxSheetCondition->setFormula1( sFormula );
table::CellRangeAddress aCellRangeAddress = mxAddressable->getRangeAddress();
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b1305add00f1..fdb6d5e61a9f 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -211,7 +211,7 @@ static double lcl_Round2DecPlaces( double nVal )
{
nVal = (nVal * (double)100);
long tmp = static_cast<long>(nVal);
- if ( ( ( nVal - tmp ) >= 0.5 ) )
+ if ( ( nVal - tmp ) >= 0.5 )
++tmp;
nVal = tmp;
nVal = nVal/100;
@@ -4476,7 +4476,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
// Use the normal uno api, sometimes e.g. when you want to use ALL as the filter
// we can't use refresh as the uno interface doesn't have a concept of ALL
// in this case we just call the core calc functionality -
- if ( ( Field >>= nField ) )
+ if ( Field >>= nField )
{
bool bAll = false;
bool bAcceptCriteria2 = true;
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index e5eea6885cd7..7b27a5751a35 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -2004,7 +2004,7 @@ void implWriteCharToBuffer( OUStringBuffer& aBuf, sal_Unicode cu, bool bKey )
}
// ISO/IEC 8859-1 range according to:
// http://en.wikipedia.org/wiki/ISO/IEC_8859-1
- else if( (cu >= 0x20 && cu <= 0x7e) )
+ else if( cu >= 0x20 && cu <= 0x7e )
//TODO: Check why (cu >= 0xa0 && cu <= 0xFF)
//is encoded in sample properties files
//else if( (cu >= 0x20 && cu <= 0x7e) ||
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index d087e82397ae..685f588f6693 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -911,20 +911,15 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj )
nPropertyFlags |= nCharAttr & 0x217; // not all attributes ar inherited
else
{
- if ( /* ( rPortion.mnCharAttrHard & 1 ) || */
- ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Bold, nCharAttr ) ) )
+ if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Bold, nCharAttr ) )
nPropertyFlags |= 1;
- if ( /* ( rPortion.mnCharAttrHard & 2 ) || */
- ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Italic, nCharAttr ) ) )
+ if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Italic, nCharAttr ) )
nPropertyFlags |= 2;
- if ( /* ( rPortion.mnCharAttrHard & 4 ) || */
- ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Underline, nCharAttr ) ) )
+ if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Underline, nCharAttr ) )
nPropertyFlags |= 4;
- if ( /* ( rPortion.mnCharAttrHard & 0x10 ) || */
- ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Shadow, nCharAttr ) ) )
+ if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Shadow, nCharAttr ) )
nPropertyFlags |= 0x10;
- if ( /* ( rPortion.mnCharAttrHard & 0x200 ) || */
- ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Embossed, nCharAttr ) ) )
+ if ( mpStyleSheet->IsHardAttribute( nInstance, pPara->nDepth, CharAttr_Embossed, nCharAttr ) )
nPropertyFlags |= 512;
}
if ( rTextObj.HasExtendedBullets() )
@@ -1292,7 +1287,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
sal_uInt32 nWidth = 1;
if ( nTabs )
- nWidth += (sal_Int32)( ( ( pTabStop[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize ) );
+ nWidth += (sal_Int32)( ( pTabStop[ nTabs - 1 ].Position / 4.40972 + nTextOfs ) / nDefaultTabSize );
nWidth *= nDefaultTabSize;
for ( i = 0; i < nDefaultTabs; i++, nWidth += nDefaultTabSize )
pRuleOut->WriteUInt32( nWidth );
@@ -1867,10 +1862,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
css::awt::Size aSize( mXShape->getSize() );
css::awt::Point aStart, aEnd, aCenter;
::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
- aStart.X = (sal_Int32)( ( cos( nStartAngle * F_PI18000 ) * 100.0 ) );
- aStart.Y = - (sal_Int32)( ( sin( nStartAngle * F_PI18000 ) * 100.0 ) );
- aEnd.X = (sal_Int32)( ( cos( nEndAngle * F_PI18000 ) * 100.0 ) );
- aEnd.Y = - (sal_Int32)( ( sin( nEndAngle * F_PI18000 ) * 100.0 ) );
+ aStart.X = (sal_Int32) ( cos( nStartAngle * F_PI18000 ) * 100.0 );
+ aStart.Y = - (sal_Int32) ( sin( nStartAngle * F_PI18000 ) * 100.0 );
+ aEnd.X = (sal_Int32) ( cos( nEndAngle * F_PI18000 ) * 100.0 );
+ aEnd.Y = - (sal_Int32) ( sin( nEndAngle * F_PI18000 ) * 100.0 ) ;
aCenter.X = aPoint.X + ( aSize.Width / 2 );
aCenter.Y = aPoint.Y + ( aSize.Height / 2 );
aStart.X += aCenter.X;
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index ebe7a3593a56..5594d12f9504 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -116,7 +116,7 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang
if ( nFieldType )
{
mpFieldEntry = new FieldEntry( nFieldType, 0, mnTextSize );
- if ( ( nFieldType >> 28 == 4 ) )
+ if ( nFieldType >> 28 == 4 )
{
mpFieldEntry->aRepresentation = aString;
mpFieldEntry->aFieldUrl = aURL;
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index e8b52ee2d2f1..715789504cce 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -274,7 +274,7 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, SfxStyleS
bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, sal_uInt16 nWhich, bool& rState )
{
- if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
+ if( rSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SvXMLAttrContainerItem& rAttr = *rSet.GetItem<SvXMLAttrContainerItem>( nWhich );
@@ -320,7 +320,7 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet )
bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet, sal_uInt16 nWhich )
{
- if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
+ if( rSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SvXMLAttrContainerItem& rAttr = *rSet.GetItem<SvXMLAttrContainerItem>( nWhich );
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 2927fb9428bd..605cdf984ff4 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1529,7 +1529,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
sal_Int32 nGroupId = pEffect->getGroupId();
CustomAnimationTextGroupPtr pTextGroup;
- if( (nGroupId != -1) )
+ if( nGroupId != -1 )
{
// use existing group
pTextGroup = pEffectSequence->findGroup( nGroupId );
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 7235a5c37ce7..97900dc99dd8 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -92,8 +92,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr )
{
SdrPageView* pPageView = mpView->GetSdrPageView();
- if( ( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) )
- // || ( mpView->GetMarkedObjectList().GetMarkCount() == 0 ) )
+ if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 )
{
nZoomValues &= ~SvxZoomEnableFlags::OPTIMAL;
}
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index b50642259255..f3df9d260562 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -1148,7 +1148,7 @@ void FuSelection::SelectionHasChanged()
FuDraw::SelectionHasChanged();
- if ((mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection))
+ if (mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection)
{
// Switch rotation body -> selection
mpView->ResetCreationActive();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6b9e55097f54..e1add507af43 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -350,10 +350,10 @@ sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< s
{
if( rIdentifier.getLength() == 16 )
{
- if( (0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
+ if( 0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
- if( (0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
+ if( 0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc));
}
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 73dd7228ab6e..80cd59e7107d 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -546,8 +546,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
- if( ( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) )
- // || ( mpDrawView->GetMarkedObjectList().GetMarkCount() == 0 ) )
+ if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 )
{
nZoomValues &= ~SvxZoomEnableFlags::OPTIMAL;
}
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 54b3628826cc..70fc761fdd0e 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1482,7 +1482,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
if( pMarkedObj ) try
{
// change first marked object
- if( (SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON) )
+ if( SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON )
{
bNewObj = false;
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index fc1f80294393..c6a82ef919b2 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -115,7 +115,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if(pSdrOle2Obj)
{
if (pSdrOle2Obj->GetObjRef().is() &&
- ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
+ (pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
rSet.DisableItem(SID_ORIGINAL_SIZE);
}
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 9821f16e56b0..647c7f7cec29 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -186,7 +186,7 @@ ErrCode CheckPasswd_Impl
{
ErrCode nRet = ERRCODE_NONE;
- if( ( !pFile->GetFilter() || pFile->IsStorage() ) )
+ if( !pFile->GetFilter() || pFile->IsStorage() )
{
uno::Reference< embed::XStorage > xStorage = pFile->GetStorage();
if( xStorage.is() )
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index a8c7143bbf18..445489490596 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -969,7 +969,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
// detect floating mode
// toggeling mode will not execute code in handlers, because pImpl->bConstructed is not set yet
bool bFloatMode = IsFloatingMode();
- if ( bFloatMode != ((GetAlignment() == SfxChildAlignment::NOALIGNMENT)) )
+ if ( bFloatMode != (GetAlignment() == SfxChildAlignment::NOALIGNMENT) )
{
bFloatMode = !bFloatMode;
SetFloatingMode( bFloatMode );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index bd3c541f8d81..77f4b8bcc2ae 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -224,7 +224,7 @@ public:
catch( const uno::Exception& )
{}
- if ( ( bReadOnly && !m_bReadOnlySupported ) )
+ if ( bReadOnly && !m_bReadOnlySupported )
throw uno::RuntimeException(); // the user could provide the data, so it must be stored
}
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8070c90c1e2c..b6558f86672e 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -282,7 +282,7 @@ void SAL_CALL IFrameObject::setPropertyValue(const OUString& aPropertyName, cons
case WID_FRAME_IS_AUTO_BORDER:
{
bool bIsAutoBorder;
- if ( (aAny >>= bIsAutoBorder) )
+ if ( aAny >>= bIsAutoBorder )
{
bool bBorder = maFrmDescr.IsFrameBorderOn();
maFrmDescr.ResetBorder();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 1bb7a932b853..5c3f71f1c398 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -800,13 +800,13 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( xProps->hasPropertyByName( aAuthor ) )
{
aAny = aContent.getPropertyValue( aAuthor );
- if ( ( aAny >>= aValue ) )
+ if ( aAny >>= aValue )
xDocProps->setAuthor(aValue);
}
if ( xProps->hasPropertyByName( aKeywords ) )
{
aAny = aContent.getPropertyValue( aKeywords );
- if ( ( aAny >>= aValue ) )
+ if ( aAny >>= aValue )
xDocProps->setKeywords(
::comphelper::string::convertCommaSeparated(aValue));
;
@@ -814,7 +814,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( xProps->hasPropertyByName( aSubject ) )
{
aAny = aContent.getPropertyValue( aSubject );
- if ( ( aAny >>= aValue ) ) {
+ if ( aAny >>= aValue ) {
xDocProps->setSubject(aValue);
}
}
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index b6e5b96a1e4d..2c63fdcae93d 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -233,7 +233,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
// Document only needs to be queried, if no other View present.
bool bClosed = false;
- if ( ( bOther || pDocSh->PrepareClose( true/*bUI*/ ) ) )
+ if ( bOther || pDocSh->PrepareClose( true/*bUI*/ ) )
{
if ( !bOther )
pDocSh->SetModified( false );
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index 68d50b9b03f3..95d97533325e 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -888,8 +888,8 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
uno::Reference<rendering::XIntegerBitmapColorSpace> xIntColorSpace(
maSlideBitmapLayout.ColorSpace);
- if( (xIntColorSpace->getType() == rendering::ColorSpaceType::RGB ||
- xIntColorSpace->getType() == rendering::ColorSpaceType::SRGB) )
+ if( xIntColorSpace->getType() == rendering::ColorSpaceType::RGB ||
+ xIntColorSpace->getType() == rendering::ColorSpaceType::SRGB )
{
/* table for canvas->OGL format mapping. outer index is number
of color components (0:3, 1:4), then comes bits per pixel
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index 95582c37b718..0f5515a0cae8 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -865,7 +865,7 @@ void SlideImpl::applyShapeAttributes(
// not a shape target. Maybe a ParagraphTarget?
presentation::ParagraphTarget aParaTarget;
- if( (aProps[i].Target >>= aParaTarget) )
+ if( aProps[i].Target >>= aParaTarget )
{
// yep, ParagraphTarget found - extract shape
// and index
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index 7bd686b42208..73635e0053f6 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -278,7 +278,7 @@ namespace internal
{
// try to extract string
OUString aString;
- if( (aAny >>= aString) )
+ if( aAny >>= aString )
{
// we also take the strings "true" and "false",
// as well as "on" and "off" here
diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx
index 64d52465d2d7..3061dc485ef7 100644
--- a/slideshow/source/engine/tools.cxx
+++ b/slideshow/source/engine/tools.cxx
@@ -139,7 +139,7 @@ namespace slideshow
const ::basegfx::B2DVector& rSlideBounds )
{
// try to extract numeric value (double, or smaller POD, like float or int)
- if( (rSourceAny >>= o_rValue) )
+ if( rSourceAny >>= o_rValue)
{
// succeeded
return true;
@@ -174,7 +174,7 @@ namespace slideshow
const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
// try to extract numeric value (int, or smaller POD, like byte)
- if( (rSourceAny >>= o_rValue) )
+ if( rSourceAny >>= o_rValue)
{
// succeeded
return true;
@@ -182,7 +182,7 @@ namespace slideshow
// okay, no plain int. Maybe one of the domain-specific enums?
drawing::FillStyle eFillStyle;
- if( (rSourceAny >>= eFillStyle) )
+ if( rSourceAny >>= eFillStyle )
{
o_rValue = sal::static_int_cast<sal_Int16>(eFillStyle);
@@ -191,7 +191,7 @@ namespace slideshow
}
drawing::LineStyle eLineStyle;
- if( (rSourceAny >>= eLineStyle) )
+ if( rSourceAny >>= eLineStyle )
{
o_rValue = sal::static_int_cast<sal_Int16>(eLineStyle);
@@ -200,7 +200,7 @@ namespace slideshow
}
awt::FontSlant eFontSlant;
- if( (rSourceAny >>= eFontSlant) )
+ if( rSourceAny >>= eFontSlant )
{
o_rValue = sal::static_int_cast<sal_Int16>(eFontSlant);
@@ -242,7 +242,7 @@ namespace slideshow
// try to extract numeric value (double, or smaller POD, like float or int)
{
double nTmp = 0;
- if( (rSourceAny >>= nTmp) )
+ if( rSourceAny >>= nTmp )
{
sal_uInt32 aIntColor( static_cast< sal_uInt32 >(nTmp) );
@@ -257,7 +257,7 @@ namespace slideshow
// try double sequence
{
uno::Sequence< double > aTmp;
- if( (rSourceAny >>= aTmp) )
+ if( rSourceAny >>= aTmp )
{
ENSURE_OR_THROW( aTmp.getLength() == 3,
"extractValue(): inappropriate length for RGB color value" );
@@ -272,7 +272,7 @@ namespace slideshow
// try sal_Int32 sequence
{
uno::Sequence< sal_Int32 > aTmp;
- if( (rSourceAny >>= aTmp) )
+ if( rSourceAny >>= aTmp )
{
ENSURE_OR_THROW( aTmp.getLength() == 3,
"extractValue(): inappropriate length for RGB color value" );
@@ -292,7 +292,7 @@ namespace slideshow
// try sal_Int8 sequence
{
uno::Sequence< sal_Int8 > aTmp;
- if( (rSourceAny >>= aTmp) )
+ if( rSourceAny >>= aTmp )
{
ENSURE_OR_THROW( aTmp.getLength() == 3,
"extractValue(): inappropriate length for RGB color value" );
@@ -324,7 +324,7 @@ namespace slideshow
// try double sequence
{
uno::Sequence< double > aTmp;
- if( (rSourceAny >>= aTmp) )
+ if( rSourceAny >>= aTmp )
{
ENSURE_OR_THROW( aTmp.getLength() == 3,
"extractValue(): inappropriate length for HSL color value" );
@@ -339,7 +339,7 @@ namespace slideshow
// try sal_Int8 sequence
{
uno::Sequence< sal_Int8 > aTmp;
- if( (rSourceAny >>= aTmp) )
+ if( rSourceAny >>= aTmp )
{
ENSURE_OR_THROW( aTmp.getLength() == 3,
"extractValue(): inappropriate length for HSL color value" );
@@ -375,7 +375,7 @@ namespace slideshow
{
bool bTmp;
// try to extract bool value
- if( (rSourceAny >>= bTmp) )
+ if( rSourceAny >>= bTmp )
{
o_rValue = bTmp;
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index fbddd2580eda..f3a649e0998d 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/salunicodeliteral \
compilerplugins/clang/test/stringconstant \
compilerplugins/clang/test/unnecessaryoverride-dtor \
+ compilerplugins/clang/test/unnecessaryparen \
compilerplugins/clang/test/unoany \
compilerplugins/clang/test/unusedfields \
compilerplugins/clang/test/useuniqueptr \
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 38d4972ec416..2fce59d6d89a 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -847,7 +847,7 @@ bool StgDataStrm::SetSize( sal_Int32 nBytes )
nBytes = ( ( nBytes + m_nIncr - 1 ) / m_nIncr ) * m_nIncr;
sal_Int32 nOldSz = m_nSize;
- if( ( nOldSz != nBytes ) )
+ if( nOldSz != nBytes )
{
if( !StgStrm::SetSize( nBytes ) )
return false;
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 527b97e3aa1a..a7a34012d99e 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2832,8 +2832,8 @@ SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
{
if ( XML_NAMESPACE_OFFICE == nPrefix )
{
- if ( (IsXMLToken(rLocalName, XML_DOCUMENT) ||
- IsXMLToken(rLocalName, XML_DOCUMENT_META)))
+ if ( IsXMLToken(rLocalName, XML_DOCUMENT) ||
+ IsXMLToken(rLocalName, XML_DOCUMENT_META) )
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index be6edef032b5..819015fd5b9c 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -1643,8 +1643,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
rRet.clear();
newline--;
}
- else if ((nPart == 2) || ((((nPart == 1) &&
- (nVariation == 0)) || (nVariation == 1))))
+ else if ((nPart == 2) ||
+ ((nPart == 1) && (nVariation == 0)) ||
+ (nVariation == 1))
{
sPush+=rRet;
rRet = sPush;
@@ -2703,7 +2704,7 @@ bool MathType::HandleTemplate(int nLevel, sal_uInt8 &rSelector,
{
OSL_ENSURE(nOption < 2,"Option out of range");
}
- else if (/*(rSelector >= 0) &&*/ (rSelector <=12))
+ else if (rSelector <= 12)
{
OSL_ENSURE(nOption < 3,"Option out of range");
}
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 0c705b7418d5..54001bb65bbc 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -165,7 +165,7 @@ void SmModule::ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg )
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell)
{
- if ((dynamic_cast<const SmViewShell *>(pViewShell) != nullptr))
+ if (dynamic_cast<const SmViewShell *>(pViewShell) != nullptr)
{
SmViewShell *pSmView = static_cast<SmViewShell *>(pViewShell);
pSmView->GetGraphicWindow().ApplyColorConfigValues( rColorCfg );
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 1089e1477f8e..65dc5d026710 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1924,44 +1924,44 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
INDEXCONTAINER |
ENUMERATION );
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XNameContainer"))
+ } else if (className
+ == "com.sun.star.container.XNameContainer")
{
rMethodConcept_i |= NAMECONTAINER;
pAccess->mbNameContainer = true;
pAccess->mbNameReplace = true;
pAccess->mbNameAccess = true;
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XNameReplace"))
+ } else if (className
+ == "com.sun.star.container.XNameReplace")
{
rMethodConcept_i |= NAMECONTAINER;
pAccess->mbNameReplace = true;
pAccess->mbNameAccess = true;
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XNameAccess"))
+ } else if (className
+ == "com.sun.star.container.XNameAccess")
{
rMethodConcept_i |= NAMECONTAINER;
pAccess->mbNameAccess = true;
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XIndexContainer"))
+ } else if (className
+ == "com.sun.star.container.XIndexContainer")
{
rMethodConcept_i |= INDEXCONTAINER;
pAccess->mbIndexContainer = true;
pAccess->mbIndexReplace = true;
pAccess->mbIndexAccess = true;
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XIndexReplace"))
+ } else if (className
+ == "com.sun.star.container.XIndexReplace")
{
rMethodConcept_i |= INDEXCONTAINER;
pAccess->mbIndexReplace = true;
pAccess->mbIndexAccess = true;
pAccess->mbElementAccess = true;
- } else if ((className
- == "com.sun.star.container.XIndexAccess"))
+ } else if (className
+ == "com.sun.star.container.XIndexAccess")
{
rMethodConcept_i |= INDEXCONTAINER;
pAccess->mbIndexAccess = true;
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 7bce837463b6..f8b5875d407c 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -1417,7 +1417,7 @@ bool BrowseBox::GoToRow( long nRow, bool bRowColMove, bool bKeepSelection )
return false;
// not allowed?
- if ( ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) ) )
+ if ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) )
return false;
if ( pDataWin->bNoScrollBack && nRow < nTopRow )
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 14070f1613cf..c9d1c2e86cf0 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -453,7 +453,7 @@ void BrowserDataWin::MouseMove( const MouseEvent& rEvt )
{
// avoid pseudo MouseMoves
Point aNewPos = OutputToScreenPixel( rEvt.GetPosPixel() );
- if ( ( aNewPos == aLastMousePos ) )
+ if ( aNewPos == aLastMousePos )
return;
aLastMousePos = aNewPos;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 21b0b1fc8a57..133e378502a8 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1635,7 +1635,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
}
}
- bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) );
+ bool bLargeIconMode = WB_ICON == ( nWinBits & VIEWMODE_MASK );
sal_uInt16 nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
if (bLargeIconMode)
nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED;
@@ -1772,7 +1772,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pE
aBound.SetPos( *pPos );
Point aPos( aBound.TopLeft() );
- switch( nWinBits & (VIEWMODE_MASK) )
+ switch( nWinBits & VIEWMODE_MASK )
{
case WB_ICON:
{
@@ -1816,7 +1816,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* p
long nBoundWidth = aBound.GetWidth();
long nBoundHeight = aBound.GetHeight();
- switch( nWinBits & (VIEWMODE_MASK) )
+ switch( nWinBits & VIEWMODE_MASK )
{
case WB_ICON:
aPos.Y() += aImageSize.Height();
@@ -1857,7 +1857,7 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingWidth() const
long nStringWidth = GetItemSize( IcnViewFieldType::Text ).Width();
long nWidth = 0;
- switch( nWinBits & (VIEWMODE_MASK) )
+ switch( nWinBits & VIEWMODE_MASK )
{
case WB_ICON:
nWidth = std::max( nStringWidth, aImageSize.Width() );
@@ -1878,7 +1878,7 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingHeight() const
long nStringHeight = GetItemSize(IcnViewFieldType::Text).Height();
long nHeight = 0;
- switch( nWinBits & (VIEWMODE_MASK) )
+ switch( nWinBits & VIEWMODE_MASK )
{
case WB_ICON:
nHeight = aImageSize.Height();
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 4bc2175cc6c2..5eef13d45aa5 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -349,10 +349,10 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper )
WallpaperStyle eStyle = aBackground.GetStyle();
Color aBack( aBackground.GetColor());
Color aTrans( COL_TRANSPARENT );
- if( aBack == aTrans && (
+ if( aBack == aTrans &&
(!aBackground.IsBitmap() ||
- aBackground.GetBitmap().IsTransparent() ||
- (eStyle != WallpaperStyle::Tile && eStyle != WallpaperStyle::Scale))))
+ aBackground.GetBitmap().IsTransparent() ||
+ (eStyle != WallpaperStyle::Tile && eStyle != WallpaperStyle::Scale)) )
{
aBackground.SetColor( rStyleSettings.GetFieldColor() );
}
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index b50b96db4388..758df8a09a89 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2431,7 +2431,7 @@ void Ruler::SetNullOffset( long nPos )
void Ruler::SetLeftFrameMargin( long nPos )
{
- if ( (mpData->nLeftFrameMargin != nPos) )
+ if ( mpData->nLeftFrameMargin != nPos )
{
mpData->nLeftFrameMargin = nPos;
ImplUpdate();
@@ -2440,7 +2440,7 @@ void Ruler::SetLeftFrameMargin( long nPos )
void Ruler::SetRightFrameMargin( long nPos )
{
- if ( (mpData->nRightFrameMargin != nPos) )
+ if ( mpData->nRightFrameMargin != nPos )
{
mpData->nRightFrameMargin = nPos;
ImplUpdate();
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 39f5dad4b92a..719d650da7c0 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -269,9 +269,9 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
{
const GraphicType eType( mpGraphic ? mpGraphic->GetType() : meType );
- *pValues <<= ( ( eType == GraphicType::Bitmap ? graphic::GraphicType::PIXEL :
+ *pValues <<= ( eType == GraphicType::Bitmap ? graphic::GraphicType::PIXEL :
( eType == GraphicType::GdiMetafile ? graphic::GraphicType::VECTOR :
- graphic::GraphicType::EMPTY ) ) );
+ graphic::GraphicType::EMPTY ) );
}
break;
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index e6bb4233d98c..c84e790f95c4 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1798,10 +1798,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen
Point aCenter( aRect.Center() );
Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], true, true ) );
Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], true, true ) );
- aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) ) ) + aCenter.X();
- aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) ) ) + aCenter.Y();
- aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) ) ) + aCenter.X();
- aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) ) ) + aCenter.Y();
+ aStart.X() = (sal_Int32)( (double)( aStart.X() - aCenter.X() ) ) + aCenter.X();
+ aStart.Y() = (sal_Int32)( (double)( aStart.Y() - aCenter.Y() ) ) + aCenter.Y();
+ aEnd.X() = (sal_Int32)( (double)( aEnd.X() - aCenter.X() ) ) + aCenter.X();
+ aEnd.Y() = (sal_Int32)( (double)( aEnd.Y() - aCenter.Y() ) ) + aCenter.Y();
aNewB2DPolygon.append(CreateArc( aRect, aStart, aEnd, bClockwise));
}
rSrcPt += 4;
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 09dffac31784..b55c16ef6cdb 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -888,7 +888,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
switch(nCode)
{
case KEY_LEFT:
- if((aFocusPosition.getX() >= 1))
+ if(aFocusPosition.getX() >= 1)
{
aFocusPosition.setX( aFocusPosition.getX() - 1 );
Invalidate(aRepaintRect);
@@ -904,7 +904,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
}
break;
case KEY_UP:
- if((aFocusPosition.getY() >= 1))
+ if(aFocusPosition.getY() >= 1)
{
aFocusPosition.setY( aFocusPosition.getY() - 1 );
Invalidate(aRepaintRect);
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index e8c422914628..3763af2683a1 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -425,7 +425,7 @@ namespace svx
,sConnectionResource
,nObjectType
,sObjectName,xConnection
- ,!((CommandType::QUERY == nObjectType))
+ ,CommandType::QUERY != nObjectType
,sCompleteStatement);
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 89518e9de4ac..db123f977bb9 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -2158,8 +2158,9 @@ void FormController::setControlLock(const Reference< XControl > & xControl)
// a. if the entire record is locked
// b. if the associated field is locked
Reference< XBoundControl > xBound(xControl, UNO_QUERY);
- if (xBound.is() && (( (bLocked && bLocked != bool(xBound->getLock())) ||
- !bLocked))) // always uncheck individual fields when unlocking
+ if (xBound.is() &&
+ ( (bLocked && bLocked != bool(xBound->getLock())) ||
+ !bLocked)) // always uncheck individual fields when unlocking
{
// there is a data source
Reference< XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 5144e4023bea..6a81478a0c9b 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -285,9 +285,9 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe
sal_Unicode cChar = aFmt.GetBulletChar();
for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++)
{
- if ( (cChar == pActualBullets[i]->cBulletChar||
- (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) ||
- (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar)))
+ if ( (cChar == pActualBullets[i]->cBulletChar) ||
+ (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) ||
+ (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar) )
{
return i+1;
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 846a067e3d8b..a68dccb5c1a8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1651,7 +1651,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
if (aRect.IsInside(rPnt))
{
- if ((!bCheckIfMarkable || IsObjMarkable(pObj,pPV)))
+ if (!bCheckIfMarkable || IsObjMarkable(pObj,pPV))
{
SdrObjList* pOL=pObj->GetSubList();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index f672e5072c48..42c105bfe628 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1000,7 +1000,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
if ( !pAny && pDefCustomShape )
{
sal_Int32 nXRef = pDefCustomShape->nXRef;
- if ( ( nXRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) )
+ if ( nXRef != DEFAULT_MINIMUM_SIGNED_COMPARE )
{
aPropVal.Name = sStretchX;
aPropVal.Value <<= nXRef;
@@ -1014,7 +1014,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
if ( !pAny && pDefCustomShape )
{
sal_Int32 nYRef = pDefCustomShape->nYRef;
- if ( ( nYRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) )
+ if ( nYRef != DEFAULT_MINIMUM_SIGNED_COMPARE )
{
aPropVal.Name = sStretchY;
aPropVal.Value <<= nYRef;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index a05a428b6798..0ba47e9b4c83 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -762,7 +762,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
const bool bTopToBottom(pOutlinerParaObject->IsTopToBottom());
const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
- if((rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame()))
+ if(rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame())
{
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index a9850d598b03..3e49ca7b07b4 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1126,22 +1126,22 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs )
const SfxPoolItem *pPoolItem=nullptr;
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem) )
aSettings.mbUseFirstRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem) )
aSettings.mbUseLastRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem) )
aSettings.mbUseRowBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem) )
aSettings.mbUseFirstColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem) )
aSettings.mbUseLastColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
- if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem)) )
+ if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem) )
aSettings.mbUseColumnBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue();
if( aSettings == pTableObj->getTableStyleSettings() )
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 19ac6bfea300..b48833191503 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -118,7 +118,7 @@ bool TableLayouter::getCellArea( const CellRef& xCell, const CellPos& rPos, base
const basegfx::B2ITuple aCellSize( getCellSize( xCell, rPos ) );
const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
- if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) )
+ if( (rPos.mnCol < ((sal_Int32)maColumns.size())) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) )
{
const sal_Int32 y = maRows[rPos.mnRow].mnPos;
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index fc1adcda3dad..27409ce2ddee 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -255,11 +255,11 @@ namespace drawinglayer
if(!rLineSide.isEmpty())
{
// reduce to inner edge of associated matching line
- nExtend = -((getBorderLineWidth(rLineSide) / 2.0));
+ nExtend = -(getBorderLineWidth(rLineSide) / 2.0);
}
else
{
- nExtend = ((getBorderLineWidth(rLineOpposite) / 2.0));
+ nExtend = (getBorderLineWidth(rLineOpposite) / 2.0);
}
return nExtend;
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index de140408609d..faaf6552b800 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -457,8 +457,8 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize )
if( nScrollWidth > 0 )
{
// calculate columns with scroll bar
- nCols = (sal_uInt16) ( ( ( (float) rNewSize.Width() - (float) nScrollWidth ) )
- / (float) aItemSize.Width() + 0.5 );
+ nCols = (sal_uInt16) ( ( (float) rNewSize.Width() - (float) nScrollWidth )
+ / (float) aItemSize.Width() + 0.5 );
}
if( nCols <= 1 )
nCols = 2;
@@ -497,7 +497,7 @@ void SvxColorDockingWindow::GetFocus()
bool SvxColorDockingWindow::EventNotify( NotifyEvent& rNEvt )
{
bool bRet = false;
- if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) )
+ if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode();
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 14b274a1f9de..4eb77feb7986 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -165,7 +165,7 @@ bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
// get that item and see if there namespaces inside
const SvXMLAttrContainerItem *pUnknown = static_cast<const SvXMLAttrContainerItem *>(pItem);
- if( (pUnknown->GetAttrCount() > 0) )
+ if( pUnknown->GetAttrCount() > 0 )
{
mpCurrentAttr = pUnknown;
mnCurrentAttr = pUnknown->GetFirstNamespaceIndex();
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index ccc976217b67..42b0f4b16463 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1013,10 +1013,9 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
// #i55919# SdrHintKind::ObjectChange is only interesting if it's for this object
const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
- if (!pSdrHint || ( /* (pSdrHint->GetKind() != SdrHintKind::ObjectRemoved) && */
- (pSdrHint->GetKind() != SdrHintKind::ModelCleared) &&
- // #110094#-9 (pSdrHint->GetKind() != HINT_OBJLISTCLEAR) &&
- ((pSdrHint->GetKind() != SdrHintKind::ObjectChange || pSdrHint->GetObject() != mpObj.get() ))))
+ if (!pSdrHint ||
+ ((pSdrHint->GetKind() != SdrHintKind::ModelCleared) &&
+ (pSdrHint->GetKind() != SdrHintKind::ObjectChange || pSdrHint->GetObject() != mpObj.get() )))
return;
uno::Reference< uno::XInterface > xSelf( mpObj->getWeakUnoShape() );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 8493de67b9eb..3c328fda911a 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2410,9 +2410,7 @@ so run here: save the parent's SwFrame not the accessible object parent,
bIsTextParent =true;
}
}
-// bool bIsVisibleChildrenOnly =aFrameOrObj.IsVisibleChildrenOnly() ;
-// bool bIsBoundAsChar =aFrameOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar &&
- if((bIsValidFrame || bIsTextParent) )
+ if( bIsValidFrame || bIsTextParent )
{
if( GetShell()->ActionPend() )
{
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index a2e4fb9b9c71..ef588936d12b 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -40,7 +40,7 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld )
{
DBG_TESTSOLARMUTEX();
// this method only handles notification about dying SwModify objects
- if( (!pOld || pOld->Which() != RES_OBJECTDYING) )
+ if( !pOld || pOld->Which() != RES_OBJECTDYING )
return;
const SwPtrMsgPoolItem* pDead = static_cast<const SwPtrMsgPoolItem*>(pOld);
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 724e2975bed5..b23362d8e598 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -111,7 +111,7 @@ SwCallLink::~SwCallLink()
const SwDoc *pDoc=rShell.GetDoc();
const SwContentNode *pNode = nullptr;
- if ( ( pDoc != nullptr && nNode < pDoc->GetNodes( ).Count( ) ) )
+ if ( pDoc && nNode < pDoc->GetNodes( ).Count( ) )
{
pNode = pDoc->GetNodes()[nNode]->GetContentNode();
}
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index e7448e881816..57204ff80b5a 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -891,10 +891,10 @@ namespace
{
const sal_Int32 nFootnoteSttIdx = pSrch->GetStart();
if( !pEndCnt || !pSttCnt ||
- !( (( &rSttNd.GetNode() == pFootnoteNd &&
+ ! (( &rSttNd.GetNode() == pFootnoteNd &&
pSttCnt->GetIndex() > nFootnoteSttIdx ) ||
- ( &rEndNd.GetNode() == pFootnoteNd &&
- nFootnoteSttIdx >= pEndCnt->GetIndex() )) ))
+ ( &rEndNd.GetNode() == pFootnoteNd &&
+ nFootnoteSttIdx >= pEndCnt->GetIndex() )) )
{
if( bDelFootnote )
{
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 4c80964c6ba8..80c96313eb31 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -639,8 +639,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
}
break;
case SwNodeType::Section:
- if( ( static_cast<SwSectionNode*>(pNd)->GetSection().IsProtect() ||
- static_cast<SwSectionNode*>(pNd)->GetSection().IsHidden() ) )
+ if( static_cast<SwSectionNode*>(pNd)->GetSection().IsProtect() ||
+ static_cast<SwSectionNode*>(pNd)->GetSection().IsHidden() )
nCurrNd = pNd->EndOfSectionIndex();
break;
case SwNodeType::End:
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 1d9859554c29..963b0aec3f56 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -307,7 +307,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType,
( pFrameFormat && SfxItemState::SET == pFrameFormat->GetItemState(
RES_ANCHOR, true, reinterpret_cast<const SfxPoolItem**>(&pAnch) )) )
{
- if ( (RndStdIds::FLY_AT_PAGE != pAnch->GetAnchorId()) )
+ if ( RndStdIds::FLY_AT_PAGE != pAnch->GetAnchorId() )
{
pAnchorPos = pAnch->GetContentAnchor();
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index f7165eb5678e..c0967895e97c 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1607,7 +1607,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
}
}
// unfortunately nothing found
- if( (bNext? (aBestPos.getX() == LONG_MAX) : (aBestPos.getX() == 0)) )
+ if( bNext ? (aBestPos.getX() == LONG_MAX) : (aBestPos.getX() == 0) )
pBest = pTop;
}
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 662d1a5e61f8..9e65bfa046c3 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -51,7 +51,7 @@
/// Return value tells whether the Frame should be moved.
bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool & )
{
- if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove()))
+ if ( SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove() )
{
// Floating back a frm uses a bit of time unfortunately.
// The most common case is the following: The Frame wants to float to
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 23500f5e8107..9819e411f1cc 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -985,7 +985,7 @@ static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFram
nOldNew = nNew;
}
}
- if ( (pRet->Frame().Top() > rPt.Y()) )
+ if ( pRet->Frame().Top() > rPt.Y() )
return pNearest;
else
return pRet;
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index ad5364568728..63a85fa3555a 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3304,7 +3304,7 @@ SwContentFrame *SwTabFrame::FindLastContent()
bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat )
{
rReformat = false;
- if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove()) )
+ if ( SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove() )
{
//Floating back Frame's is quite time consuming unfortunately.
//Most often the location where the Frame wants to float to has the same
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 41221d2300bd..999bc8897c1d 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -664,10 +664,10 @@ static const SwContentFrame * lcl_MissProtectedFrames( const SwContentFrame *pCn
while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
if ( !pCell ||
- (( ( bInReadOnly || !pCell->GetFormat()->GetProtect().IsContentProtected() ) &&
+ ( ( bInReadOnly || !pCell->GetFormat()->GetProtect().IsContentProtected() ) &&
( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) &&
( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) &&
- !pCell->IsCoveredCell()) ) )
+ !pCell->IsCoveredCell() ) )
bProtect = false;
else
pCnt = (*fnNxtPrv)( pCnt );
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 268914f3abd8..a228cddf6bae 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -71,11 +71,11 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
// bottom, if its wrap mode is 'through' and its anchor frame has fixed
// size. Otherwise, it's positioned top.
sal_Int16 eVertOrient = aVert.GetVertOrient();
- if ( ( bFlyAtFly &&
- ( eVertOrient == text::VertOrientation::CENTER ||
- eVertOrient == text::VertOrientation::BOTTOM ) &&
+ if ( bFlyAtFly &&
+ ( eVertOrient == text::VertOrientation::CENTER ||
+ eVertOrient == text::VertOrientation::BOTTOM ) &&
css::text::WrapTextMode_THROUGH != rFrameFormat.GetSurround().GetSurround() &&
- !GetAnchorFrame().HasFixSize() ) )
+ !GetAnchorFrame().HasFixSize() )
{
eVertOrient = text::VertOrientation::TOP;
}
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index ef262333c4a7..cd76aa2a0b13 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -307,7 +307,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// 6168: Avoid that the rest of a FieldPortion gets the attributes of the
// next portion with SeekAndChgBefore():
- if( ( bRest && pPor->InFieldGrp() && !pPor->GetLen() ) )
+ if( bRest && pPor->InFieldGrp() && !pPor->GetLen() )
SeekAndChgBefore( GetInfo() );
else if ( pPor->IsQuoVadisPortion() )
{
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 616a591b169e..136955fdcad5 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -187,10 +187,12 @@ void SwFormatField::ClearTextField()
bool SwFormatField::operator==( const SfxPoolItem& rAttr ) const
{
assert(SfxPoolItem::operator==(rAttr));
- return ( ( mpField && static_cast<const SwFormatField&>(rAttr).GetField()
- && mpField->GetTyp() == static_cast<const SwFormatField&>(rAttr).GetField()->GetTyp()
- && mpField->GetFormat() == static_cast<const SwFormatField&>(rAttr).GetField()->GetFormat() ) )
- || ( !mpField && !static_cast<const SwFormatField&>(rAttr).GetField() );
+ return ( mpField
+ && static_cast<const SwFormatField&>(rAttr).GetField()
+ && mpField->GetTyp() == static_cast<const SwFormatField&>(rAttr).GetField()->GetTyp()
+ && mpField->GetFormat() == static_cast<const SwFormatField&>(rAttr).GetField()->GetFormat() )
+ ||
+ ( !mpField && !static_cast<const SwFormatField&>(rAttr).GetField() );
}
SfxPoolItem* SwFormatField::Clone( SfxItemPool* ) const
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e304ec606597..8aefa0d6077e 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -3224,7 +3224,7 @@ bool SwpHints::TryInsertHint(
// multiple times
// FME 2007-11-08 #i82989# in NOHINTADJUST mode, we want to insert
// character attributes directly
- if ( ( RES_TXTATR_CHARFMT == nWhich && !bNoHintAdjustMode ) )
+ if ( RES_TXTATR_CHARFMT == nWhich && !bNoHintAdjustMode )
{
BuildPortions( rNode, *pHint, nMode );
}
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index e497972a948c..78266380d0fd 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1890,8 +1890,8 @@ void HTMLTable::SetBorders()
{
(*m_pRows)[m_nRows-1]->bBottomBorder = true;
}
- if( (HTMLTableFrame::RHS==m_eFrame || HTMLTableFrame::VSides==m_eFrame ||
- HTMLTableFrame::Box==m_eFrame) )
+ if( HTMLTableFrame::RHS==m_eFrame || HTMLTableFrame::VSides==m_eFrame ||
+ HTMLTableFrame::Box==m_eFrame )
m_bRightBorder = true;
if( HTMLTableFrame::LHS==m_eFrame || HTMLTableFrame::VSides==m_eFrame || HTMLTableFrame::Box==m_eFrame )
{
@@ -2224,11 +2224,14 @@ void HTMLTable::CloseTable()
HTMLTableRow *const pPrevRow = (*m_pRows)[m_nCurrentRow-1].get();
HTMLTableCell *pCell;
for( i=0; i<m_nCols; i++ )
- if( ( (pCell=(pPrevRow->GetCell(i))), (pCell->GetRowSpan()) > 1 ) )
+ {
+ pCell = pPrevRow->GetCell(i);
+ if( pCell->GetRowSpan() > 1 )
{
FixRowSpan( m_nCurrentRow-1, i, pCell->GetContents() );
ProtectRowSpan(m_nCurrentRow, i, (*m_pRows)[m_nCurrentRow]->GetCell(i)->GetRowSpan());
}
+ }
for( i=m_nRows-1; i>=m_nCurrentRow; i-- )
m_pRows->erase(m_pRows->begin() + i);
m_nRows = m_nCurrentRow;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 1ae6990ab51c..93b6d5b609bf 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3677,8 +3677,8 @@ void SwHTMLParser::NewFontAttr( HtmlTokenId nToken )
// In headings the current heading sets the font height
// and not BASEFONT.
sal_uInt16 nPoolId = GetCurrFormatColl()->GetPoolFormatId();
- if( (nPoolId>=RES_POOLCOLL_HEADLINE1 &&
- nPoolId<=RES_POOLCOLL_HEADLINE6) )
+ if( nPoolId>=RES_POOLCOLL_HEADLINE1 &&
+ nPoolId<=RES_POOLCOLL_HEADLINE6 )
{
// If the font height in the heading wasn't changed yet,
// then take the one from the style.
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 1986429414b2..6ad2e8703a35 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -449,8 +449,8 @@ void WW8Export::OutGrf(const ww8::Frame &rFrame)
// Otherwise, an additional paragraph is exported for a graphic, which is
// forced to be treated as inline, because it's anchored inside another frame.
if ( !rFrame.IsInline() &&
- ( ((eAn == RndStdIds::FLY_AT_PARA)) ||
- (eAn == RndStdIds::FLY_AT_PAGE)) )
+ ( (eAn == RndStdIds::FLY_AT_PARA) ||
+ (eAn == RndStdIds::FLY_AT_PAGE) ) )
{
WriteChar( (char)0x0d ); // close the surrounding frame with CR
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 77009b764fed..1567b40e4676 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -258,7 +258,7 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell* pDocShell, s
{
rStrm.ReadBytes(aGuid, 16);
- if( (memcmp(aGuid, aGuidFileMoniker, 16) == 0) )
+ if( memcmp(aGuid, aGuidFileMoniker, 16) == 0 )
{
rStrm.ReadUInt16( nLevel );
xShortName.reset(new OUString(read_uInt32_lenPrefixed_uInt8s_ToOUString(rStrm, GetCharSetFromLanguage())));
@@ -278,7 +278,7 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell* pDocShell, s
else
lclGetAbsPath( *xShortName, nLevel, pDocShell);
}
- else if( (memcmp(aGuid, aGuidUrlMoniker, 16) == 0) )
+ else if( memcmp(aGuid, aGuidUrlMoniker, 16) == 0 )
{
sal_uInt32 nStrLen(0);
rStrm.ReadUInt32( nStrLen );
@@ -4462,7 +4462,7 @@ void wwSectionManager::InsertSegments()
(aIter->GetPageHeight() == aNext->GetPageHeight()) &&
(aIter->IsLandScape() == aNext->IsLandScape()));
- if (((aNext != aEnd && aNext->IsContinuous() && bThisAndNextAreCompatible) || bProtected))
+ if ((aNext != aEnd && aNext->IsContinuous() && bThisAndNextAreCompatible) || bProtected)
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index ddff8244e7f7..bc244fe62acb 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -526,10 +526,8 @@ void wwSectionManager::GetPageULData(const wwSection &rSection,
even pages, something we cannot do. So we will put it on top of all
pages, that way the pages are at least the right size.
*/
- if (
- (!mrReader.m_bVer67 && mrReader.m_pWDop->iGutterPos &&
+ if (!mrReader.m_bVer67 && mrReader.m_pWDop->iGutterPos &&
rSection.maSep.fRTLGutter)
- )
{
nWWUp += rSection.maSep.dzaGutter;
}
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 0341eb26eb80..6e75c781bdde 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1107,7 +1107,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[0] = (sal_uInt8) ( nSprmId & 0x00ff) ;
aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index e12627b4c656..d05820fa1115 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -613,7 +613,7 @@ void SwXMLImport::startDocument()
GetTextImport()->SetCursor( xTextCursor );
}
- if( (!(getImportFlags() & (SvXMLImportFlags::CONTENT|SvXMLImportFlags::MASTERSTYLES))))
+ if( !(getImportFlags() & (SvXMLImportFlags::CONTENT|SvXMLImportFlags::MASTERSTYLES)) )
return;
if( !pTextCursor )
@@ -848,7 +848,7 @@ void SwXMLImport::endDocument()
// SJ: #i49801# -> now permitting repaints
if ( pDoc )
{
- if( (getImportFlags() == SvXMLImportFlags::ALL ) )
+ if( getImportFlags() == SvXMLImportFlags::ALL )
{
// Notify math objects. If we are in the package filter this will
// be done by the filter object itself
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index ee094fceaa01..d06f31b66d4f 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1913,9 +1913,11 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper,
SwXMLTableRow_Impl *pStartRow = (*m_pRows)[nStartRow].get();
const SwXMLTableCell_Impl *pCell;
for( i=nLeftCol; i<nRightCol; i++ )
- if( ( pCell=pStartRow->GetCell(i),
- pCell->GetRowSpan() > nMaxRowSpan ) )
+ {
+ pCell = pStartRow->GetCell(i);
+ if( pCell->GetRowSpan() > nMaxRowSpan )
nMaxRowSpan = pCell->GetRowSpan();
+ }
nStartRow += nMaxRowSpan;
if( nStartRow<nBottomRow )
@@ -2332,7 +2334,8 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox )
const SwXMLTableCell_Impl *pCell;
for( sal_uLong i = 0; i < m_aColumnWidths.size(); ++i )
{
- if( ( pCell=pPrevRow->GetCell(i), pCell->GetRowSpan() > 1UL ) )
+ pCell = pPrevRow->GetCell(i);
+ if( pCell->GetRowSpan() > 1 )
{
FixRowSpan( m_nCurRow-1UL, i, 1UL );
}
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 527052c9c996..f38c0d7fdf96 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -336,7 +336,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
//centered: change both sides equally
else if(m_pCenterBtn->IsChecked())
{
- if((nLeft != nRight))
+ if(nLeft != nRight)
{
nDiff += nLeft + nRight;
nLeft = nDiff/2;
diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx
index 6b9c577ac369..41a87cf6463e 100644
--- a/sw/source/ui/vba/vbacolumns.cxx
+++ b/sw/source/ui/vba/vbacolumns.cxx
@@ -100,7 +100,7 @@ void SAL_CALL SwVbaColumns::Select( )
uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ )
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) )
+ if( Index1 >>= nIndex )
{
if( nIndex <= 0 || nIndex > getCount() )
{
diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx
index 30ef9d2f1ca2..1627631ec39d 100644
--- a/sw/source/ui/vba/vbalistgalleries.cxx
+++ b/sw/source/ui/vba/vbalistgalleries.cxx
@@ -55,7 +55,7 @@ SwVbaListGalleries::SwVbaListGalleries( const uno::Reference< XHelperInterface >
uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ )
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) )
+ if( Index1 >>= nIndex )
{
if( nIndex == word::WdListGalleryType::wdBulletGallery
|| nIndex == word::WdListGalleryType::wdNumberGallery
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index ac08e16e9726..cfe3b862d3aa 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -317,7 +317,7 @@ void SAL_CALL SwVbaRows::Select( )
uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ )
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) )
+ if( Index1 >>= nIndex )
{
if( nIndex <= 0 || nIndex > getCount() )
{
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 494857f069a4..5150e4dd22af 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -940,9 +940,9 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
{
if(pViewShell->GetWindow())
{
- if((dynamic_cast< const SwView *>( pViewShell ) != nullptr ||
- dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr ||
- dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr))
+ if(dynamic_cast< const SwView *>( pViewShell ) != nullptr ||
+ dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr ||
+ dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr)
{
if(bAccessibility)
{
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 0c94290af8b8..f73ea02ddca5 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -219,7 +219,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
}
else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
{
- if( ( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() ) )
+ if( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() )
{
short nBtn = ScopedVclPtrInstance<SvxPrtQryBox>(&GetEditWin())->Execute();
if( RET_CANCEL == nBtn )
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 775741fe6588..9a63b496b8f1 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1163,7 +1163,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
if ( rProp.Name == UNO_NAME_FILE_NAME )
{
OUString sFileURL;
- if ( (rProp.Value >>= sFileURL ) )
+ if ( rProp.Value >>= sFileURL )
{
// Convert the File URL into a system dependent path, as the SalPrinter expects
OUString sSystemPath;
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index aa30b63e9f14..f6c0c463483f 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -590,7 +590,7 @@ void SAL_CALL SwXTextView::setRubyList(
}
else if(pProperties[nProp].Name == UNO_NAME_RUBY_CHAR_STYLE_NAME)
{
- if((pProperties[nProp].Value >>= sTmp))
+ if(pProperties[nProp].Value >>= sTmp)
{
OUString sName;
SwStyleNameMapper::FillUIName(sTmp, sName, SwGetPoolIdFromName::ChrFmt, true );
@@ -605,7 +605,7 @@ void SAL_CALL SwXTextView::setRubyList(
else if(pProperties[nProp].Name == UNO_NAME_RUBY_ADJUST)
{
sal_Int16 nTmp = 0;
- if((pProperties[nProp].Value >>= nTmp))
+ if(pProperties[nProp].Value >>= nTmp)
pEntry->GetRubyAttr().SetAdjustment((css::text::RubyAdjust)nTmp);
}
else if(pProperties[nProp].Name == UNO_NAME_RUBY_IS_ABOVE)
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 4be4e226be6d..88862a02a7b2 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1401,7 +1401,7 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
}
else
m_nHiddenBlock |= nOr;
- if((pCntType->GetType() == ContentTypeId::OUTLINE))
+ if(pCntType->GetType() == ContentTypeId::OUTLINE)
{
std::map< void*, bool > aCurrOutLineNodeMap;
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index a46b76f4b374..8675c490610e 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -1063,7 +1063,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (-1 != sFileName.indexOf('#'))
return nRet;
- if ((m_sContentFileName.isEmpty() || m_sContentFileName != sFileName))
+ if (m_sContentFileName.isEmpty() || m_sContentFileName != sFileName)
{
nRet = rEvt.mnAction;
sFileName = comphelper::string::stripEnd(sFileName, 0);
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index d8e4640e3f65..5af6fe04abbd 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1506,11 +1506,7 @@ tools::Polygon& Polygon::operator=( tools::Polygon&& rPoly )
bool Polygon::operator==( const tools::Polygon& rPoly ) const
{
-
- if ( (rPoly.mpImplPolygon == mpImplPolygon) )
- return true;
- else
- return false;
+ return rPoly.mpImplPolygon == mpImplPolygon;
}
bool Polygon::IsEqual( const tools::Polygon& rPoly ) const
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx
index b797106dfcc0..04dddb068c66 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -70,7 +70,7 @@ void PackageUri::init() const
m_aScheme.clear();
// URI must match at least: <sheme>://<non_empty_url_to_file>
- if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) )
+ if ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 )
{
// error, but remember that we did a init().
m_aPath = "/";
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index ec53ad152588..564f998f0377 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -1852,7 +1852,7 @@ void Content::transfer(
// Does source URI scheme match? Only vnd.sun.star.tdoc is supported.
- if ( ( rInfo.SourceURL.getLength() < TDOC_URL_SCHEME_LENGTH + 2 ) )
+ if ( rInfo.SourceURL.getLength() < TDOC_URL_SCHEME_LENGTH + 2 )
{
// Invalid length (to short).
ucbhelper::cancelCommandExecution(
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index a922dc874397..7093ee76552d 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -112,14 +112,14 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< css::uno::Any > & a
if (len > 1) {
OUString arg1;
css::uno::Reference< css::rdf::XURI > xURI;
- if ((aArguments[1] >>= arg1)) {
+ if (aArguments[1] >>= arg1) {
if (!arg1.isEmpty()) {
m_Language = arg1;
} else {
throw css::lang::IllegalArgumentException(
"CLiteral::initialize: argument is not valid language", *this, 1);
}
- } else if ((aArguments[1] >>= xURI)) {
+ } else if (aArguments[1] >>= xURI) {
if (xURI.is()) {
m_xDatatype = xURI;
} else {
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 0c44afd07f17..35471873ff66 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -718,7 +718,7 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu
sal_Int16 arg(0);
OUString arg0;
OUString arg1;
- if ((aArguments[0] >>= arg)) {
+ if (aArguments[0] >>= arg) {
// integer argument: constant from rdf::URIs
if (len != 1) {
throw css::lang::IllegalArgumentException(
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 5f84f7a89e1c..272608c2a11c 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -353,7 +353,7 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
OUString sRange( "-" );
OUString sFileName;
- if (( nFrom || nTo ) )
+ if ( nFrom || nTo )
{
if ( nFrom )
sRange = ( OUString::number( nFrom ) + sRange );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c8769355051b..e9f048b19dd3 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1082,7 +1082,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight())));
aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height());
- if (((nState & ControlState::ROLLOVER)) || !(GetStyle() & WB_FLATBUTTON))
+ if ((nState & ControlState::ROLLOVER) || !(GetStyle() & WB_FLATBUTTON))
{
bNativeOK = rRenderContext.DrawNativeControl(ControlType::Pushbutton, ControlPart::Entire, aCtrlRegion, nState,
aControlValue, OUString() /*PushButton::GetText()*/);
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 78d2e1dbb656..5f8084ee9d31 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1833,7 +1833,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I
// Or if at the very beginning ( StartPos 0 ) followed by a tab...
if ( ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) ) ||
( nStartPos && ( pNode->GetText()[ nStartPos - 1 ] == '\t' ) ) ||
- ( ( !nStartPos && ( nNewChars < pNode->GetText().getLength() ) && pNode->GetText()[ nNewChars ] == '\t' ) ) )
+ ( !nStartPos && ( nNewChars < pNode->GetText().getLength() ) && pNode->GetText()[ nNewChars ] == '\t' ) )
{
std::size_t nNewPortionPos = 0;
if ( nStartPos )
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index b78c2fdddafa..6ae9459f5bd6 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -762,8 +762,8 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
if (!bTest || rFormatExtension.startsWith("PDF"))
{
- if ((sFirstBytes[0] == '%' && sFirstBytes[1] == 'P' && sFirstBytes[2] == 'D' &&
- sFirstBytes[3] == 'F' && sFirstBytes[4] == '-'))
+ if (sFirstBytes[0] == '%' && sFirstBytes[1] == 'P' && sFirstBytes[2] == 'D' &&
+ sFirstBytes[3] == 'F' && sFirstBytes[4] == '-')
{
rFormatExtension = "PDF";
return true;
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index f1a7e2b52a17..fc85066a2b03 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -123,7 +123,7 @@ bool isCompatible(SvStream& rInStream)
if (nRead < 8)
return false;
- if ((aFirstBytes[0] != '%' || aFirstBytes[1] != 'P' || aFirstBytes[2] != 'D' || aFirstBytes[3] != 'F' || aFirstBytes[4] != '-'))
+ if (aFirstBytes[0] != '%' || aFirstBytes[1] != 'P' || aFirstBytes[2] != 'D' || aFirstBytes[3] != 'F' || aFirstBytes[4] != '-')
return false;
sal_Int32 nMajor = OString(aFirstBytes[5]).toInt32();
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 32ce4f1d44a2..e53e6066e5ef 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -580,7 +580,7 @@ bool UpcasePossible(UCHAR c)
UCHAR Upcase(UCHAR c)
{
- if ((c>=(UCHAR)'a' && c<=(UCHAR)'z')) c=(c-(UCHAR)'a')+(UCHAR)'A';
+ if (c>=(UCHAR)'a' && c<=(UCHAR)'z') c=(c-(UCHAR)'a')+(UCHAR)'A';
else if ( c == 0xe4 ) c = 0xc4;
else if ( c == 0xf6 ) c = 0xd6;
else if ( c == 0xfc ) c = 0xdc;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index b9d2f8d27615..501f36eabfe9 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -697,7 +697,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pAcc.reset();
if ( nSye && nSxe &&
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
- ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
+ ( ( nSy + nSye ) <= aBmp.GetSizePixel().Height() ) )
{
tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
@@ -748,7 +748,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
// test if it is sensible to crop
if ( nSye && nSxe &&
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
- ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
+ ( ( nSy + nSye ) <= aBmp.GetSizePixel().Height() ) )
{
tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index b10f3c295926..869578425aef 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -46,7 +46,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR;
// chinese
- if ( ((ch >= 0x3400) && (ch <= 0x9FFF)) )
+ if ( (ch >= 0x3400) && (ch <= 0x9FFF) )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_TC|ImplFontAttrs::CJK_SC;
// cjk
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index 5e28ab37a03f..5381e29e175e 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -72,7 +72,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR;
// chinese
- if ( ((ch >= 0x3400) && (ch <= 0x9FFF)) )
+ if ( (ch >= 0x3400) && (ch <= 0x9FFF) )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_TC|ImplFontAttrs::CJK_SC;
// cjk
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f45dd1685b64..0126752d2c67 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -702,7 +702,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
* outside the interval [32(=ASCII' ');126(=ASCII'~')]
* should be escaped hexadecimal
*/
- if( (aStr[i] >= 32 && aStr[i] <= 126 ) )
+ if( aStr[i] >= 32 && aStr[i] <= 126 )
aBuffer.append( aStr[i] );
else
{
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 32643162d110..0473c541ae0f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -396,8 +396,8 @@ void VclBox::setAllocation(const Size &rAllocation)
long nHomogeneousDimension = 0, nExtraSpace = 0;
if (m_bHomogeneous)
{
- nHomogeneousDimension = ((nAllocPrimaryDimension -
- (nVisibleChildren - 1) * m_nSpacing)) / nVisibleChildren;
+ nHomogeneousDimension = (nAllocPrimaryDimension -
+ (nVisibleChildren - 1) * m_nSpacing) / nVisibleChildren;
}
else if (nExpandChildren)
{
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index 62a500a060e7..bcf4bc2c0be6 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -162,9 +162,9 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
if( pSWindow && isVisibleInLayout(pSWindow) && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if ( ( nType == WindowType::FIXEDTEXT ||
- nType == WindowType::FIXEDLINE ||
- nType == WindowType::GROUPBOX ) )
+ if ( nType == WindowType::FIXEDTEXT ||
+ nType == WindowType::FIXEDLINE ||
+ nType == WindowType::GROUPBOX )
{
// a fixed text can't be labeld by a fixed text.
if ( ( nMyType != WindowType::FIXEDTEXT ) || ( nType != WindowType::FIXEDTEXT ) )
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 8142bb649cc5..271ab84ac60a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2764,7 +2764,10 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
// set the flag to hide or show accelerators in the menu depending on whether the menu was launched by mouse or keyboard shortcut
if( pSFrom && pSFrom->IsMenuBar())
- ((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey()));
+ {
+ auto pMenuBarWindow = static_cast<MenuBarWindow*>(pSFrom->pWindow.get());
+ pMenuBarWindow->SetMBWHideAccel( !(pMenuBarWindow->GetMBWMenuKey()) );
+ }
delete mpLayoutData;
mpLayoutData = nullptr;
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 7c03f58eee8c..5630c1c09a08 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -919,7 +919,7 @@ void PrintDialog::setupOptionalUI()
if( ! (rEntry.Value >>= aHelpTexts) )
{
OUString aHelpText;
- if( (rEntry.Value >>= aHelpText) )
+ if( rEntry.Value >>= aHelpText )
{
aHelpTexts.realloc( 1 );
*aHelpTexts.getArray() = aHelpText;
@@ -931,7 +931,7 @@ void PrintDialog::setupOptionalUI()
if( ! (rEntry.Value >>= aHelpIds ) )
{
OUString aHelpId;
- if( (rEntry.Value >>= aHelpId) )
+ if( rEntry.Value >>= aHelpId )
{
aHelpIds.realloc( 1 );
*aHelpIds.getArray() = aHelpId;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4475353a65a2..c76de72b03e1 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1933,8 +1933,8 @@ void lcl_hideDoubleSeparators( ToolBox::ImplToolItems& rItems )
ToolBox::ImplToolItems::iterator temp_it;
for ( temp_it = it+1; temp_it != rItems.end(); ++temp_it )
{
- if ( ((temp_it->meType == ToolBoxItemType::BUTTON) &&
- temp_it->mbVisible) )
+ if ( (temp_it->meType == ToolBoxItemType::BUTTON) &&
+ temp_it->mbVisible )
{
it->mbVisible = true;
break;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 04d8e8d5c3b2..5d30f4f54fda 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1009,7 +1009,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
( !(nFrameStyle & ~SalFrameStyleFlags::CLOSEABLE) &&
( mpWindowImpl->mbFloatWin || ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow) || (nStyle & WB_SYSTEMFLOATWIN) ) ) ||
// 2. borderwindows of floaters with ownerdraw decoration
- ( ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) )
+ ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) )
{
nFrameStyle = SalFrameStyleFlags::FLOAT;
if( nStyle & WB_OWNERDRAWDECORATION )
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 43b6bfbe9284..698955614daf 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -743,7 +743,7 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
CheckTimeout();
// handle wakeup events.
- if ((nFound > 0) && (FD_ISSET(m_pTimeoutFDS[0], &ReadFDS)))
+ if ((nFound > 0) && FD_ISSET(m_pTimeoutFDS[0], &ReadFDS))
{
int buffer;
while (read (m_pTimeoutFDS[0], &buffer, sizeof(buffer)) > 0)
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 0d3b58ee49cb..a4d08b8da1d0 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -3759,7 +3759,7 @@ void SelectionManager::shutdown() throw()
sal_Bool SelectionManager::handleEvent(const Any& event)
{
Sequence< sal_Int8 > aSeq;
- if( (event >>= aSeq) )
+ if( event >>= aSeq )
{
XEvent* pEvent = reinterpret_cast<XEvent*>(aSeq.getArray());
Time nTimestamp = CurrentTime;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 46d642f98a64..180958e0321c 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -3966,7 +3966,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
// don't set the focus into the IME status window
// since this will lead to a parent loss of focus, close status,
// reget focus, open status, .... flicker loop
- if ( (vcl::I18NStatus::get().getStatusFrame() != this) )
+ if ( vcl::I18NStatus::get().getStatusFrame() != this )
bSetFocus = true;
}
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index e9430ea1fc8a..c23157d76785 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1245,7 +1245,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
if( bDecoHandling )
{
gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
- if( ( (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION)) ) )
+ if( nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION) )
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, false );
}
}
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index ebe9112b480e..d2dbd5b9298a 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -974,7 +974,7 @@ bool GtkSalGraphics::DoDrawNativeControl(
{
return NWPaintGTKEditBox( pDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
- else if ( ((nType==ControlType::MultilineEditbox) && ((nPart==ControlPart::Entire) || (nPart==ControlPart::HasBackgroundTexture)) ) )
+ else if ( (nType==ControlType::MultilineEditbox) && ((nPart==ControlPart::Entire) || (nPart==ControlPart::HasBackgroundTexture)) )
{
return NWPaintGTKEditBox( pDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
@@ -1201,8 +1201,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
child->style->font_desc,
pango_context_get_language( context ) );
- arrow_size = ( PANGO_PIXELS( pango_font_metrics_get_ascent( metrics ) +
- pango_font_metrics_get_descent( metrics ) ));
+ arrow_size = PANGO_PIXELS( pango_font_metrics_get_ascent( metrics ) +
+ pango_font_metrics_get_descent( metrics ) );
pango_font_metrics_unref( metrics );
@@ -1215,7 +1215,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
returnVal = true;
}
}
- if( (nType == ControlType::Radiobutton || nType == ControlType::Checkbox) )
+ if( nType == ControlType::Radiobutton || nType == ControlType::Checkbox )
{
NWEnsureGTKRadio( m_nXScreen );
NWEnsureGTKCheck( m_nXScreen );
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index bae9cba368bd..626b7ea10e01 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -356,7 +356,7 @@ lcl_extractHelpTextsOrIds(
if (!(rEntry.Value >>= rHelpStrings))
{
OUString aHelpString;
- if ((rEntry.Value >>= aHelpString))
+ if (rEntry.Value >>= aHelpString)
{
rHelpStrings.realloc(1);
*rHelpStrings.getArray() = aHelpString;
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 6f460826e0ee..1a8f45137862 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -2632,8 +2632,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
}
else if( nType == ControlType::MenuPopup)
{
- if (((nPart == ControlPart::MenuItemCheckMark) ||
- (nPart == ControlPart::MenuItemRadioMark) ))
+ if ((nPart == ControlPart::MenuItemCheckMark) ||
+ (nPart == ControlPart::MenuItemRadioMark) )
{
indicator_size = 0;
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 95ab4ad3db69..6b66e122e703 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -110,7 +110,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
double fRed = 255.0-1.5*sqrt((double)(nX*nX+nY*nY));
if( fRed < 0.0 )
fRed = 0.0;
- double fGreen = 255.0-1.5*sqrt((double)(((255-nX)*(255-nX)+nY*nY)));
+ double fGreen = 255.0-1.5*sqrt((double)((255-nX)*(255-nX)+nY*nY));
if( fGreen < 0.0 )
fGreen = 0.0;
double fBlue = 255.0-1.5*sqrt((double)((128-nX)*(128-nX)+(255-nY)*(255-nY)));
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index fa9ff2d16cbc..f54a85b98d29 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -760,7 +760,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS
customTarget = aPair.Second;
}
}
- if(( bFound || bHeaderFooterFound))
+ if( bFound || bHeaderFooterFound)
{
if(bFound)
{
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 70127bed872c..60f8fee23610 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -413,7 +413,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
case XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER:
{
rProperty.maValue >>= nValue;
- if((( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE ))
+ if( ( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE )
{
if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
{
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index ddd913aabcd8..667305fa6902 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -724,8 +724,8 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
const OUString& rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( ( rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
- || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported ) ) )
+ if( rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
+ || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported ) )
{
try
{
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 1cc706787f86..a84cf8caabef 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1271,7 +1271,7 @@ bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
// Some quick tests: Some may rely on the package structure!
sal_Int32 nLen = rURL.getLength();
- if( (nLen > 0 && '/' == rURL[0]) )
+ if( nLen > 0 && '/' == rURL[0] )
// RFC2396 net_path or abs_path
return false;
else if( nLen > 1 && '.' == rURL[0] )
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 6c5506609b61..5e083fe05a43 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -612,12 +612,12 @@ void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, bool bLong, bo
const SdXMLDataStyleNumber* pStyleMember = aSdXMLDataStyleNumbers;
for( sal_uInt8 nIndex = 0; pStyleMember->meNumberStyle != XML_TOKEN_INVALID; nIndex++, pStyleMember++ )
{
- if( (IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
+ if( IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
( ( (pStyleMember->mpText == nullptr) && (rText.isEmpty()) ) ||
- ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) ) )
+ ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) )
{
mnElements[mnIndex++] = nIndex + 1;
return;
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 03bd527f5299..7e1473199aef 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1684,7 +1684,7 @@ void XMLPageExportPropertyMapper::ContextFilter(
}
break;
case CTF_PAGE_TRANSITION_FADECOLOR:
- if( (!(mrExport.getExportFlags() & SvXMLExportFlags::OASIS)) )
+ if( !(mrExport.getExportFlags() & SvXMLExportFlags::OASIS) )
(*property).mnIndex = -1;
else
pTransitionFadeColor = property;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 7c7af84385f1..66b8bf41eab7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -230,8 +230,8 @@ bool ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
bool ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
{
- return ((mnType == rInfo.mnType
- && mpPageMasterInfo == rInfo.mpPageMasterInfo));
+ return mnType == rInfo.mnType
+ && mpPageMasterInfo == rInfo.mpPageMasterInfo;
}
ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf)
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 02e32dca12b6..8a63acc1ca26 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -404,7 +404,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
std::vector< XMLPropertyState > aPropStates;
sal_Int32 nCount = 0;
- if( (!bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape)) )
+ if( !bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape) )
{
aPropStates = GetPropertySetMapper()->Filter( xPropSet );
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 8b366a7fe931..dd1deeb76dfb 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -478,9 +478,8 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP
if ( m_xCurrentPageFormsSupp.is() )
pContext = new OFormImport(*this, *this, _nPrefix, _rLocalName, m_xCurrentPageFormsSupp->getForms() );
}
- else if ( ( _nPrefix == XML_NAMESPACE_XFORMS
- && ( xmloff::token::IsXMLToken( _rLocalName, xmloff::token::XML_MODEL ) ) )
- )
+ else if ( _nPrefix == XML_NAMESPACE_XFORMS
+ && xmloff::token::IsXMLToken( _rLocalName, xmloff::token::XML_MODEL ) )
{
pContext = createXFormsModelContext( m_rImporter, _nPrefix, _rLocalName );
}
diff --git a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
index a232d4a8f709..721aafa2bc1e 100644
--- a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
+++ b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx
@@ -45,7 +45,7 @@ bool XMLPercentOrMeasurePropertyHandler::importXML(
Any& rValue,
const SvXMLUnitConverter& rUnitConverter ) const
{
- if( (rStrImpValue.indexOf( '%' ) != -1))
+ if( rStrImpValue.indexOf( '%' ) != -1 )
return false;
sal_Int32 nValue;
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 034eb3e64294..3e9571195719 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -365,7 +365,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
for( i = 0; i < nCount; ++i, ++pStates )
{
- if( (*pStates == PropertyState_DIRECT_VALUE)/* || (bDefault && (*pStates == PropertyState_DEFAULT_VALUE))*/ )
+ if( *pStates == PropertyState_DIRECT_VALUE )
nValueCount++;
}
@@ -385,7 +385,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
i = 0;
while( i < nValueCount )
{
- if( (*pStates == PropertyState_DIRECT_VALUE)/* || (bDefault && (*pStates == PropertyState_DEFAULT_VALUE))*/ )
+ if( *pStates == PropertyState_DIRECT_VALUE )
{
*pAPINames++ = aItr->GetApiName();
aPropIters.push_back( aItr );
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index f64525f48070..b8727681a3da 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1662,7 +1662,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName)));
if (pStyle)
{
- if ((pStyle->PrivateGetKey() > -1)) // don't reset pStyle's bRemoveAfterUse flag
+ if (pStyle->PrivateGetKey() > -1) // don't reset pStyle's bRemoveAfterUse flag
AddCondition(i);
}
}