summaryrefslogtreecommitdiff
path: root/swext
diff options
context:
space:
mode:
authorArianna Masciolini <uzkamascio@gmail.com>2017-05-29 17:10:40 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-29 23:40:37 +0200
commita8124c2eaf401741e2235939a20cef2617ad8bd1 (patch)
tree39b2372ebb2bd1a57dfe277547aaeff8169650bc /swext
parent1955bb1172508b2bf3c7476de241834ae7771359 (diff)
tdf#33831 swext: mention images by name in the mediawiki export
odt files with pictures exported in mediawiki format now contain references to each image Change-Id: Idd73da997e2fe983899dd4514d3c393b3607a52d Reviewed-on: https://gerrit.libreoffice.org/38160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'swext')
-rw-r--r--swext/mediawiki/src/filter/odt2mediawiki.xsl9
1 files changed, 8 insertions, 1 deletions
diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index f3da0651bbeb..1b41b712cf5e 100644
--- a/swext/mediawiki/src/filter/odt2mediawiki.xsl
+++ b/swext/mediawiki/src/filter/odt2mediawiki.xsl
@@ -1017,6 +1017,8 @@
<text>[[</text>
<call-template name="mk-image-name">
<with-param name="image" select="$image"/>
+ <with-param name="frame" select="."/>
+ <with-param name="extension" select="'.png'"/>
</call-template>
<text>|thumb</text>
</variable>
@@ -1038,6 +1040,7 @@
<text>[[</text>
<call-template name="mk-image-name">
<with-param name="image" select="."/>
+ <with-param name="frame" select="parent::node()"/>
</call-template>
</variable>
@@ -1155,7 +1158,9 @@
<template name="mk-image-name">
<param name="image"/>
-
+ <param name="frame"/>
+ <param name="extension"/>
+
<variable name="base-name">
<call-template name="mk-base-name">
<with-param name="href" select="$image/@xlink:href"/>
@@ -1166,6 +1171,8 @@
<value-of select="'Image:'"/>
</if>
<value-of select="$base-name"/>
+ <value-of select="$frame/@draw:name"/>
+ <value-of select="'.png'"/>
</template>
<template name="mk-base-name">