[Libreoffice-commits] help.git: helpers/refactor.xsl

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 29 13:19:21 UTC 2020


 helpers/refactor.xsl |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 59200481f126b3cd56ccd1eb231b8c1ee3a61a61
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Fri Jun 26 10:41:28 2020 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Mon Jun 29 15:18:59 2020 +0200

    Add  empty colspan/rowspan cleaning
    
    Change-Id: Ibb73313768ad2252e27d6b85757338fabf0ea1d7
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/97414
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/helpers/refactor.xsl b/helpers/refactor.xsl
index 16341ca35..5f3c4fc94 100644
--- a/helpers/refactor.xsl
+++ b/helpers/refactor.xsl
@@ -15,6 +15,18 @@
     <xsl:apply-templates/>
 </xsl:template>
 
+<!-- remove colspan="" rowspan="" in tablecell -->
+<xsl:template match="//tablecell[@colspan='' and @rowspan='']">
+<tablecell>
+<xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:if>
+<xsl:if test="@width"><xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute></xsl:if>
+<xsl:if test="@unit"><xsl:attribute name="unit"><xsl:value-of select="@unit"/></xsl:attribute></xsl:if>
+<xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
+<xsl:if test="@localize"><xsl:attribute name="localize"><xsl:value-of select="@localize"/></xsl:attribute></xsl:if>
+<xsl:apply-templates/>
+</tablecell>
+</xsl:template>
+
 <xsl:template match="node()|@*">
     <xsl:copy>
        <xsl:apply-templates select="node()|@*"/>
@@ -57,5 +69,4 @@
             <xsl:apply-templates />
     </xsl:element>
 </xsl:template>
-
 </xsl:stylesheet>


More information about the Libreoffice-commits mailing list