Author: af Date: Fri Jun 21 09:52:54 2013 New Revision: 1495357 URL: http://svn.apache.org/r1495357 Log: 121256: Remember Any by value not by pointer before using it in outer scope.
Modified: openoffice/trunk/main/filter/source/msfilter/escherex.cxx Modified: openoffice/trunk/main/filter/source/msfilter/escherex.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/filter/source/msfilter/escherex.cxx?rev=1495357&r1=1495356&r2=1495357&view=diff ============================================================================== --- openoffice/trunk/main/filter/source/msfilter/escherex.cxx (original) +++ openoffice/trunk/main/filter/source/msfilter/escherex.cxx Fri Jun 21 09:52:54 2013 @@ -2707,8 +2707,10 @@ void EscherPropertyContainer::CreateCust const rtl::OUString sHandles ( RTL_CONSTASCII_USTRINGPARAM( "Handles" ) ); const rtl::OUString sAdjustmentValues ( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) ); - const beans::PropertyValue* pAdjustmentValuesProp = NULL; - const beans::PropertyValue* pPathCoordinatesProp = NULL; + bool bHasAdjustmentValuesProp = false; + uno::Any aAdjustmentValuesProp; + bool bHasPathCoordinatesProp = false; + uno::Any aPathCoordinatesProp; sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0; uno::Sequence< beans::PropertyValues > aHandlesPropSeq; sal_Bool bPredefinedHandlesUsed = sal_True; @@ -3157,7 +3159,10 @@ void EscherPropertyContainer::CreateCust else if ( rrProp.Name.equals( sPathCoordinates ) ) { if ( !bIsDefaultObject ) - pPathCoordinatesProp = &rrProp; + { + aPathCoordinatesProp = rrProp.Value; + bHasPathCoordinatesProp = true; + } } else if ( rrProp.Name.equals( sPathGluePoints ) ) { @@ -3785,13 +3790,14 @@ void EscherPropertyContainer::CreateCust { // it is required, that the information which handle is polar has already be read, // so we are able to change the polar value to a fixed float - pAdjustmentValuesProp = &rProp; + aAdjustmentValuesProp = rProp.Value; + bHasAdjustmentValuesProp = true; } } - if ( pAdjustmentValuesProp ) + if ( bHasAdjustmentValuesProp ) { uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq; - if ( pAdjustmentValuesProp->Value >>= aAdjustmentSeq ) + if ( aAdjustmentValuesProp >>= aAdjustmentSeq ) { if ( bPredefinedHandlesUsed ) LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted ); @@ -3802,10 +3808,10 @@ void EscherPropertyContainer::CreateCust AddOpt( (sal_uInt16)( DFF_Prop_adjustValue + k ), (sal_uInt32)nValue ); } } - if( pPathCoordinatesProp ) + if( bHasPathCoordinatesProp ) { com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aCoordinates; - if ( pPathCoordinatesProp->Value >>= aCoordinates ) + if ( aPathCoordinatesProp >>= aCoordinates ) { // creating the vertices if ( (sal_uInt16)aCoordinates.getLength() )