[Libreoffice-commits] core.git: cppcanvas/source
Muthu Subramanian
sumuthu at suse.com
Fri Apr 26 01:33:19 PDT 2013
cppcanvas/source/mtfrenderer/emfplus.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 5a1d77327867ae9b80bc676d67f1f70a5d8a2fd4
Author: Muthu Subramanian <sumuthu at suse.com>
Date: Fri Apr 26 14:02:47 2013 +0530
fdo#60638: Workaround should be in FillRects rather than FillPolygon.
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index bcc24f2..2a3d9de 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -890,10 +890,6 @@ namespace cppcanvas
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);
@@ -1415,6 +1411,7 @@ namespace cppcanvas
sal_uInt32 brushIndexOrColor;
sal_Int32 rectangles;
+ bool isColor = (flags & 0x8000);
::basegfx::B2DPolygon polygon;
rMF >> brushIndexOrColor >> rectangles;
@@ -1450,7 +1447,12 @@ namespace cppcanvas
::basegfx::B2DPolyPolygon polyPolygon (polygon);
- EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
+ // n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF !
+ // Workaround for the problem.
+ if( isColor && brushIndexOrColor == 0xFFFFFFFF && rectangles == 1 )
+ brushIndexOrColor = 0xFFFFFF;
+
+ EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, isColor, brushIndexOrColor);
}
break;
}
More information about the Libreoffice-commits
mailing list