help3xsl/online_transform.xsl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit f3124329e336603ba6684e913a61a58e7a202020 Author: Olivier Hallot <[email protected]> AuthorDate: Fri Sep 7 10:31:49 2018 -0300 Commit: Olivier Hallot <[email protected]> CommitDate: Fri Sep 7 17:58:55 2018 +0200 Prepare to handle native SVG icons Today icons are PNG images, if later they become SVG natively... Change-Id: I42d886257b55b5676767c8b8879a6bf35eb4d5e6 Reviewed-on: https://gerrit.libreoffice.org/60156 Tested-by: Jenkins Reviewed-by: Olivier Hallot <[email protected]> diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 70843b4c3..90b8a44a2 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -1089,7 +1089,17 @@ <img src="{$src2}" alt="{$alt}" title="{$alt}" height="{$height}" width="{$width}"> <xsl:if test="ancestor::tablecell"> <xsl:attribute name="class"><xsl:value-of select="'imageicon'"/></xsl:attribute> - <xsl:attribute name="src"><xsl:value-of select="concat(substring-before($src2,'.png'),'.svg')"/></xsl:attribute> + <xsl:attribute name="src"> + <!--Check if icon is already svg--> + <xsl:choose> + <xsl:when test="substring($src2,string-length($src2) - 3, 4)='.png'"> + <xsl:value-of select="concat(substring-before($src2,'.png'),'.svg')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$src2"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> </xsl:if> </img> </xsl:template> _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
