summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-08-19 23:45:48 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-07 15:59:51 +0200
commit94b583dccc90651bc6366c2a85813d91b708496f (patch)
tree98407ab0fda8edb03a6d5390d2f85325afde723b
parentb4050f780d352c36175d9fb98aa01d7af973d8fe (diff)
tdf#111492 XHTML export does not honor numbering levels
In heading, for preceding level, count only those with num-format != '' Reviewed-on: https://gerrit.libreoffice.org/41341 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit c284e1de170add762906658b1f44e7d11a370c5e) Change-Id: I93cb73ae5a236f5413c149c412b247da559671e4 Reviewed-on: https://gerrit.libreoffice.org/42004 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-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 124411bfa639..c0ba08f5e8a7 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">