filter/source/xslt/odf2xhtml/export/common/table/table.xsl | 4 ++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl | 19 ++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-)
New commits: commit c910a1320c7247c111d4f7e2a61540fc646938ff Author: Franklin Weng <frank...@goodhorse.idv.tw> AuthorDate: Wed Mar 22 12:33:38 2023 +0800 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Tue May 9 18:26:48 2023 +0200 tdf#153839 : Further handling for adding newlines before and after some tags as described in comment 7 Change-Id: I6e2a6559a888d259c6d1cc848fad7d39a1ab653b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149280 Reviewed-by: Stéphane Guillou <stephane.guil...@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> (cherry picked from commit ce4272c25426f0084e53735e80870b9339239078) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150729 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/filter/source/xslt/odf2xhtml/export/common/table/table.xsl b/filter/source/xslt/odf2xhtml/export/common/table/table.xsl index cfc1ebbc525b..d55948cab5b9 100644 --- a/filter/source/xslt/odf2xhtml/export/common/table/table.xsl +++ b/filter/source/xslt/odf2xhtml/export/common/table/table.xsl @@ -63,6 +63,7 @@ <xsl:template match="table:table" name="table:table"> + <xsl:text>
</xsl:text> <xsl:param name="globalData" /> <!-- The table will only be created if the table:scenario is active --> @@ -71,6 +72,7 @@ <xsl:with-param name="globalData" select="$globalData" /> </xsl:call-template> </xsl:if> + <xsl:text>
</xsl:text> </xsl:template> @@ -110,10 +112,12 @@ </xsl:element> </xsl:when> <xsl:otherwise> + <xsl:text>
</xsl:text> <xsl:call-template name="create-table-element"> <xsl:with-param name="globalData" select="$globalData" /> <xsl:with-param name="allVisibleTableRows" select="$allVisibleTableRows" /> </xsl:call-template> + <xsl:text>
</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl index 6f64b5a83d82..6ad03e260d8c 100644 --- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl +++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl @@ -254,7 +254,9 @@ <xsl:template match="draw:text-box"> <xsl:param name="globalData"/> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' was a 'draw:text-box'.</xsl:comment> + <xsl:text>
</xsl:text> <xsl:element name="div"> <xsl:variable name="dimension"> <xsl:apply-templates select="@fo:min-width" /> @@ -379,10 +381,14 @@ <!-- The paragraph is written as DIV as there might be nested paragraphs (see above choose block) --> <xsl:choose> <xsl:when test="name() = 'text:p'"> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' was a 'text:p'.</xsl:comment> + <xsl:text>
</xsl:text> </xsl:when> <xsl:otherwise> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' was a 'draw:page'.</xsl:comment> + <xsl:text>
</xsl:text> </xsl:otherwise> </xsl:choose> <xsl:element name="div"> @@ -840,7 +846,9 @@ <!-- every following frame sibling till the next draw:frame have to be encapsulated within a div with left indent. To be moved altogether according the indent (usually right) --> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' added for floating.</xsl:comment> + <xsl:text>
</xsl:text> <xsl:element name="div"> <xsl:attribute name="style"> <xsl:text>display:inline; position:relative; left:</xsl:text> @@ -1031,7 +1039,9 @@ </xsl:variable> <!-- if the frame is anchored on a paragraph --> <xsl:if test="@text:anchor-type='paragraph'"> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' is emulating the top height of a draw:frame.</xsl:comment> + <xsl:text>
</xsl:text> <!-- When the svg:y is set relative to the paragraph content, the best way to emulate a positive height, is to add an invisible division inbetween with a height. Often text will flow into this 'gap', which is handled separately! @@ -1070,9 +1080,9 @@ <xsl:otherwise>div</xsl:otherwise> </xsl:choose> </xsl:variable> - <xsl:comment>Next ' - <xsl:value-of select="$elem-name"/>' is a draw:frame. - </xsl:comment> + <xsl:text>
</xsl:text> + <xsl:comment>Next '<xsl:value-of select="$elem-name"/>' is a draw:frame. </xsl:comment> + <xsl:text>
</xsl:text> <xsl:element name="{$elem-name}"> <xsl:choose> <xsl:when test="draw:object/math:math"> @@ -2812,12 +2822,15 @@ <xsl:param name="globalData"/> <xsl:if test="not(contains(@text:display, 'none'))"> + <xsl:text>
</xsl:text> <xsl:comment>Next 'div' was a 'text:section'.</xsl:comment> + <xsl:text>
</xsl:text> <xsl:element name="div"> <xsl:call-template name="apply-styles-and-content"> <xsl:with-param name="globalData" select="$globalData"/> </xsl:call-template> </xsl:element> + <xsl:text>
</xsl:text> </xsl:if> </xsl:template>