summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-06-21 12:02:57 +0200
committerRadek Doulik <rodo@novell.com>2012-10-15 15:27:09 +0200
commitd61388426060bada1532cf079496cfe02ad2687a (patch)
treed10a1cb3f00eb1cbc6f5f6cfcfcae002273884bc /oox
parentc1160636c5af766287aa2ada67ad2727fee30c4b (diff)
make sure we don't export shapes with negative size (fixes n#760997)
Change-Id: Id77cbfaa287d15c4af9a91976f3b091e68229223
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index bc0e9879332f..b4dcc1cfcd14 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -635,6 +635,11 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
awt::Point aPos = rXShape->getPosition();
awt::Size aSize = rXShape->getSize();
+ if ( aSize.Width < 0 )
+ aSize.Width = 1000;
+ if ( aSize.Height < 0 )
+ aSize.Height = 1000;
+
WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, nRotation );
}