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 | |
parent | removed duplicate includes in sw (diff) | |
download | core-3751ab6910d06ca01d1980fce40792560afc9ebb.tar.gz core-3751ab6910d06ca01d1980fce40792560afc9ebb.zip |
n#751573: docx, no mso-fit-shape-to-text means the textbox size is fixed
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/vml/vmlshape.hxx | 1 | ||||
-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 |
4 files changed, 12 insertions, 1 deletions
diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 37e9c0934849..8c6833728733 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. + 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 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; } } } |