Kaydet (Commit) fb2edd68 authored tarafından Frédéric Wang's avatar Frédéric Wang Kaydeden (comit) Khaled Hosny

fdo#66645 XHTML export: ignore incorrect style on math objects

Change-Id: Ied09a189184380aa3eba30261c7517f6bccf6d09
Reviewed-on: https://gerrit.libreoffice.org/4751Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
Tested-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 6e2815a0
......@@ -1068,6 +1068,23 @@
<xsl:value-of select="$elem-name"/>' is a draw:frame.
</xsl:comment>
<xsl:element name="{$elem-name}">
<xsl:choose>
<xsl:when test="draw:object/math:math">
<!-- draw:frame elements contain many data that are not
relevant for mathematical formulas and that may
cause incorrect rendering. Let's ignore the
replacement image and keep only the id attribute.
See fdo#66645 -->
<xsl:apply-templates select="@draw:name"/>
<xsl:text> </xsl:text>
<xsl:apply-templates select="draw:object[1]"/>
<!-- TODO: do not always add a space after the formula,
for example when it is followed by a comma, period,
dash etc This will probably require using regexp
features like xsl:analyze-string -->
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="style">
<xsl:call-template name="widthAndHeight"/>
<xsl:text> padding:0; </xsl:text>
......@@ -1090,6 +1107,8 @@
<xsl:apply-templates select="node()">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
......@@ -2969,7 +2988,4 @@
<xsl:apply-templates select="*[1]" mode="math"/>
</xsl:template>
<!-- Ignore the replacement image -->
<xsl:template match="draw:frame/draw:image[preceding-sibling::*[1]/math:math]"/>
</xsl:stylesheet>
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