Kaydet (Commit) 26b9122e authored tarafından Robert Antoni Buj Gelonch's avatar Robert Antoni Buj Gelonch Kaydeden (comit) Adolfo Jayme Barrientos

tdf#75019 bookmarks in exporting to mediawiki

Add support for exporting common bookmarks
Add support for going to a specific bookmark (including TOC)

Change-Id: I2775d8b03a5bd986ffcbdf7c95a1fbed755e3bd6
Reviewed-on: https://gerrit.libreoffice.org/15486Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
üst cc89e15a
......@@ -658,12 +658,37 @@
<variable name="link-ref" select="@xlink:href"/>
<choose>
<when test="string-length($link-ref) &gt; 0">
<variable name="link-label" select="string(.)"/>
<text>[</text>
<value-of select="$link-ref"/>
<text> </text>
<value-of select="$link-label"/>
<text>]</text>
<choose>
<when test="starts-with($link-ref, '#')">
<text>[[</text>
<choose>
<when test="contains($link-ref, '_')">
<value-of select="translate($link-ref,'_','')"/>
</when>
<otherwise>
<value-of select="$link-ref"/>
</otherwise>
</choose>
<text>|</text>
<choose>
<when test="text:tab and ancestor::text:index-body">
<value-of select="node()[1]"/>
</when>
<otherwise>
<value-of select="string(.)"/>
</otherwise>
</choose>
<text>]]</text>
</when>
<otherwise>
<text>[</text>
<value-of select="$link-ref"/>
<text> </text>
<value-of select="string(.)"/>
<text>]</text>
</otherwise>
</choose>
</when>
<otherwise>
......@@ -1124,7 +1149,26 @@
<!-- TODO: Output an anchor. -->
</template>
<!--
<template match="text:bookmark-start">
<if test="boolean(@text:name)">
<variable name="bookmark">
<choose>
<when test="contains(@text:name,'_')">
<value-of select="translate(@text:name,'_','')"/>
</when>
<otherwise>
<value-of select="@text:name"/>
</otherwise>
</choose>
</variable>
<text>{{anchor|</text>
<value-of select="$bookmark"/>
<text>}} </text>
</if>
<apply-templates/>
</template>
<!--
== Plain text ==
-->
......
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