Organitzaci贸 i ubicaci贸 dels scripts en Python

LibreOffice macros are grouped in module files, modules are usually grouped in library folders, and libraries are grouped in library containers although containers can contain modules too.

A library is used as a major grouping for either an entire category of macros, or for an entire application. Modules usually split functionality, such as user interaction and calculations. Individual macros are subroutines and functions. The Figure below shows an example of the hierarchical structure of macro libraries in LibreOffice.

Library Container diagram

Figure: Macro Library hierarchy

The containers are accessible in all LibreOffice programs through the user interface. Go to Tools > Macros > Organize Macros > Python, to open the Python Macros dialog.

Hi ha tres contenidors de biblioteques dins la llista Macro des de:

  1. Les meues macros: les macros personals a disposici贸 de l'usuari del LibreOffice

  2. Macros de l'aplicaci贸: macros del sistema distribu茂des amb el LibreOffice per a tots els usuaris de l'ordinador

  3. Document macros: every document can contain macro libraries available in that document for all users

Ubicacions dels scripts en Python

Refer to Getting Session Information in order to get programmatic access to Python script locations.

Macros de l'aplicaci贸

El programa d'instal路laci贸 ha col路locat les macros existents a aquesta ubicaci贸 (contenidor). Estan disponibles per a tots els usuaris de l'ordinador, i qualsevol document obert pot accedir-hi. Vos calen privilegis administratius per a emmagatzemar o modificar macros a aquesta ubicaci贸.

La ubicaci贸 del contenidor Macros del LibreOffice al sistema de fitxers dep猫n del sistema operatiu:

Les meues macros

This container is accessible only by the LibreOffice user. Any open document can access macros stored the container. Macros in this location are stored in the LibreOffice user profile.

La ubicaci贸 del contenidor Les meues macros 茅s a l'espai d'usuari i dep猫n del sistema operatiu:

Macros de document

Document macros are embedded in the document and are accessible only when the document is open.

Biblioteques, m貌duls i macros

Python macros can be organized in libraries, modules and macros. Use the Macro Library hierarchy as a guide when creating or installing new macros in module files, new module files in library folders or new library folders in containers.

Ens cal la vostra ajuda!