[Libreoffice-commits] core.git: 2 commits - filter/source
Svante Schubert (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 2 12:21:59 UTC 2021
filter/source/xslt/odf2xhtml/export/xhtml/header.xsl | 30 ++++++++++---------
1 file changed, 17 insertions(+), 13 deletions(-)
New commits:
commit a973087c2380738b20d8fe2b91f9f534169714f0
Author: Svante Schubert <svante.schubert at gmail.com>
AuthorDate: Mon Aug 24 12:08:27 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 2 13:21:23 2021 +0100
HTML XSLT: List empty CSS styles (ODF styles without CSS mappable styles) only as a comment
Change-Id: I0be491ff96d0b454d064618426da5aa3f861b7f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111612
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index d5043d07c4b0..110b88aeff43 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -137,8 +137,9 @@
</xsl:for-each>
<!-- Otherwise all styles have been processed and the empty styles have to be given out -->
- <xsl:text>/* ODF styles with no properties representable as CSS */</xsl:text><xsl:text>
- </xsl:text><xsl:for-each select="$globalData/all-styles/style[final-properties = '']"><xsl:value-of select="concat('.', @style:name, ' ')"/></xsl:for-each> { }
+ <xsl:text>/* ODF styles with no properties representable as CSS:
+ </xsl:text><xsl:for-each select="$globalData/all-styles/style[final-properties = '']"><xsl:value-of select="concat('.', @style:name, ' ')"/></xsl:for-each><xsl:text> { } */
+</xsl:text>
</xsl:template>
<!-- Creating CSS page layout based on first office master style -->
commit 3282db181aa63dda00ca7c45af1037911762e5b3
Author: Svante Schubert <svante.schubert at gmail.com>
AuthorDate: Mon Aug 24 11:48:01 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 2 13:21:04 2021 +0100
HTML XSLT: Only write page {} information when they exist
Change-Id: I213645835745e992fe6f2aa79a678d177a97c45f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111611
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index 8264aa50ad67..d5043d07c4b0 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -167,20 +167,23 @@
<!-- Find the according style:page-layout and store the properties in a variable -->
<xsl:variable name="pageProperties" select="key('pageLayoutElements', $pageLayoutName)/style:page-layout-properties"/>
-<xsl:text>@page { </xsl:text>
-
- <xsl:call-template name="page-size">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="pageProperties" select="$pageProperties" />
- </xsl:call-template>
- <xsl:call-template name="page-margin">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="pageProperties" select="$pageProperties" />
- </xsl:call-template>
+ <xsl:variable name="pageSize">
+ <xsl:call-template name="page-size">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="pageProperties" select="$pageProperties" />
+ </xsl:call-template>
+ <xsl:call-template name="page-margin">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="pageProperties" select="$pageProperties" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$pageSize and $pageSize!=''">
+<xsl:text>@page { </xsl:text>
+<xsl:value-of select="$pageSize"/>
<xsl:text> }
</xsl:text>
-
+ </xsl:if>
</xsl:template>
More information about the Libreoffice-commits
mailing list