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-06-21 13:07:22 +0200
commit7279610bbd403fbbb12a894d334a6ec4ba259600 (patch)
tree9f26102cc0ee282da406ac7911b4fb491eff13f8 /oox
parent6af68b494dafcc6822463a0445692929735eb0af (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 f2c28e985655..b6e67c8b2663 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 );
}