From 4fe8a4954c4c5cf13074fde419c4fc6f094578bf Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Mon, 24 Mar 2014 17:52:15 +0100 Subject: GetPaintArea() was operating directly on the region, no need to return it. Rename it accordingly, so that it is more obvious. Change-Id: Ifb313f1e60b50761247a65b7ce2c6b38773c1304 --- vcl/source/gdi/outdev2.cxx | 5 ++--- vcl/source/window/window.cxx | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'vcl') diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index c5d18c9feb62..29f170231d7e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1990,9 +1990,8 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp, return res; } -Rectangle& OutputDevice::GetPaintArea( Rectangle& rDstRect ) +void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/) { - return rDstRect; } void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, @@ -2006,7 +2005,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, const bool bHMirr = aOutSz.Width() < 0; const bool bVMirr = aOutSz.Height() < 0; - aDstRect = GetPaintArea(aDstRect); + ClipToPaintRegion(aDstRect); if( bHMirr ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 49716ed8fa37..abe769a3af65 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -446,14 +446,12 @@ void Window::CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags ) OutputDevice::CopyAreaFinal(aPosAry, nFlags); } -Rectangle& Window::GetPaintArea( Rectangle& rDstRect ) +void Window::ClipToPaintRegion(Rectangle& rDstRect) { - const Region aPaintRgn( GetPaintRegion() ); + const Region aPaintRgn(GetPaintRegion()); - if( !aPaintRgn.IsNull() ) - rDstRect.Intersection( LogicToPixel( aPaintRgn.GetBoundRect() ) ); - - return rDstRect; + if (!aPaintRgn.IsNull()) + rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect())); } void Window::ImplReleaseGraphics( bool bRelease ) -- cgit