diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2019-12-09 18:20:19 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2019-12-10 01:01:33 +0100 |
commit | 17084948575e6e6f33fc7451d9614807ca7ef1c3 (patch) | |
tree | ba56c81b26648997f5cc011f67dd6c0f543d1013 /help3 | |
parent | a8ca35cbeec21eec2b2eb9bab25b02a23b736f4d (diff) |
handle rendered images style
Change-Id: If854b8a2c8d0cf7f7c3e8bf15aaf5899dfd9c85d
Reviewed-on: https://gerrit.libreoffice.org/84790
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3')
-rw-r--r-- | help3/xhpeditor/ed_transform.xsl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/help3/xhpeditor/ed_transform.xsl b/help3/xhpeditor/ed_transform.xsl index d4c742fa..d97355ea 100644 --- a/help3/xhpeditor/ed_transform.xsl +++ b/help3/xhpeditor/ed_transform.xsl @@ -963,6 +963,22 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> + <xsl:variable name="imagestyle"> + <xsl:choose> + <xsl:when test="starts-with(@src,'media/screenshots/')"> + <xsl:value-of select="'screenshot'"/> + </xsl:when> + <xsl:when test="starts-with(@src,'media/')"> + <xsl:value-of select="'genericimage'"/> + </xsl:when> + <xsl:when test="not(starts-with(@src,'media/'))"> + <xsl:value-of select="'iconimage'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'genericimage'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable> <xsl:variable name="width"> <xsl:if test="string-length(@width)!=0"> @@ -975,11 +991,7 @@ </xsl:if> </xsl:variable> <p class="debugembed">Image href: <xsl:value-of select="$src2"/></p> - <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:if> - </img> + <img src="{$src2}" class="{$imagestyle}" alt="{$alt}" title="{$alt}" style="{concat('width:',$width,';height:',$height)}"/> </xsl:template> <!-- Insert an object --> |