summaryrefslogtreecommitdiff
path: root/source/text/sbasic/shared/03/lib_ScriptForge.xhp
blob: 522fb1e8373ec3275df5cb9af266c63e08bf7bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?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="toolsbasiclibrary" indexer="include" status="PUBLISH">
            <title id="tit" xml-lang="en-US">ScriptForge Libraries</title>
            <filename>/text/sbasic/shared/03/lib_ScriptForge.xhp</filename>
        </topic>
    </meta>
    <body>
    <h1 id="hd_id31529004750471" xml-lang="en-US"><variable id="ScriptForge_lib"><link href="text/sbasic/shared/03/lib_ScriptForge.xhp" name="ScriptForge library">The <literal>ScriptForge</literal> Library</link></variable></h1>
    <bookmark xml-lang="en-US" branch="index" id="bm_id491529070339774">
        <bookmark_value>BASIC ScriptForge library</bookmark_value>
    </bookmark>
    <section id="howtoget">
        <embed href="text/sbasic/shared/00000003.xhp#basiclibhowtoget"/>
    </section>
    <paragraph role="paragraph" id="par_id681619700336879">ScriptForge libraries build up an extensible collection of macro scripting resources for %PRODUCTNAME to be invoked from Basic macros or Python scripts.</paragraph>
    <note id="par_id901528999850603" localize="false">&#8226; Basic macros require to load <literal>ScriptForge</literal> library using the following statement:<br/>   <literal>GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</literal><br/><br/>&#8226; Python scripts require an import from <literal>scriptforge</literal> module:<br/>
      <literal>from scriptforge import CreateScriptService</literal>
    </note>
    <paragraph role="paragraph" id="par_id781606153472028">The described modules and classes are invoked from user scripts as "Services". A generic constructor of those services has been designed for that purpose for each language:</paragraph>
    <bascode>
      <paragraph role="bascode" localize="false" id="bas_id901619770181787">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
      <paragraph role="bascode" localize="false" id="bas_id201606153529501">Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...])</paragraph>
    </bascode>
    <pycode>
      <paragraph role="pycode" id="pyc_id701619701322002" localize="false">from scriptforge import CreateScriptService</paragraph>
      <paragraph role="pycode" id="pyc_id531619701322249" localize="false">svc = CreateScriptService('servicename'[, arg0, arg1, ...])</paragraph>
      <paragraph role="pycode" id="pyc_id471619701322489"></paragraph>
    </pycode>
    <note id="par_id851605659675843">The <literal>ScriptForge</literal> Basic library is available from %PRODUCTNAME 7.1 onwards.<br/>Python <literal>scriptforge</literal> module is available from %PRODUCTNAME 7.2 onwards.</note>
  <h2 id="hd_id851613836643580">Services provided by the ScriptForge library</h2>
  <table id="tab_id311613838858931">
    <tablerow>
       <tablecell>
         <paragraph id="par_id131613838858931" role="tablehead">Category</paragraph>
       </tablecell>
       <tablecell>
         <paragraph id="par_id441613838858931" role="tablehead">Services</paragraph>
       </tablecell>
       <tablecell>
         <paragraph id="par_id441613839128931" localize="false" role="tablehead"></paragraph>
       </tablecell>
    </tablerow>
    <tablerow>
       <tablecell>
         <paragraph id="par_id851613847558931" role="tablecontent">%PRODUCTNAME Basic</paragraph>
       </tablecell>
       <tablecell>
         <paragraph role="tablecontent" localize="false" id="par_id581613836728425">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Array" name="Array service">Array</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Dictionary" name="Dictionary service">Dictionary</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Exception" name="Exception service">Exception</link><br/>
         </paragraph>
       </tablecell>
       <tablecell>
         <paragraph role="tablecontent" localize="false" id="par_id731613840022120">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#FileSystem" name="FileSystem service">FileSystem</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#String" name="String service">String</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#TextStream" name="TextStream service">TextStream</link>
         </paragraph>
       </tablecell>
    </tablerow>
    <tablerow>
      <tablecell>
         <paragraph id="par_id131613838825831" role="tablecontent">Document Content</paragraph>
       </tablecell>
       <tablecell>
         <paragraph role="paragraph" localize="false" id="par_id771613836902464">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Base" name="Base service">Base</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Calc" name="Calc service">Calc</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Database" name="Database service">Database</link>
         </paragraph>
       </tablecell>
       <tablecell>
         <paragraph id="par_id441543838858931" localize="false" role="tablecontent">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Document" name="Document service">Document</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Form" name="Form service">Form</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#FormControl" name="FormControl service">FormControl</link>
         </paragraph>
       </tablecell>
    </tablerow>
    <tablerow>
      <tablecell>
         <paragraph id="par_id131613947858931" role="tablecontent">User Interface</paragraph>
       </tablecell>
       <tablecell>
         <paragraph role="tablecontent" localize="false" id="par_id481613837033056">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Dialog" name="Dialog service">Dialog</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#DialogControl" name="DialogControl service">DialogControl</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#UI" name="UI service">UI</link>
         </paragraph>
       </tablecell>
       <tablecell>
         <paragraph id="par_id441613885558931" localize="false" role="tablecontent"></paragraph>
       </tablecell>
    </tablerow>
    <tablerow>
      <tablecell>
         <paragraph id="par_id131613866258931" role="tablecontent">Utilities</paragraph>
       </tablecell>
       <tablecell>
         <paragraph role="tablecontent" localize="false" id="par_id461613837133275">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Basic" name="Basic service">Basic</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#L10N" name="L10N service">L10N</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Platform" name="Platform service">Platform</link><br/>
         </paragraph>
       </tablecell>
       <tablecell>
         <paragraph id="par_id441613723858931" localize="false" role="tablecontent">
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Services" name="Services service">Services</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Session" name="Session service">Session</link><br/>
           <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Timer" name="Timer service">Timer</link><br/><br/>
         </paragraph>
       </tablecell>
    </tablerow>
  </table>
    <section id="Array">
      <embed href="text/sbasic/shared/03/sf_array.xhp#abstract"/>
    </section>
    <section id="Base">
      <embed href="text/sbasic/shared/03/sf_base.xhp#abstract"/>
    </section>
    <section id="Basic">
      <embed href="text/sbasic/shared/03/sf_basic.xhp#abstract"/>
    </section>
    <section id="Calc">
      <embed href="text/sbasic/shared/03/sf_calc.xhp#abstract"/>
    </section>
    <section id="Database">
      <embed href="text/sbasic/shared/03/sf_database.xhp#abstract"/>
    </section>
    <section id="Dialog">
      <embed href="text/sbasic/shared/03/sf_dialog.xhp#abstract"/>
    </section>
    <section id="DialogControl">
      <embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#abstract"/>
    </section>
    <section id="Dictionary">
      <embed href="text/sbasic/shared/03/sf_dictionary.xhp#abstract"/>
    </section>
    <section id="Document">
      <embed href="text/sbasic/shared/03/sf_document.xhp#abstract"/>
    </section>
    <section id="Exception">
      <embed href="text/sbasic/shared/03/sf_exception.xhp#abstract"/>
    </section>
    <section id="FileSystem">
      <embed href="text/sbasic/shared/03/sf_filesystem.xhp#abstract"/>
    </section>
    <section id="Form">
      <embed href="text/sbasic/shared/03/sf_form.xhp#abstract"/>
    </section>
    <section id="FormControl">
      <embed href="text/sbasic/shared/03/sf_formcontrol.xhp#abstract"/>
    </section>
    <section id="L10N">
      <embed href="text/sbasic/shared/03/sf_l10n.xhp#abstract"/>
    </section>
    <section id="Platform">
      <embed href="text/sbasic/shared/03/sf_platform.xhp#abstract"/>
    </section>
    <section id="Services">
      <embed href="text/sbasic/shared/03/sf_services.xhp#abstract"/>
    </section>
    <section id="Session">
      <embed href="text/sbasic/shared/03/sf_session.xhp#abstract"/>
    </section>
    <section id="String">
      <embed href="text/sbasic/shared/03/sf_string.xhp#abstract"/>
    </section>
    <section id="TextStream">
      <embed href="text/sbasic/shared/03/sf_textstream.xhp#abstract"/>
    </section>
    <section id="Timer">
      <embed href="text/sbasic/shared/03/sf_timer.xhp#abstract"/>
    </section>
    <section id="UI">
      <embed href="text/sbasic/shared/03/sf_ui.xhp#abstract"/>
    </section>
    <comment>Restricted use for SF_Root, SF_Utils modules as well as internal methods</comment>
    <paragraph role="paragraph" id="par_id331608220104798"><emph>Note:</emph> Other <literal>ScriptForge</literal> undescribed modules are reserved for internal use. Their content is subject to change without notice.</paragraph>
    <section id="SF_InternalUse">
      <warning id="par_id851506659675843">All <literal>ScriptForge</literal> Basic routines or identifiers that are prefixed with an underscore character "_" are reserved for internal use. They are not meant be used in Basic macros.</warning>
    </section>
</body>
</helpdocument>