diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-12-22 21:09:04 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2020-12-23 08:59:51 +0100 |
commit | 1edf1871079518f90e447c3de9df0c4ef5e1e3e4 (patch) | |
tree | 39bc2aca763876c4f9fde5f000c8386c62742791 /filter | |
parent | ca7d0835008b2333eaebe88030f94b5e072d0eb6 (diff) |
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 <serval2412@yahoo.fr>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl | 65 |
1 files changed, 50 insertions, 15 deletions
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, ' '), ' ')"/> |