help3xsl/online_transform.xsl | 91 ++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 43 deletions(-)
New commits: commit 807a16ea2eda59452c92477b17702fc99943ba56 Author: Olivier Hallot <[email protected]> Date: Fri Feb 16 10:49:29 2018 -0200 tdf#94017 embeded h1 entries should be h2 This improves visual appearance of help pages of menus, etc... Change-Id: Ieece5897980e1defe25cda7b28fcd16c9998dfd4 Reviewed-on: https://gerrit.libreoffice.org/49857 Reviewed-by: Olivier Hallot <[email protected]> Tested-by: Olivier Hallot <[email protected]> diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index ee93c80bf..0b9eed254 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -572,65 +572,70 @@ <!-- PARAGRAPH --> <xsl:template match="paragraph"> - <xsl:choose> + <xsl:choose> - <xsl:when test="@role='heading'"> - <xsl:call-template name="insertheading"> - <xsl:with-param name="level" select="@level"/> - </xsl:call-template> - </xsl:when> + <xsl:when test="@role='heading'"> + <xsl:call-template name="insertheading"> + <xsl:with-param name="level" select="@level"/> + </xsl:call-template> + </xsl:when> - <xsl:when test="contains(' note warning tip ',@role)"> - <xsl:call-template name="insertnote"> - <xsl:with-param name="type" select="@role" /> - </xsl:call-template> - </xsl:when> + <xsl:when test="contains(' note warning tip ',@role)"> + <xsl:call-template name="insertnote"> + <xsl:with-param name="type" select="@role" /> + </xsl:call-template> + </xsl:when> - <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> - <xsl:apply-templates /> - </xsl:when> + <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> + <xsl:apply-templates /> + </xsl:when> - <xsl:when test="@role='bascode'"> - <xsl:call-template name="insertbascode" /> - </xsl:when> + <xsl:when test="@role='bascode'"> + <xsl:call-template name="insertbascode" /> + </xsl:when> - <xsl:when test="@role='logocode'"> - <xsl:call-template name="insertlogocode" /> - </xsl:when> + <xsl:when test="@role='logocode'"> + <xsl:call-template name="insertlogocode" /> + </xsl:when> - <xsl:otherwise> - <xsl:call-template name="insertpara" /> - </xsl:otherwise> + <xsl:otherwise> + <xsl:call-template name="insertpara" /> + </xsl:otherwise> - </xsl:choose> + </xsl:choose> </xsl:template> <xsl:template match="paragraph" mode="embedded"> - <xsl:choose> + <xsl:choose> + <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded --> + <xsl:variable name="newlevel"> + <xsl:choose> + <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when> + <xsl:otherwise><xsl:value-of select="@level"/></xsl:otherwise> + </xsl:choose> + </xsl:variable> - <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded --> -<!-- <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable> --> - <xsl:call-template name="insertheading"> + <xsl:call-template name="insertheading"> + <xsl:with-param name="level" select="$newlevel"/> <xsl:with-param name="embedded" select="'yes'"/> - <xsl:with-param name="level" select="@level"/> - </xsl:call-template> - </xsl:when> + </xsl:call-template> + </xsl:when> - <xsl:when test="contains(' note warning tip ',@role)"> - <xsl:call-template name="insertnote"> - <xsl:with-param name="type" select="@role" /> - </xsl:call-template> - </xsl:when> + <xsl:when test="contains(' note warning tip ',@role)"> + <xsl:call-template name="insertnote"> + <xsl:with-param name="type" select="@role" /> + </xsl:call-template> + </xsl:when> - <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> - <xsl:apply-templates /> - </xsl:when> + <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> + <xsl:apply-templates /> + </xsl:when> - <xsl:otherwise> - <xsl:call-template name="insertpara" /> - </xsl:otherwise> + <xsl:otherwise> + <xsl:call-template name="insertpara" /> + </xsl:otherwise> - </xsl:choose> + </xsl:choose> </xsl:template> <!-- SECTION --> _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
