mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +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:choose>
|
||||||
<xsl:when test="contains(., 'rgb(')">
|
<xsl:when test="contains(., 'rgb(')">
|
||||||
<xsl:call-template name="rbga-to-hex">
|
<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:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<!-- This is not quite right -->
|
<xsl:value-of select="substring-after(.,'#')" />
|
||||||
<xsl:variable name="hex" select="." />
|
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
@ -163,9 +162,16 @@ Breakers
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="starts-with(.,'background-color:')">
|
<xsl:if test="starts-with(.,'background-color:')">
|
||||||
<xsl:variable name="hex">
|
<xsl:variable name="hex">
|
||||||
<xsl:call-template name="rbga-to-hex">
|
<xsl:choose>
|
||||||
<xsl:with-param name="rgba-val" select="."/>
|
<xsl:when test="contains(., 'rgb(')">
|
||||||
</xsl:call-template>
|
<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>
|
</xsl:variable>
|
||||||
<w:shd w:fill="{$hex}"/>
|
<w:shd w:fill="{$hex}"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -167,9 +167,16 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="starts-with(.,'color:')">
|
<xsl:when test="starts-with(.,'color:')">
|
||||||
<xsl:variable name="hex">
|
<xsl:variable name="hex">
|
||||||
<xsl:call-template name="rbga-to-hex">
|
<xsl:choose>
|
||||||
<xsl:with-param name="rgba-val" select="substring-after(.,':')"/>
|
<xsl:when test="contains(., 'rgb(')">
|
||||||
</xsl:call-template>
|
<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>
|
</xsl:variable>
|
||||||
<style:text-properties fo:color="#{$hex}"/>
|
<style:text-properties fo:color="#{$hex}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
Loading…
Reference in New Issue
Block a user