Organització de biblioteques i de mòduls

Contenidors de biblioteques del Basic

Les biblioteques del LibreOffice BASIC es poden emmagatzemar en 3 contenidors diferents:

To access macros stored in libraries of Application Macros or My Macros from another container, including the document container, use the GlobalScope specifier.

Organització de biblioteques

Creació d'una biblioteca nova

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Biblioteques.

  3. Select to where you want to attach the library in the Location list. If you select Application Macros & Dialogs, the library will belong to the LibreOffice application and will be available for all documents. If you select a document the library will be attached to this document and only available from there.

  4. Feu clic a Nou i inseriu un nom per crear una biblioteca nova.

Importació d'una biblioteca

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Biblioteques.

  3. Select to where you want to import the library in the Location list. If you select Application Macros & Dialogs, the library will belong to the LibreOffice application and will be available for all documents. If you select a document the library will be imported to this document and only available from there.

  4. Feu clic a Importa i seleccioneu una biblioteca externa per importar-la.

  5. Seleccioneu totes les biblioteques que cal importar al diàleg Importa biblioteques. El diàleg mostra totes les biblioteques contingudes al fitxer seleccionat.

  6. Si voleu inserir la biblioteca únicament com a referència, activeu la casella de selecció Insereix com a referència (només de lectura). Les biblioteques només de lectura són totalment funcionals però no es poden modificar a l'EID del Basic.

  7. Activeu la casella Reemplaça les biblioteques existents si voleu que les biblioteques existents amb el mateix nom se sobreescriguin.

  8. Feu clic a D'acord per importar la biblioteca.

Exportació d'una biblioteca

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Biblioteques.

  3. Indiqueu on està emmagatzemada la biblioteca a la llista Ubicació. Seleccioneu la biblioteca que voleu exportar. Tingueu en compte que no podeu exportar la biblioteca Estàndard.

  4. Feu clic a Exporta...

  5. Trieu si voleu exportar la biblioteca com a extensió o com a biblioteca del BASIC.

  6. Feu clic a D'acord.

  7. Seleccioneu on voleu exportar la biblioteca.

  8. Feu clic a Guarda per exportar la biblioteca.

Supressió de biblioteques

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Biblioteques.

  3. Seleccioneu la biblioteca que voleu suprimir de la llista.

  4. Feu clic a Suprimeix.

Organització de mòduls i diàlegs

Creació d'un mòdul o diàleg nou

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Mòduls o a la pestanya Diàlegs.

  3. Seleccioneu la biblioteca on s'inserirà el mòdul i feu clic a Nou.

  4. Introduïu un nom per al mòdul o el diàleg i feu clic a D'acord.

Canvi de nom d'un mòdul o d'un diàleg

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu doble clic al mòdul el nom del qual voleu canviar, amb una petita pausa entre els dos clics. Introduïu el nom nou.

    A l'EID del Basic, feu clic amb el botó dret del ratolí al nom del mòdul o del diàleg a les pestanyes de la part inferior de la pantalla, seleccioneu Canvia el nom i escriviu el nom nou.

  3. Premeu Retorn per confirmar els canvis.

Supressió d'un mòdul o d'un diàleg

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Feu clic a la pestanya Mòduls o a la pestanya Diàlegs.

  3. Seleccioneu el mòdul o el diàleg que voleu suprimir de la llista. Feu doble clic en una entrada per mostrar les subentrades, si cal.

  4. Feu clic a Suprimeix.

warning

La supressió permanent d'un mòdul suprimeix tots els procediments i les funcions existents en este mòdul.


Organització de projectes entre documents o plantilles

Moviment o còpia de mòduls entre documents, plantilles i l'aplicació.

  1. Obriu tots els documents o plantilles entre els quals voleu moure o copiar els mòduls o diàlegs.

  2. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  3. Per moure un mòdul o un diàleg a un altre document, feu clic a l'objecte corresponent de la llista i arrossegueu-lo fins a la posició que vulgueu. Una línia horitzontal indica la posició de destí de l'objecte actual mentre s'arrossega. Manteniu premuda la tecla mentre arrossegueu per copiar l'objecte en lloc de moure'l.

Ens cal la vostra ajuda!