diff options
-rw-r--r-- | oox/source/drawingml/shape.cxx | 22 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 11 |
2 files changed, 16 insertions, 17 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 2b81eac2db75..d7168233e865 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -509,18 +509,6 @@ Reference< XShape > Shape::createAndInsert( aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr ); aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr ); - // Moved here because the properties like Flip needs to be applied before - // applying the rotation property - if( bIsCustomShape ) - { - if ( mbFlipH ) - mpCustomShapePropertiesPtr->setMirroredX( sal_True ); - if ( mbFlipV ) - mpCustomShapePropertiesPtr->setMirroredY( sal_True ); - OSL_TRACE("==cscode== shape name: '%s'", rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); - mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape ); - } - // applying autogrowheight property before setting shape size, because // the shape size might be changed if currently autogrowheight is true // we must also check that the PropertySet supports the property. @@ -534,6 +522,16 @@ Reference< XShape > Shape::createAndInsert( if( aServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")) ) PropertySet( xSet ).setProperties( aShapeProps ); + if( bIsCustomShape ) + { + if ( mbFlipH ) + mpCustomShapePropertiesPtr->setMirroredX( sal_True ); + if ( mbFlipV ) + mpCustomShapePropertiesPtr->setMirroredY( sal_True ); + OSL_TRACE("==cscode== shape name: '%s'", rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); + mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape ); + } + // in some cases, we don't have any text body. if( getTextBody() ) { diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index de53ed680217..a92a962e591e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -315,11 +315,6 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende } pRenderedShape->Shear( pSdrObjCustomShape->GetSnapRect().Center(), nShearWink, nTan, sal_False); } - if( nRotateAngle ) - { - double a = nRotateAngle * F_PI18000; - pRenderedShape->NbcRotate( pSdrObjCustomShape->GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); - } if ( bFlipV ) { Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 ); @@ -332,6 +327,12 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende Point aBottom( aTop.X(), aTop.Y() + 1000 ); pRenderedShape->NbcMirror( aTop, aBottom ); } + // Note that the rotation needs be done after flipping + if( nRotateAngle ) + { + double a = nRotateAngle * F_PI18000; + pRenderedShape->NbcRotate( pSdrObjCustomShape->GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); + } pRenderedShape->NbcSetStyleSheet( pSdrObjCustomShape->GetStyleSheet(), sal_True ); pRenderedShape->RecalcSnapRect(); } |