EID del Basic

Defines the settings for the Basic IDE (Integrated Development Environment) to help edit macros in Basic.

Per a accedir a aquesta ordre...

Trieu ▸ LibreOffice ▸ IDE del Basic.


Compleció de codi

This feature helps the Basic programmer to complete the code, saves extensive typing and helps to reduce coding errors.

Enable code completion

Display methods of a Basic object. Code completion will display the methods of a Basic object, provided the object is a UNO extended type, and the option "Use extended types" is also on. It does not work on a generic Object or Variant Basic types.

When a variable is a UNO interface or structure, a list box appears when pressing the dot after a variable's name (like aVar. [list box appears] ). Its methods and variables are listed in the list box, displayed just below. You can navigate between the suggested methods and variables with the arrow keys. To insert the selected entry, press the Enter key or double click on it with the mouse. To cancel the list box, press the Esc key.

When typing the method's name, and pressing the Tab key once, it will complete the selected entry, pressing the Tab key again will cycle through the matches with the longest prefix. For example, when aVar.aMeth is typed, it will cycle through aMeth1, aMethod2, aMethod3 entries, and other entries are not hidden.

Exemple:


    Dim aPicker As com.sun.star.ui.dialogs.XFilePicker
  

és una definició de variable vàlida i és possible accedir als seus mètodes mitjançant l'operador punt («.»).


    aPicker.getDisplayDirectory()
  

Suggeriments de codi

These are coding helpers for the Basic programmer.

Correcció automàtica

Correct cases of Basic variables and keywords while typing. LibreOffice Basic IDE will modify the typing of Basic statements and Basic variables of your code to improve coding style and readability. Modifications of the code are based on the program's variables declarations and on the LibreOffice Basic commands parsed.

Exemple:


    Dim intVar as Integer
  

and when writing Intvar, will be corrected to intVar to match the case existing in the declaration of intVar .

Basic keywords are also automatically corrected (the list of the keywords is grabbed out from the parser).

Exemples:

Integer, String, ReDim, ElseIf, etc...

Tanca automàticament les cometes

Tanca automàticament les cometes obertes. LibreOffice IDE bàsic afegirà una cita de tancament cada vegada que escriviu una cita d'obertura. Handy per inserir cadenes al codi del Basic.

Tanca automàticament els parèntesis

Tanca automàticament els parèntesis oberts. LibreOffice Basic IDE afegirà un parèntesi de tancament «)» cada vegada que escriviu un parèntesi d'obertura «(“.

Tanca automàticament els procediments

Insereix automàticament les sentències de tancament per a procediments.LibreOffice Basic IDE afegirà una declaració End Sub o End End Function després d'escriure una sentència Sub o Function i prémer Intro.

Característiques de llengua

Utilitza tipus ampliats

Allow UNO object types as valid Basic types. This feature extends the Basic programming language standard types with the LibreOffice UNO types. This allows the programmer to define variables with the right UNO type and is necessary for the code completion feature.

Exemple:


    Sub Some_Calc_UNO_Types
    REM A spreadsheet object
        Dim oSheet As com.sun.star.sheet.XSpreadsheet
        oSheet = ThisComponent.getSheets().getByIndex(0)
    REM A cell object
        Dim oCell As com.sun.star.table.XCell
        oCell = oSheet.getCellByPosition(0,0)
    End Sub
  
Icona d'avís

The use of UNO Extended Types in Basic programs can restrain interoperability of the program when executed in other office suites.


Ens cal la vostra ajuda!