Basic IDE

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

warning

This feature is experimental and may produce errors or behave unexpectedly. To enable it anyway, choose - LibreOfficeDev - Advanced and select Enable experimental features checkbox.


Pre prístup k tomuto príkazu...

Choose - LibreOfficeDev - Basic IDE.


Dokončovanie kódu

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

Zapnúť dokončovanie kódu

Zobrazí metódy objektu jazyka Basic. Doplňovanie kódu zobrazí metódy Basic objektu za podmienky, že ide o rozšírený UNO typ. Nefunguje s typmi Basicu základný Objekt a Variant.

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.

Príklady


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

is a valid variable definition, its methods can be accessed via the dot (".") operator:


    aPicker.getDisplayDirectory()
  

Návrh kódu

These are coding helpers for the Basic programmer.

Automatická oprava

Pri písaní opraví veľkosť písmen premenných a kľúčových slov jazyka Basic. LibreOfficeDev Basic IDE upraví zápis základných príkazov a základných premenných kódu aby sa zlepšil štýl a čitateľnosť. Úpravy kódu sú založené na deklaráciách premenných programu a na analyzovaných základných príkazoch LibreOfficeDev.

Príklady


    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).

Príklady

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

Automaticky ukončiť úvodzovky

Automaticky uzatvárať otvorené úvodzovky. LibreOfficeDev Basic IDE pridá koncovú úvodzovku zakaždým, keď napíšete úvodnú úvodzovku. Je to užitočné pri vkladaní reťazcov do kódu Basicu.

Automaticky ukončiť zátvorky

Automaticky uzatvárať otvorené zátvorky. LibreOfficeDev Basic LibreOfficeDev Basic IDE pridá zatváraciu zátvorku „)“ zakaždým, keď zadáte úvodnú zátvorku „(“.

Automaticky ukončiť procedúry

Automaticky bude vkladať uzatváracie príkazy pre procedúry. LibreOfficeDev Basic IDE vloží príkaz End Sub alebo End Function potom, ako vložíte príkaz Sub alebo Function a stlačíte Enter.

Vlastnosti jazyka

Použiť rozšírené typy

Povolí objekty typu UNO ako platné typy jazyka Basic. Táto funkcia rozširuje základné štandardné typy Basicu o typy LibreOfficeDev UNO. To umožňuje programátorovi definovať premenné so správnym typom UNO, čo je potrebné pre funkciu dokončovania kódu.

Príklady


    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
  
Warning Icon

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