mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Fix handling of colors in hex format
This commit is contained in:
parent
e15b7304bc
commit
1c2486e058
@ -150,12 +150,11 @@ Breakers
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(., 'rgb(')">
|
||||
<xsl:call-template name="rbga-to-hex">
|
||||
<xsl:with-param name="rgba-val" select="."/>
|
||||
<xsl:with-param name="rgba-val" select="substring-after(.,':')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- This is not quite right -->
|
||||
<xsl:variable name="hex" select="." />
|
||||
<xsl:value-of select="substring-after(.,'#')" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
@ -163,9 +162,16 @@ Breakers
|
||||
</xsl:if>
|
||||
<xsl:if test="starts-with(.,'background-color:')">
|
||||
<xsl:variable name="hex">
|
||||
<xsl:call-template name="rbga-to-hex">
|
||||
<xsl:with-param name="rgba-val" select="."/>
|
||||
</xsl:call-template>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(., 'rgb(')">
|
||||
<xsl:call-template name="rbga-to-hex">
|
||||
<xsl:with-param name="rgba-val" select="substring-after(.,':')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring-after(.,'#')" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<w:shd w:fill="{$hex}"/>
|
||||
</xsl:if>
|
||||
|
@ -167,9 +167,16 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(.,'color:')">
|
||||
<xsl:variable name="hex">
|
||||
<xsl:call-template name="rbga-to-hex">
|
||||
<xsl:with-param name="rgba-val" select="substring-after(.,':')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(., 'rgb(')">
|
||||
<xsl:call-template name="rbga-to-hex">
|
||||
<xsl:with-param name="rgba-val" select="substring-after(.,':')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring-after(.,'#')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<style:text-properties fo:color="#{$hex}"/>
|
||||
</xsl:when>
|
||||
|
Loading…
Reference in New Issue
Block a user