summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/textcharacterproperties.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/textcharacterproperties.cxx')
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index 7ffeaeba8da2..1ed3e7499f0c 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -136,7 +136,13 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
if (aColor.hasTransparency())
{
- rPropMap.setProperty(PROP_CharTransparence, aColor.getTransparency());
+ const auto nTransparency = aColor.getTransparency();
+ rPropMap.setProperty(PROP_CharTransparence, nTransparency);
+
+ // WORKAROUND: Fully transparent white has the same value as COL_AUTO, avoid collision
+ if (nTransparency == 100
+ && aColor.getColor(rFilter.getGraphicHelper()).GetRGBColor() == COL_AUTO.GetRGBColor())
+ rPropMap.setProperty(PROP_CharColor, ::Color(ColorTransparency, 0xFFFFFFFE));
}
}
@@ -195,6 +201,12 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
rPropMap.setProperty( PROP_CharUnderlineHasColor, true);
rPropMap.setProperty( PROP_CharUnderlineColor, maUnderlineColor.getColor( rFilter.getGraphicHelper() ));
}
+ else
+ {
+ rPropMap.setProperty( PROP_CharUnderlineHasColor, false);
+ rPropMap.setProperty( PROP_CharUnderlineColor, sal_Int32(-1));
+ }
+
// TODO If bUnderlineFillFollowText uFillTx (CT_TextUnderlineFillFollowText) is set, fill color of the underline should be the same color as the text
if (maHighlightColor.isUsed() && maHighlightColor.getTransparency() != 100)