summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-09-07 09:34:14 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-09-07 09:44:54 +0200
commit1da162bedf1ab3907caa5ed8ba202a8251dae0a1 (patch)
tree51fd0d851f08eda47c8d1f743d77c0eb6308c0bf
parent6a478cf43f647458e507de21c4c1edb70679ac74 (diff)
xhtml filter: Use css class instead of <style> attribute
Change-Id: I9d63e03b609298e737e55f0d850eb78206171817 Reviewed-on: https://gerrit.libreoffice.org/42038 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl6
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/header.xsl2
2 files changed, 5 insertions, 3 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 6f6b4e1ccf89..5571629c67aa 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1279,10 +1279,10 @@
<xsl:variable name="currentOutlineLevel" select="@text:outline-level"/>
<xsl:variable name="labelFollowedBy" select="$globalData//office:document/office:styles/text:outline-style/text:outline-level-style[@text:level = $currentOutlineLevel]/style:list-level-properties[@text:list-level-position-and-space-mode='label-alignment']/style:list-level-label-alignment/@text:label-followed-by"/>
- <!-- Add some margin (a tab is around 0.64cm in LO), but only if there is a number preceding the heading. -->
+ <!-- Add some margin, but only if there is a number preceding the heading. -->
<xsl:if test="$labelFollowedBy='listtab' and $headingNumber != ''">
- <xsl:attribute name="style">
- <xsl:text>margin-right:0.8rem;</xsl:text>
+ <xsl:attribute name="class">
+ <xsl:text>heading_numbering</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:copy-of select="$headingNumber"/>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index 46e66ff557b9..dcbeda0a3297 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -106,6 +106,8 @@
</xsl:text>
<xsl:text>span.annotation_style_by_filter { font-size:95%; font-family:Arial; background-color:#fff000; margin:0; border:0; padding:0; }
</xsl:text>
+<!-- Simulate tabs. They are around 0.64cm in LO, we convert that to 0.8rem. -->
+<xsl:text>span.heading_numbering { margin-right: 0.8rem; }</xsl:text>
<xsl:text>* { margin:0;}
</xsl:text>
<xsl:call-template name="write-mapped-CSS-styles">