summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-08-19 23:45:48 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-09-05 10:36:54 +0200
commitc284e1de170add762906658b1f44e7d11a370c5e (patch)
tree5eb996e971d505ed153bcb83d8b872ebc09f33cf
parent688b30f33510a7b8c5989daa86cba9252031142c (diff)
tdf#111492: XHTML export does not honor numbering levels
In heading, for preceding level, count only those with num-format != '' Change-Id: I93cb73ae5a236f5413c149c412b247da559671e4 Reviewed-on: https://gerrit.libreoffice.org/41341 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl20
1 files changed, 11 insertions, 9 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index df3438214484..9994d3f08a10 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1329,15 +1329,17 @@
<xsl:when test="$iOutlineLevel &lt; $outlineLevel">
<!-- Write preceding heading numbers -->
- <xsl:call-template name="writeNumber">
- <xsl:with-param name="numberDigit">
- <xsl:call-template name="calc-heading-digit">
- <xsl:with-param name="value" select="0"/>
- <xsl:with-param name="currentoutlineLevel" select="$iOutlineLevel"/>
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="numberFormat" select="$globalData/office:styles/text:outline-style/text:outline-level-style[@text:level = ($outlineLevel)]/@style:num-format"/>
- </xsl:call-template>
+ <xsl:if test="$globalData/office:styles/text:outline-style/text:outline-level-style[@text:level = ($iOutlineLevel)]/@style:num-format != ''">
+ <xsl:call-template name="writeNumber">
+ <xsl:with-param name="numberDigit">
+ <xsl:call-template name="calc-heading-digit">
+ <xsl:with-param name="value" select="0"/>
+ <xsl:with-param name="currentoutlineLevel" select="$iOutlineLevel"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="numberFormat" select="$globalData/office:styles/text:outline-style/text:outline-level-style[@text:level = ($outlineLevel)]/@style:num-format"/>
+ </xsl:call-template>
+ </xsl:if>
<xsl:choose>
<xsl:when test="$globalData/office:styles/text:outline-style/text:outline-level-style[@text:level = ($iOutlineLevel + 1)]/@text:start-value">
<xsl:call-template name="calc-heading-number">