[Libreoffice-commits] help.git: source/get_bookmark.sh source/get_bookmark.xsl

Olivier olivier.hallot at libreoffice.org
Tue Dec 20 18:26:41 UTC 2016


 source/get_bookmark.sh  |   65 +++++++++++++++++++++++++++++++++---------------
 source/get_bookmark.xsl |    6 ++--
 2 files changed, 49 insertions(+), 22 deletions(-)

New commits:
commit 84c9ad7e308a3fa3809529aac4557c0b4cde823e
Author: Olivier <olivier.hallot at libreoffice.org>
Date:   Tue Dec 20 16:20:42 2016 -0200

    Sort bookmarks alphabetically in HC3
    
    Change-Id: Id26048f7ebfdccc2e5afd8a851a0f30c7a78fda0
    Reviewed-on: https://gerrit.libreoffice.org/32249
    Reviewed-by: Olivier Hallot <olivier.hallot at edx.srv.br>
    Tested-by: Olivier Hallot <olivier.hallot at edx.srv.br>

diff --git a/source/get_bookmark.sh b/source/get_bookmark.sh
index b979a07..2957cb2 100755
--- a/source/get_bookmark.sh
+++ b/source/get_bookmark.sh
@@ -9,56 +9,83 @@
 stub1='<ul class="indexlink">'
 stub2='</ul>'
 ffile=bookmark_calc.html
-rm -f $ffile
+ffile2=temp.html
+rm -f $ffile $ffile2
+find text/scalc -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/scalc -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_writer.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/swriter -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/swriter -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_draw.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/sdraw -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/sdraw -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_impress.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/simpress -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/simpress -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_shared.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/shared -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/shared -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_chart.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/schart -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/schart -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_math.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/smath -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/smath -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_basic.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/sbasic -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/sbasic -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
 
 ffile=bookmark_base.html
-rm -f $ffile
+rm -f $ffile $ffile2
+touch $ffile2
+find text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile2
 echo $stub1 > $ffile
-find text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile
+awk 'NF' $ffile2 >> $ffile
+sort -k3b -t\> -s -o $ffile $ffile
 echo $stub2 >> $ffile
-
+rm -f $ffile2
diff --git a/source/get_bookmark.xsl b/source/get_bookmark.xsl
index 3b1be23..6f1bd17 100644
--- a/source/get_bookmark.xsl
+++ b/source/get_bookmark.xsl
@@ -53,9 +53,9 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:variable name="href" select="concat($filename,'#', at id)"/>
            <xsl:for-each select="bookmark_value">
 		     <li><a href="{$href}" target="_top">
-                     <xsl:apply-templates>
-                           <xsl:value-of select="."/>
-                     </xsl:apply-templates>
+                     <xsl:call-template name="brand"><xsl:with-param name="string">
+                          <xsl:value-of select="."/>
+                     </xsl:with-param></xsl:call-template>
                      </a></li><xsl:text>&#xA;</xsl:text>
            </xsl:for-each>
       </xsl:for-each>


More information about the Libreoffice-commits mailing list