summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>