Kaydet (Commit) b532d465 authored tarafından Robert Antoni Buj Gelonch's avatar Robert Antoni Buj Gelonch Kaydeden (comit) David Tardon

odt2mediawiki.xsl: tabulation in toc entries

Change-Id: I596bd1c8814efcf2070d3e6d2ff126c03c0ec168
Reviewed-on: https://gerrit.libreoffice.org/15785Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst ec916dc7
......@@ -173,6 +173,12 @@
use="@style:name"
/>
<key
name="text:table-of-content-entry-ref"
match="//text:table-of-content-entry-template"
use="@text:style-name"
/>
<key
name="reference-resolution"
match="//text:reference-mark | //text:reference-mark-start"
......@@ -699,6 +705,21 @@
</choose>
</template>
<!--
Function for generating tabulations in TOC entries.
@param style
The style of the TOC entry
-->
<template name="mk-tab-toc">
<param name="style"/>
<if test="number($style/@text:outline-level) &gt; 0">
<call-template name="mk-token">
<with-param name="level" select="number($style/@text:outline-level) - 1"/>
<with-param name="char" select="':'"/>
</call-template>
</if>
</template>
<!--
== WikiLink ==
......@@ -726,6 +747,16 @@
-->
<template match="text:p">
<!-- TOC tabs -->
<if test="ancestor::text:index-body and boolean(@text:style-name)">
<variable name="style" select="key('style-ref', @text:style-name)"/>
<if test="boolean($style/@style:parent-style-name)">
<call-template name="mk-tab-toc">
<with-param name="style" select="key('text:table-of-content-entry-ref', $style/@style:parent-style-name)"/>
</call-template>
</if>
</if>
<variable name="alignment">
<call-template name="mk-style-set">
<with-param name="node" select="."/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment