[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/source

Thorsten Behrens tbehrens at suse.com
Thu May 9 00:01:03 PDT 2013


 vcl/source/gdi/print2.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit a10bc9322dd234549a4d061f77df038d89fb5c2a
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Tue May 7 18:36:01 2013 +0200

    Fix fdo#40421 Take current clip into account for shape bounds.
    
    Seems with the extensive drawinglayer rework, we now get bitmap
    fills rendered via clip polygon and subsequent bitmap tiles. To
    get the true bound rect of the current metaaction, clip it against
    outdev's clip region bounds (as some reasonably cheap best-effort
    approximation).
    
    Change-Id: I4ecf04e2d94da21acc97362a1a65a965c7176077
    Reviewed-on: https://gerrit.libreoffice.org/3815
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 5f7ccad..3111ba3 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -627,7 +627,14 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
     }
 
     if( !aActionBounds.IsEmpty() )
-        return rOut.LogicToPixel( aActionBounds );
+    {
+        // fdo#40421 limit current action's output to clipped area
+        if( rOut.IsClipRegion() )
+            return rOut.LogicToPixel(
+                rOut.GetClipRegion().GetBoundRect().Intersection( aActionBounds ) );
+        else
+            return rOut.LogicToPixel( aActionBounds );
+    }
     else
         return Rectangle();
 }


More information about the Libreoffice-commits mailing list