diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-02-25 17:52:23 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-02-25 17:59:40 +0100 |
commit | 4f4e4e40f5b79a4dba46ffedd11cafa7beb08a87 (patch) | |
tree | c158b93b176b084eac024c0e3b5e94e18911f50f /sd/source | |
parent | e39c551c6133d0ff2b7074f64ea66563ebcce14b (diff) |
loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/eppt/pptx-epptbase.cxx | 25 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 56 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 6 |
6 files changed, 48 insertions, 46 deletions
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 4ba7d3845179..de815dc7c5fc 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -994,17 +994,20 @@ sal_Bool PPTWriterBase::ContainsOtherShapeThanPlaceholders( sal_Bool bForOOMLX ) sal_Bool bOtherThanPlaceHolders = sal_False; if ( nShapes ) - for ( sal_uInt32 nIndex = 0; ( nIndex < nShapes ) && ( bOtherThanPlaceHolders == sal_False ); nIndex++ ) { - if ( GetShapeByIndex( nIndex ) && mType != "drawing.Page" ) { - if( bForOOMLX && - ( mType == "presentation.Page" || - mType == "presentation.Notes" ) ) { - Reference< XSimpleText > rXText( mXShape, UNO_QUERY ); - - if( rXText.is() && !rXText->getString().isEmpty() ) - bOtherThanPlaceHolders = sal_True; - } else - bOtherThanPlaceHolders = sal_True; + for ( sal_uInt32 nIndex = 0; ( nIndex < nShapes ) && ( bOtherThanPlaceHolders == sal_False ); nIndex++ ) + { + if ( GetShapeByIndex( nIndex ) && mType != "drawing.Page" ) + { + if( bForOOMLX && + ( mType == "presentation.Page" || + mType == "presentation.Notes" ) ) { + Reference< XSimpleText > rXText( mXShape, UNO_QUERY ); + + if( rXText.is() && !rXText->getString().isEmpty() ) + bOtherThanPlaceHolders = sal_True; + } + else + bOtherThanPlaceHolders = sal_True; } DBG(printf("mType == %s\n", mType.getStr())); } diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e7bfb73883a5..fb616f657545 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -492,7 +492,7 @@ const char* PowerPointExport::Get8Direction( sal_uInt8 nDirection ) const char* pDirection = GetSideDirection( nDirection ); if( !pDirection ) - pDirection = GetCornerDirection( nDirection ); + pDirection = GetCornerDirection( nDirection ); return pDirection; } @@ -509,11 +509,11 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS ) sal_uInt8 nDirection = 0; if( GETA( TransitionType ) && ( mAny >>= nTransitionType ) && - GETA( TransitionSubtype ) && ( mAny >>= nTransitionSubtype ) ) - nPPTTransitionType = GetTransition( nTransitionType, nTransitionSubtype, eFadeEffect, nDirection ); + GETA( TransitionSubtype ) && ( mAny >>= nTransitionSubtype ) ) + nPPTTransitionType = GetTransition( nTransitionType, nTransitionSubtype, eFadeEffect, nDirection ); if( !nPPTTransitionType && eFadeEffect != FadeEffect_NONE ) - nPPTTransitionType = GetTransition( eFadeEffect, nDirection ); + nPPTTransitionType = GetTransition( eFadeEffect, nDirection ); if( nPPTTransitionType ) { AnimationSpeed animationSpeed = AnimationSpeed_MEDIUM; @@ -657,7 +657,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS ) void PowerPointExport::WriteAnimationProperty( FSHelperPtr pFS, const Any& rAny ) { if( !rAny.hasValue() ) - return; + return; switch( rAny.getValueType().getTypeClass() ) { case TypeClass_STRING: @@ -674,7 +674,7 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn { const Sequence< double > aKeyTimes = rXAnimate->getKeyTimes(); if( aKeyTimes.getLength() <= 0 ) - return; + return; const Sequence< Any > aValues = rXAnimate->getValues(); const OUString& sFormula = rXAnimate->getFormula(); const OUString& rAttributeName = rXAnimate->getAttributeName(); @@ -693,10 +693,10 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn pFS->startElementNS( XML_p, XML_val, FSEND ); ValuePair aPair; if( aValues[ i ] >>= aPair ) { - WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aPair.First, rAttributeName ) ); - WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aPair.Second, rAttributeName ) ); + WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aPair.First, rAttributeName ) ); + WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aPair.Second, rAttributeName ) ); } else - WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aValues[ i ], rAttributeName ) ); + WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aValues[ i ], rAttributeName ) ); pFS->endElementNS( XML_p, XML_val ); pFS->endElementNS( XML_p, XML_tav ); @@ -709,7 +709,7 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn void PowerPointExport::WriteAnimateTo( FSHelperPtr pFS, Any aValue, const OUString& rAttributeName ) { if( !aValue.hasValue() ) - return; + return; DBG(printf("to attribute name: %s\n", USS( rAttributeName ))); @@ -723,7 +723,7 @@ void PowerPointExport::WriteAnimateTo( FSHelperPtr pFS, Any aValue, const OUStri void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUString& rAttributeName ) { if( rAttributeName.isEmpty() ) - return; + return; pFS->startElementNS( XML_p, XML_attrNameLst, FSEND ); @@ -731,11 +731,11 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr const char* sAttributeName = NULL; if ( rAttributeName == "Visibility" ) { - sAttributeName = "style.visibility"; + sAttributeName = "style.visibility"; } else if ( rAttributeName == "X" ) { - sAttributeName = "ppt_x"; + sAttributeName = "ppt_x"; } else if ( rAttributeName == "Y" ) { - sAttributeName = "ppt_y"; + sAttributeName = "ppt_y"; } pFS->startElementNS( XML_p, XML_attrName, FSEND ); @@ -773,7 +773,7 @@ void PowerPointExport::WriteAnimationNodeAnimate( FSHelperPtr pFS, const Referen { Reference< XAnimate > rXAnimate( rXNode, UNO_QUERY ); if( !rXAnimate.is() ) - return; + return; const char* pCalcMode = NULL; const char* pValueType = NULL; @@ -814,7 +814,7 @@ void PowerPointExport::WriteAnimationNodeAnimateInside( FSHelperPtr pFS, const R { Reference< XAnimate > rXAnimate( rXNode, UNO_QUERY ); if( !rXAnimate.is() ) - return; + return; const char* pAdditive = NULL; @@ -935,7 +935,7 @@ void PowerPointExport::WriteAnimationCondition( FSHelperPtr pFS, Any& rAny, sal_ DBG(printf ("event offset: %f\n", fDelay)); } else if( aEvent.Offset >>= eTiming ) { if( eTiming == Timing_INDEFINITE ) - pDelay = "indefinite"; + pDelay = "indefinite"; DBG(printf ("event offset timing: %d\n", eTiming)); } } @@ -1200,12 +1200,12 @@ void PowerPointExport::WriteAnimationNode( FSHelperPtr pFS, const Reference< XAn } if( pMethod ) { - (this->*(pMethod))( pFS, rXNode, xmlNodeType, bMainSeqChild ); - return; + (this->*(pMethod))( pFS, rXNode, xmlNodeType, bMainSeqChild ); + return; } if( xmlNodeType == -1 ) - return; + return; pFS->startElementNS( XML_p, xmlNodeType, FSEND ); @@ -1451,7 +1451,7 @@ void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNu void PowerPointExport::ImplWriteNotes( sal_uInt32 nPageNum ) { if( !mbCreateNotes || !ContainsOtherShapeThanPlaceholders( sal_True ) ) - return; + return; DBG(printf("write Notes %" SAL_PRIuUINT32 "\n----------------\n", nPageNum)); @@ -1658,11 +1658,11 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste mXShapes = Reference< XShapes >( xSlide, UNO_QUERY ); if( mLayoutInfo[ nOffset ].mnFileIdArray.size() < mnMasterPages ) { - mLayoutInfo[ nOffset ].mnFileIdArray.resize( mnMasterPages ); + mLayoutInfo[ nOffset ].mnFileIdArray.resize( mnMasterPages ); } if( mLayoutInfo[ nOffset ].mnFileIdArray[ nMasterNum ] != 0 ) - return; + return; FSHelperPtr pFS = openFragmentStreamWithSerializer( OUStringBuffer() @@ -1738,7 +1738,7 @@ void PowerPointExport::WriteShapeTree( FSHelperPtr pFS, PageType ePageType, sal_ ShapeExport& PowerPointShapeExport::WritePageShape( Reference< XShape > xShape, PageType ePageType, sal_Bool bPresObj ) { if( ( ePageType == NOTICE && bPresObj ) || ePageType == LAYOUT ) - return WritePlaceholderShape( xShape, SlideImage ); + return WritePlaceholderShape( xShape, SlideImage ); return WriteTextShape( xShape ); } @@ -1810,7 +1810,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape( Reference< XShape > x WritePresetShape( "rect" ); Reference< XPropertySet > xProps( xShape, UNO_QUERY ); if( xProps.is() ) - WriteBlipFill( xProps, "GraphicURL" ); + WriteBlipFill( xProps, "GraphicURL" ); mpFS->endElementNS( XML_p, XML_spPr ); WriteTextBox( xShape, XML_p ); @@ -2112,8 +2112,8 @@ sal_Bool PowerPointExport::WriteNotesMaster() Reference< XPropertySet > aXBackgroundPropSet; if( ImplGetPropertyValue( mXPagePropSet, rtl::OUString( "Background" ) ) && - ( mAny >>= aXBackgroundPropSet ) ) - ImplWriteBackground( pFS, aXBackgroundPropSet ); + ( mAny >>= aXBackgroundPropSet ) ) + ImplWriteBackground( pFS, aXBackgroundPropSet ); WriteShapeTree( pFS, NOTICE, sal_True ); @@ -2145,7 +2145,7 @@ sal_Bool PowerPointExport::WriteNotesMaster() sal_Bool PowerPointExport::ImplCreateMainNotes() { if( mbCreateNotes ) - return WriteNotesMaster(); + return WriteNotesMaster(); return sal_True; } diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 3ab54fb528b0..91e7789e2439 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -116,7 +116,7 @@ SdModule::~SdModule() delete pSearchItem; if( pNumberFormatter ) - delete pNumberFormatter; + delete pNumberFormatter; ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocShell ) diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index fe790dd2d86c..91d06f32ca85 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -116,8 +116,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { nFamily = ( (const SfxUInt16Item &) pArgs->Get( SID_STYLE_FAMILY ) ).GetValue(); } - else - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, + else if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_False, &pItem )) { String sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue(); diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index c7007772ca97..7fbc12ef120d 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -479,7 +479,7 @@ awt::Rectangle SAL_CALL SlideShowView::getCanvasArea( ) throw (RuntimeException awt::Rectangle aRectangle; if( mxWindow.is() ) - return mxWindow->getPosSize(); + return mxWindow->getPosSize(); aRectangle.X = aRectangle.Y = aRectangle.Width = aRectangle.Height = 0; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index a8de717b5ac7..a0ea086e83e2 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -981,9 +981,9 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const String& rs // Get a pointer to the corresponding accessible object and notify // that of the name change. - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); - if ( ! pWindow) - return; + SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + if ( ! pWindow) + return; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible (pWindow->GetAccessible(sal_False)); |