diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-10-02 14:32:19 +0200 |
---|---|---|
committer | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-10-07 15:57:43 +0200 |
commit | 67c578f4cb0a51076388c8b02a01a3b5a6e7f245 (patch) | |
tree | 35f9223b9607e3232146bc3797a3df043ae28658 | |
parent | 5d92f55416a4f7b77841615b83514ea192b612d8 (diff) |
cppcheck scope reduction of var in filter/..escherex.cxx
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 6ad0a26b15b0..47bac1c22873 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -451,16 +451,15 @@ void EscherPropertyContainer::CreateFillProperties( ::com::sun::star::uno::Any aAny; AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone ); AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle ); - - sal_uInt32 nFillBackColor = 0; - const rtl::OUString aPropName( String( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" ) ) ); + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, aPropName, sal_False ) ) { ::com::sun::star::drawing::FillStyle eFS; if ( ! ( aAny >>= eFS ) ) eFS = ::com::sun::star::drawing::FillStyle_SOLID; + sal_uInt32 nFillBackColor = 0; switch( eFS ) { case ::com::sun::star::drawing::FillStyle_GRADIENT : @@ -1261,7 +1260,6 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( sal_Bool bMirrored = sal_False; sal_Bool bRotate = sal_True; - sal_uInt16 nAngle = 0; GraphicAttr* pGraphicAttr = NULL; GraphicObject aGraphicObject; String aGraphicUrl; @@ -1273,6 +1271,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, rSource ) ) { + sal_uInt16 nAngle = 0; if ( rSource == String( RTL_CONSTASCII_USTRINGPARAM( "MetaFile" ) ) ) { ::com::sun::star::uno::Sequence<sal_uInt8> aSeq = *(::com::sun::star::uno::Sequence<sal_uInt8>*)aAny.getValue(); @@ -2194,10 +2193,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT } else if ( rProp.Name.equals( sTextRotateAngle ) ) { - double f = 0, fTextRotateAngle; + double f = 0; if ( rProp.Value >>= f ) { - fTextRotateAngle = fmod( f, 360.0 ); + double fTextRotateAngle = fmod( f, 360.0 ); if ( fTextRotateAngle < 0 ) fTextRotateAngle = 360 + fTextRotateAngle; if ( ( fTextRotateAngle < 271.0 ) && ( fTextRotateAngle > 269.0 ) ) @@ -2960,9 +2959,9 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT aFontName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Arial Black" )); AddOpt( DFF_Prop_gtextFont, aFontName ); - sal_Int16 nCharScaleWidth = 100; if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "CharScaleWidth" ) ), sal_True ) ) { + sal_Int16 nCharScaleWidth = 100; if ( aAny >>= nCharScaleWidth ) { if ( nCharScaleWidth != 100 ) |