[Libreoffice-commits] core.git: basic/source canvas/source chart2/source compilerplugins/clang connectivity/source cppuhelper/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source framework/source i18npool/source include/svl include/xmloff io/source lotuswordpro/source mysqlc/source oox/source package/source reportdesign/source rsc/source sal/rtl sal/textenc sax/qa sax/source scripting/source sc/source sd/source sfx2/source slideshow/source solenv/CompilerTest_compilerplugins_clang.mk sot/source starmath/source stoc/source svtools/source svx/source sw/source tools/source ucb/source unoxml/source vbahelper/source vcl/source vcl/unx vcl/workben writerfilter/source xmloff/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jul 5 09:09:22 UTC 2017
basic/source/classes/sbunoobj.cxx | 12 -
basic/source/runtime/methods.cxx | 2
basic/source/runtime/runtime.cxx | 2
basic/source/sbx/sbxvalue.cxx | 2
canvas/source/tools/parametricpolypolygon.cxx | 2
chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx | 4
chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 14 -
chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx | 4
chart2/source/view/charttypes/GL3DBarChart.cxx | 2
compilerplugins/clang/test/unnecessaryparen.cxx | 20 ++
compilerplugins/clang/unnecessaryparen.cxx | 84 ++++++++++
connectivity/source/commontools/dbconversion.cxx | 6
connectivity/source/commontools/dbtools.cxx | 6
connectivity/source/drivers/evoab2/NStatement.cxx | 8
connectivity/source/drivers/file/FStatement.cxx | 2
connectivity/source/drivers/file/fanalyzer.cxx | 2
connectivity/source/drivers/file/fcomp.cxx | 2
connectivity/source/drivers/hsqldb/HStorageMap.cxx | 2
connectivity/source/drivers/mork/MResultSet.cxx | 4
connectivity/source/drivers/mork/MStatement.cxx | 2
connectivity/source/parse/sqlnode.cxx | 2
cppuhelper/source/propertysetmixin.cxx | 4
cui/source/customize/cfgutil.cxx | 4
dbaccess/source/core/api/RowSetCache.cxx | 4
dbaccess/source/core/api/View.cxx | 2
dbaccess/source/core/api/column.cxx | 9 -
dbaccess/source/ui/browser/brwctrlr.cxx | 2
dbaccess/source/ui/browser/unodatbr.cxx | 4
dbaccess/source/ui/control/RelationControl.cxx | 2
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2
dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 2
dbaccess/source/ui/querydesign/querycontroller.cxx | 2
desktop/source/app/dispatchwatcher.cxx | 2
desktop/source/migration/services/wordbookmigration.cxx | 2
desktop/source/splash/splash.cxx | 4
editeng/source/editeng/impedit.cxx | 5
editeng/source/editeng/impedit2.cxx | 2
editeng/source/editeng/impedit3.cxx | 2
editeng/source/editeng/impedit4.cxx | 6
editeng/source/items/frmitems.cxx | 2
editeng/source/items/numitem.cxx | 2
editeng/source/rtf/svxrtf.cxx | 10 -
extensions/source/bibliography/framectr.cxx | 2
extensions/source/propctrlr/usercontrol.cxx | 2
filter/source/graphicfilter/icgm/actimpr.cxx | 2
filter/source/msfilter/msdffimp.cxx | 7
filter/source/msfilter/svdfppt.cxx | 2
filter/source/svg/svgexport.cxx | 4
filter/source/svg/svgwriter.cxx | 8
framework/source/recording/dispatchrecorder.cxx | 2
framework/source/uielement/menubarmanager.cxx | 4
i18npool/source/breakiterator/breakiteratorImpl.cxx | 2
i18npool/source/localedata/LocaleNode.cxx | 4
include/svl/flagitem.hxx | 2
include/xmloff/nmspmap.hxx | 6
io/source/stm/odata.cxx | 4
lotuswordpro/source/filter/lwpgrfobj.cxx | 6
lotuswordpro/source/filter/lwpstory.cxx | 8
mysqlc/source/mysqlc_resultset.cxx | 2
oox/source/export/chartexport.cxx | 4
package/source/xstor/owriteablestream.cxx | 4
package/source/zippackage/ZipPackage.cxx | 8
package/source/zippackage/ZipPackageFolder.cxx | 2
package/source/zippackage/ZipPackageStream.cxx | 2
package/source/zippackage/zipfileaccess.cxx | 4
reportdesign/source/ui/report/DesignView.cxx | 6
reportdesign/source/ui/report/ScrollHelper.cxx | 4
rsc/source/tools/rsctools.cxx | 2
sal/rtl/alloc_arena.cxx | 2
sal/rtl/strtmpl.cxx | 16 -
sal/textenc/textcvt.cxx | 2
sax/qa/cppunit/xmlimport.cxx | 2
sax/source/expatwrap/xml2utf.cxx | 2
sax/source/tools/converter.cxx | 2
sc/source/filter/excel/xicontent.cxx | 2
sc/source/filter/excel/xiescher.cxx | 2
sc/source/filter/oox/pagesettings.cxx | 2
sc/source/filter/oox/stylesbuffer.cxx | 8
sc/source/filter/rtf/rtfparse.cxx | 7
sc/source/filter/starcalc/scflt.cxx | 2
sc/source/filter/xml/xmlcelli.cxx | 2
sc/source/filter/xml/xmlexprt.cxx | 2
sc/source/ui/Accessibility/AccessibleDocument.cxx | 4
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 2
sc/source/ui/drawfunc/drawsh2.cxx | 2
sc/source/ui/vba/vbaaxes.cxx | 2
sc/source/ui/vba/vbacondition.cxx | 4
sc/source/ui/vba/vbarange.cxx | 4
scripting/source/stringresource/stringresource.cxx | 2
sd/source/filter/eppt/epptso.cxx | 25 +-
sd/source/filter/eppt/pptx-text.cxx | 2
sd/source/filter/xml/sdtransform.cxx | 4
sd/source/ui/animations/CustomAnimationPane.cxx | 2
sd/source/ui/func/fuscale.cxx | 3
sd/source/ui/func/fusel.cxx | 2
sd/source/ui/unoidl/unomodel.cxx | 4
sd/source/ui/view/drviewsa.cxx | 3
sd/source/ui/view/drviewse.cxx | 2
sd/source/ui/view/drviewsj.cxx | 2
sfx2/source/appl/appopen.cxx | 2
sfx2/source/dialog/dockwin.cxx | 2
sfx2/source/doc/guisaveas.cxx | 2
sfx2/source/doc/iframe.cxx | 2
sfx2/source/doc/objstor.cxx | 6
sfx2/source/view/viewfrm2.cxx | 2
slideshow/source/engine/opengl/TransitionerImpl.cxx | 4
slideshow/source/engine/slide/slideimpl.cxx | 2
slideshow/source/engine/slide/targetpropertiescreator.cxx | 2
slideshow/source/engine/tools.cxx | 24 +-
solenv/CompilerTest_compilerplugins_clang.mk | 1
sot/source/sdstor/stgstrms.cxx | 2
starmath/source/mathmlimport.cxx | 4
starmath/source/mathtype.cxx | 7
starmath/source/smmod.cxx | 2
stoc/source/inspect/introspection.cxx | 24 +-
svtools/source/brwbox/brwbox1.cxx | 2
svtools/source/brwbox/datwin.cxx | 2
svtools/source/contnr/imivctl1.cxx | 10 -
svtools/source/contnr/ivctrl.cxx | 6
svtools/source/control/ruler.cxx | 4
svtools/source/graphic/descriptor.cxx | 4
svx/source/customshapes/EnhancedCustomShape2d.cxx | 8
svx/source/dialog/dlgctrl.cxx | 4
svx/source/fmcomp/dbaexchange.cxx | 2
svx/source/form/formcontroller.cxx | 5
svx/source/sidebar/nbdtmg.cxx | 6
svx/source/svdraw/svdmrkv.cxx | 2
svx/source/svdraw/svdoashp.cxx | 4
svx/source/svdraw/svdotextdecomposition.cxx | 2
svx/source/table/tablecontroller.cxx | 12 -
svx/source/table/tablelayouter.cxx | 2
svx/source/table/viewcontactoftableobj.cxx | 4
svx/source/tbxctrls/colrctrl.cxx | 6
svx/source/unodraw/UnoNamespaceMap.cxx | 2
svx/source/unodraw/unoshape.cxx | 7
sw/source/core/access/accmap.cxx | 4
sw/source/core/attr/calbck.cxx | 2
sw/source/core/crsr/callnk.cxx | 2
sw/source/core/doc/DocumentContentOperationsManager.cxx | 6
sw/source/core/doc/docedt.cxx | 4
sw/source/core/doc/doclay.cxx | 2
sw/source/core/frmedt/feshview.cxx | 2
sw/source/core/layout/calcmove.cxx | 2
sw/source/core/layout/flycnt.cxx | 2
sw/source/core/layout/tabfrm.cxx | 2
sw/source/core/layout/trvlfrm.cxx | 4
sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx | 8
sw/source/core/text/itrpaint.cxx | 2
sw/source/core/txtnode/atrfld.cxx | 10 -
sw/source/core/txtnode/thints.cxx | 2
sw/source/filter/html/htmltab.cxx | 9 -
sw/source/filter/html/swhtml.cxx | 4
sw/source/filter/ww8/wrtww8gr.cxx | 4
sw/source/filter/ww8/ww8par.cxx | 6
sw/source/filter/ww8/ww8par6.cxx | 4
sw/source/filter/ww8/ww8scan.cxx | 2
sw/source/filter/xml/xmlimp.cxx | 4
sw/source/filter/xml/xmltbli.cxx | 9 -
sw/source/ui/table/tabledlg.cxx | 2
sw/source/ui/vba/vbacolumns.cxx | 2
sw/source/ui/vba/vbalistgalleries.cxx | 2
sw/source/ui/vba/vbarows.cxx | 2
sw/source/uibase/app/apphdl.cxx | 6
sw/source/uibase/uiview/viewprt.cxx | 2
sw/source/uibase/uno/unotxdoc.cxx | 2
sw/source/uibase/uno/unotxvw.cxx | 4
sw/source/uibase/utlui/content.cxx | 2
sw/source/uibase/utlui/navipi.cxx | 2
tools/source/generic/poly.cxx | 6
ucb/source/ucp/package/pkguri.cxx | 2
ucb/source/ucp/tdoc/tdoc_content.cxx | 2
unoxml/source/rdf/CLiteral.cxx | 4
unoxml/source/rdf/CURI.cxx | 2
vbahelper/source/vbahelper/vbahelper.cxx | 2
vcl/source/control/button.cxx | 2
vcl/source/edit/texteng.cxx | 2
vcl/source/filter/graphicfilter.cxx | 4
vcl/source/filter/ipdf/pdfread.cxx | 2
vcl/source/filter/sgvtext.cxx | 2
vcl/source/filter/wmf/winwmf.cxx | 4
vcl/source/font/PhysicalFontCollection.cxx | 2
vcl/source/font/PhysicalFontFamily.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/window/layout.cxx | 4
vcl/source/window/legacyaccessibility.cxx | 6
vcl/source/window/menu.cxx | 5
vcl/source/window/printdlg.cxx | 4
vcl/source/window/toolbox.cxx | 4
vcl/source/window/window.cxx | 2
vcl/unx/generic/app/saldata.cxx | 2
vcl/unx/generic/dtrans/X11_selection.cxx | 2
vcl/unx/generic/window/salframe.cxx | 2
vcl/unx/gtk/gtksalframe.cxx | 2
vcl/unx/gtk/salnativewidgets-gtk.cxx | 8
vcl/unx/gtk/salprn-gtk.cxx | 2
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 4
vcl/workben/svptest.cxx | 2
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 2
xmloff/source/chart/PropertyMaps.cxx | 2
xmloff/source/chart/SchXMLAxisContext.cxx | 4
xmloff/source/core/xmlimp.cxx | 2
xmloff/source/draw/XMLNumberStyles.cxx | 4
xmloff/source/draw/sdpropls.cxx | 2
xmloff/source/draw/sdxmlexp.cxx | 4
xmloff/source/draw/shapeexport.cxx | 2
xmloff/source/forms/layerimport.cxx | 5
xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx | 2
xmloff/source/style/xmlexppr.cxx | 4
xmloff/source/style/xmlnumfi.cxx | 2
209 files changed, 504 insertions(+), 407 deletions(-)
New commits:
commit 4b2262ab5b10f334f1984fec84d2978db81c58f1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Jul 5 08:32:57 2017 +0200
new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec
Reviewed-on: https://gerrit.libreoffice.org/39549
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list