summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorPeter Jentsch <pjotr@guineapics.de>2012-11-29 21:53:24 +0100
committerPeter Jentsch <pjotr@guineapics.de>2012-11-29 21:58:27 +0100
commit3f6946cfd7021dccdc3c2787442d20c168c197d1 (patch)
tree36abf8639d254d59f9a35287ccb2b6d64d1623bb /filter
parentab5af23e7240959e77b4329b55da72f235859d27 (diff)
fix fdo#57641 table alignment broken in XHTML export
Change-Id: Ibbb88c1ecaaac14866145753e383609db2a3dd1a
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl12
1 files changed, 10 insertions, 2 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 b7573fe1bae6..986dd3d5d877 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
@@ -297,9 +297,17 @@
<xsl:template match="@table:align">
<xsl:choose>
<xsl:when test=".='left'">
- <xsl:text>margin-left:0px; margin-right:auto;</xsl:text></xsl:when>
+ <xsl:if test="not(../@fo:margin-left)">margin-left:0px; </xsl:if>
+ <xsl:text>margin-right:auto;</xsl:text></xsl:when>
<xsl:when test=".='right'">
- <xsl:text>margin-left:auto; margin-right: 0px;</xsl:text></xsl:when>
+ <xsl:text>margin-left:auto</xsl:text>
+ <xsl:if test="not(../@fo:margin-right)">
+ ; margin-right: 0px;
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test=".='center'">
+ margin-left:auto;margin-right:auto;
+ </xsl:when>
<xsl:otherwise>
<xsl:text>float:none; </xsl:text>
</xsl:otherwise>