summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/vml/vmlshape.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 32ab75672679..bf4218632d4e 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -192,11 +192,18 @@ awt::Rectangle ShapeType::getAbsRectangle() const
awt::Rectangle ShapeType::getRelRectangle() const
{
+ sal_Int32 nWidth = maTypeModel.maWidth.toInt32();
+ if ( nWidth == 0 )
+ nWidth = 1;
+
+ sal_Int32 nHeight = maTypeModel.maHeight.toInt32();
+ if ( nHeight == 0 )
+ nHeight = 1;
+
return awt::Rectangle(
maTypeModel.maLeft.toInt32(),
maTypeModel.maTop.toInt32(),
- maTypeModel.maWidth.toInt32(),
- maTypeModel.maHeight.toInt32() );
+ nWidth, nHeight );
}
// ============================================================================