filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl | 20 ++++++++-- 1 file changed, 16 insertions(+), 4 deletions(-)
New commits: commit 95460224f4f8443547dbf5cedbea008ea2639337 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sat Apr 11 22:35:23 2020 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat Apr 11 23:24:31 2020 +0200 tdf#131812: fix exporting to html doesn't preserve RTL property Change-Id: I227e304c6868afe7a98dbd8e96487270d06ce1eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92067 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> 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 da123b1e5146..dc07f7e2918b 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 @@ -123,10 +123,10 @@ <xsl:when test="contains(., 'end')"> <xsl:choose> <xsl:when test="parent::*/@style:writing-mode and contains(parent::*/@style:writing-mode, 'rl')"> - <xsl:text>text-align:left ! important;</xsl:text> + <xsl:text>text-align:right ! important;</xsl:text> </xsl:when> <xsl:otherwise> - <xsl:text>text-align:right ! important; </xsl:text> + <xsl:text>text-align:left ! important; </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> @@ -290,8 +290,20 @@ </xsl:template> <xsl:template match="@style:writing-mode"> <xsl:text>writing-mode:</xsl:text> - <xsl:value-of select="."/> - <xsl:text>; </xsl:text> + <xsl:choose> + <xsl:when test=".='rl-tb'"> + <xsl:text>horizontal-tb; direction:rtl; </xsl:text> + </xsl:when> + <xsl:when test=".='lr-tb'"> + <xsl:text>horizontal-tb; direction:ltr; </xsl:text> + </xsl:when> + <xsl:when test=".='tb-rl'"> + <xsl:text>vertical-rl; </xsl:text> + </xsl:when> + <xsl:when test=".='tb-lr'"> + <xsl:text>vertical-lr; </xsl:text> + </xsl:when> + </xsl:choose> </xsl:template> <!-- *** Properties with a no 'fo:' or 'style:' prefix *** --> <xsl:template match="@table:align"> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits