summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r--oox/source/drawingml/shape.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 50ded9b2753b..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 );
@@ -374,8 +375,8 @@ Reference< XShape > Shape::createAndInsert(
if ( mbHidden )
{
- const OUString sHidden( CREATE_OUSTRING( "NumberingLevel" ) );
- xSet->setPropertyValue( sHidden, Any( mbHidden ) );
+ const OUString sHidden( CREATE_OUSTRING( "Visible" ) );
+ xSet->setPropertyValue( sHidden, Any( !mbHidden ) );
}
Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY );
@@ -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() )