diff options
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index fcc0da5a5a20..8d84edd33418 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -463,7 +463,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if ( maTypeModel.maWidthRelative.isEmpty() || maTypeModel.maWidthRelative == "page" ) { sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10; - PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) ); + // Only apply if nWidth != 0 + if ( nWidth ) + PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) ); } } if ( !maTypeModel.maHeightPercent.isEmpty( ) ) @@ -472,7 +474,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if ( maTypeModel.maHeightRelative.isEmpty() || maTypeModel.maHeightRelative == "page" ) { sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10; - PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) ); + // Only apply if nHeight != 0 + if ( nHeight ) + PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) ); } } } |