Tartalom
Index 🔎︎

# ScriptForge Method Signatures

A ScriptForge parancskönyvtárak a Basic makrókból vagy Python parancsfájlokból meghívható LibreOffice makroszkript-erőforrásokat gyűjtik össze. Az ide tartozó modulok és osztályok felhasználói parancsfájlokból "szolgáltatásként" hívhatók meg, amelyek tulajdonságokat, metódusokat és eseményeket tesznek közzé.

- Whenever service methods are proposed solely for LibreOffice Basic, their syntax presentation matches that of Basic subroutines, functions or properties.

- Whenever service methods are proposed for Python and Basic, or solely for Python, their syntax and arguments use a specific textual layout.

## Basic only service method

Typographical characters such as brackets, ellipsis or curly braces denote optional, repetitive or compulsory arguments:

- [opt1|opt2|opt3] Items inside brackets are optional, alternatives are indicated with a vertical bar,

- case[[sep]…] An ellipsis indicates a possible repetition, an optional separator may be specified,

- {choice1|choice2} Items inside curly braces are compulsory, alternatives are indicated with a vertical bar.

### Példa:

           FSO.HashFile(FileName As String, _
               Algorithm As String = {MD5|SHA1|SHA224|SHA256|SHA384|SHA512}) As String
           SF_Array.ImportFromCSVFile(FileName As String, _
               [Delimiter = ","], [DateFormat As String]) As Variant
           SF_String.SplitNotQuoted(InputStr As String, _
              [Delimiter As String], [Occurrences As Long], [QuoteChar As String]) As Variant

## Python or Basic service methods

The following typographical rules are mixing the UML notation, the API documentation layout and the UNO object inspector user interface:

- Optional parameters are indicated with either opt, '=' accompanying a default value, or '[ ]' brackets.

- arguments are lowercased, in order to comply with Python PEP 8 while Basic is case-agnostic.

- Collections arguments or API sequences are denoted using UML multiplicity. That applies also to return values.

- Basic data types and Python annotations are syntactically transposed as:

LibreOffice Basic | Szintaxis | Python
--- | --- | ---
Boolean (logikai) | bool | bool
Date | datetime | datetime
Double | float | float
Integer | int | int
Long | int | int
Object | obj |
Single | float | float
String | str | str
Variant | any |
UNO objektum | uno |
User Defined Type (UDT) | obj |
ScriptForge szolgáltatás | svc |

### Példa:

svc.Forms( opt form: any ): svc[0..*]

svc.MsgBox( prompt: str, buttons = svc.MB_OK , opt title: str ): opt str

svc.InputBox( prompt: str, default = "", [ title: str ], [ xpostwips: int, ypostwips: int ] ): str