Kaydet (Commit) 70e8e4f7 authored tarafından Andre Fischer's avatar Andre Fischer

121256: Remember Any by value not by pointer before using it in outer scope.

üst 1cf0f678
...@@ -2707,8 +2707,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT ...@@ -2707,8 +2707,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
const rtl::OUString sHandles ( RTL_CONSTASCII_USTRINGPARAM( "Handles" ) ); const rtl::OUString sHandles ( RTL_CONSTASCII_USTRINGPARAM( "Handles" ) );
const rtl::OUString sAdjustmentValues ( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) ); const rtl::OUString sAdjustmentValues ( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) );
const beans::PropertyValue* pAdjustmentValuesProp = NULL; bool bHasAdjustmentValuesProp = false;
const beans::PropertyValue* pPathCoordinatesProp = NULL; uno::Any aAdjustmentValuesProp;
bool bHasPathCoordinatesProp = false;
uno::Any aPathCoordinatesProp;
sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0; sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0;
uno::Sequence< beans::PropertyValues > aHandlesPropSeq; uno::Sequence< beans::PropertyValues > aHandlesPropSeq;
sal_Bool bPredefinedHandlesUsed = sal_True; sal_Bool bPredefinedHandlesUsed = sal_True;
...@@ -3157,7 +3159,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT ...@@ -3157,7 +3159,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
else if ( rrProp.Name.equals( sPathCoordinates ) ) else if ( rrProp.Name.equals( sPathCoordinates ) )
{ {
if ( !bIsDefaultObject ) if ( !bIsDefaultObject )
pPathCoordinatesProp = &rrProp; {
aPathCoordinatesProp = rrProp.Value;
bHasPathCoordinatesProp = true;
}
} }
else if ( rrProp.Name.equals( sPathGluePoints ) ) else if ( rrProp.Name.equals( sPathGluePoints ) )
{ {
...@@ -3785,13 +3790,14 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT ...@@ -3785,13 +3790,14 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
{ {
// it is required, that the information which handle is polar has already be read, // 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 // 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; uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
if ( pAdjustmentValuesProp->Value >>= aAdjustmentSeq ) if ( aAdjustmentValuesProp >>= aAdjustmentSeq )
{ {
if ( bPredefinedHandlesUsed ) if ( bPredefinedHandlesUsed )
LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted ); LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted );
...@@ -3802,10 +3808,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT ...@@ -3802,10 +3808,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( (sal_uInt16)( DFF_Prop_adjustValue + k ), (sal_uInt32)nValue ); 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; com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aCoordinates;
if ( pPathCoordinatesProp->Value >>= aCoordinates ) if ( aPathCoordinatesProp >>= aCoordinates )
{ {
// creating the vertices // creating the vertices
if ( (sal_uInt16)aCoordinates.getLength() ) if ( (sal_uInt16)aCoordinates.getLength() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment