diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-12 16:01:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-09-06 18:44:24 +0200 |
commit | 71de6914b3b34a4e9d97f92a6ec04405256fd296 (patch) | |
tree | 8713d1923f3aa3a29b5b5b15514502f4561c4a00 /oox | |
parent | bb09c7c14bb1caf7b08b39944bda61382b158c64 (diff) |
n#779642: 0 width or height in //v:shape[@style] produces weird results
(cherry picked from commit 3d5fb88cc0aa8ee6be6cec5ce0255f1412368519)
Change-Id: I37ba59dd54ac692f234f3228e442799c5a5f450b
Signed-off-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 9a5278b301a8..d74a52675070 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -190,11 +190,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 ); } // ============================================================================ |