filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl | 65 +++++++++++++----- 1 file changed, 50 insertions(+), 15 deletions(-)
New commits: commit 1edf1871079518f90e447c3de9df0c4ef5e1e3e4 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Tue Dec 22 21:09:04 2020 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Dec 23 08:59:51 2020 +0100 Related tdf#139073: deal with "none" for border-width in odf2uof_spreadsheet Change-Id: I040aab5a1863b359cf343de45930127a80e28506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108217 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl b/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl index f1b9955c55e6..e8bb6fa7999a 100644 --- a/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl +++ b/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl @@ -4328,9 +4328,16 @@ <xsl:attribute name="uof:locID">u0061</xsl:attribute> <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> <xsl:variable name="border-width"> - <xsl:call-template name="convert2cm"> - <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-bl-tr, ' ')"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$styleProperties/@style:diagonal-bl-tr !='none'"> + <xsl:call-template name="convert2cm"> + <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-bl-tr, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$styleProperties/@style:diagonal-bl-tr" /> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:variable name="border-style" select="substring-before(substring-after($styleProperties/@style:diagonal-bl-tr, ' '), ' ')"/> <xsl:variable name="border-color" select="substring-after(substring-after($styleProperties/@style:diagonal-bl-tr, ' '), ' ')"/> @@ -4346,9 +4353,16 @@ <xsl:attribute name="uof:locID">u0062</xsl:attribute> <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> <xsl:variable name="border-width"> - <xsl:call-template name="convert2cm"> - <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-tl-br, ' ')"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$styleProperties/@style:diagonal-tl-br !='none'"> + <xsl:call-template name="convert2cm"> + <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-tl-br, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$styleProperties/@style:diagonal-tl-br" /> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:variable name="border-style" select="substring-before(substring-after($styleProperties/@style:diagonal-tl-br, ' '), ' ')"/> <xsl:variable name="border-color" select="substring-after(substring-after($styleProperties/@style:diagonal-tl-br, ' '), ' ')"/> @@ -4441,9 +4455,16 @@ <xsl:attribute name="uof:locID">u0061</xsl:attribute> <xsl:attribute name="attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> <xsl:variable name="border-width"> - <xsl:call-template name="convert2cm"> - <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-bl-tr, ' ')"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$styleProperties/@style:diagonal-bl-tr !='none'"> + <xsl:call-template name="convert2cm"> + <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-bl-tr, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$styleProperties/@style:diagonal-bl-tr" /> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:variable name="border-style" select="substring-before(substring-after($styleProperties/@style:diagonal-bl-tr, ' '), ' ')"/> <xsl:variable name="border-color" select="substring-after(substring-after($styleProperties/@style:diagonal-bl-tr, ' '), ' ')"/> @@ -4458,9 +4479,16 @@ <xsl:attribute name="uof:locID">u0062</xsl:attribute> <xsl:attribute name="uof:attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> <xsl:variable name="border-width"> - <xsl:call-template name="convert2cm"> - <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-tl-br, ' ')"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$styleProperties/@style:diagonal-tl-br !='none'"> + <xsl:call-template name="convert2cm"> + <xsl:with-param name="value" select="substring-before($styleProperties/@style:diagonal-tl-br, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$styleProperties/@style:diagonal-tl-br" /> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:variable name="border-style" select="substring-before(substring-after($styleProperties/@style:diagonal-tl-br, ' '), ' ')"/> <xsl:variable name="border-color" select="substring-after(substring-after($styleProperties/@style:diagonal-tl-br, ' '), ' ')"/> @@ -4479,9 +4507,16 @@ <xsl:param name="border_properties"/> <xsl:attribute name="attrList">类型 宽度 边距 颜色 阴影</xsl:attribute> <xsl:variable name="border-width"> - <xsl:call-template name="convert2cm"> - <xsl:with-param name="value" select="substring-before($border_properties, ' ')"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$border_properties !='none'"> + <xsl:call-template name="convert2cm"> + <xsl:with-param name="value" select="substring-before($border_properties, ' ')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$border_properties" /> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:variable name="border-style" select="substring-before(substring-after($border_properties, ' '), ' ')"/> <xsl:variable name="border-color" select="substring-after(substring-after($border_properties, ' '), ' ')"/> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits