[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - cppcanvas/source

Muthu Subramanian sumuthu at suse.com
Wed Apr 24 23:30:08 PDT 2013


 cppcanvas/source/mtfrenderer/emfplus.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit abd0ed222788077b66d92b84f0918309aa58d865
Author: Muthu Subramanian <sumuthu at suse.com>
Date:   Thu Apr 25 11:57:59 2013 +0530

    n#812793: (Workaround) Transparent background import in EMF+.
    
    EMF+ seems to have alpha of 0xff for transparent background!

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 81f7eb7..1ef38a6 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -890,10 +890,14 @@ namespace cppcanvas
             ActionSharedPtr pPolyAction;
 
             if (isColor) {
-                EMFP_DEBUG (printf ("EMF+\t\tcolor fill\n"));
-
+                EMFP_DEBUG (printf ("EMF+\t\tcolor fill:0x%X\n", brushIndexOrColor));
                 rState.isFillColorSet = true;
                 rState.isLineColorSet = false;
+                // n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF !
+                // Workaround for the problem.
+                if(brushIndexOrColor == 0xFFFFFFFF)
+                    brushIndexOrColor = 0xFFFFFF;
+
                 SET_FILL_COLOR(brushIndexOrColor);
 
                 pPolyAction = ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) );


More information about the Libreoffice-commits mailing list