diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/xhtml/header.xsl | 25 |
1 files changed, 14 insertions, 11 deletions
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> |