[Libreoffice-commits] dev-tools.git: help3/xhpeditor
Olivier Hallot (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 10 00:01:55 UTC 2019
help3/xhpeditor/ed_transform.xsl | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
New commits:
commit 17084948575e6e6f33fc7451d9614807ca7ef1c3
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Mon Dec 9 18:20:19 2019 -0300
Commit: Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Tue Dec 10 01:01:33 2019 +0100
handle rendered images style
Change-Id: If854b8a2c8d0cf7f7c3e8bf15aaf5899dfd9c85d
Reviewed-on: https://gerrit.libreoffice.org/84790
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/help3/xhpeditor/ed_transform.xsl b/help3/xhpeditor/ed_transform.xsl
index d4c742f..d97355e 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 -->
More information about the Libreoffice-commits
mailing list