summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorSvante Schubert <svante.schubert@gmail.com>2020-09-09 15:27:54 +0200
committerAndras Timar <andras.timar@collabora.com>2021-05-21 13:31:49 +0200
commit938d8ddf59cb2a99ffc1a58fddf13365d51e4376 (patch)
tree94752b308b00c7de9d895aee362a5519b798893d /filter
parent552d0a496928b15141475846fbb7ab50753b0e8d (diff)
tdf#118637: HTML XSLT: Adding missing MathML siblings.
The floating draw:frame sibling content being text were not shown, nor further occuring draw:frame (other MathML) Change-Id: Ifc5cdd4c58bdf01ceebcf10c01b85cdf96b60d26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111620 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115879
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl20
1 files changed, 16 insertions, 4 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 83171a1f4d1a..ad74d3716b45 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -380,8 +380,20 @@
</xsl:apply-templates>
<!-- the footnote symbol is the prefix for a footnote in the footer -->
<xsl:copy-of select="$footnotePrefix"/>
- <!-- start floating of frame (and siblings) -->
- <xsl:apply-templates select="node()[1]" mode="frameFloating">
+ <!-- deal with none draw:frame ahead of the <draw:frame> -->
+ <xsl:if test="name(node()[1]) != 'draw:frame'">
+ <xsl:apply-templates select="node()[1]" mode="frameFloating">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="previousFrameWidths" select="0"/>
+ <xsl:with-param name="previousFrameHeights" select="0"/>
+ <!-- 2DO for me (Svante) - Not used, uncertain 4now...
+ <xsl:with-param name="pageMarginLeft">
+ <xsl:call-template name="getPageMarginLeft"/>
+ </xsl:with-param>-->
+ </xsl:apply-templates>
+ </xsl:if>
+ <!-- start floating of frames (each take care of its siblings till next draw:frame) -->
+ <xsl:apply-templates select="draw:frame" mode="frameFloating">
<xsl:with-param name="globalData" select="$globalData" />
<xsl:with-param name="previousFrameWidths" select="0"/>
<xsl:with-param name="previousFrameHeights" select="0"/>
@@ -876,7 +888,7 @@
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
<xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="$createDiv"/>
+ <xsl:with-param name="createDiv" select="false()"/>
<xsl:with-param name="noDivBefore" select="$noDivBefore"/>
</xsl:apply-templates>
</xsl:template>
@@ -1049,7 +1061,7 @@
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
<xsl:with-param name="parentMarginLeft" select="$parentMarginLeftNew"/>
<xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="true()"/>
+ <xsl:with-param name="createDiv" select="false()"/>
<xsl:with-param name="noDivBefore" select="false()"/>
</xsl:apply-templates>
<!--