summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <ohallot@collabora.co.uk>2016-11-06 18:29:59 -0200
committerOlivier Hallot <olivier.hallot@edx.srv.br>2016-11-06 20:35:09 +0000
commit1678d9035beaf714860804462f03501393291c56 (patch)
tree055892c8bfcbf86314bb9b66209e12b087bc9b70
parent8494b1d545c68fd4eeb75d78c692a3ce71ed3caf (diff)
Honor width and height in images for help3
Modern browsers renders width and height expressed in inches and centimeters, as well as pixels. Change-Id: I337de791e7e894b0c84f1bd9848e15edc861707f Reviewed-on: https://gerrit.libreoffice.org/30616 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
-rw-r--r--help3xsl/online_transform.xsl15
1 files changed, 4 insertions, 11 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index fd53aad663..3d8de82028 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -44,12 +44,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:math="http://www.w3.org/1998/Math/MathML">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output indent="yes" method="html"
-doctype-system= "about:legacy-compat"/>
+<xsl:output indent="yes" method="html" doctype-system= "about:legacy-compat"/>
<!--
############################
@@ -855,12 +852,8 @@ doctype-system= "about:legacy-compat"/>
<p class="bug">Image: <xsl:value-of select="$src"/></p>
<!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
<xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
- <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
- <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
- <img src="{$src}" alt="{$alt}" title="{$alt}">
- <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
- <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
- </img>
+ <xsl:variable name="istyle"><xsl:value-of select="concat('width:',@width,';','height:',@height,';')"/></xsl:variable>
+ <img src="{$src}" alt="{$alt}" title="{$alt}" style="{$istyle}"></img>
</xsl:template>
<!-- Insert a Table -->