General Structure

From Apache OpenOffice Wiki
Jump to: navigation, search



The library system that is used to store Basic source code modules and Dialogs has three levels:

Library container

  • The library container represents the top level of the library hierarchy containing libraries. The libraries inside a library container are accessed by name.

Library

  • A library contains elements that logically belong together, for example, several Basic modules that form a program or a set of related dialogs together.

Library elements

  • Library elements are Basic source code modules or dialogs. The elements represent the lowest level in the library hierarchy. For Basic source code modules, the element type is string. Dialogs are represented by the interface com.sun.star.io.XInputStreamProvider that provides access to the XML data describing the dialog.

The hierarchy is separated for Basic source code and dialogs, that is, a Basic library container only contains Basic libraries containing Basic source code modules and a dialog library container only contains dialog libraries containing dialogs.

Basic source code and dialogs are stored globally for the whole office application and locally in documents. For the application, there is one Basic library container and one dialog library container. Every document has one Basic library container and one dialog library container as well. By including the application or document level, the library system actually has four levels. Illustration 1: Sample module structure depicts this structure.

As shown in the library hierarchy for Document 1, the Basic and dialog library containers do not have the same structure. The Basic library container has a library named Library1 and the dialog library container has a library named Library2. The library containers are separated for Basic and dialogs in the API.

It is not recommended to create a structure as described above because the library and dialog containers are not separated in the GUI, for example, in the OpenOffice Basic Macros dialog. When a user creates or deletes a new library in the OpenOffice Basic Macro Organizer dialog , the library is created or deleted in the Basic and the dialog library containers.

Simple module structure
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages