Libraries

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 13:43, 16 May 2022 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



The following illustrations show the OpenOffice Basic Macro Organizer dialog with the Libraries tab page activated. In this dialog, the application and document libraries are listed separately. The Library list only contains the libraries of the library container currently selected in the Location list box. The second illustration is dropped down showing the My Macros & Dialogs and OpenOffice Macros & Dialogs entries and the two open documents.

The Libraries tab page in the Macro Organizer dialog
The Libraries tab page showing the Application/Document selection

The libraries are displayed in the following manner:

  • Regular libraries are displayed in black.
  • Libraries with read-only status are grayed out.
  • Library links are followed by an URL indicating the location where the library is stored. In the example above, all libraries except for Standard and Library1 are library links and all library links have read-only status.
  • Password protected libraries are indicated with a key symbol before the name. In the example, only Library1 is password protected.

Clicking a library twice (not double-click) allows the user to rename it.

The following list describes the buttons on the right side of the dialog:

  • Edit
Loads the first module of the library selected in the Library list box into the Basic macro editor (see Basic Source Editor and Debugger below). If the library only contains dialogs, the first dialog of the corresponding dialog library is displayed in the Dialog editor (see Dialog Editor below). If the Basic/Dialog editor window does not exist, it is opened.
  • Close
Closes the OpenOffice Basic Macro Organizer dialog without any further action.
  • Password
Opens the Change Password dialog displayed in the next illustration for the library currently selected in the Library list box.
This dialog is used to change the password if the library is already password protected. Enter the old password first, then the new password twice.
If the library is not password protected, the Old password edit field is disabled. The new password is entered twice in the New password section. Clicking OK activates the password protection if both passwords match.
The Change Password dialog
  • New
Opens a dialog allowing the user to enter the name for a new library. The name edit field initially contains the name Library<Number>, such as Library1 and Library2, depending on the libraries already existing. Clicking the OK button creates the library and adds it to the Library list. A new library is always created as a Basic and dialog library.
  • Import
This button is used to import additional libraries into the library container that is selected in the Location list box. The button opens a file dialog where the user selects the location where the library is imported from. The following types of files can be selected:
  • Library container index files (script.xlc or dialog.xlc)
  • Library index files (script.xlb or dialog.xlb)
  • Apache OpenOffice documents (e.g. *.odt, *.ods, *.sxw, *.sxc, *.sdw, *.sdc)
  • Star Office 5.x and previous Basic library files (*.sbl)
After selecting a file, an Import library dialog is displayed. The next illustration shows the dialog after selecting a library index file script.xlb. The dialog displays all libraries that are found in the chosen file. In this example, only the library Euro appears, because the file script.xlb only represented this library.
The Import Libraries dialog
The checkboxes in the Options section, when selected, indicates if a library is inserted as a read-only link and if existing libraries with the same name are replaced by the new library.
The next illustration shows the dialog after selecting the writer document LibraryImportExample. This document contains the four libraries Standard, Library1, Library2 and Library3. The illustration shows that the libraries Library1 and Library2 are selected for import. The Insert as reference (read-only) option is disabled, because the libraries inside documents cannot be referenced as a link. As well, StarOffice 5.x Basic library files can not be linked.
The Import Libraries dialog with selected libraries
Clicking the OK button imports the selected libraries into the library container that was previously selected in the Location list box, including the Basic and dialog libraries.
  • Export
This button is used to export a library. The Standard library cannot be exported. Clicking the button displays the Export Basic library dialog.
The Export Basic Library dialog
This dialog allows to chose between two export formats. Choosing Export as package and clicking OK opens the Export library as package file dialog allowing to save the library in the UNO package bundle format that can be easily imported from other Apache OpenOffice installations using the Package Manager available in the Tools menu. So this format should be used for deploying Basic libraries.
The Export library as package dialog
Choosing Export as BASIC library in the Export Basic library dialog opens the Export as BASIC library dialog allowing to choose a location where the library will be stored as folder named like the library. This format can be accessed with the Import functionality described above.
The Export as BASIC library dialog
The exported libraries always contain both Basic Modules and Dialogs.
  • Delete
Deletes the item selected in the Library list box. If the item represents a library link, only the link is removed, not the library itself. The Delete button appears disabled whenever a Standard library is selected, because Standard libraries cannot be deleted.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages