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-06-22 16:50:17 +0200
commit00285a7de24019f9c9eaf9a165a4bed21938eb21 (patch)
tree0bf98e8f60bf46005c2d6d2244a1edb491386d63
parentbf5d91d495efc24c50fbb6783f0b59e66a783e23 (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 2043afa36a21..7d04d3d40979 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
@@ -1016,7 +1016,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