summaryrefslogtreecommitdiff
path: root/emfio/source
diff options
context:
space:
mode:
Diffstat (limited to 'emfio/source')
-rw-r--r--emfio/source/reader/emfreader.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 4ffecf5d8e03..4205d8dee225 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1921,9 +1921,9 @@ namespace emfio
tools::Rectangle EmfReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
- Point aTL ( Point( x1, y1 ) );
- Point aBR( Point( --x2, --y2 ) );
- return tools::Rectangle( aTL, aBR );
+ Point aTL(x1, y1);
+ Point aBR(o3tl::saturating_add<sal_Int32>(x2, -1), o3tl::saturating_add<sal_Int32>(y2, -1));
+ return tools::Rectangle(aTL, aBR);
}
}