diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-03-27 11:32:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-03-28 10:27:46 +0200 |
commit | 8b8fad38b2de3f037f628fea1f0f00fcb280be0d (patch) | |
tree | a8359a0cecd10549ef8606807a0b4713bba10305 /oox | |
parent | n#751117 writerfilter: include all oox tokens in gperffasttoken.hxx (diff) | |
download | core-8b8fad38b2de3f037f628fea1f0f00fcb280be0d.tar.gz core-8b8fad38b2de3f037f628fea1f0f00fcb280be0d.zip |
n#751117 oox: implement VML import of shape style 'rotation'
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/vml/vmlshape.hxx | 1 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 4 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 1 |
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; } } } |