[Libreoffice-commits] .: oox/source svx/source
Muthu Subramanian
sumuthu at kemper.freedesktop.org
Thu Dec 8 02:49:53 PST 2011
oox/source/drawingml/shape.cxx | 22 ++++++++----------
svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 11 ++++-----
2 files changed, 16 insertions(+), 17 deletions(-)
New commits:
commit 704ee5bc859499f5fe824f66f9607b554c135c66
Author: Muthu Subramanian <sumuthu at suse.com>
Date: Thu Dec 8 16:47:56 2011 +0530
n#719989: Rotation needs to be done post flipping.
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2b81eac..d716823 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 de53ed6..a92a962 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();
}
More information about the Libreoffice-commits
mailing list