summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jentsch <pjotr@guineapics.de>2012-11-26 01:26:37 +0100
committerPeter Jentsch <pjotr@guineapics.de>2012-11-26 01:26:37 +0100
commit6aabe09ac092c51d4b394bde9c7ea0055b952e33 (patch)
treeec1b2c0283d2301c43f1845e0c30880c714becce
parent2a9c7f044f03533604e34216d5b8f6e217609832 (diff)
fix fdo#56596 - FILESAVE: huge excesses of white space in xhtml...
Change-Id: Ideb395c1f1bc22d5b23d1c949ec6221e04590a2e
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl2
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl11
2 files changed, 9 insertions, 4 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index b95cda7e5caa..9b02d9448509 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -800,6 +800,8 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+ <!-- workaround AOOO#119401 suspicious property fo:margin="100%" in paragraph style -->
+ <xsl:template match="@fo:margin[string(.) = '100%']" mode="paragraphMerge"/>
<xsl:template mode="paragraphMerge" match="@fo:margin | @fo:margin-top | @fo:margin-bottom | @fo:margin-left | @fo:margin-right">
<xsl:text>padding</xsl:text>
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 785f9bddcae1..1dedcc2349ae 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
@@ -83,10 +83,13 @@
<xsl:text>; </xsl:text>
</xsl:template>
- <!-- Maps fo:margin as well fo:margin-top, fo:margin-bottom, fo:padding-left, fo:margin-right -->
- <!-- Maps fo:padding as well fo:padding-top, fo:padding-bottom, fo:padding-left, fo:padding-right -->
- <xsl:template match="@fo:letter-spacing | @fo:line-height | @fo:width |@fo:margin | @fo:margin-top | @fo:margin-bottom | @fo:margin-left | @fo:margin-right | @fo:padding | @fo:padding-top | @fo:padding-bottom | @fo:padding-left | @fo:padding-right">
- <xsl:value-of select="substring-after(name(), ':')"/>
+ <!-- workaround AOOO#119401 suspicious property fo:margin="100%" in paragraph style -->
+ <xsl:template match="@fo:margin[string(.) = '100%']"/>
+
+ <!-- Maps fo:margin as well fo:margin-top, fo:margin-bottom, fo:padding-left, fo:margin-right -->
+ <!-- Maps fo:padding as well fo:padding-top, fo:padding-bottom, fo:padding-left, fo:padding-right -->
+ <xsl:template match="@fo:letter-spacing | @fo:line-height | @fo:width |@fo:margin | @fo:margin-top | @fo:margin-bottom | @fo:margin-left | @fo:margin-right | @fo:padding | @fo:padding-top | @fo:padding-bottom | @fo:padding-left | @fo:padding-right">
+ <xsl:value-of select="local-name(.)"/>
<xsl:text>:</xsl:text>
<!-- Map once erroneusly used inch shortage 'inch' to CSS shortage 'in' -->
<xsl:choose>