Blob Blame History Raw
From de56e13f6ddc291f2039cab57e017e9e2dd67016 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 23 Jul 2019 10:38:09 +0100
Subject: [PATCH] rhbz#1728763 bg of blocks is black

Change-Id: I31a331c8ada44b6d1424d122b54cbbe91cc8c221
---
 cppcanvas/source/mtfrenderer/emfplus.cxx    |  4 ++--
 cppcanvas/source/mtfrenderer/textaction.cxx | 11 ++++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 5a9076e82a0f..8b2059a8d187 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1305,7 +1305,7 @@ namespace cppcanvas
                                         ::Color(),
                                         ::Size(),
                                         ::Color(),
-                                        ::Color(),
+                                        ::Color(COL_AUTO),
                                         text,
                                         0,
                                         stringLength,
@@ -1621,7 +1621,7 @@ namespace cppcanvas
                                         ::Color(),
                                         ::Size(),
                                         ::Color(),
-                                        ::Color(),
+                                        ::Color(COL_AUTO),
                                         text,
                                         0,
                                         glyphsCount,
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index ad38d6c8a131..0bb23720b6a5 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -766,6 +766,7 @@ namespace cppcanvas
                                   const ::Color&             rReliefColor,
                                   const ::basegfx::B2DSize&  rShadowOffset,
                                   const ::Color&             rShadowColor,
+                                  const ::Color&             rTextFillColor,
                                   const OUString&     rText,
                                   sal_Int32                  nStartPos,
                                   sal_Int32                  nLen,
@@ -778,6 +779,7 @@ namespace cppcanvas
                                   const ::Color&                    rReliefColor,
                                   const ::basegfx::B2DSize&         rShadowOffset,
                                   const ::Color&                    rShadowColor,
+                                  const ::Color&                    rTextFillColor,
                                   const OUString&            rText,
                                   sal_Int32                         nStartPos,
                                   sal_Int32                         nLen,
@@ -834,6 +836,7 @@ namespace cppcanvas
                                                 const ::Color&             rReliefColor,
                                                 const ::basegfx::B2DSize&  rShadowOffset,
                                                 const ::Color&             rShadowColor,
+                                                const ::Color&             rTextFillColor,
                                                 const OUString&     rText,
                                                 sal_Int32                  nStartPos,
                                                 sal_Int32                  nLen,
@@ -852,6 +855,7 @@ namespace cppcanvas
                 maReliefColor( rReliefColor ),
                 maShadowOffset( rShadowOffset ),
                 maShadowColor( rShadowColor ),
+                maTextFillColor( rTextFillColor ),
                 maTextDirection( rState.textDirection )
             {
                 initEffectLinePolyPolygon( maLinesOverallSize,
@@ -873,6 +877,7 @@ namespace cppcanvas
                                                 const ::Color&                  rReliefColor,
                                                 const ::basegfx::B2DSize&       rShadowOffset,
                                                 const ::Color&                  rShadowColor,
+                                                const ::Color&                  rTextFillColor,
                                                 const OUString&          rText,
                                                 sal_Int32                       nStartPos,
                                                 sal_Int32                       nLen,
@@ -892,6 +897,7 @@ namespace cppcanvas
                 maReliefColor( rReliefColor ),
                 maShadowOffset( rShadowOffset ),
                 maShadowColor( rShadowColor ),
+                maTextFillColor( rTextFillColor ),
                 maTextDirection( rState.textDirection )
             {
                 initEffectLinePolyPolygon( maLinesOverallSize,
@@ -2196,7 +2202,8 @@ namespace cppcanvas
                     !rState.textUnderlineStyle &&
                     !rState.textStrikeoutStyle &&
                     rReliefColor == aEmptyColor &&
-                    rShadowColor == aEmptyColor )
+                    rShadowColor == aEmptyColor &&
+                    rTextFillColor == aEmptyColor )
                 {
                     // nope
                     if( rParms.maTextTransformation.is_initialized() )
@@ -2231,6 +2238,7 @@ namespace cppcanvas
                                                     rReliefColor,
                                                     aShadowOffset,
                                                     rShadowColor,
+                                                    rTextFillColor,
                                                     rText,
                                                     nStartPos,
                                                     nLen,
@@ -2245,6 +2253,7 @@ namespace cppcanvas
                                                     rReliefColor,
                                                     aShadowOffset,
                                                     rShadowColor,
+                                                    rTextFillColor,
                                                     rText,
                                                     nStartPos,
                                                     nLen,
-- 
2.21.0