summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-04-11 22:35:23 +0200
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2020-04-16 10:18:55 +0200
commitf7c6660dc2dd60ba8df7ee63a63438dea1368e7c (patch)
tree3ced8df183f9daa9753e782114d7fe18514d3250 /filter
parentd44dba1a56052e87b879ac986ad14a63bbca357d (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> (cherry picked from commit 95460224f4f8443547dbf5cedbea008ea2639337) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92019 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'filter')
-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">