diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-02-16 10:49:29 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-02-16 13:58:54 +0100 |
commit | 807a16ea2eda59452c92477b17702fc99943ba56 (patch) | |
tree | 042798fb1cd6072badc0a65364f00331f68ba992 /help3xsl | |
parent | 54fb08a20e9b92af1e8085f9357fbd68b515678f (diff) |
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 <olivier.hallot@libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 91 |
1 files changed, 48 insertions, 43 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index ee93c80bf7..0b9eed254d 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 --> |