diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:26:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:21 +0200 |
commit | 77fd72237c6d326e1a9c6ae1fa438459ca276519 (patch) | |
tree | b3698cddc6ec5113b24a94e5bcec1bca7749017c /filter/source | |
parent | 537921fd65a4e736269eb52986469c05268aae07 (diff) |
loplugin:simplifybool
Change-Id: Idf2ae6b0b2c3d111125ad91ea7d13eec67325f36
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 8 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 2 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index fdf5806daf01..c7444bfceb1e 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -967,14 +967,14 @@ void EscherPropertyContainer::CreateLineProperties( bSwapLineEnds = true; } } - if ( GetLineArrow( bSwapLineEnds ? false : true, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) + if ( GetLineArrow( !bSwapLineEnds, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) { AddOpt( ESCHER_Prop_lineStartArrowLength, nArrowLength ); AddOpt( ESCHER_Prop_lineStartArrowWidth, nArrowWidth ); AddOpt( ESCHER_Prop_lineStartArrowhead, eLineEnd ); nLineFlags |= 0x100010; } - if ( GetLineArrow( bSwapLineEnds ? true : false, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) + if ( GetLineArrow( bSwapLineEnds, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) { AddOpt( ESCHER_Prop_lineEndArrowLength, nArrowLength ); AddOpt( ESCHER_Prop_lineEndArrowWidth, nArrowWidth ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 3f99bf1fb4e5..0dce7915648e 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1508,7 +1508,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const rSet.Put( makeSdrTextUpperDistItem( nTextTop ) ); rSet.Put( makeSdrTextLowerDistItem( nTextBottom ) ); - rSet.Put( makeSdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? true : false ) ); + rSet.Put( makeSdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ) ); rSet.Put( makeSdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) ); } @@ -5396,8 +5396,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, pImpRec->nCropFromRight = GetPropertyValue( DFF_Prop_cropFromRight, 0 ); - pImpRec->bVFlip = (rObjData.nSpFlags & SP_FFLIPV) ? true : false; - pImpRec->bHFlip = (rObjData.nSpFlags & SP_FFLIPH) ? true : false; + pImpRec->bVFlip = (rObjData.nSpFlags & SP_FFLIPV) != 0; + pImpRec->bHFlip = (rObjData.nSpFlags & SP_FFLIPH) != 0; sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash ); pImpRec->eLineStyle = (nLineFlags & 8) @@ -5992,7 +5992,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, // Can the shape be replaced with a frame? // (provided that it is a TextBox and the text is not rotated) - bool bCanBeReplaced = (ULONG_MAX > nPosGroup) ? false : true; + bool bCanBeReplaced = nPosGroup >= ULONG_MAX; // we don't know yet whether it's a TextBox MSO_SPT eShapeType = mso_sptNil; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 823a583d54ba..1f08100d97d1 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3671,7 +3671,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx break; } } - return ( nHardCount ) ? true : false; + return nHardCount != 0; } void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/) diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 00fd14ddee70..64bd9778e43d 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -885,7 +885,7 @@ void ImpPDFTabOpnFtrPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) else if( mpRbPgLyContinueFacing->IsChecked() ) paParent->mnPageLayout = 3; - paParent->mbFirstPageLeft = ( mbUseCTLFont ) ? mpCbPgLyFirstOnLeft->IsChecked() : false; + paParent->mbFirstPageLeft = mbUseCTLFont && mpCbPgLyFirstOnLeft->IsChecked(); } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 049b6fc0bbe8..d156efc7aa54 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -341,8 +341,8 @@ SVGExport::SVGExport( const char* pSVGDisableFontEmbedding = getenv( "SVG_DISABLE_FONT_EMBEDDING" ); OUString aEmbedFontEnv("${SVG_DISABLE_FONT_EMBEDDING}"); rtl::Bootstrap::expandMacros(aEmbedFontEnv); - mbIsEmbedFonts=pSVGDisableFontEmbedding ? false : ( - aEmbedFontEnv.getLength() ? false : true); + mbIsEmbedFonts = pSVGDisableFontEmbedding == nullptr + && aEmbedFontEnv.isEmpty(); } else { @@ -351,7 +351,7 @@ SVGExport::SVGExport( } // Native Decoration - mbIsUseNativeTextDecoration = mbIsUseTinyProfile ? false : aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_NATIVEDECORATION, false); + mbIsUseNativeTextDecoration = !mbIsUseTinyProfile && aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_NATIVEDECORATION, false); // Tiny Opacity (supported from SVG Tiny 1.2) mbIsUseOpacity = aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_OPACITY, true); |