diff options
author | Svante Schubert <svante.schubert@gmail.com> | 2020-07-08 00:57:33 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-07-08 17:10:28 +0200 |
commit | a7cf0151eb8068d0aa418171a6acdaddfe8722e2 (patch) | |
tree | f76d5c778b38df4c4ccf876f9369c1e46fae0420 /filter | |
parent | 4bc9d9d0c49881ca8f66f7e744174ee6f8ff4ae3 (diff) |
Fixing top border style by fixing three XSLT issues triggered by...
... new properties in ODF 1.3
* check for fo:border='none'
* missing @ in @fo:background-color
* without default case (xsl:otherwise), end delimiter for "page"
missing in CSS
Change-Id: Ie5d0c3e8a32de0403534c5a4fa33a5f20393ce69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98365
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 646cf598633bacc3959fc126c9117f06f3d0f9e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98334
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl | 13 | ||||
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl index f9b5aff1b363..d1c8f189be85 100644 --- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl +++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl @@ -705,11 +705,16 @@ <xsl:choose> <xsl:when test=" $style/@style:family='paragraph' - and(( + and + ( + ( ( $style/*/@fo:border-top or $style/*/@fo:border-bottom - or $style/*/@fo:border + or ($style/*/@fo:border + and + not($style/*/@fo:border='none') + ) ) and ( @@ -727,10 +732,10 @@ and ( $style/*/@fo:background-color and - not($style/*/fo:background-color='transparent') + not($style/*/@fo:background-color='transparent') ) ) - )"> + )"> <xsl:element name="style" namespace=""> <xsl:copy-of select="$style/@style:family" /> <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderStart')" /></xsl:attribute> diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl index dc07f7e2918b..ec5b680df150 100644 --- a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl +++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl @@ -303,6 +303,9 @@ <xsl:when test=".='tb-lr'"> <xsl:text>vertical-lr; </xsl:text> </xsl:when> + <xsl:otherwise> + <xsl:text>horizontal-tb; direction:ltr;</xsl:text> + </xsl:otherwise> </xsl:choose> </xsl:template> <!-- *** Properties with a no 'fo:' or 'style:' prefix *** --> |