AllLangHelp_sbasic.mk                          |    1 
 source/auxiliary/sbasic.tree                   |    1 
 source/text/sbasic/shared/special_vba_func.xhp |   51 +++----
 source/text/sbasic/shared/strconv.xhp          |  179 +++++++++++++++++++++++++
 4 files changed, 203 insertions(+), 29 deletions(-)

New commits:
commit 68a8e252d2600cabc694d9c489ec641dbd3c902a
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Fri Jun 4 00:18:32 2021 -0300
Commit:     Olivier Hallot <olivier.hal...@libreoffice.org>
CommitDate: Mon Jun 7 19:36:15 2021 +0200

    tdf#124066 Help for VBA StrConv function
    
    1) LCID codes linked to LibreOffice internal LCID file
    2) Examples borrowed from QA tests
    
    Change-Id: I1b00a1901f32de0243b518de39abd633ba08eadc
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116684
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 0f7e60542..f40dd2d0f 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -402,6 +402,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
     helpcontent2/source/text/sbasic/shared/main0601 \
     helpcontent2/source/text/sbasic/shared/Resume \
     helpcontent2/source/text/sbasic/shared/special_vba_func \
+    helpcontent2/source/text/sbasic/shared/strconv \
     helpcontent2/source/text/sbasic/shared/vbasupport \
     helpcontent2/source/text/sbasic/python/main0000 \
     helpcontent2/source/text/sbasic/python/python_2_basic \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 40d7c6bf2..b52b277ee 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -285,6 +285,7 @@
                     <topic id="sbasic/text/sbasic/shared/03103500.xhp">Static 
keyword</topic>
                     <topic id="sbasic/text/sbasic/shared/03090408.xhp">Stop 
Statement</topic>
                     <topic id="sbasic/text/sbasic/shared/03120403.xhp">StrComp 
Function</topic>
+                    <topic id="sbasic/text/sbasic/shared/strconv.xhp">StrConv 
Function [VBA]</topic>
                     <topic id="sbasic/text/sbasic/shared/03120103.xhp">Str 
Function</topic>
                     <topic 
id="sbasic/text/sbasic/shared/03120412.xhp">StrReverse Function [VBA]</topic>
                     <topic id="sbasic/text/sbasic/shared/03120202.xhp">String 
Function</topic>
diff --git a/source/text/sbasic/shared/special_vba_func.xhp 
b/source/text/sbasic/shared/special_vba_func.xhp
index 32d98942e..8a257ee26 100644
--- a/source/text/sbasic/shared/special_vba_func.xhp
+++ b/source/text/sbasic/shared/special_vba_func.xhp
@@ -26,23 +26,20 @@
 </meta>
 
 <body>
-
-
 <section id="exclusive_vba_functions">
 <bookmark xml-lang="en-US" branch="index" id="bm_id051920170350145208">
-  <bookmark_value>VBA Functions;Introduction</bookmark_value>
+<bookmark_value>VBA Functions;Introduction</bookmark_value>
 </bookmark>
 
-
-<paragraph id="hd_id051820170313205718" role="heading" level="1" 
xml-lang="en-US"><variable id="exclusivevba"><link 
href="text/sbasic/shared/special_vba_func.xhp">Exclusive VBA Functions and 
Statements</link></variable></paragraph>
+<h1 id="hd_id051820170313205718"><variable id="exclusivevba"><link 
href="text/sbasic/shared/special_vba_func.xhp">Exclusive VBA Functions and 
Statements</link></variable></h1>
 <paragraph id="par_id051820170314436068" role="paragraph" 
xml-lang="en-US"><ahelp hid=".">%PRODUCTNAME Basic adds this set of functions 
when VBA support is enabled.</ahelp></paragraph>
 </section>
 <paragraph id="hd_id051820170407499827" role="paragraph" 
xml-lang="en-US">These exclusive VBA functions are enabled when the statement 
<item type="literal">Option VBASupport 1</item> is placed before the first 
macro of a %PRODUCTNAME Basic module. </paragraph>
 
 <section id="vbastatements">
-    <bookmark xml-lang="en-US" branch="index" id="bm_id71543455697570">
-        <bookmark_value>VBA Statements</bookmark_value>
-    </bookmark>
+<bookmark xml-lang="en-US" branch="index" id="bm_id71543455697570">
+<bookmark_value>VBA Statements</bookmark_value>
+</bookmark>
     <h2 id="hd_id31543446449360">VBA Statements</h2>
     <embed href="text/sbasic/shared/compatible.xhp#optioncompatiblestatement"/>
     <embed href="text/sbasic/shared/classmodule.xhp#classmodulefunction"/>
@@ -51,20 +48,21 @@
 
 <section id="VBAString">
 <bookmark xml-lang="en-US" branch="index" id="bm_id05192017035621676">
-  <bookmark_value>VBA Functions;Text Functions</bookmark_value>
+<bookmark_value>VBA Functions;Text Functions</bookmark_value>
 </bookmark>
-<paragraph id="par_id051820170355592834" role="heading" level="2" 
xml-lang="en-US">Text functions</paragraph>
+<h2 id="par_id051820170355592834">Text functions</h2>
 <embed href="text/sbasic/shared/03120111.xhp#ascw"/>
 <embed href="text/sbasic/shared/03120112.xhp#chrw"/>
 <embed href="text/sbasic/shared/03120411.xhp#instrrev"/>
 <embed href="text/sbasic/shared/03120412.xhp#strreverse"/>
+<embed href="text/sbasic/shared/strconv.xhp#vbastrconv"/>
 </section>
 
 <section id="VBAFinancial">
-    <bookmark xml-lang="en-US" branch="index" id="bm_id051920170357078705">
-        <bookmark_value>VBA Functions;Financial Functions</bookmark_value>
-    </bookmark>
-<paragraph id="par_id051820170355592581" role="heading" level="2" 
xml-lang="en-US">Financial functions</paragraph>
+<bookmark xml-lang="en-US" branch="index" id="bm_id051920170357078705">
+<bookmark_value>VBA Functions;Financial Functions</bookmark_value>
+</bookmark>
+<h2 id="par_id051820170355592581">Financial functions</h2>
 <embed href="text/sbasic/shared/03140000.xhp#ddb"/>
 <embed href="text/sbasic/shared/03140001.xhp#fv"/>
 <embed href="text/sbasic/shared/03140002.xhp#ipmt"/>
@@ -82,9 +80,9 @@
 
 <section id="VBADateTime">
 <bookmark xml-lang="en-US" branch="index" id="bm_id051920170358102074">
-    <bookmark_value>VBA Functions;Date and Time Functions</bookmark_value>
+<bookmark_value>VBA Functions;Date and Time Functions</bookmark_value>
 </bookmark>
-<paragraph id="par_id051820170356005357" role="heading" level="2" 
xml-lang="en-US">Date and time functions</paragraph>
+<h2 id="par_id051820170356005357">Date and time functions</h2>
 <embed href="text/sbasic/shared/03150000.xhp#FormatDateTime"/>
 <embed href="text/sbasic/shared/03150002.xhp#MonthName"/>
 <embed href="text/sbasic/shared/03150001.xhp#WeekdayName"/>
@@ -92,36 +90,31 @@
 
 <section id="VBAIO">
 <bookmark xml-lang="en-US" branch="index" id="bm_id051920170358002074">
-  <bookmark_value>VBA Functions;I/O Functions</bookmark_value>
+<bookmark_value>VBA Functions;I/O Functions</bookmark_value>
 </bookmark>
 
-<paragraph id="par_id051820170356006501" role="heading" level="2" 
xml-lang="en-US">I/O Functions</paragraph>
+<h2 id="par_id051820170356006501">I/O Functions</h2>
 <embed href="text/sbasic/shared/03160000.xhp#Input"/>
 </section>
 
 <section id="VBAMath">
 <bookmark xml-lang="en-US" branch="index" id="bm_id051920170358346963">
-  <bookmark_value>VBA Functions;Mathematical Functions</bookmark_value>
-  <bookmark_value>VBA Functions;formatting numbers</bookmark_value>
-  <bookmark_value>VBA Functions;partitioning numbers</bookmark_value>
+<bookmark_value>VBA Functions;Mathematical Functions</bookmark_value>
+<bookmark_value>VBA Functions;formatting numbers</bookmark_value>
+<bookmark_value>VBA Functions;partitioning numbers</bookmark_value>
 </bookmark>
-
-<paragraph id="par_id051820170356005221" role="heading" level="2" 
xml-lang="en-US">Mathematical Functions</paragraph>
+<h2 id="par_id051820170356005221">Mathematical Functions</h2>
 <embed href="text/sbasic/shared/03170000.xhp#Round"/>
 <embed href="text/sbasic/shared/03170010.xhp#formatnumber"/>
 <embed href="text/sbasic/shared/partition.xhp#vbapartition"/>
-
 </section>
 
 <section id="VBAObject">
-
 <bookmark xml-lang="en-US" branch="index" id="bm_id051920170359045662">
-  <bookmark_value>VBA Functions;Object Properties and Methods</bookmark_value>
+<bookmark_value>VBA Functions;Object Properties and Methods</bookmark_value>
 </bookmark>
-
-<paragraph id="hd_id051920170347039686" role="heading" level="2" 
xml-lang="en-US">Object Properties and Methods</paragraph>
+<h2 id="hd_id051920170347039686">Object Properties and Methods</h2>
 <embed href="text/sbasic/shared/ErrVBA.xhp#VBAErrObject"/>
-
 </section>
 </body>
 </helpdocument>
diff --git a/source/text/sbasic/shared/strconv.xhp 
b/source/text/sbasic/shared/strconv.xhp
new file mode 100644
index 000000000..81267e187
--- /dev/null
+++ b/source/text/sbasic/shared/strconv.xhp
@@ -0,0 +1,179 @@
+<?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="strconvvbafunc" indexer="include" status="PUBLISH">
+    <title id="tit" xml-lang="en-US">StrConv Function [VBA]</title>
+    <filename>/text/sbasic/shared/strconv.xhp</filename>
+  </topic>
+</meta>
+<body>
+<bookmark xml-lang="en-US" branch="index" id="bm_id941622761814292">
+<bookmark_value>StrConv function</bookmark_value>
+</bookmark>
+<section id="vbastrconv">
+    <h1 id="hd_id791622761498015"><link href="text/sbasic/shared/strconv.xhp" 
name="StrConv Function">StrConv Function</link></h1>
+    <paragraph id="par_id621622761498018" role="paragraph" 
xml-lang="en-US"><variable id="variable name">Convert a string as specified by 
a conversion type.</variable></paragraph>
+</section>
+<embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="code" id="par_id771622762489917">StrConv(Text, Conversion, [ 
LCID ])</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+<paragraph role="paragraph" id="par_id971548420129767" 
localize="false">String</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph role="paragraph" id="par_id421622762822934"><emph>Text</emph>: Any 
valid string expression.</paragraph>
+<paragraph role="paragraph" 
id="par_id671622762931475"><emph>Conversion</emph>: The type of conversion to 
perform, as defined in the table below.</paragraph>
+<table id="tab_id91622763145456">
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id531622763145456" 
role="tablehead">Conversion</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id131622763145457" 
role="tablehead">Value</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id411622763145457" 
role="tablehead">Description</paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id721622763145457" role="tablecontent" 
localize="false">vbUpperCase</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id11622763145458" role="tablecontent" 
localize="false">1</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id421622763145458" role="tablecontent">Converts 
<emph>Text</emph> characters to uppercase.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id91622763415122" role="tablecontent" 
localize="false">vbLowerCase</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id911622763415123" role="tablecontent" 
localize="false">2</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id251622763427976" role="tablecontent" 
xml-lang="en-US">Converts <emph>Text</emph> characters lowercase.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id1001622764064614" role="tablecontent" 
localize="false">vbProperCase</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id21622764064614" role="tablecontent" 
localize="false">3</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id531622764070154" role="tablecontent" 
xml-lang="en-US">Converts the first letter of every word in <emph>Text</emph> 
to uppercase.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id891622764187452" role="tablecontent" 
localize="false">vbWide</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id471622764187452" role="tablecontent" 
localize="false">4</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id881622764192628" role="tablecontent" 
xml-lang="en-US" >Converts narrow (<link 
href="text/shared/00/00000005.xhp#halfwidth" 
name="halfwidth">half-width</link>) characters in <emph>Text</emph> to wide 
(<link href="text/shared/00/00000005.xhp#halfwidth" 
name="halfwidth">full-width</link>) characters.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id121622764454098" role="tablecontent" 
localize="false">vbNarrow</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id31622764454099" role="tablecontent" 
localize="false">8</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id71622764459352" role="paragraph" 
xml-lang="en-US">Converts wide (<link 
href="text/shared/00/00000005.xhp#halfwidth" 
name="halfwidth">full-width</link>) characters in <emph>Text</emph> to narrow 
(<link href="text/shared/00/00000005.xhp#halfwidth" 
name="halfwidth">half-width</link>) characters.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id801622764558261" role="tablecontent" 
localize="false">vbKatakana</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id531622764558262" role="tablecontent" 
localize="false">16</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id371622764565366" role="tablecontent" 
xml-lang="en-US" >Converts Hiragana characters in <emph>Text</emph> to Katakana 
characters.</paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id771622764721149" role="tablecontent" 
localize="false">vbHiragana</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id901622764721150" role="tablecontent" 
localize="false">32</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id911622764728794" role="tablecontent" 
xml-lang="en-US">Converts Katakana characters in <emph>Text</emph> to Hiragana 
characters.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id211622764833771" role="tablecontent" 
localize="false">vbUnicode</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id321622764833772" role="tablecontent" 
localize="false">64</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id21622764841321" role="tablecontent" 
xml-lang="en-US">Converts <emph>Text</emph> characters to Unicode characters 
using the default code page of the system.</paragraph>
+        </tablecell>
+    </tablerow>
+        <tablerow>
+        <tablecell>
+            <paragraph id="par_id901622764984846" role="tablecontent" 
xml-lang="en-US" >vbFromUnicode</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id281622764984846" role="tablecontent" 
xml-lang="en-US" >128</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id221622764991492" role="tablecontent" 
xml-lang="en-US" >Converts <emph>Text</emph> characters from Unicode to the 
default code page of the system.</paragraph>
+        </tablecell>
+    </tablerow>
+</table>
+<paragraph role="paragraph" id="par_id761622765118156"><emph>LCID</emph> 
Optional. The Locale ID in decimal number. If this parameter is omitted, it 
assumes the system Locale ID. Refer to the file <link 
href="https://opengrok.libreoffice.org/xref/core/l10ntools/source/ulfconv/msi-encodinglist.txt";
 name="LCID">msi-encodinglist.txt</link> for the available LCID 
values.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<bascode>
+<paragraph role="bascode" id="par_id321548420503855" xml-lang="en-US" 
localize="false">Option VBASupport 1</paragraph>
+<paragraph role="bascode" id="par_id431548420514604" xml-lang="en-US" 
localize="false">Option Explicit</paragraph>
+<paragraph role="bascode" id="par_id181548420522842" xml-lang="en-US" 
localize="false">Sub Test_StrConv</paragraph>
+    <paragraph role="bascode" id="par_id251622770431375" xml-lang="en-US" 
localize="false">Print StrConv("abc EFG hij", vbUpperCase) '= "ABC EFG 
HIJ"</paragraph>
+    <paragraph role="bascode" id="par_id321622770438020" xml-lang="en-US" 
localize="false">Print StrConv("abc EFG hij", vbLowerCase) ' =  "abc efg 
hij"</paragraph>
+    <paragraph role="bascode" id="par_id271622770442247" xml-lang="en-US" 
localize="false">Print StrConv("abc EFG hij", vbProperCase) ' = "Abc Efg Hij" 
vbProperCase)")</paragraph>
+
+    <paragraph role="bascode" id="par_id311622770486052" xml-lang="en-US">REM 
Converts narrow (single-byte) characters in string to wide</paragraph>
+    <paragraph role="bascode" id="par_id31622770457020" xml-lang="en-US" 
localize="false">Print StrConv("ABCDEVB¥ì¥¹¥­¥å©", vbWide) ' = 
"ABCDEVB¥ì¥¹¥­¥å©"</paragraph>
+
+    <paragraph role="bascode" id="par_id231622770493491" xml-lang="en-US">REM 
Converts wide (double-byte) characters in string to narrow (single-byte) 
characters</paragraph>
+    <paragraph role="bascode" id="par_id371622770464200" xml-lang="en-US" 
localize="false">Print StrConv("ABCD@$%23'?EG", vbNarrow) ' = 
"ABCD@$%23'?EG"</paragraph>
+
+    <paragraph role="bascode" id="par_id871622770498992" xml-lang="en-US">REM 
Converts Hiragana characters in string to Katakana characters</paragraph>
+    <paragraph role="bascode" id="par_id291622770470204" xml-lang="en-US" 
localize="false">Print StrConv("かたかな", vbKatakana) ' = "カタカナ"</paragraph>
+
+    <paragraph role="bascode" id="par_id351622770504087" xml-lang="en-US">REM 
Converts Katakana characters in string to Hiragana characters</paragraph>
+    <paragraph role="bascode" id="par_id601622770474346" xml-lang="en-US" 
localize="false">Print StrConv("カタカナ", vbHiragana) '= "かたかな"</paragraph>
+
+    <paragraph role="bascode" id="par_id861622770508875" xml-lang="en-US" 
localize="false">REM  Assumes CP-1252 encoding associated with en-US locale 
used in unit tests.</paragraph>
+    <paragraph role="bascode" id="par_id481622770521394" xml-lang="en-US" 
localize="false">Dim x() As Byte</paragraph>
+    <paragraph role="bascode" id="par_id691622770750591" xml-lang="en-US" 
localize="false">x = StrConv("ÉϺ£ÊÐABC", vbFromUnicode)</paragraph>
+    <paragraph role="bascode" id="par_id841622770962002" xml-lang="en-US" 
localize="false">Print UBound(x) ' 8 characters</paragraph>
+    <paragraph role="bascode" id="par_id931622770966903" xml-lang="en-US" 
localize="false">Print x(2) ' = 186</paragraph>
+    <paragraph role="bascode" id="par_id91622770974484" xml-lang="en-US" 
localize="false">Print StrConv(x, vbUnicode)' = "ÉϺ£ÊÐABC"</paragraph>
+<paragraph role="bascode" id="par_id121622772546703" xml-lang="en-US" 
localize="false">End Sub</paragraph>
+</bascode>
+<section id="relatedtopics">
+    <embed href="text/sbasic/shared/special_vba_func.xhp#exclusivevba"/>
+</section>
+</body>
+</helpdocument>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to