Kaydet (Commit) a5b3bf72 authored tarafından Miklos Vajna's avatar Miklos Vajna

n#757890 oox: implement mso-position-horizontal shape property for textframes

üst 6a80adb0
...@@ -80,6 +80,7 @@ struct ShapeTypeModel ...@@ -80,6 +80,7 @@ struct ShapeTypeModel
::rtl::OUString maMarginLeft; ///< X position of the shape bounding box to shape anchor (number with unit). ::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 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 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 maRotation; ///< Rotation of the shape, in degrees.
::rtl::OUString maFlip; ///< Flip type of the shape (can be "x" or "y"). ::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) sal_Bool mbAutoHeight; ///< If true, the height value is a minimum value (mostly used for textboxes)
......
...@@ -219,6 +219,7 @@ HelpText ...@@ -219,6 +219,7 @@ HelpText
HideInactiveSelection HideInactiveSelection
HoriJustify HoriJustify
HoriJustifyMethod HoriJustifyMethod
HoriOrient
HoriOrientPosition HoriOrientPosition
HorizontalSplitMode HorizontalSplitMode
HorizontalSplitPositionTwips HorizontalSplitPositionTwips
......
...@@ -389,6 +389,8 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes ...@@ -389,6 +389,8 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
{ {
PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) ); PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) );
PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); 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) // Import Legacy Fragments (if any)
......
...@@ -348,6 +348,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) ...@@ -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-left" ) ) ) mrTypeModel.maMarginLeft = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-top" ) ) ) mrTypeModel.maMarginTop = 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.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( "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( "rotation" ) ) ) mrTypeModel.maRotation = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flip" ) ) ) mrTypeModel.maFlip = aValue; else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flip" ) ) ) mrTypeModel.maFlip = aValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment