From 1c2d7eba4af280630285e4c3822f7c8e2fb6d2f4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 28 Mar 2012 12:02:39 +0200 Subject: n#751117 oox: make sure position is not lost during VML import of rotation --- oox/source/vml/vmlshape.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'oox') diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 37e64313d7ba..9258c5a3a7a7 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -400,7 +400,13 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes } if (xShape.is() && !maTypeModel.maRotation.isEmpty()) - PropertySet(xShape).setAnyProperty(PROP_RotateAngle, makeAny(maTypeModel.maRotation.toInt32() * 100)); + { + PropertySet aPropertySet(xShape); + aPropertySet.setAnyProperty(PROP_RotateAngle, makeAny(maTypeModel.maRotation.toInt32() * 100)); + // If rotation is used, simple setPosition() is not enough. + aPropertySet.setAnyProperty(PROP_HoriOrientPosition, makeAny( aShapeRect.X ) ); + aPropertySet.setAnyProperty(PROP_VertOrientPosition, makeAny( aShapeRect.Y ) ); + } return xShape; } -- cgit