summaryrefslogtreecommitdiff
path: root/filter/source/xslt
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-04-11 22:35:23 +0200
committerJulien Nabet <serval2412@yahoo.fr>2020-04-11 23:24:31 +0200
commit95460224f4f8443547dbf5cedbea008ea2639337 (patch)
treeab2440df11b6cff43e667539cc5dcf223f8c6d2a /filter/source/xslt
parentf53077423fe1d62eb4392dd393a9bf6df84bd517 (diff)
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 <serval2412@yahoo.fr>
Diffstat (limited to 'filter/source/xslt')
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl20
1 files changed, 16 insertions, 4 deletions
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">