include/vcl/outdev.hxx | 2 +- include/vcl/window.hxx | 2 +- vcl/source/gdi/outdev2.cxx | 5 ++--- vcl/source/window/window.cxx | 10 ++++------ 4 files changed, 8 insertions(+), 11 deletions(-)
New commits: commit 4fe8a4954c4c5cf13074fde419c4fc6f094578bf Author: Jan Holesovsky <[email protected]> Date: Mon Mar 24 17:52:15 2014 +0100 GetPaintArea() was operating directly on the region, no need to return it. Rename it accordingly, so that it is more obvious. Change-Id: Ifb313f1e60b50761247a65b7ce2c6b38773c1304 diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index cbdf725..eb4d0ba 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -736,7 +736,7 @@ public: SAL_DLLPRIVATE void ImplDrawAlpha ( const Bitmap& rBmp, const AlphaMask& rAlpha, const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel ); - virtual Rectangle& GetPaintArea ( Rectangle& rDstRect ); + virtual void ClipToPaintRegion ( Rectangle& rDstRect ); SAL_DLLPRIVATE Bitmap ImplBlend ( Bitmap aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index d41f0f5..5bf0e8d 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -579,7 +579,7 @@ protected: virtual OUString getDefaultAccessibleName() const; virtual void CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags); - virtual Rectangle& GetPaintArea ( Rectangle& rDstRect ); + virtual void ClipToPaintRegion( Rectangle& rDstRect ); public: bool HasMirroredGraphics() const; diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index c5d18c9..29f1702 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 49716ed..abe769a 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 ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
