summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/inc/oox/vml/vmlshape.hxx1
-rw-r--r--oox/source/vml/vmlshape.cxx4
-rw-r--r--oox/source/vml/vmlshapecontext.cxx1
3 files changed, 6 insertions, 0 deletions
diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx
index 946af368f4cd..c00625c5a6fa 100644
--- a/oox/inc/oox/vml/vmlshape.hxx
+++ b/oox/inc/oox/vml/vmlshape.hxx
@@ -80,6 +80,7 @@ struct ShapeTypeModel
::rtl::OUString maMarginLeft; ///< X position of the shape bounding box to shape anchor (number with unit).
::rtl::OUString maMarginTop; ///< Y position of the shape bounding box to shape anchor (number with unit).
::rtl::OUString maPositionVerticalRelative; ///< The Y position is relative to this.
+ ::rtl::OUString maRotation; ///< Rotation of the shape, in degrees.
sal_Bool mbAutoHeight; ///< If true, the height value is a minimum value (mostly used for textboxes)
StrokeModel maStrokeModel; ///< Border line formatting.
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index ec34f0ec674e..8c27d76b85b2 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -382,6 +382,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
if( xInStrm.is() )
PropertySet( xShape ).setProperty( PROP_LegacyFragment, xInStrm );
}
+
+ if (xShape.is() && !maTypeModel.maRotation.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_RotateAngle, makeAny(maTypeModel.maRotation.toInt32() * 100));
+
return xShape;
}
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 12d2dc441da2..f6f6ac91c9f7 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -348,6 +348,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-top" ) ) ) mrTypeModel.maMarginTop = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-position-vertical-relative" ) ) ) mrTypeModel.maPositionVerticalRelative = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-fit-shape-to-text" ) ) ) mrTypeModel.mbAutoHeight = sal_True;
+ else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "rotation" ) ) ) mrTypeModel.maRotation = aValue;
}
}
}