vcl/source/gdi/outdev4.cxx |    8 +-------
 vcl/source/gdi/outdev6.cxx |   16 ++--------------
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit 04e08fa4aa419b8d89d80a39e6904bc4cd8883be
Author: Chris Sherlock <chris.sherloc...@gmail.com>
Date:   Tue Apr 1 23:40:05 2014 +1100

    fdo#74702 Refactor code to use ClipToPaintRegion()
    
    There is a fair amount of code that should use ClipToPaintRegion().
    Not only does this remove meOutDevType and decouples classes, but
    we are using code, so code reuse FTW.
    
    Change-Id: I05a2623b73f4a523230dc01d02db33a6df9911ab
    Reviewed-on: https://gerrit.libreoffice.org/8810
    Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com>
    Tested-by: Chris Sherlock <chris.sherloc...@gmail.com>

diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 4d23620..0810e6b 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -852,13 +852,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& 
rPolyPoly,
 
             aDstRect.Intersection( aBoundRect );
 
-            if( OUTDEV_WINDOW == meOutDevType )
-            {
-                const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
-                if( !aPaintRgn.IsNull() )
-                    aDstRect.Intersection( LogicToPixel( aPaintRgn 
).GetBoundRect() );
-            }
+            ClipToPaintRegion( aDstRect );
 
             if( !aDstRect.IsEmpty() )
             {
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 0234df3..d96e59f 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -346,13 +346,7 @@ void OutputDevice::EmulateDrawTransparent ( const 
PolyPolygon& rPolyPoly,
 
     aDstRect.Intersection( aPolyRect );
 
-    if( OUTDEV_WINDOW == meOutDevType )
-    {
-        const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
-        if( !aPaintRgn.IsNull() )
-            aDstRect.Intersection( LogicToPixel( aPaintRgn ).GetBoundRect() );
-    }
+    ClipToPaintRegion( aDstRect );
 
     if( !aDstRect.IsEmpty() )
     {
@@ -632,13 +626,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& 
rMtf, const Point& rPos,
         mpMetaFile = NULL;
         aDstRect.Intersection( aOutRect );
 
-        if( OUTDEV_WINDOW == meOutDevType )
-        {
-            const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
-            if( !aPaintRgn.IsNull() )
-                aDstRect.Intersection( LogicToPixel( aPaintRgn.GetBoundRect() 
) );
-        }
+        ClipToPaintRegion( aDstRect );
 
         if( !aDstRect.IsEmpty() )
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to