diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-03-23 15:28:29 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-03-23 15:28:50 +0100 |
commit | 3751ab6910d06ca01d1980fce40792560afc9ebb (patch) | |
tree | 028d4cdb249363ab10682aeda89d1da869bce61b /oox/source | |
parent | 9e890ae00e508addaf453d9c12a7a8cae4cca149 (diff) |
n#751573: docx, no mso-fit-shape-to-text means the textbox size is fixed
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/token/properties.txt | 2 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 9 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 560f87920cbc..97555c87203b 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -180,6 +180,7 @@ FooterIsDynamicHeight FooterIsOn FooterIsShared FormulaConvention +FrameIsAutomaticHeight Function GapwidthSequence Geometry3D @@ -418,6 +419,7 @@ Size Size100thMM SizePixel SizeProtect +SizeType SkipDuplicates SortInfo Sound diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index bdecb8b4ed69..ec34f0ec674e 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -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 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 91703fc527e9..12d2dc441da2 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -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-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; } } } |