[Libreoffice-commits] core.git: filter/source

Julien Nabet serval2412 at yahoo.fr
Tue Sep 5 08:37:19 UTC 2017


 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit c284e1de170add762906658b1f44e7d11a370c5e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Aug 19 23:45:48 2017 +0200

    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 at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

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 < $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">


More information about the Libreoffice-commits mailing list