OOo Off the Wall: Macros and Add-ons
Editors' Note: This article has been revised since its original posting.
One of the features that makes the Open Source community so stimulating is its members are not passive consumers of software, but active participants in its direction. OpenOffice.org is no exception. Although slow to develop this attitude--possibly because of the sheer size of the project--in the last year, the OpenOffice.org community has started having an effect on the development of the office suite.
True, basic development still is dependent heavily on employees of Sun Microsystems--too dependent, some might say. However, volunteers are coming into their own now with both macros and add-ons. Macros are scripts written in OOoBasic that run from documents, while add-ons are functions integrated directly into an OpenOffice.org installation, often using another programming language, such as Python. Probably the best examples of this change are Laurence Godard's DicOOo macro, which installs spellchecking, hyphenation and thesaurus dictionaries, and FontOOo macro, which installs free fonts available on the Internet. Both macros have been added as autopilots and were major features of the releases in which they first appeared.
Currently, perhaps two dozen people actively are publishing macros and add-ons. Others are active on the API list, but have yet to make their efforts generally available.
What follow is a small sampling of some publicly available macros and add-ons for OOo. Most are released under the GNU GPL or LGPL, but a few of those available on the Internet use other licenses that you might want to read before downloading, to make sure that they are compatible with your beliefs. After the samples is a brief set of instructions for using and installing them.
Unlike Godard's macro collections, none of these have become an official part of OpenOffice.org, although one or two may achieve that sign of acceptance. However, even if official acceptance doesn't happen, you easily can add their functionality to your copy of OpenOffice.org.
When StarOffice was open sourced, the proprietary elements stripped out included the import and export filters for WordPerfect. WordPerfect hasn't been the dominant office format for almost a decade, but its brief support for Linux several years ago has left a loyal group of users for whom the ability to read the format is important. The WriterPerfect Project, built by William Lachance, Marc Maurer and other contributors, exists to provide that ability for OpenOffice.org, AbiWord and, in the future, KWord, through various uses of its libwpd library.
WriterPerfect itself is an import filter. It compares favorably with the StarOffice WordPerfect filter and, in my experience, seems to do a better job than OOo's MS Word filters. Still, like most filters, its results need tweaking, especially when used on complex documents. My only complaint is neither a static tarball nor a Debian package is available on the site. However, both can be built from source, and wpd2sxw, a standalone program from the project, is now a part of Debian unstable.
This set of macros was one of the first to be made available and continues to be updated. It includes a grab-bag of functions, most of which are well commented and useful (if unspectacular) if you are interested in learning how to write your own macro. For example, two are for converting Writer text to plain text e-mail; one adds two carriage returns to mark the start of paragraphs and another strips out smart quotes and en-dashes so that only the basic ASCII set is used. Others apply heading styles, insert a special character and change the case of selected letters.
The standout in this collection is a selected word count. Although the document containing the macros notes that form items and fields can throw out the count, this macro adds a functionality that is missing from Writer but often requested.
Alexej Kryukov's History Manager is an add-on for adjusting the number of recently used files at the bottom of the File menu. By default, OpenOffice.org shows only four, but most people prefer a longer list. The number of files displayed can be hacked, but History Manager provides a clean interface for editing the list instead.
Danny Brewer's Recent File List Changer provides the same capacity through macros.
-- Bruce Byfield (nanday)
|July 2015 Issue of Linux Journal: Mobile||Jul 01, 2015|
|July 2015 Video Preview||Jul 01, 2015|
|PHP for Non-Developers||Jun 30, 2015|
|A Code Boot Camp for Underprivileged Kids||Jun 30, 2015|
|Comprehensive Identity Management and Audit for Red Hat Enterprise Linux||Jun 29, 2015|
|Linux Kernel 4.1 Released||Jun 26, 2015|
- July 2015 Issue of Linux Journal: Mobile
- PHP for Non-Developers
- Secure Server Deployments in Hostile Territory
- Linux Kernel 4.1 Released
- Comprehensive Identity Management and Audit for Red Hat Enterprise Linux
- A Code Boot Camp for Underprivileged Kids
- Cinnamon 2.6 Released
- Django Templates
- Attack of the Drones
- The AtoMiC Toolkit!