diff options
author | sj <sj@openoffice.org> | 2010-07-02 16:52:34 +0200 |
---|---|---|
committer | sj <sj@openoffice.org> | 2010-07-02 16:52:34 +0200 |
commit | 96c2ec57493d647197befcb540bc59e85b2530a1 (patch) | |
tree | 7c51a19faedd8604191bd8b057a116ea7e60f3f1 /oox/source/drawingml/shape.cxx | |
parent | 558e6bbbcdd73af926e1156990825e7660a1f852 (diff) |
impress193: #162822# fixed font size problem with presentation objects and flipping problem of freeform shapes
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 97c3b4a5374a..f0ae2ec2a7a3 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -260,6 +260,7 @@ Reference< XShape > Shape::createAndInsert( OUString aServiceName = rServiceName; if( mxCreateCallback.get() ) aServiceName = mxCreateCallback->onCreateXShape( aServiceName, awt::Rectangle( aPosition.X / 360, aPosition.Y / 360, aSize.Width / 360, aSize.Height / 360 ) ); + sal_Bool bIsCustomShape = aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ); basegfx::B2DHomMatrix aTransformation; if( aSize.Width != 1 || aSize.Height != 1) @@ -279,7 +280,7 @@ Reference< XShape > Shape::createAndInsert( // center object at origin aTransformation.translate( -aCenter.getX(), -aCenter.getY() ); - if( mbFlipH || mbFlipV) + if( !bIsCustomShape && ( mbFlipH || mbFlipV ) ) { // mirror around object's center aTransformation.scale( mbFlipH ? -1.0 : 1.0, mbFlipV ? -1.0 : 1.0 ); @@ -469,8 +470,14 @@ Reference< XShape > Shape::createAndInsert( if( aServiceName != OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) ) aPropSet.setProperties( aShapeProperties ); - if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) ) + if( bIsCustomShape ) + { + if ( mbFlipH ) + mpCustomShapePropertiesPtr->setMirroredX( sal_True ); + if ( mbFlipV ) + mpCustomShapePropertiesPtr->setMirroredY( sal_True ); mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape ); + } // in some cases, we don't have any text body. if( getTextBody() ) |