tdf#89901 corectly interpret COL_TRANSPARENT
in wmfemfhelper when converting Metafile to
sequence of Prmitives. In the MetafileActions
MetaLineColorAction and MetaFillColorAction
usage of COL_TRANSPARENT must switch off line
draw/resp. fill
Change-Id: Id5754773c06b7f4aa8824dce9b8b9e7e526e6067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91061
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index b42124e..80989a2 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -2433,7 +2433,8 @@ namespace wmfemfhelper
{
/** CHECKED, WORKS WELL */
const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pAction);
const bool bActive(pA->IsSetting());
// tdf#89901 do as OutDev does: COL_TRANSPARENT deacvtivates line draw
const bool bActive(pA->IsSetting() && COL_TRANSPARENT != pA->GetColor());
rPropertyHolders.Current().setLineColorActive(bActive);
if(bActive)
@@ -2445,7 +2446,8 @@ namespace wmfemfhelper
{
/** CHECKED, WORKS WELL */
const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pAction);
const bool bActive(pA->IsSetting());
// tdf#89901 do as OutDev does: COL_TRANSPARENT deacvtivates polygon fill
const bool bActive(pA->IsSetting() && COL_TRANSPARENT != pA->GetColor());
rPropertyHolders.Current().setFillColorActive(bActive);
if(bActive)