oox/inc/oox/vml/vmlshape.hxx | 1 + oox/source/token/properties.txt | 2 ++ oox/source/vml/vmlshape.cxx | 9 ++++++++- oox/source/vml/vmlshapecontext.cxx | 1 + 4 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit f1afee4b1f40d45b6b4a11e7b1bfe5253627e80f Author: Cédric Bosdonnat <cedric.bosdonnat....@free.fr> Date: Fri Mar 23 15:28:29 2012 +0100 n#751573: docx, no mso-fit-shape-to-text means the textbox size is fixed (cherry picked from commit 3751ab6910d06ca01d1980fce40792560afc9ebb) Conflicts: oox/inc/oox/vml/vmlshape.hxx oox/source/vml/vmlshapecontext.cxx Signed-off-by: Miklos Vajna <vmik...@suse.cz> diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 65683f7..1926a08 100644 --- a/oox/inc/oox/vml/vmlshape.hxx +++ b/oox/inc/oox/vml/vmlshape.hxx @@ -78,6 +78,7 @@ struct ShapeTypeModel ::rtl::OUString maHeight; /// Height of the shape bounding box (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). + sal_Bool mbAutoHeight; /// If true, the height value is a minimum value (mostly used for textboxes) StrokeModel maStrokeModel; /// Border line formatting. FillModel maFillModel; /// Shape fill formatting. diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 9127c38..b754f1d 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -179,6 +179,7 @@ FooterIsDynamicHeight FooterIsOn FooterIsShared FormulaConvention +FrameIsAutomaticHeight Function GapwidthSequence Geometry3D @@ -416,6 +417,7 @@ Size Size100thMM SizePixel SizeProtect +SizeType SkipDuplicates SortInfo Sound diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index b9bd653..4f1b40f 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -170,7 +170,8 @@ void lclSetXShapeRect( const Reference< XShape >& rxShape, const Rectangle& rSha // ============================================================================ -ShapeTypeModel::ShapeTypeModel() +ShapeTypeModel::ShapeTypeModel(): + mbAutoHeight( sal_False ) { } @@ -425,6 +426,12 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, rShapeRect ); 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) if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() ) { diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 6980ce3..cb64424 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -346,6 +346,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "height" ) ) ) mrTypeModel.maHeight = 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( "mso-fit-shape-to-text" ) ) ) mrTypeModel.mbAutoHeight = sal_True; } } }
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits