summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximpshap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/ximpshap.cxx')
-rw-r--r--xmloff/source/draw/ximpshap.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 5b6523a6ea5a..616dec4d1ba2 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1091,8 +1091,8 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
}
// set sizes for transformation
- maSize.Width = aBottomRight.X - aTopLeft.X;
- maSize.Height = aBottomRight.Y - aTopLeft.Y;
+ maSize.Width = o3tl::saturating_add(aBottomRight.X, -aTopLeft.X);
+ maSize.Height = o3tl::saturating_add(aBottomRight.Y, -aTopLeft.Y);
maPosition.X = aTopLeft.X;
maPosition.Y = aTopLeft.Y;
@@ -1100,7 +1100,6 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
SetTransformation();
SdXMLShapeContext::StartElement(xAttrList);
-
}