GlobalScope specifier

To manage personal or shared library containers (LibreOffice 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 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 LibreOffice Macros or My Macros) from within a document, you must use the GlobalScope specifier.

Syntax:

GlobalScope specifier

Example:

рдЖрдзрд╛рд░рднреВрдд рдХрд╛рдЧрдЬрд╛рддрдХрд╛ рдЙрджрд╛рд╣рд░рдг


    рдХрд╛рдЧрдЬрд╛рдд рд▓рд╛рдЗрдмреНрд░реЗрд░реА рдорд╛рдирдХрдорд╛ рд╕рдВрд╡рд╛рджрез рдмреЛрд▓рд╛рдЙрджрд╛
    oDlgDesc = DialogLibraries.Standard.Dialog1
    рдЕрдиреБрдкреНрд░рдпреЛрдЧ рд▓рд╛рдЗрдмреНрд░реЗрд░реА рд▓рд╛рдЗрдмреНрд░реЗрд░реАрезрдорд╛ рд╕рдВрд╡рд╛рджреи рдмреЛрд▓рд╛рдЙрджрд╛
    oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2