[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/source
Cédric Bosdonnat
cedric.bosdonnat at free.fr
Wed Jun 12 09:44:35 PDT 2013
oox/source/vml/vmlshape.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 3ad1d411f658b0c2bc8e318aebb999ab75675327
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jun 12 16:01:00 2013 +0200
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
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 1c3cbac..414cc03 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 );
}
// ============================================================================
More information about the Libreoffice-commits
mailing list