[Libreoffice-commits] .: Branch 'libreoffice-3-5' - canvas/source

Tor Lillqvist tml at kemper.freedesktop.org
Sun Mar 18 23:28:32 PDT 2012


 canvas/source/vcl/canvashelper.cxx |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 0ad246127fe8f9d788793ceb8dc327e25ef4a699
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Wed Mar 7 00:31:56 2012 +0100

    Return proper transparency value even for ignore_color.
    
    Rather unexpectedly, calling setupOutDevState() with IGNORE_COLOR
    does not return a proper transparency, but null. Fixed now.
    
    (cherry picked from commit 4b475f31eb9b290b477bb6992ff28e52248cee5d)
    
    Signed-off-by: Tor Lillqvist <tlillqvist at suse.com>

diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index c5c5943..5d4c40a 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -1269,21 +1269,21 @@ namespace vclcanvas
                 p2ndOutDev->SetClipRegion( aClipRegion );
         }
 
-        if( eColorType != IGNORE_COLOR )
-        {
-            Color aColor( COL_WHITE );
+        Color aColor( COL_WHITE );
 
-            if( renderState.DeviceColor.getLength() > 2 )
-            {
-                aColor = ::vcl::unotools::stdColorSpaceSequenceToColor(
-                    renderState.DeviceColor );
-            }
+        if( renderState.DeviceColor.getLength() > 2 )
+        {
+            aColor = ::vcl::unotools::stdColorSpaceSequenceToColor(
+                renderState.DeviceColor );
+        }
 
-            // extract alpha, and make color opaque
-            // afterwards. Otherwise, OutputDevice won't draw anything
-            nTransparency = aColor.GetTransparency();
-            aColor.SetTransparency(0);
+        // extract alpha, and make color opaque
+        // afterwards. Otherwise, OutputDevice won't draw anything
+        nTransparency = aColor.GetTransparency();
+        aColor.SetTransparency(0);
 
+        if( eColorType != IGNORE_COLOR )
+        {
             switch( eColorType )
             {
                 case LINE_COLOR:


More information about the Libreoffice-commits mailing list