Kaydet (Commit) 09cf7189 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS impress140 (1.68.40); FILE MERGED

2008/04/03 15:10:39 cl 1.68.40.1: #i87804# reverted faulty optimization for custom shapes setPropertyValue
üst e59d4f7d
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: unoshap2.cxx,v $ * $RCSfile: unoshap2.cxx,v $
* *
* $Revision: 1.68 $ * $Revision: 1.69 $
* *
* last change: $Author: rt $ $Date: 2008-03-12 10:11:58 $ * last change: $Author: kz $ $Date: 2008-04-04 12:51:38 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -2120,25 +2120,34 @@ void SAL_CALL SvxCustomShape::setSize( const awt::Size& rSize ) ...@@ -2120,25 +2120,34 @@ void SAL_CALL SvxCustomShape::setSize( const awt::Size& rSize )
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) //----------------------------------------------------------------------
void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException)
{ {
switch( pProperty->nWID ) OGuard aGuard( Application::GetSolarMutex() );
{ SdrObject* pObject = mpObj.get();
case SDRATTR_CUSTOMSHAPE_GEOMETRY:
{ sal_Bool bCustomShapeGeometry = pObject && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShapeGeometry" ) );
SdrObjCustomShape* pObject = static_cast< SdrObjCustomShape* >( mpObj.get() );
sal_Bool bMirroredX = sal_False;
sal_Bool bMirroredY = sal_False;
sal_Bool bMirroredX = pObject->IsMirroredX(); if ( bCustomShapeGeometry )
sal_Bool bMirroredY = pObject->IsMirroredY(); {
bMirroredX = ( ((SdrObjCustomShape*)pObject)->IsMirroredX() );
bMirroredY = ( ((SdrObjCustomShape*)pObject)->IsMirroredY() );
}
SvxShapeText::setPropertyValueImpl( pProperty, rValue ); SvxShape::setPropertyValue( aPropertyName, aValue );
pObject->MergeDefaultAttributes(0); if ( bCustomShapeGeometry )
{
((SdrObjCustomShape*)pObject)->MergeDefaultAttributes(0);
Rectangle aRect( pObject->GetSnapRect() ); Rectangle aRect( pObject->GetSnapRect() );
// #i38892# // #i38892#
bool bNeedsMirrorX = pObject->IsMirroredX() != bMirroredX; bool bNeedsMirrorX = ((SdrObjCustomShape*)pObject)->IsMirroredX() != bMirroredX;
bool bNeedsMirrorY = pObject->IsMirroredY() != bMirroredY; bool bNeedsMirrorY = ((SdrObjCustomShape*)pObject)->IsMirroredY() != bMirroredY;
boost::scoped_ptr< SdrGluePointList > pListCopy; boost::scoped_ptr< SdrGluePointList > pListCopy;
if( bNeedsMirrorX || bNeedsMirrorY ) if( bNeedsMirrorX || bNeedsMirrorY )
...@@ -2155,7 +2164,7 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, ...@@ -2155,7 +2164,7 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
pObject->NbcMirror( aTop, aBottom ); pObject->NbcMirror( aTop, aBottom );
// NbcMirroring is flipping the current mirror state, // NbcMirroring is flipping the current mirror state,
// so we have to set the correct state again // so we have to set the correct state again
pObject->SetMirroredX( bMirroredX ? sal_False : sal_True ); ((SdrObjCustomShape*)pObject)->SetMirroredX( bMirroredX ? sal_False : sal_True );
} }
if ( bNeedsMirrorY ) if ( bNeedsMirrorY )
{ {
...@@ -2164,7 +2173,7 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, ...@@ -2164,7 +2173,7 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
pObject->NbcMirror( aLeft, aRight ); pObject->NbcMirror( aLeft, aRight );
// NbcMirroring is flipping the current mirror state, // NbcMirroring is flipping the current mirror state,
// so we have to set the correct state again // so we have to set the correct state again
pObject->SetMirroredY( bMirroredY ? sal_False : sal_True ); ((SdrObjCustomShape*)pObject)->SetMirroredY( bMirroredY ? sal_False : sal_True );
} }
if( pListCopy ) if( pListCopy )
...@@ -2173,10 +2182,6 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, ...@@ -2173,10 +2182,6 @@ bool SvxCustomShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
if(pNewList) if(pNewList)
*pNewList = *pListCopy; *pNewList = *pListCopy;
} }
return true;
}
default:
return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
} }
} }
......
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