Kaydet (Commit) c6f3a537 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

xhtml export: Prefer svg if it's available

And not use the replacement graphic in this case.

Change-Id: I5e1bb7a694f210e2681ff5acf241a131d38a4c5d
Reviewed-on: https://gerrit.libreoffice.org/45782Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit aa768bdb)
Reviewed-on: https://gerrit.libreoffice.org/45801
üst 4e8f20a5
...@@ -1483,10 +1483,12 @@ ...@@ -1483,10 +1483,12 @@
<xsl:template match="draw:image | draw:object-ole"> <xsl:template match="draw:image | draw:object-ole">
<xsl:param name="globalData"/> <xsl:param name="globalData"/>
<!-- If there is a replacement graphic, we take it. <!-- If there is a replacement graphic, we take it (only exception is if the main image is svg).
It is a png which browsers are more likely able to render than the original graphic The replacement graphic is a png which browsers are more likely able to render than the
which might have arbitrary formats. --> original graphic which might have arbitrary formats. -->
<xsl:if test="not(following-sibling::draw:image)"> <xsl:if test="(@loext:mime-type = 'image/svg+xml') or
(not(following-sibling::draw:image) and
not(preceding-sibling::draw:image[1]/@loext:mime-type = 'image/svg+xml'))">
<xsl:choose> <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"> <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 --> <!-- XHTML does not allow the mapped elements to contain paragraphs -->
......
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