summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorsj <sj@openoffice.org>2010-07-02 16:52:34 +0200
committersj <sj@openoffice.org>2010-07-02 16:52:34 +0200
commit96c2ec57493d647197befcb540bc59e85b2530a1 (patch)
tree7c51a19faedd8604191bd8b057a116ea7e60f3f1 /oox/source
parent558e6bbbcdd73af926e1156990825e7660a1f852 (diff)
impress193: #162822# fixed font size problem with presentation objects and flipping problem of freeform shapes
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx5
-rw-r--r--oox/source/drawingml/shape.cxx11
-rw-r--r--oox/source/token/properties.txt2
3 files changed, 15 insertions, 3 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 62e42701b273..d296a4041fb9 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -50,6 +50,8 @@ using namespace ::com::sun::star::drawing;
namespace oox { namespace drawingml {
CustomShapeProperties::CustomShapeProperties()
+: mbMirroredX ( sal_False )
+, mbMirroredY ( sal_False )
{
}
CustomShapeProperties::~CustomShapeProperties()
@@ -149,7 +151,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
sal_uInt32 i;
PropertyMap aPropertyMap;
aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" );
-
+ aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
+ aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
awt::Size aSize( xShape->getSize() );
awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 );
if ( maPath2DList.size() )
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() )
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 2b32b0a14d91..3fbcb7e1deb0 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -257,6 +257,8 @@ MaxFieldCount
MaxTextLen
MediaType
MinorTickmarks
+MirroredX
+MirroredY
MissingValueTreatment
Model
MultiLine