[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/auxiliary source/text

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Mar 14 14:57:39 UTC 2019


 AllLangHelp_sbasic.mk                  |    1 
 source/auxiliary/sbasic.tree           |    1 
 source/text/sbasic/shared/03120300.xhp |    1 
 source/text/sbasic/shared/replace.xhp  |   52 +++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+)

New commits:
commit e6dfe7b36ebfda217fe89c18b656d2eee72c18ce
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Thu Mar 14 06:09:37 2019 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Thu Mar 14 15:57:16 2019 +0100

    tdf#124066, tdf#114263 BASIC Replace function Help
    
    with kind help of  Gerhard Weydt (tdf#124066)
    
    Change-Id: I856c8ff600774bec82daafdef63ea8cca15b5097
    Reviewed-on: https://gerrit.libreoffice.org/69255
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 859e79439..9325e065f 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -360,6 +360,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
     helpcontent2/source/text/sbasic/shared/compatible \
     helpcontent2/source/text/sbasic/shared/enum \
     helpcontent2/source/text/sbasic/shared/partition \
+    helpcontent2/source/text/sbasic/shared/replace \
     helpcontent2/source/text/sbasic/shared/uno_objects \
     helpcontent2/source/text/sbasic/shared/stardesktop \
     helpcontent2/source/text/sbasic/shared/GetPathSeparator \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 5c633bcbd..8ecb215a0 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -243,6 +243,7 @@
                     <topic id="sbasic/text/sbasic/shared/03102101.xhp">ReDim Statement</topic>
                     <topic id="sbasic/text/sbasic/shared/03010303.xhp">Red Function</topic>
                     <topic id="sbasic/text/sbasic/shared/03090407.xhp">Rem Statement</topic>
+                    <topic id="sbasic/text/sbasic/shared/replace.xhp">Replace Function</topic>
                     <topic id="sbasic/text/sbasic/shared/03020104.xhp">Reset Statement</topic>
                     <topic id="sbasic/text/sbasic/shared/03120307.xhp">Right Function</topic>
                     <topic id="sbasic/text/sbasic/shared/03020413.xhp">RmDir Statement</topic>
diff --git a/source/text/sbasic/shared/03120300.xhp b/source/text/sbasic/shared/03120300.xhp
index 3d42c6485..024dbd09f 100644
--- a/source/text/sbasic/shared/03120300.xhp
+++ b/source/text/sbasic/shared/03120300.xhp
@@ -40,6 +40,7 @@
 <embed href="text/sbasic/shared/03120304.xhp#lset"/>
 <embed href="text/sbasic/shared/03120305.xhp#ltrim"/>
 <embed href="text/sbasic/shared/03120306.xhp#mid"/>
+<embed href="text/sbasic/shared/replace.xhp#replace"/>
 <embed href="text/sbasic/shared/03120307.xhp#right"/>
 <embed href="text/sbasic/shared/03120308.xhp#rset"/>
 <embed href="text/sbasic/shared/03120309.xhp#rtrim"/>
diff --git a/source/text/sbasic/shared/replace.xhp b/source/text/sbasic/shared/replace.xhp
new file mode 100644
index 000000000..ee17e0fd1
--- /dev/null
+++ b/source/text/sbasic/shared/replace.xhp
@@ -0,0 +1,52 @@
+<?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="sbasicsharedreplace" indexer="include" status="PUBLISH">
+            <title id="tit" xml-lang="en-US">Replace Function</title>
+            <filename>/text/sbasic/shared/replace.xhp</filename>
+        </topic>
+    </meta>
+    <body>
+    <section id="replace">
+        <bookmark xml-lang="en-US" branch="index" id="bm_id721552551162491">
+            <bookmark_value>Replace function</bookmark_value>
+        </bookmark>
+        <h1 id="hd_id781552551013521"><link href="text/sbasic/shared/replace.xhp" name="Replace Function">Replace Function</link></h1>
+        <paragraph id="par_id291552551013522" role="paragraph">Replaces some string by another.</paragraph>
+    </section>
+
+    <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+    <paragraph role="code" id="par_id931552552227310">Replace (Text As String, SearchStr As String, ReplStr As String [, Start As Long [, Count as long [, Compare As Boolean]]]</paragraph>
+
+    <embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+    <paragraph role="paragraph" id="par_id911552552252024">String</paragraph>
+
+    <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+    <paragraph role="paragraph" id="par_id721552552263062"><emph>Text:</emph> Any string expression that you want to modify.</paragraph>
+    <paragraph role="paragraph" id="par_id901552552269836"><emph>SearchStr:</emph> Any string expression that shall be searched for.</paragraph>
+    <paragraph role="paragraph" id="par_id791552552275383"><emph>ReplStr:</emph> Any string expression that shall replace the found search string.</paragraph>
+    <paragraph role="paragraph" id="par_id111552552283060"><emph>Start:</emph> Numeric expression that indicates the character position within the string where the search shall begin. The maximum allowed value is 65535.</paragraph>
+    <paragraph role="paragraph" id="par_id921552552289833"><emph>Count:</emph> The maximal number of times the replace shall be performed.</paragraph>
+    <paragraph role="paragraph" id="par_id891552552302894"><emph>Compare:</emph> Optional boolean expression that defines the type of comparison. The value of this parameter can be TRUE or FALSE. The default value of TRUE specifies a text comparison that is not case-sensitive. The value of FALSE specifies a binary comparison that is case-sensitive. You can as well use 0 instead of FALSE or 1 instead of TRUE.</paragraph>
+
+    <embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
+    <embed href="text/sbasic/shared/00000003.xhp#err5"/>
+    <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+
+    <bascode>
+        <paragraph role="bascode" id="par_id991552552420717">msgbox replace ("aBbcnnbnn", "b", "$", 1, 1, FALSE)	'returns "aB$cnnbnn"</paragraph>
+        <paragraph role="bascode" id="par_id321552552440672" >REM meaning: "b" should be replaced, but</paragraph>
+        <paragraph role="bascode" id="par_id571552552467647">REM * only when lowercase (parameter 6), hence second occurrence of "b"</paragraph>
+        <paragraph role="bascode" id="par_id71552552474769">REM * only first (respecting case) occurrence (parameter 5)</paragraph>
+    </bascode>
+</body>
+</helpdocument>


More information about the Libreoffice-commits mailing list