diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-11-10 19:54:22 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-11-11 20:41:50 +0100 |
commit | 4f351cf5ffbba2877b16593ab9ebb76c6d723980 (patch) | |
tree | 5cbc558232782a0c156b8b809ea33f0aa3a06384 /help3xsl/online_transform.xsl | |
parent | 12cf5b53b185177924dd7ce572bc7451c9edc76b (diff) |
Fix icon display in Help pages
1) The python script creates the replacement table (xsl) for
missing icons from colibre/links.txt. Later it should go to
build system.
2) Handle icon tables when images are not from icon-theme
Change-Id: If946af6fc6c05431c07470c01082a46e0fdbdde0
Reviewed-on: https://gerrit.libreoffice.org/63254
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 18cadf233f..c1755937cd 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -22,7 +22,7 @@ <xsl:output indent="yes" method="html" doctype-system= "about:legacy-compat"/> <xsl:include href="localized.xsl"/> -<xsl:include href="link.txt.xsl"/> +<xsl:include href="links.txt.xsl"/> <!-- ############################ # Variables and Parameters # @@ -1073,7 +1073,17 @@ <xsl:variable name="linklist"> <xsl:call-template name="linktxt"><xsl:with-param name="src1" select="@src"/></xsl:call-template> </xsl:variable> - <xsl:value-of select="concat($target,'media/icon-themes/',$linklist)"/> + <xsl:variable name="aux00"> + <xsl:choose> + <xsl:when test="substring($linklist,string-length($linklist) - 3, 4)='.png'"> + <xsl:value-of select="concat(substring-before($linklist,'.png'),'.svg')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$linklist"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:value-of select="concat($target,'media/icon-themes/',$aux00)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat($target,@src)"/> @@ -1094,17 +1104,6 @@ <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"> - <!--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> |