From 63a68064bb33f180b8a231f7524d99405d910226 Mon Sep 17 00:00:00 2001
From: Noel <noel.grandin@collabora.co.uk>
Date: Fri, 15 Jan 2021 14:49:12 +0200
Subject: make the Color constructors explicitly specify transparency

to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.

i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)

Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 emfio/source/reader/mtftools.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'emfio')

diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index e1e80ec8bb04..b05beeb2a9dc 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -875,7 +875,7 @@ namespace emfio
         mnTextAlign(TA_LEFT | TA_TOP | TA_NOUPDATECP),
         maLatestTextColor(),
         maTextColor(),
-        maLatestBkColor(0x12345678),
+        maLatestBkColor(ColorTransparency, 0x12345678),
         maBkColor(COL_WHITE),
         mnLatestTextLayoutMode(ComplexTextLayoutFlags::Default),
         mnTextLayoutMode(ComplexTextLayoutFlags::Default),
-- 
cgit