[Libreoffice-commits] help.git: help3xsl/online_transform.xsl
Olivier Hallot
olivier.hallot at libreoffice.org
Fri Feb 16 12:59:20 UTC 2018
help3xsl/online_transform.xsl | 91 ++++++++++++++++++++++--------------------
1 file changed, 48 insertions(+), 43 deletions(-)
New commits:
commit 807a16ea2eda59452c92477b17702fc99943ba56
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
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 <olivier.hallot at libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>
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 ', at 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 ', at 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 ', at 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 ', at 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 -->
More information about the Libreoffice-commits
mailing list