summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-27 16:47:09 +0200
committerJan Holesovsky <kendy@collabora.com>2021-01-07 16:32:53 +0100
commit3e0b32251cb43521c5d20f5d1af540919562d3e5 (patch)
tree36b351373e06bbf74ece3e408b3b1cf84f894e51 /filter
parent280b44ecf20ac34986cd4a2bea3c0af8fd9b94b7 (diff)
filter,writerperfect: adapt XHTML,EPUB to draw:mime-type in ODF 1.3
Change-Id: I6391f7b4f0183a0193aaa10f2a41fac416a22c09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92984 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl16
1 files changed, 14 insertions, 2 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 26a344928097..683ed8599a37 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1484,8 +1484,11 @@
The replacement graphic is a png which browsers are more likely able to render than the
original graphic which might have arbitrary formats. -->
<xsl:if test="(@loext:mime-type = 'image/svg+xml') or
+ (@draw:mime-type = 'image/svg+xml') or
(not(following-sibling::draw:image) and
- not(preceding-sibling::draw:image[1]/@loext:mime-type = 'image/svg+xml'))">
+ not((preceding-sibling::draw:image[1]/@loext:mime-type = 'image/svg+xml')
+ or
+ (preceding-sibling::draw:image[1]/@draw:mime-type = 'image/svg+xml')))">
<xsl:choose>
<xsl:when test="ancestor::text:p or parent::text:span or parent::text:h or parent::draw:a or parent::text:a or text:ruby-base">
<!-- XHTML does not allow the mapped elements to contain paragraphs -->
@@ -1551,7 +1554,16 @@
<xsl:attribute name="src">
<xsl:call-template name="create-href">
<xsl:with-param name="href" select="@xlink:href"/>
- <xsl:with-param name="mimetype" select="@loext:mime-type"/>
+ <xsl:with-param name="mimetype">
+ <xsl:choose>
+ <xsl:when test="@draw:mime-type">
+ <xsl:value-of select="@draw:mime-type"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@loext:mime-type"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
</xsl:call-template>
</xsl:attribute>