diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-27 16:47:09 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-05-12 14:17:43 +0200 |
commit | 0777abafe01eb6c9ba6ed7412e44002c8018d972 (patch) | |
tree | 3304eef9b20e82456836ef3e07278552842e5f3a /filter | |
parent | 0507ef963842191d2b34e007831a38800212f602 (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.xsl | 16 |
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 ba6bdd78f6c2..ce2a03b8499f 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> |