forked from amazingfate/loongoffice
If a character theme color is shaded, Word writes this as w:themeShade attribute of the w:color element. If the character also has transparency, Word writes an additional w14:textFill element with a w14:lumMod child element. In such cases the w14:textFill element supersedes the w:color element. The initial implementation of Fontwork import in commit cbf30153a5c776e6d1ee26f2f83c8f77503eceb9 does it wrong. It replaces the color itself but not the color transformation, so that the shading was applied twice, once from w:themeShade attribute and the other time from w14:lumMod. The solution here is to reverse the order so that w:color is only evaluated if w14:textFill is not present. Another solution would have been to clear the color transformation vector before adding the values from w14:textFill. I use reverse order here because it more clearly reflects that w14:textFill supersedes w:color. Change-Id: I3e700795167a34238ea619b9c4a691c10da357f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145150 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>