| Server IP : 121.121.20.254 / Your IP : 216.73.217.101 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files/LibreOffice/help/en-US/text/sbasic/shared/03/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ScriptForge Libraries</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<h1 id="hd_id31529004750471" dir="auto">
<a name="ScriptForge_lib"></a>The <span class="literal">ScriptForge</span> Library</h1>
<a name="bm_id491529070339774"></a>
<meta itemprop="keywords" content="BASIC ScriptForge library">
<meta itemprop="keywords" content="Python scriptforge module">
<a name="howtoget"></a><div class="howtoget">
<div><p class="howtogetheader" dir="auto"><a name="wie"></a>To access this command...</p></div>
<div class="howtogetbody">
<div class="embedded">
<a name="basiclibhowtoget"></a>
<p id="par_id631529000528928" class="paragraph" dir="auto">Open <span class="menuitem">Tools - Macros - LibreOffice Basic - Edit</span> and select <span class="menuitem">Application Macros</span> container.</p>
</div>
</div>
</div>
<br>
<p id="par_id681619700336879" class="paragraph" dir="auto">ScriptForge libraries build up an extensible collection of macro scripting resources for LibreOffice to be invoked from Basic macros or Python scripts.</p>
<a name="importLibs"></a>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id901528999850603" dir="auto">• Basic macros require to load <span class="literal">ScriptForge</span> library using the following statement:<br><span class="literal">GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</span><br><br>• Python scripts require an import from <span class="literal">scriptforge</span> module:<br><span class="literal">from scriptforge import CreateScriptService</span>
</p></div>
</div>
<br>
<div class="tip">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/tip.svg" alt="tip" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id1001623412767893" dir="auto">To learn more about how to create and execute Python scripts using the <span class="literal">ScriptForge</span> library, read the help page <a target="_top" href="en-US/text/sbasic/shared/03/sf_intro.html">Creating Python Scripts with ScriptForge</a>.</p></div>
</div>
<br>
<h2 id="hd_id781637256119733" dir="auto">Invoking ScriptForge services</h2>
<p id="par_id781606153472028" class="paragraph" dir="auto">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.</p>
<p id="par_id871637256506167" class="paragraph" dir="auto">The <span class="literal">Dispose</span> method is available in all services and should be called to free up resources after usage:</p>
<div class="embedded">
<a name="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">In Basic</h5>
</div>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...])
' ...
oSvc.Dispose()
</code></pre></div>
<div class="embedded">
<a name="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">In Python</h5>
</div>
<div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-python line-numbers">
from scriptforge import CreateScriptService
svc = CreateScriptService('servicename'[, arg0, arg1, ...])
# ...
svc.Dispose()
</code></pre></div>
<h2 id="hd_id851613836643580" dir="auto">Services provided by the ScriptForge library</h2>
<table border="1" class="sf_table" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th rowspan="" colspan="" class="tableheadcell" dir="auto">
<p id="par_id131613838858931" class="tableheadintable" dir="auto">Category</p>
</th>
<th rowspan="" colspan="3" class="tableheadcell" dir="auto">
<p id="par_id441613838858931" class="tableheadintable" dir="auto">Services</p>
</th>
</tr>
</thead>
<tr>
<td rowspan="" colspan="" dir="auto">
<p id="par_id851613847558931" class="tablecontentintable" dir="auto">LibreOffice Basic</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id581613836728425" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Array">Array</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Dictionary">Dictionary</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id731613840022120" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Exception">Exception</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#FileSystem">FileSystem</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id701643305576028" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#String">String</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#TextStream">TextStream</a><br>
</p>
</td>
</tr>
<tr>
<td rowspan="" colspan="" dir="auto">
<p id="par_id131613838825831" class="tablecontentintable" dir="auto">Document Content</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id771613836902464" class="paragraphintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Base">Base</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Calc">Calc</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Chart">Chart</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id441543838858931" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Database">Database</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Dataset">Dataset</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Datasheet">Datasheet</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id701643305576137" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Document">Document</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#FormDocument">FormDocument</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Writer">Writer</a><br>
</p>
</td>
</tr>
<tr>
<td rowspan="" colspan="" dir="auto">
<p id="par_id131613947858931" class="tablecontentintable" dir="auto">User Interface</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id481613837033056" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Dialog">Dialog</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#DialogControl">DialogControl</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Form">Form</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id441613885558931" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#FormControl">FormControl</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Menu">Menu</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#PopupMenu">PopupMenu</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id701643305576632" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Toolbar">Toolbar</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#ToolbarButton">ToolbarButton</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#UI">UI</a><br>
</p>
</td>
</tr>
<tr>
<td rowspan="" colspan="" dir="auto">
<p id="par_id131613866258931" class="tablecontentintable" dir="auto">Utilities</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id461613837133275" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Basic">Basic</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#L10N">L10N</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Platform">Platform</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id441613723858931" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Region">Region</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Services">Services</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Session">Session</a><br>
</p>
</td>
<td rowspan="" colspan="" dir="auto">
<p id="par_id701643305572058" class="tablecontentintable" dir="auto">
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#Timer">Timer</a><br>
<a target="_top" href="en-US/text/sbasic/shared/03/lib_ScriptForge.html#UnitTest">UnitTest</a><br><br>
</p>
</td>
</tr>
</table>
<br>
<a name="Array"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_array.html"><span class="literal">ScriptForge</span>.<span class="literal">Array</span> service</a></h2>
<p id="par_id991582454416549" class="paragraph" dir="auto">Provides a collection of methods for manipulating and transforming arrays of one dimension (vectors) and arrays of two dimensions (matrices). This includes set operations, sorting, importing from and exporting to text files.</p>
<p id="par_id681609955015503" class="paragraph" dir="auto">Arrays with more than two dimensions cannot be used with the methods in this service, the only exception being the <span class="literal">CountDims</span> method that accepts Arrays with any number of dimensions.</p>
</div>
<a name="Base"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_base.html"><span class="literal">SFDocuments</span>.<span class="literal">Base</span> service</a></h2>
<p id="par_id901619031958273" class="paragraph" dir="auto">The <span class="literal">Base</span> service provides a number of methods and properties to facilitate the management and handling of LibreOffice Base documents.</p>
<p id="par_id961619032060880" class="paragraph" dir="auto">This service is closely related to the <span class="literal">Document</span> service, which provides generic methods for handling LibreOffice documents, including Base documents. Hence, the <span class="literal">Base</span> service extends the <span class="literal">Document</span> service and provides additional methods that are specific for Base documents, enabling users to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id241619032289964" class="listitem" dir="auto">Get access to the database contained in a Base document.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id291619032292829" class="listitem" dir="auto">Open form documents stored in a Base document.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id421619032296454" class="listitem" dir="auto">Check if a form document from a Base document is currently loaded.</p>
</li>
</ul>
</div>
<a name="Basic"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_basic.html"><span class="literal">ScriptForge</span>.<span class="literal">Basic</span> service</a></h2>
<p id="par_id381589189355849" class="paragraph" dir="auto">The <span class="literal">ScriptForge.Basic</span> service proposes a collection of LibreOffice Basic methods to be executed in a Python context. <span class="literal">Basic</span> service methods reproduce the exact syntax and behaviour of Basic builtin functions.
</p>
</div>
<a name="Calc"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_calc.html"><span class="literal">SFDocuments</span>.<span class="literal">Calc</span> service</a></h2>
<p id="par_id381589189355849" class="paragraph" dir="auto">The <span class="literal">SFDocuments</span> shared library provides a number of methods and properties to facilitate the management and handling of LibreOffice documents.</p>
<p id="par_id351591014177269" class="paragraph" dir="auto">The <span class="literal">SFDocuments.Calc</span> service is a subclass of the <a target="_top" href="en-US/text/sbasic/shared/03/sf_document.html"><span class="literal">SFDocuments.Document</span></a> service. All methods and properties defined for the <span class="literal">Document</span> service can also be accessed using a <span class="literal">Calc</span> service instance.</p>
<p id="par_id591589189364267" class="paragraph" dir="auto">The <span class="literal">Calc</span> service is focused on:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id891589189452545" class="listitem" dir="auto">Handling sheets within a Calc document (copy, insert, move, etc)</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id811589189463041" class="listitem" dir="auto">Exchanging data between Basic data structures and Calc ranges</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id141599569935662" class="listitem" dir="auto">Copying and importing massive amounts of data</p>
</li>
</ul>
</div>
<a name="Chart"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_chart.html"><span class="literal">SFDocuments</span>.<span class="literal">Chart</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">Chart</span> service provides a set of properties and methods to handle charts in Calc documents. With this service it is possible to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">Access chart objects in Calc documents and manipulate their properties.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Create and insert new charts into a Calc document.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id67160078807676" class="listitem" dir="auto">Export charts as image files.</p>
</li>
</ul>
</div>
<a name="Database"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id371587913266310" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_database.html"><span class="literal">SFDatabases</span>.<span class="literal">Database</span> service</a></h2>
<p id="par_id891599407198144" class="paragraph" dir="auto">The <span class="literal">Database</span> service provides access to databases either embedded or described in Base documents. This service provides methods to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id551615386924481" class="listitem" dir="auto">Get access to data in database tables.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id551615386924285" class="listitem" dir="auto">Run <span class="literal">SELECT</span> queries and perform aggregate functions.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id551615386924111" class="listitem" dir="auto">Run SQL action statements such as <span class="literal">INSERT</span>, <span class="literal">UPDATE</span>, <span class="literal">DELETE</span>, etc.</p>
</li>
</ul>
</div>
<a name="Dataset"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_dataset.html"><span class="literal">SFDatabases</span>.<span class="literal">Dataset</span> service</a></h2>
<p id="par_id571700837631557" class="paragraph" dir="auto">The <span class="literal">Dataset</span> service is used to represent tabular data produced by a database. With this service it is possible to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id891589189452545" class="listitem" dir="auto">Navigate through and access the data in a dataset.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id811589189463041" class="listitem" dir="auto">Update, insert and remove records in a dataset.</p>
</li>
</ul>
</div>
<a name="Datasheet"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_datasheet.html"><span class="literal">SFDatabases</span>.<span class="literal">Datasheet</span> service</a></h2>
<p id="par_id901619031958273" class="paragraph" dir="auto">The <span class="literal">Datasheet</span> service allows to visualize the contents of database tables as well as the results of queries and SQL statements using Base's Data View. Additionally, this service allows to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id241619032289964" class="listitem" dir="auto">Add custom menus to the data view.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id291619032292829" class="listitem" dir="auto">Access values in specific positions of the data view.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id421619032296454" class="listitem" dir="auto">Position the cursor in a specific cell of the data view.</p>
</li>
</ul>
</div>
<a name="Dialog"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_dialog.html"><span class="literal">SFDialogs</span>.<span class="literal">Dialog</span> service</a></h2>
<p id="par_id931583589764919" class="paragraph" dir="auto">The <span class="literal">Dialog</span> service contributes to the management of dialogs created with the Basic <a target="_top" href="en-US/text/sbasic/guide/create_dialog.html">Dialog Editor</a> or dialogs created on-the-fly. Each instance of the current class represents a single dialog box displayed to the user.</p>
</div>
<a name="DialogControl"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_dialogcontrol.html"><span class="literal">SFDialogs</span>.<span class="literal">DialogControl</span> service</a></h2>
<p id="par_id931583589764919" class="paragraph" dir="auto">The <span class="literal">DialogControl</span> service manages the controls belonging to a dialog defined with the Basic <a target="_top" href="en-US/text/sbasic/guide/create_dialog.html">Dialog Editor</a>. Each instance of the current service represents a single control within a dialog box.</p>
<p id="par_id701598191157426" class="paragraph" dir="auto">The focus is set on getting and setting the values displayed by the controls of the dialog box. Formatting is accessible via the <span class="literal">XControlModel</span> and <span class="literal">XControlView</span> properties.</p>
<p id="par_id981598191184526" class="paragraph" dir="auto">Note that the unique <span class="literal">DialogControl.Value</span> property content varies according to the control type.</p>
<p id="par_id991612698027551" class="paragraph" dir="auto">A special attention is given to controls of type tree control. It is easy to populate a tree, either branch by branch, or with a set of branches at once. Populating a tree control can be performed statically or dynamically.</p>
</div>
<a name="Dictionary"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_dictionary.html"><span class="literal">ScriptForge</span>.<span class="literal">Dictionary</span> service</a></h2>
<p id="par_id891582884466217" class="paragraph" dir="auto">A dictionary is a collection of key-item pairs</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto"><p id="par_id861582884516571" class="listitem" dir="auto">The key is a case-insensitive string</p></li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto"><p id="par_id531582884549542" class="listitem" dir="auto">Items may be of any type</p></li>
</ul>
</div>
<a name="Document"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_document.html"><span class="literal">SFDocuments</span>.<span class="literal">Document</span> service</a></h2>
<p id="par_id381589189355849" class="paragraph" dir="auto">The <span class="literal">SFDocuments</span> library provides methods and properties to facilitate the management and manipulation of LibreOffice documents.</p>
<p id="par_id591589189364267" class="paragraph" dir="auto">Methods that are applicable for all types of documents (Text Documents, Sheets, Presentations, etc) are provided by the <span class="literal">SFDocuments.Document</span> service. Some examples are:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id891589189452545" class="listitem" dir="auto">Opening, closing and saving documents</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id811589189463041" class="listitem" dir="auto">Accessing standard or custom properties of documents</p>
</li>
</ul>
</div>
<a name="Exception"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id521580038927003" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_exception.html"><span class="literal">ScriptForge</span>.<span class="literal">Exception</span> service</a></h2>
<p id="par_id181587139648008" class="paragraph" dir="auto">The <span class="literal">Exception</span> service is a collection of methods to assist in code debugging in Basic and Python scripts and in error handling in Basic scripts.</p>
<p id="par_id141587140927573" class="paragraph" dir="auto">In <span class="emph">Basic scripts</span>, when a run-time error occurs, the methods and properties of the <span class="literal">Exception</span> service help identify the error context and allow to handle it.</p>
</div>
<a name="FileSystem"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_filesystem.html"><span class="literal">ScriptForge</span>.<span class="literal">FileSystem</span> service</a></h2>
<p id="par_id931583589764919" class="paragraph" dir="auto">The <span class="literal">FileSystem</span> service includes routines to handle files and folders. Next are some examples of the features provided by this service:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id121612917070593" class="listitem" dir="auto">Verify whether a file or folder exists.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id121612917070594" class="listitem" dir="auto">Create and delete folders and files.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id121612917070595" class="listitem" dir="auto">Launch dialog boxes to open/save files.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id121612917070596" class="listitem" dir="auto">Access the list of files in a folder, etc.</p>
</li>
</ul>
</div>
<a name="Form"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_form.html"><span class="literal">SFDocuments</span>.<span class="literal">Form</span> service</a></h2>
<p id="par_id931583589764919" class="paragraph" dir="auto">The <span class="literal">Form</span> service provides methods and properties to manage forms in LibreOffice documents. This service supports forms in Base, Calc and Writer documents and allows to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id381618172063851" class="listitem" dir="auto">Open and activate forms.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id261618172129782" class="listitem" dir="auto">Navigate through records shown by the form.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id281618172141607" class="listitem" dir="auto">Get access to the controls inside the form.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id371618172155483" class="listitem" dir="auto">Get access to subforms of a parent form.</p>
</li>
</ul>
</div>
<a name="FormControl"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_formcontrol.html"><span class="literal">SFDocuments</span>.<span class="literal">FormControl</span> service</a></h2>
<p id="par_id931583589764919" class="paragraph" dir="auto">The <span class="literal">FormControl</span> service provides access to the controls that belong to a form, a subform or a table control of a <span class="literal">FormDocument</span>. Each instance of the <span class="literal">FormControl</span> service refers to a single control in the form. This service allows users to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id451618771561326" class="listitem" dir="auto">Get and set the properties of the control represented by the <span class="literal">FormControl</span> instance.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id601618771565183" class="listitem" dir="auto">Access the current value displayed by the control.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id981618771567951" class="listitem" dir="auto">Set the focus on the desired control.</p>
</li>
</ul>
</div>
<a name="FormDocument"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id781582391760253" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_formdocument.html"><span class="literal">SFDocuments</span>.<span class="literal">FormDocument</span> service</a></h2>
<p id="par_id321692486382326" class="paragraph" dir="auto">The <span class="literal">FormDocument</span> service allows to access form documents stored in LibreOffice Base documents.</p>
<p id="par_id621692487292145" class="paragraph" dir="auto">In a Base document, existing form documents can be viewed by selecting <span class="menuitem">View - Forms</span> in the user interface. Each form document may be composed of one or more forms, including the main form and other sub-forms.</p>
</div>
<a name="L10N"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id521585843652750" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_l10n.html"><span class="literal">ScriptForge</span>.<span class="literal">L10N</span> service</a></h2>
<p id="par_id411585843652556" class="paragraph" dir="auto">This service provides a number of methods related to the translation of strings with minimal impact on the program's source code. The methods provided by the <span class="literal">L10N</span> service can be used mainly to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id601614351922212" class="listitem" dir="auto">Create POT files that can be used as templates for translation of all strings in the program.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id131614352196513" class="listitem" dir="auto">Get translated strings at runtime for the language defined in the <span class="literal">Locale</span> property.</p>
</li>
</ul>
</div>
<a name="Menu"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_menu.html"><span class="literal">SFWidgets</span>.<span class="literal">Menu</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">Menu</span> service can be used to create and remove menus from the menubar of a LibreOffice document window. Each menu entry can be associated with a script or with a UNO command. This service provides the following capabilities:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">Creation of menus with custom entries, checkboxes, radio buttons and separators.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Decoration of menu items with icons and tooltips.</p>
</li>
</ul>
</div>
<a name="Platform"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_platform.html"><span class="literal">ScriptForge</span>.<span class="literal">Platform</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">Platform</span> service provides a collection of properties about the current execution environment and context, such as:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">The hardware platform (architecture, CPU count, machine type, etc)</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Operating system information (OS type, release, version, etc)</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id67160078807676" class="listitem" dir="auto">The LibreOffice version</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id671600788076855" class="listitem" dir="auto">The current user name</p>
</li>
</ul>
</div>
<a name="PopupMenu"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_popupmenu.html"><span class="literal">SFWidgets</span>.<span class="literal">PopupMenu</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">PopupMenu</span> service can be used to create popup menus that can be associated with events or executed by scripts. This service provides the following capabilities:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">Creation of popup menus with custom entries, checkboxes and radio buttons.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Decoration of menu items with icons and tooltips.</p>
</li>
</ul>
</div>
<a name="Region"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_region.html"><span class="literal">ScriptForge</span>.<span class="literal">Region</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">Region</span> service provides a collection of properties and methods to handle locale and region-related aspects of programming, such as:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">Accessing locale and region-dependent settings such as number formatting, currency and timezones.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Converting timezones and calculate Daylight Saving Time (DST) offsets.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id67160078807676" class="listitem" dir="auto">Transforming numbers into text in any supported language.</p>
</li>
</ul>
</div>
<a name="Services"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id471582710868716" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_services.html"><span class="literal">ScriptForge</span>.<span class="literal">Services</span> service</a></h2>
<p id="par_id241627513489594" class="paragraph" dir="auto">The main purpose of the <span class="literal">Services</span> module is to provide access to the <span class="literal">CreateScriptService</span> method, which can be called in user scripts to instantiate services that are implemented using the ScriptForge framework.</p>
</div>
<a name="Session"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id901582814720985" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_session.html"><span class="literal">ScriptForge.Session</span> service</a></h2>
<p id="par_id861582814720987" class="paragraph" dir="auto">The <span class="literal">Session</span> service gathers various general-purpose methods about:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id34158281472051" class="listitem" dir="auto">the installation or execution environment</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id411582814720361" class="listitem" dir="auto">UNO introspection</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id321582814720863" class="listitem" dir="auto">the invocation of external scripts or programs</p>
</li>
</ul>
</div>
<a name="String"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id521580038927003" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_string.html"><span class="literal">ScriptForge</span>.<span class="literal">String</span> service</a></h2>
<p id="par_id351579602570526" class="paragraph" dir="auto">The <span class="literal">String</span> service provides a collection of methods for string processing. These methods can be used to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id611611952070366" class="listitem" dir="auto">Validate the contents of strings</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id611611952070376" class="listitem" dir="auto">Format strings by trimming, justifying or wrapping their contents</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id611611952070367" class="listitem" dir="auto">Use regular expressions to search and replace substrings</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id611611952070368" class="listitem" dir="auto">Apply hash algorithms on strings, etc.</p>
</li>
</ul>
</div>
<a name="TextStream"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id351585330787295" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_textstream.html"><span class="literal">ScriptForge</span>.<span class="literal">TextStream</span> service</a></h2>
<p id="par_id511585330787205" class="paragraph" dir="auto">The <span class="literal">TextStream</span> service is used to sequentially read from and write to files opened or created using the <span class="literal">ScriptForge.FileSystem</span> service.</p>
<p id="par_id41613596903894" class="paragraph" dir="auto">The methods <span class="literal">OpenTextFile</span> and <span class="literal">CreateTextFile</span> from the <span class="literal">FileSystem</span> service return an instance of the <span class="literal">TextStream</span> service.</p>
</div>
<a name="Timer"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_timer.html"><span class="literal">ScriptForge</span>.<span class="literal">Timer</span> service</a></h2>
<p id="par_id961582733781662" class="paragraph" dir="auto">The <span class="literal">Timer</span> service measures the amount of time it takes to run user scripts.</p>
<p id="par_id181582733781323" class="paragraph" dir="auto">A <span class="literal">Timer</span> measures <span class="emph">durations</span>. It can be:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id711582733781252" class="listitem" dir="auto">Started, to indicate when to start measuring time.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id631582733781431" class="listitem" dir="auto">Suspended, to pause measuring running time.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id691582733781498" class="listitem" dir="auto">Resumed, to continue tracking running time after the Timer has been suspended.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id31582733781344" class="listitem" dir="auto">Restarted, which will cancel previous measurements and start the <span class="literal">Timer</span> at zero.</p>
</li>
</ul>
</div>
<a name="Toolbar"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_toolbar.html"><span class="literal">SFWidgets</span>.<span class="literal">Toolbar</span> service</a></h2>
<p id="par_id571700837631557" class="paragraph" dir="auto">The <span class="literal">Toolbar</span> service allows to retrieve information related to the toolbars available for a specific document window. With this service it is possible to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id891589189452545" class="listitem" dir="auto">Toggle the visibility of specific toolbars.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id811589189463041" class="listitem" dir="auto">Access information about the buttons available in each toolbar.</p>
</li>
</ul>
</div>
<a name="ToolbarButton"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_toolbarbutton.html"><span class="literal">SFWidgets</span>.<span class="literal">ToolbarButton</span> service</a></h2>
<p id="par_id571700837631557" class="paragraph" dir="auto">The <span class="literal">ToolbarButton</span> service allows to retrieve information related to the toolbar buttons available in a given toolbar. With this service it is possible to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id891589189452545" class="listitem" dir="auto">Toggle the visibility of toolbar elements.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id811589189463041" class="listitem" dir="auto">Execute the command associated with a given toolbar button.</p>
</li>
</ul>
</div>
<a name="UI"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id371587913266310" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_ui.html"><span class="literal">ScriptForge</span>.<span class="literal">UI</span> service</a></h2>
<p id="par_id31587913266153" class="paragraph" dir="auto">The UI (User Interface) service simplifies the identification and the manipulation of the different windows composing the whole LibreOffice application:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id591587913266547" class="listitem" dir="auto">Windows selection</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id511587913266292" class="listitem" dir="auto">Windows moving and resizing</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id51587913266596" class="listitem" dir="auto">Statusbar settings</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id401599404339702" class="listitem" dir="auto">Display of a floating progress bar</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id761587913266388" class="listitem" dir="auto">Creation of new windows</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id591587913266489" class="listitem" dir="auto">Access to the underlying "documents"</p>
</li>
</ul>
</div>
<a name="UnitTest"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="bm_id681600788076499" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_unittest.html"><span class="literal">SFUnitTests</span>.<span class="literal">UnitTest</span> service</a></h2>
<p id="par_id181600788076612" class="paragraph" dir="auto">The <span class="literal">UnitTest</span> service provides a framework for automating unit tests using the Basic language, including the ability to:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id301600788076785" class="listitem" dir="auto">Aggregate test cases into test suites and unit tests.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id1001600788076848" class="listitem" dir="auto">Share setup and shutdown code among test cases.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id67160078807676" class="listitem" dir="auto">Report test results using the <span class="literal">Console</span>.</p>
</li>
</ul>
</div>
<a name="Writer"></a>
<div class="embedded">
<a name="abstract"></a>
<h2 id="hd_id731582733781114" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03/sf_writer.html"><span class="literal">SFDocuments</span>.<span class="literal">Writer</span> service</a></h2>
<p id="par_id381589189355849" class="paragraph" dir="auto">The <span class="literal">SFDocuments</span> shared library provides a number of methods and properties to facilitate the management and handling of LibreOffice documents.</p>
<p id="par_id351591014177269" class="paragraph" dir="auto">Some methods are generic for all types of documents and are inherited from the <span class="literal">SF_Document</span> module, whereas other methods that are specific for Writer documents are defined in the <span class="literal">SF_Writer</span> module.</p>
</div>
<p id="par_id331608220104798" class="paragraph" dir="auto"><span class="emph">Note:</span> Other <span class="literal">ScriptForge</span> undescribed modules are reserved for internal use. Their content is subject to change without notice.</p>
<a name="SF_InternalUse"></a>
<div class="warning">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id851506659675843" dir="auto">All <span class="literal">ScriptForge</span> 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 or Python scripts.</p></div>
</div>
<br>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03/lib_ScriptForge.xhp" target="_blank">/text/sbasic/shared/03/lib_ScriptForge.xhp</a></p>
<p dir="auto">Title is: ScriptForge Libraries</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>