summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-06-21 23:08:11 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-06-22 12:55:20 +0200
commit073dd4c78a396bb41802083fe389ac1085cf270b (patch)
tree5257ad6b8daf82d392cae1d711ffc461cec69c34 /xmloff
parentb036162d609b01e7b27e0eafc09cbd0192d95200 (diff)
Avoid division by zero with paths that are vertical or horizontal lines
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/xexptran.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index a36e8e703f82..4d4a81668b70 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -2199,8 +2199,8 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
-mrViewBox.GetY());
if( bScale )
aTransform.scale(
- rObjectSize.Width / mrViewBox.GetWidth(),
- rObjectSize.Height / mrViewBox.GetHeight());
+ (mrViewBox.GetWidth() ? rObjectSize.Width / mrViewBox.GetWidth() : 0),
+ (mrViewBox.GetHeight() ? rObjectSize.Height / mrViewBox.GetHeight() : 0));
aTransform.translate( rObjectPos.X, rObjectPos.Y );
aPoly.transform(aTransform);