GlobalScope specifier

To manage personal or shared library containers (Application Macros or My Macros) from within a document, use the GlobalScope specifier.

Basic source code and dialogs are organized in library containers. Libraries can contain modules and dialogs.

На Basic:

Basic libraries and modules can be managed with the BasicLibraries object. Libraries can be searched, explored and loaded on request. Monitoring Documents Events illustrates LibreOffice library loading.

Π’ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²Ρ‹Ρ… ΠΎΠΊΠ½Π°Ρ…:

Dialog libraries and dialogs can be managed with the DialogLibraries object. Opening a Dialog With Basic illustrates how to display LibreOffice shared dialogs.

BasicLibraries and DialogLibraries containers exist at application level and within every document. Document's library containers do not need the GlobalScope specifier to be managed. If you want to call a global library container (located in Application Macros or My Macros) from within a document, you must use the GlobalScope specifier.

Syntax:

GlobalScope specifier

Example:

ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Π½Π° Basic


    ' Π²Ρ‹Π·ΠΎΠ² Dialog1 Π² Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ΅ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² Standard
    oDlgDesc = DialogLibraries.Standard.Dialog1
    ' Π²Ρ‹Π·ΠΎΠ² Dialog2 Π² Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ΅ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ Library1
    oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2