summaryrefslogtreecommitdiff
path: root/canvas/source/vcl/canvashelper.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-07-04 16:08:13 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-07-04 16:23:32 +0100
commit97ae222bd71716e9b9d4329aa646eddeec9a1c66 (patch)
tree85ec1d31c3337e123ecef7e93d238bd01ebb7ca2 /canvas/source/vcl/canvashelper.cxx
parent43fd9bbafcf4348f2b8083baf551f38b8572519c (diff)
fix fdo#51547: revert "Some cppcheck cleaning"
This reverts commit 2f804c94cdaaa9ac047f229509c774dbea1dbcaa.
Diffstat (limited to 'canvas/source/vcl/canvashelper.cxx')
-rw-r--r--canvas/source/vcl/canvashelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 7dc47519682c..fde6ebe2d271 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -483,6 +483,7 @@ namespace vclcanvas
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
const int nTransparency( setupOutDevState( viewState, renderState, FILL_COLOR ) );
+ const int nTransPercent( (nTransparency * 100 + 128) / 255 ); // normal rounding, no truncation here
::basegfx::B2DPolyPolygon aB2DPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
@@ -496,8 +497,7 @@ namespace vclcanvas
}
else
{
- const sal_uInt16 nTransPercent( (nTransparency * 100 + 128) / 255 ); // normal rounding, no truncation here
- mpOutDev->getOutDev().DrawTransparent( aPolyPoly, nTransPercent );
+ mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
if( mp2ndOutDev )