summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-12 16:01:00 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-12 18:41:02 +0200
commit3ad1d411f658b0c2bc8e318aebb999ab75675327 (patch)
treeacfbc1b9a9b36a9c04a1f9c75d408ba35e41df0c /oox
parent0677918be20211176bec249f867d87fa11e5a42d (diff)
n#779642: 0 width or height in //v:shape[@style] produces weird results
(cherry picked from commit b7144acb2bfa369fb89146d060dbd8ddd547f4c1) Conflicts: oox/source/vml/vmlshape.cxx Change-Id: I37ba59dd54ac692f234f3228e442799c5a5f450b
Diffstat (limited to 'oox')
-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 1c3cbac18a08..414cc030f554 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 );
}
// ============================================================================