help3xsl/online_transform.xsl |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit 1678d9035beaf714860804462f03501393291c56
Author: Olivier Hallot <[email protected]>
Date:   Sun Nov 6 18:29:59 2016 -0200

    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 <[email protected]>
    Tested-by: Olivier Hallot <[email protected]>

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index fd53aad..3d8de82 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 -->
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to