[Libreoffice-commits] core.git: filter/source

Svante Schubert (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 2 12:25:10 UTC 2021


 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit f680b6d74209fd78c547201b2f14c6547e55c81b
Author:     Svante Schubert <svante.schubert at gmail.com>
AuthorDate: Wed Sep 9 15:27:54 2020 +0200
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 2 13:24:15 2021 +0100

    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 at allotropia.de>

diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 7754538e2ea5..aa3c956d7c9f 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"/>
@@ -882,7 +894,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>
@@ -1055,7 +1067,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>
                 <!--


More information about the Libreoffice-commits mailing list