diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-04-23 11:48:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-04-23 17:04:43 +0200 |
commit | a5b3bf724e355ceb476991f4ecaa56fd019e3067 (patch) | |
tree | ce884c469f75a992423edf2ff3447fd0d08698a9 /oox | |
parent | 6a80adb094d87cddc103d84d5616e1ecae899889 (diff) |
n#757890 oox: implement mso-position-horizontal shape property for textframes
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/vml/vmlshape.hxx | 1 | ||||
-rw-r--r-- | oox/source/token/properties.txt | 1 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 2 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 82c0f3e75936..d969577ca212 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 maPositionHorizontal; ///< The X position orientation (default: absolute). ::rtl::OUString maRotation; ///< Rotation of the shape, in degrees. ::rtl::OUString maFlip; ///< Flip type of the shape (can be "x" or "y"). sal_Bool mbAutoHeight; ///< If true, the height value is a minimum value (mostly used for textboxes) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index a86df729e81c..c476fde6c0ae 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -219,6 +219,7 @@ HelpText HideInactiveSelection HoriJustify HoriJustifyMethod +HoriOrient HoriOrientPosition HorizontalSplitMode HorizontalSplitPositionTwips diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 2b61e91aa783..4000932ca127 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -389,6 +389,8 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes { PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) ); PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); + if (maTypeModel.maPositionHorizontal == "center") + PropertySet(xShape).setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::CENTER)); } // Import Legacy Fragments (if any) diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 57a85e90f161..ddae966b59b8 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-left" ) ) ) mrTypeModel.maMarginLeft = aValue; 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 == "mso-position-horizontal" ) mrTypeModel.maPositionHorizontal = 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; else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flip" ) ) ) mrTypeModel.maFlip = aValue; |