Kaydet (Commit) 3751ab69 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

n#751573: docx, no mso-fit-shape-to-text means the textbox size is fixed

üst 9e890ae0
...@@ -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.
sal_Bool mbAutoHeight; /// If true, the height value is a minimum value (mostly used for textboxes)
StrokeModel maStrokeModel; /// Border line formatting. StrokeModel maStrokeModel; /// Border line formatting.
FillModel maFillModel; /// Shape fill formatting. FillModel maFillModel; /// Shape fill formatting.
......
...@@ -180,6 +180,7 @@ FooterIsDynamicHeight ...@@ -180,6 +180,7 @@ FooterIsDynamicHeight
FooterIsOn FooterIsOn
FooterIsShared FooterIsShared
FormulaConvention FormulaConvention
FrameIsAutomaticHeight
Function Function
GapwidthSequence GapwidthSequence
Geometry3D Geometry3D
...@@ -418,6 +419,7 @@ Size ...@@ -418,6 +419,7 @@ Size
Size100thMM Size100thMM
SizePixel SizePixel
SizeProtect SizeProtect
SizeType
SkipDuplicates SkipDuplicates
SortInfo SortInfo
Sound Sound
......
...@@ -113,7 +113,8 @@ Rectangle lclGetAbsRect( const Rectangle& rRelRect, const Rectangle& rShapeRect, ...@@ -113,7 +113,8 @@ Rectangle lclGetAbsRect( const Rectangle& rRelRect, const Rectangle& rShapeRect,
// ============================================================================ // ============================================================================
ShapeTypeModel::ShapeTypeModel() ShapeTypeModel::ShapeTypeModel():
mbAutoHeight( sal_False )
{ {
} }
...@@ -368,6 +369,12 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes ...@@ -368,6 +369,12 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, rShapeRect ); Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, rShapeRect );
convertShapeProperties( xShape ); convertShapeProperties( xShape );
if ( maService.equalsAscii( "com.sun.star.text.TextFrame" ) )
{
PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) );
PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) );
}
// Import Legacy Fragments (if any) // Import Legacy Fragments (if any)
if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() ) if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() )
{ {
......
...@@ -347,6 +347,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) ...@@ -347,6 +347,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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-fit-shape-to-text" ) ) ) mrTypeModel.mbAutoHeight = sal_True;
} }
} }
} }
......
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