summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvante Schubert <svante.schubert@gmail.com>2020-08-24 11:20:32 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-03-02 13:20:24 +0100
commit83def17aa0c861b05582dc37c8a9d4ed39e3ba33 (patch)
tree3012dc60ebae1d2a7db97dd84f7859fee56c9893
parent7f2eb7b641a9864d2335ed4abdaaee1b79dd1028 (diff)
HTML XSLT: Set default to 0 in case of not-a-number: min-width:NaNcm
This had a conflict with commit 9804cb2f195451811eff8924d7997a3cbd6d679d Fixing bodx.xsl: Invalid min-width:NaN check (Michael's GitHub Review) Change-Id: I0bd5bbae1411c6b4892bf332e6ff3c7027f8c341 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111609 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl14
1 files changed, 12 insertions, 2 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 9408d971f9c6..09d4ed43c5e2 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -2042,7 +2042,12 @@
<xsl:with-param name="paraStyleName" select="descendant-or-self::*/@text:style-name"/>
</xsl:call-template>
<xsl:text>;min-width:</xsl:text>
- <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ <xsl:choose>
+ <xsl:when test="$listLabelWidth and not($listLabelWidth='') and not($listLabelWidth='NaN')">
+ <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
<xsl:text>cm;</xsl:text>
</xsl:attribute>
<xsl:variable name="labelContent">
@@ -2104,7 +2109,12 @@
<xsl:with-param name="paraStyleName" select="descendant-or-self::*/@text:style-name"/>
</xsl:call-template>
<xsl:text>;min-width:</xsl:text>
- <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ <xsl:choose>
+ <xsl:when test="$listLabelWidth and not($listLabelWidth='') and not($listLabelWidth='NaN')">
+ <xsl:value-of select="translate($listLabelWidth,',','.')"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
<xsl:text>cm</xsl:text>
</xsl:attribute>
<xsl:comment>&#160;</xsl:comment>