summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-20 20:00:55 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-12 18:44:20 +0200
commitc7610f13df9a5f944a2fceb94a7079d3f42fe381 (patch)
tree4bb6289e9b7cd13926e9bafb8b59749fe56a906d
parentdbe3b6afaddeb137632b8f6dda01c68835bb2c72 (diff)
fix off-by-one when reading WMF/EMF
According to docs http://msdn.microsoft.com/en-us/library/dd162589(v=vs.85), cxDest/cyDest are "Logical width/height of the destination rectangle.", so there should be no +1 as there would be if they were the top-bottom corner. Change-Id: Iefa6db8e6131abe785b7878d97df1c891b73011c
-rw-r--r--svtools/source/filter/wmf/enhwmf.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index b81d973aa9c7..cce3dca83007 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -950,7 +950,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
cxSrc = cySrc = 0;
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
+ Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative
cyDest = abs( (int)cyDest ); // and also 122889
@@ -1019,7 +1019,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
>> cyDest;
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
+ Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative
cyDest = abs( (int)cyDest ); // and also 122889