diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 14:12:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 19:16:52 +0100 |
commit | 72ef2b5d9802c424dbb0810e0a72fae50d92b678 (patch) | |
tree | c043fd16189d55fcc549589cecf145bb522089e6 /filter | |
parent | b140f92531396c1087b997852d7ece18429b79d1 (diff) |
Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for
pFormat = (pGrfObj)
? ...
(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).
Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/cgm.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 8 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index a155d8d5dd65..694998345361 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1971,7 +1971,7 @@ void PSWriter::ImplWriteString( const OString& rString, VirtualDevice const & rV { if ( i > 0 ) nx = pDXArry[ i - 1 ]; - ImplWriteDouble( ( bStretch ) ? nx : rVDev.GetTextWidth( OUString(rString[i]) ) ); + ImplWriteDouble( bStretch ? nx : rVDev.GetTextWidth( OUString(rString[i]) ) ); ImplWriteDouble( nx ); ImplWriteLine( "(", PS_NONE ); ImplWriteCharacter( rString[i] ); diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index e20d60d3bd69..31c583900e1f 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -221,7 +221,7 @@ double CGM::ImplGetFloat( RealPrecision eRealPrecision, sal_uInt32 nRealSize ) else // ->RP_FIXED { long nVal; - const int nSwitch = ( bCompatible ) ? 0 : 1 ; + const int nSwitch = bCompatible ? 0 : 1 ; if ( nRealSize == 4 ) { sal_uInt16* pShort = static_cast<sal_uInt16*>(pPtr); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index b06a325ded6b..128d1556b4c6 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1891,7 +1891,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( { css::uno::Any aAny; bRetValue = EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, - ( bBezier ) ? OUString("PolyPolygonBezier") : OUString("PolyPolygon"), true ); + bBezier ? OUString("PolyPolygonBezier") : OUString("PolyPolygon"), true ); if ( bRetValue ) { aPolyPolygon = GetPolyPolygon( aAny ); @@ -4003,7 +4003,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, sal_uInt32 nResize ) { - sal_uInt32 nPictureOffset = ( bWritePictureOffset ) ? mnPictureOffset : 0; + sal_uInt32 nPictureOffset = bWritePictureOffset ? mnPictureOffset : 0; rSt.WriteUInt32( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) .WriteUInt32( 36 + nResize ) @@ -4452,9 +4452,9 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) sal_uInt32 nRule = 0; css::uno::Any aAny; - css::awt::Point aRefPoint( ( bFirst ) ? maPointA : maPointB ); + css::awt::Point aRefPoint( bFirst ? maPointA : maPointB ); css::uno::Reference< css::drawing::XShape > - aXShape( ( bFirst ) ? mXConnectToA : mXConnectToB ); + aXShape( bFirst ? mXConnectToA : mXConnectToB ); OUString aString(aXShape->getShapeType()); OStringBuffer aBuf(OUStringToOString(aString, RTL_TEXTENCODING_UTF8)); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 78a8e1b9500a..f1b8c65759d6 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2276,7 +2276,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* } } sal_Int32 nParaIndex = pTextObj->GetCurrentIndex(); - SfxStyleSheet* pS = ( ppStyleSheetAry ) ? ppStyleSheetAry[ pPara->mxParaSet->mnDepth ] : pSheet; + SfxStyleSheet* pS = ppStyleSheetAry ? ppStyleSheetAry[ pPara->mxParaSet->mnDepth ] : pSheet; ESelection aSelection( nParaIndex, 0, nParaIndex, 0 ); rOutliner.Insert( OUString(), nParaIndex, pPara->mxParaSet->mnDepth ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 95b229723474..824f21be6ccd 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -695,7 +695,7 @@ sal_Int32 SVGTextWriter::setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nC if( bEmpty ) { nCurAction = nActionIndex; - return ( (bEOL) ? -2 : ( (bEOP) ? -1 : 0 ) ); + return ( bEOL ? -2 : ( bEOP ? -1 : 0 ) ); } else { |