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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Jan 26 11:11:44 UTC 2019


 AllLangHelp_sbasic.mk                          |    1 
 source/auxiliary/sbasic.tree                   |    1 
 source/text/sbasic/shared/03103350.xhp         |   12 ++---
 source/text/sbasic/shared/classmodule.xhp      |   13 +++--
 source/text/sbasic/shared/compatible.xhp       |    8 +--
 source/text/sbasic/shared/partition.xhp        |   60 +++++++++++++++++++++++++
 source/text/sbasic/shared/special_vba_func.xhp |   15 ++----
 7 files changed, 86 insertions(+), 24 deletions(-)

New commits:
commit 3f27275900a441c45af6c7e91901c98def81623a
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Fri Jan 25 11:58:07 2019 -0200
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Sat Jan 26 12:11:22 2019 +0100

    tdf#114263 Help page for Partition [VBA]
    
    + some hyperlinks and reordering of text in calssmodule
    and compatible, option vba support.
    
    Change-Id: Ic387086a5874989d22cf93caf0f3d0f48fd77a9e
    Reviewed-on: https://gerrit.libreoffice.org/66910
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 2b54b99fd..e8c2c202f 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -359,6 +359,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
     helpcontent2/source/text/sbasic/shared/classmodule \
     helpcontent2/source/text/sbasic/shared/compatible \
     helpcontent2/source/text/sbasic/shared/enum \
+    helpcontent2/source/text/sbasic/shared/partition \
     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 58fc08930..28d5a1161 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -227,6 +227,7 @@
                     <topic id="sbasic/text/sbasic/shared/03103350.xhp">Option VBASupport Statement</topic>
                     <topic id="sbasic/text/sbasic/shared/03104100.xhp">Optional (in Function Statement)</topic>
                     <topic id="sbasic/text/sbasic/shared/03060500.xhp">Or-Operator</topic>
+                    <topic id="sbasic/text/sbasic/shared/partition.xhp">Partition Function [VBA]</topic>
                     <topic id="sbasic/text/sbasic/shared/03140007.xhp">Pmt Function [VBA]</topic>
                     <topic id="sbasic/text/sbasic/shared/03140008.xhp">PPmt Function [VBA]</topic>
                     <topic id="sbasic/text/sbasic/shared/03140009.xhp">PV Function [VBA]</topic>
diff --git a/source/text/sbasic/shared/03103350.xhp b/source/text/sbasic/shared/03103350.xhp
index 015d57770..80f3f0a9c 100644
--- a/source/text/sbasic/shared/03103350.xhp
+++ b/source/text/sbasic/shared/03103350.xhp
@@ -39,12 +39,11 @@
 <paragraph id="par_id3148538" role="paragraph" xml-lang="en-US">Specifies that %PRODUCTNAME Basic will support some VBA statements, functions and objects.</paragraph>
 </section>
 <paragraph id="par_id051720171055367194" role="note" xml-lang="en-US">The support for VBA is not complete, but covers a large portion of the common usage patterns.</paragraph>
-
+<embed href="text/sbasic/shared/00000003.xhp#beforeexecutable"/>
 <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
 <paragraph id="par_id3149514" role="code" localize="false" xml-lang="en-US">Option VBASupport {1|0}</paragraph>
 
 <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
-<embed href="text/sbasic/shared/00000003.xhp#beforeexecutable"/>
 
 <paragraph id="par_id051720171055361727" role="paragraph" xml-lang="en-US">1: Enable VBA support in %PRODUCTNAME</paragraph>
 <paragraph id="par_id051720171055369857" role="paragraph" xml-lang="en-US">0: Disable VBA support</paragraph>
@@ -53,15 +52,18 @@
 <bascode>
 <paragraph id="par_idm1340938880" role="bascode" localize="false" xml-lang="en-US">Option VBASupport 1</paragraph>
 <paragraph id="par_idm1340937648" role="bascode" localize="false" xml-lang="en-US">Sub ExampleVBA</paragraph>
-<paragraph id="par_id051720171055368852" role="bascode" localize="false" xml-lang="en-US">Dim sVar As Single</paragraph>
-<paragraph id="par_id051720171055369387" role="bascode" localize="false" xml-lang="en-US"> sVar = Worksheets("Sheet1").Range("A1")</paragraph>
-<paragraph id="par_id051720171055365423" role="bascode" localize="false" xml-lang="en-US">Print sVar</paragraph>
+<paragraph id="par_id051720171055368852" role="bascode" localize="false" xml-lang="en-US">    Dim sVar As Single</paragraph>
+<paragraph id="par_id051720171055369387" role="bascode" localize="false" xml-lang="en-US">    sVar = Worksheets("Sheet1").Range("A1")</paragraph>
+<paragraph id="par_id051720171055365423" role="bascode" localize="false" xml-lang="en-US">    Print sVar</paragraph>
 <paragraph id="par_idm1340929616" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
 </bascode>
 
 <section id="relatedtopics">
 <paragraph id="par_id051720171119254111" role="paragraph" xml-lang="en-US"><link href="text/shared/optionen/01130100.xhp">VBA Properties</link></paragraph>
 <paragraph id="par_id051720170424259343" role="paragraph" xml-lang="en-US"><link href="text/sbasic/shared/vbasupport.xhp">VBA support in %PRODUCTNAME</link></paragraph>
+<embed href="text/sbasic/shared/compatible.xhp#compatiblestatement"/>
+<embed href="text/sbasic/shared/compatible.xhp#compatibilitymodestatement"/>
+<embed href="text/sbasic/shared/classmodule.xhp#classmodulestatement"/>
 </section>
 </body>
 </helpdocument>
diff --git a/source/text/sbasic/shared/classmodule.xhp b/source/text/sbasic/shared/classmodule.xhp
index a6ddac738..13d95b9cb 100644
--- a/source/text/sbasic/shared/classmodule.xhp
+++ b/source/text/sbasic/shared/classmodule.xhp
@@ -18,13 +18,16 @@
       <bookmark branch="index" id="N0082">
          <bookmark_value>Option ClassModule</bookmark_value>
       </bookmark>
-      <h1 id="N0083"><variable id="classmodulestatement"><link href="text/sbasic/shared/classmodule.xhp" name="option classmodule">Option ClassModule Statement</link></variable></h1>
-      <paragraph role="paragraph" id="N0084">Specifies that the module is a class module that contains members, properties, procedures and functions.</paragraph>
-      <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
-      <paragraph role="code" id="N0086">Option ClassModule</paragraph>
+
+      <section id="classmodulefunction">
+          <h1 id="N0083"><variable id="classmodulestatement"><link href="text/sbasic/shared/classmodule.xhp" name="option classmodule">Option ClassModule Statement</link></variable></h1>
+          <paragraph role="paragraph" id="N0084">Specifies that the module is a class module that contains members, properties, procedures and functions.</paragraph>
+      </section>
+      <embed href="text/sbasic/shared/00000003.xhp#beforeexecutable"/>
       <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
-      <warning id="N0088">This statement must be added before the executable program code in a module.</warning>
       <paragraph role="paragraph" id="N0089">This statement must be used jointly with <literal>Option Compatible</literal> statement or <literal>Option VBASupport 1</literal>, the former is enabling VBA compatibility mode, while the latter is enforcing VBA support on top of compatibility.</paragraph>
+      <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+      <paragraph role="code" id="N0086">Option ClassModule</paragraph>
       <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
       <bascode>
          <paragraph role="bascode" localize="false" id="N0092">Option Compatible</paragraph>
diff --git a/source/text/sbasic/shared/compatible.xhp b/source/text/sbasic/shared/compatible.xhp
index 3d8824adf..d533ceaf7 100644
--- a/source/text/sbasic/shared/compatible.xhp
+++ b/source/text/sbasic/shared/compatible.xhp
@@ -23,9 +23,9 @@
 
     <section id="optioncompatiblestatement">
         <h1 id="N0104"><variable id="compatiblestatement"><link href="text/sbasic/shared/compatible.xhp" name="compatible">Option Compatible Statement</link></variable></h1>
+        <paragraph role="paragraph" id="N0106"><literal>Option Compatible</literal> turns on VBA compatible Basic compiler mode at module level. Function <literal>CompatibilityMode()</literal> controls runtime mode and affects all code executed after setting or resetting the mode.</paragraph>
     </section>
     <embed href="text/sbasic/shared/00000003.xhp#beforeexecutable"/>
-    <paragraph role="paragraph" id="N0106"><literal>Option Compatible</literal> turns on VBA compatible Basic compiler mode at module level. Function <literal>CompatibilityMode()</literal> controls runtime mode and affects all code executed after setting or resetting the mode.</paragraph>
     <paragraph role="paragraph" id="N0107">This option may affect or assist in the following situations:</paragraph>
     <list type="unordered">
         <listitem><paragraph role="listitem" id="N0108">Allow special characters as identifiers.</paragraph></listitem>
@@ -40,10 +40,10 @@
     <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
     <paragraph role="code" localize="false" id="N0117">Option Compatible</paragraph>
     <section id="compatibilitymodefunction">
-        <h1 id="N0118"><variable id="compatibilitymodestatement"><link href="text/sbasic/shared/compatible.xhp" name="CompatibilityMode">CompatibilityMode() function</link></variable></h1>
-    </section>
+        <h1 id="N0118"><variable id="compatibilitymodestatement"><link href="text/sbasic/shared/compatible.xhp" name="CompatibilityMode">CompatibilityMode() Function</link></variable></h1>
+        <paragraph role="paragraph" id="N0120"><literal>CompatibilityMode()</literal> function is controlling runtime mode and affects all code executed after setting or resetting the mode. <literal>Option Compatible</literal> turns on VBA compatibility at module level for the %PRODUCTNAME Basic compiler.</paragraph>
+        </section>
     <warning id="N0119">Use this feature with caution, limit it to document conversion situations for example.</warning>
-    <paragraph role="paragraph" id="N0120"><literal>CompatibilityMode()</literal> function is controlling runtime mode and affects all code executed after setting or resetting the mode. <literal>Option Compatible</literal> turns on VBA compatibility at module level for the %PRODUCTNAME Basic compiler.</paragraph>
     <paragraph role="paragraph" id="N0121">This function may affect or help in the following situations:</paragraph>
     <list type="unordered">
         <listitem><paragraph role="listitem" id="N0122">Creating enumerations with Enum statement</paragraph></listitem>
diff --git a/source/text/sbasic/shared/partition.xhp b/source/text/sbasic/shared/partition.xhp
new file mode 100644
index 000000000..09e42f54e
--- /dev/null
+++ b/source/text/sbasic/shared/partition.xhp
@@ -0,0 +1,60 @@
+<?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="vbapartition" indexer="include" status="PUBLISH">
+            <title id="tit" xml-lang="en-US">Partition Function</title>
+            <filename>/text/sbasic/shared/partition.xhp</filename>
+        </topic>
+    </meta>
+    <body>
+    <section id="vbapartition">
+        <bookmark xml-lang="en-US" branch="index" id="bm_id31548421805896">
+            <bookmark_value>Partition Function</bookmark_value>
+        </bookmark>
+        <h1 id="hd_id171548419512929"><link href="text/sbasic/shared/partition.xhp" name="Partition function">Partition Function [VBA]</link></h1>
+        <paragraph role="paragraph" id="par_id461548419700445">Returns a string indicating where a number occurs within a calculated series of ranges.</paragraph>
+    </section>
+    <embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
+    <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+    <paragraph role="code" id="par_id111548419647867">Partition( Number, Start, End, Interval)</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_id481548420000538"><emph>Number</emph>: Required. The number to determine the partition.</paragraph>
+    <paragraph role="paragraph" id="par_id841548420006137"><emph>Start</emph>: Required. An integer number defining the lower value of the range of numbers.</paragraph>
+    <paragraph role="paragraph" id="par_id781548420012105"><emph>End</emph>: Required. An integer number defining the highest value of the range.</paragraph>
+    <paragraph role="paragraph" id="par_id371548420017250"><emph>Interval</emph>: Required. An integer number that specifies the size of the partitions within the range of numbers (between Start and End).</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_Partition</paragraph>
+        <paragraph role="bascode" id="par_id721548420527861" xml-lang="en-US" localize="false">    Dim retStr As String</paragraph>
+        <paragraph role="bascode" id="par_id21548420534821" xml-lang="en-US" localize="false">    retStr = Partition(20, 0, 98, 5)</paragraph>
+        <paragraph role="bascode" id="par_id561548420541509" xml-lang="en-US">    print "20:24  the number 20 occurs in the range: " & retStr</paragraph>
+        <paragraph role="bascode" id="par_id261548420553088" xml-lang="en-US" localize="false">    retStr = Partition(20, 0, 99, 1)</paragraph>
+        <paragraph role="bascode" id="par_id161548420558523" xml-lang="en-US">    print " 20: 20 the number 20 occurs in the range: " & retStr</paragraph>
+        <paragraph role="bascode" id="par_id251548420573894" xml-lang="en-US" localize="false">    retStr = Partition(120, 0, 99, 5)</paragraph>
+        <paragraph role="bascode" id="par_id561548420579525" xml-lang="en-US">    print  "100:  the number 120 occurs in the range: " & retStr</paragraph>
+        <paragraph role="bascode" id="par_id611548420591014" xml-lang="en-US" localize="false">    retStr = Partition(-5, 0, 99, 5)</paragraph>
+        <paragraph role="bascode" id="par_id921548420596118" xml-lang="en-US">    print "   : -1 the number -5 occurs in the range: " & retStr</paragraph>
+        <paragraph role="bascode" id="par_id561548420604604" xml-lang="en-US" localize="false">    retStr = Partition(2, 0, 5, 2)</paragraph>
+        <paragraph role="bascode" id="par_id861548420616153" xml-lang="en-US" >    print " 2: 3 the number 2 occurs in the range: " & retStr</paragraph>
+        <paragraph role="bascode" id="par_id841548421054219" xml-lang="en-US" localize="false">End Sub</paragraph>
+    </bascode>
+    <section id="relatedtopics">
+        <embed href="text/sbasic/shared/00000003.xhp#VBAMath"/>
+    </section>
+</body>
+</helpdocument>
diff --git a/source/text/sbasic/shared/special_vba_func.xhp b/source/text/sbasic/shared/special_vba_func.xhp
index 7d7d16cda..3d3f43644 100644
--- a/source/text/sbasic/shared/special_vba_func.xhp
+++ b/source/text/sbasic/shared/special_vba_func.xhp
@@ -44,6 +44,9 @@
         <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/compatible.xhp#compatibilitymodefunction"/>
+    <embed href="text/sbasic/shared/classmodule.xhp#classmodulefunction"/>
     <embed href="text/sbasic/shared/enum.xhp#enumheading"/>
 </section>
 
@@ -98,17 +101,16 @@
 </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>
 
 <paragraph id="par_id051820170356005221" role="heading" level="2" xml-lang="en-US">Mathematical Functions</paragraph>
 <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>
 
@@ -120,13 +122,6 @@
 
 <paragraph id="hd_id051920170347039686" role="heading" level="2" xml-lang="en-US">Object Functions</paragraph>
 
-<list type="unordered">
-  <listitem>
-    <paragraph id="par_id051820170335289499" role="paragraph" localize="false" xml-lang="en-US">Me</paragraph>
-  </listitem>
-  <listitem>
-    <paragraph id="par_id051820170335293856" role="paragraph" localize="false" xml-lang="en-US">RTL</paragraph>
-  </listitem></list>
 </section>
 </body>
 </helpdocument>


More information about the Libreoffice-commits mailing list