AllLangHelp_scalc.mk                   |    2 +
 helpers/calc_text_func.xsl             |   48 +++++++++++++++++++++++++++++
 source/text/scalc/01/04060110.xhp      |   50 +------------------------------
 source/text/scalc/01/func_bahttext.xhp |   42 ++++++++++++++++++++++++++
 source/text/scalc/01/func_base.xhp     |   53 +++++++++++++++++++++++++++++++++
 5 files changed, 147 insertions(+), 48 deletions(-)

New commits:
commit a3d5c1442a38c08407b4a0e4e54d4ca79d14e380
Author:     Pierre F <f...@bger.ch>
AuthorDate: Mon Sep 2 12:33:30 2024 +0200
Commit:     Olivier Hallot <olivier.hal...@libreoffice.org>
CommitDate: Fri Oct 4 18:20:25 2024 +0200

    tdf#143846 split BASE + BAHTTEXT
    
    new helper : xsltproc  --stringparam func BAHTTEXT 
helpers/calc_text_func.xsl source/text/scalc/01/04060110.xhp > 
source/text/scalc/01/bahttext.xhp
    
    Change-Id: I40c33d486c45ef0a3316dba1c0aea4af68ff9f37
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/172748
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk
index e291a4a258..c1b44cdbc4 100644
--- a/AllLangHelp_scalc.mk
+++ b/AllLangHelp_scalc.mk
@@ -200,6 +200,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\
     helpcontent2/source/text/scalc/01/func_asc \
     helpcontent2/source/text/scalc/01/func_averageif \
     helpcontent2/source/text/scalc/01/func_averageifs \
+    helpcontent2/source/text/scalc/01/func_base \
+    helpcontent2/source/text/scalc/01/func_bahttext \
     helpcontent2/source/text/scalc/01/func_ceiling \
     helpcontent2/source/text/scalc/01/func_countifs \
     helpcontent2/source/text/scalc/01/func_color \
diff --git a/helpers/calc_text_func.xsl b/helpers/calc_text_func.xsl
new file mode 100644
index 0000000000..e2d379d9e7
--- /dev/null
+++ b/helpers/calc_text_func.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+<xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+
+<xsl:param name="func" select="BASE"/>
+
+<xsl:template match="/">
+  <xsl:for-each select="//section/h2[contains(text(), $func)]">
+       
+       <xsl:call-template name="section"/>
+  </xsl:for-each>
+</xsl:template> 
+
+<xsl:template name="section">
+  <helpdocument version="1.0">
+  <xsl:comment>
+    * This file is part of the LibreOffice project.
+    *
+    * This Source Code Form is subject to the terms of the Mozilla Public
+    * License, v. 2.0. If a copy of the MPL was not distributed with this
+    * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+    *
+  </xsl:comment>
+  <meta>
+    <topic id="calcfunc_{../@id}" indexer="include" status="PUBLISH">
+        <title id="tit"><xsl:value-of select="text()"/> Function</title>
+        <filename>/text/scalc/01/func_<xsl:value-of 
select="../@id"/>.xhp</filename>
+    </topic>
+  </meta>
+  <body>
+  
+    <xsl:copy-of select="preceding-sibling::*"/>
+<section id="func_{../@id}">
+    <h1 id="{@id}">
+      <variable id="{../@id}_h1">
+        <link href="text/scalc/01/func_{../@id}.xhp"><xsl:value-of 
select="text()"/></link>
+      </variable>
+    </h1>
+   <xsl:copy-of select="following-sibling::*[1]"/>
+
+</section>
+    <xsl:copy-of select="following-sibling::*[1]/following-sibling::*"/>
+
+  </body>
+</helpdocument>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/source/text/scalc/01/04060110.xhp 
b/source/text/scalc/01/04060110.xhp
index 4e36aec2d5..9b56a621df 100644
--- a/source/text/scalc/01/04060110.xhp
+++ b/source/text/scalc/01/04060110.xhp
@@ -91,57 +91,11 @@
 </section>
 
 <section id="bahttext">
-<bookmark branch="index" id="bm_id9323709">
-  <bookmark_value>BAHTTEXT function</bookmark_value>
-</bookmark>
-<bookmark branch="hid/SC_HID_FUNC_BAHTTEXT" id="bm_id744346" 
localize="false"/><comment>i66350</comment>
-<h2 id="hd_id6695455">BAHTTEXT</h2>
-<paragraph id="par_id354014" role="paragraph">Converts a number to Thai text, 
including the Thai currency names.</paragraph>
-
-<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
-<paragraph id="par_id8780785" role="code">BAHTTEXT(Number)</paragraph>
-<paragraph id="par_id1539353" role="paragraph"> <emph>Number</emph> is any 
number. "Baht" is appended to the integral part of the number, and "Satang" is 
appended to the decimal part of the number.</paragraph>
-
-<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
-<paragraph id="par_id3289284" role="paragraph"> <item 
type="input">=BAHTTEXT(12.65)</item> returns a string in Thai characters with 
the meaning of "Twelve Baht and sixty five Satang".</paragraph>
-    <embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
-    <embed href="text/scalc/01/common_func.xhp#notODFF"/>
-    <paragraph role="paragraph" id="par_id341640873986703" 
localize="false"><literal>COM.MICROSOFT.BAHTTEXT</literal></paragraph>
+  <embed href="text/scalc/01/func_bahttext.xhp#func_bahttext"/>
 </section>
 
 <section id="base">
-<bookmark branch="index" id="bm_id3153072">
-  <bookmark_value>BASE function</bookmark_value>
-</bookmark>
-
-<bookmark branch="hid/SC_HID_FUNC_BASIS" id="bm_id3150957" localize="false"/>
-<bookmark branch="index" id="bm_id3156399">
-  <bookmark_value>decimal system; converting to</bookmark_value>
-</bookmark>
-<h2 id="hd_id3153072">BASE</h2>
-<paragraph id="par_id3153289" role="paragraph"><ahelp 
hid="HID_FUNC_BASIS">Converts a positive integer to a specified base into a 
text from the <link href="text/shared/00/00000005.xhp#number_system">numbering 
system</link>.</ahelp> The digits 0-9 and the letters A-Z are used.</paragraph>
-
-<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
-<paragraph id="par_id3155743" role="code">BASE(Number; Radix [; 
MinimumLength])</paragraph>
-<paragraph id="par_id3151339" role="paragraph"> <emph>Number</emph> is the 
positive integer to be converted.</paragraph>
-<paragraph id="par_id3159262" role="paragraph"> <emph>Radix</emph> indicates 
the base of the numeral system. It may be any positive integer between 2 and 
36.</paragraph>
-<paragraph id="par_id3148746" role="paragraph"> <emph>MinimumLength</emph> 
(optional) determines the minimum length of the character sequence that has 
been created. If the text is shorter than the indicated minimum length, zeros 
are added to the left of the string.</paragraph>
-
-<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
-<paragraph id="par_id3156399" role="paragraph"> <item 
type="input">=BASE(17;10;4)</item> returns 0017 in the decimal 
system.</paragraph>
-<bookmark branch="index" id="bm_id3157871">
-  <bookmark_value>binary system; converting to</bookmark_value>
-</bookmark>
-
-<paragraph id="par_id3157871" role="paragraph"> <item 
type="input">=BASE(17;2)</item> returns 10001 in the binary system.</paragraph>
-<bookmark branch="index" id="bm_id3145226">
-  <bookmark_value>hexadecimal system; converting to</bookmark_value>
-</bookmark>
-
-<paragraph id="par_id3145226" role="paragraph"> <item 
type="input">=BASE(255;16;4)</item> returns 00FF in the hexadecimal 
system.</paragraph>
-
-<embed href="text/scalc/01/common_func.xhp#sectionseealso"/>
-<paragraph role="paragraph" id="par_id991655560817321"><link 
href="text/scalc/01/04060110.xhp#decimal">DECIMAL</link></paragraph>
+  <embed href="text/scalc/01/func_base.xhp#func_base"/>
 </section>
 
 <section id="char">
diff --git a/source/text/scalc/01/func_bahttext.xhp 
b/source/text/scalc/01/func_bahttext.xhp
new file mode 100644
index 0000000000..aad6e7d8c1
--- /dev/null
+++ b/source/text/scalc/01/func_bahttext.xhp
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+<!--
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+-->
+  <meta>
+    <topic id="calcfunc_bahttext" indexer="include" status="PUBLISH">
+      <title id="tit">BAHTTEXT Function</title>
+      <filename>/text/scalc/01/func_bahttext.xhp</filename>
+    </topic>
+  </meta>
+  <body>
+    <bookmark branch="index" id="bm_id9323709">
+  <bookmark_value>BAHTTEXT function</bookmark_value>
+</bookmark>
+    <bookmark branch="hid/SC_HID_FUNC_BAHTTEXT" id="bm_id744346" 
localize="false"/>
+    <comment>i66350</comment>
+    <section id="func_bahttext">
+      <h1 id="hd_id6695455">
+        <variable id="bahttext_h1">
+          <link href="text/scalc/01/func_bahttext.xhp">BAHTTEXT</link>
+        </variable>
+      </h1>
+      <paragraph id="par_id354014" role="paragraph">Converts a number to Thai 
text, including the Thai currency names.</paragraph>
+    </section>
+    <embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
+    <paragraph id="par_id8780785" role="code">BAHTTEXT(Number)</paragraph>
+    <paragraph id="par_id1539353" role="paragraph"> <emph>Number</emph> is any 
number. "Baht" is appended to the integral part of the number, and "Satang" is 
appended to the decimal part of the number.</paragraph>
+    <embed href="text/scalc/01/common_func.xhp#sectionexample"/>
+    <paragraph id="par_id3289284" role="paragraph"> <item 
type="input">=BAHTTEXT(12.65)</item> returns a string in Thai characters with 
the meaning of "Twelve Baht and sixty five Satang".</paragraph>
+    <embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
+    <embed href="text/scalc/01/common_func.xhp#notODFF"/>
+    <paragraph role="paragraph" id="par_id341640873986703" localize="false">
+      <literal>COM.MICROSOFT.BAHTTEXT</literal>
+    </paragraph>
+  </body>
+</helpdocument>
diff --git a/source/text/scalc/01/func_base.xhp 
b/source/text/scalc/01/func_base.xhp
new file mode 100644
index 0000000000..50c923a0cd
--- /dev/null
+++ b/source/text/scalc/01/func_base.xhp
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+<!--
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+-->
+  <meta>
+    <topic id="calcfunc_base" indexer="include" status="PUBLISH">
+      <title id="tit">BASE Function</title>
+      <filename>/text/scalc/01/func_base.xhp</filename>
+    </topic>
+  </meta>
+  <body>
+    <bookmark branch="index" id="bm_id3153072">
+  <bookmark_value>BASE function</bookmark_value>
+</bookmark>
+    <bookmark branch="hid/SC_HID_FUNC_BASIS" id="bm_id3150957" 
localize="false"/>
+    <bookmark branch="index" id="bm_id3156399">
+  <bookmark_value>decimal system; converting to</bookmark_value>
+</bookmark>
+    <section id="func_base">
+      <h1 id="hd_id3153072">
+        <variable id="base_h1">
+          <link href="text/scalc/01/func_base.xhp">BASE</link>
+        </variable>
+      </h1>
+      <paragraph id="par_id3153289" role="paragraph"><ahelp 
hid="HID_FUNC_BASIS">Converts a positive integer to a specified base into a 
text from the <link href="text/shared/00/00000005.xhp#number_system">numbering 
system</link>.</ahelp> The digits 0-9 and the letters A-Z are used.</paragraph>
+    </section>
+    <embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
+    <paragraph id="par_id3155743" role="code">BASE(Number; Radix [; 
MinimumLength])</paragraph>
+    <paragraph id="par_id3151339" role="paragraph"> <emph>Number</emph> is the 
positive integer to be converted.</paragraph>
+    <paragraph id="par_id3159262" role="paragraph"> <emph>Radix</emph> 
indicates the base of the numeral system. It may be any positive integer 
between 2 and 36.</paragraph>
+    <paragraph id="par_id3148746" role="paragraph"> <emph>MinimumLength</emph> 
(optional) determines the minimum length of the character sequence that has 
been created. If the text is shorter than the indicated minimum length, zeros 
are added to the left of the string.</paragraph>
+    <embed href="text/scalc/01/common_func.xhp#sectionexample"/>
+    <paragraph id="par_id3156399" role="paragraph"> <item 
type="input">=BASE(17;10;4)</item> returns 0017 in the decimal 
system.</paragraph>
+    <bookmark branch="index" id="bm_id3157871">
+  <bookmark_value>binary system; converting to</bookmark_value>
+</bookmark>
+    <paragraph id="par_id3157871" role="paragraph"> <item 
type="input">=BASE(17;2)</item> returns 10001 in the binary system.</paragraph>
+    <bookmark branch="index" id="bm_id3145226">
+  <bookmark_value>hexadecimal system; converting to</bookmark_value>
+</bookmark>
+    <paragraph id="par_id3145226" role="paragraph"> <item 
type="input">=BASE(255;16;4)</item> returns 00FF in the hexadecimal 
system.</paragraph>
+    <embed href="text/scalc/01/common_func.xhp#sectionseealso"/>
+    <paragraph role="paragraph" id="par_id991655560817321">
+      <link href="text/scalc/01/04060110.xhp#decimal">DECIMAL</link>
+    </paragraph>
+  </body>
+</helpdocument>

Reply via email to