OpenOffice.org? You may need to download the source, build it, and then hack it for a feature development or enhancement. After all these efforts, it may take time to be accepted upstream. So the best solution is to create and distribute an extension-whoever likes it and is confident of the risks involved, can install and use it.
For this purpose, 000 supports easy development of third-party extensions with the help of an SDK (software development kit). As an extension developer you don't need the required environment (distro, architecture, disk space, etc) for building source, leave alone the knowledge about the full development cycle of the core. You can start off with extension development with much less effort.
Overview of extensions
Extensions add additional functionality to the core 000 office suite, which can be deployed or removed independently. It can be in the form ofUI components, custom functions for Calc, data pilots, new chart types, a spell-checker, etc. Some extensions like templates don't require coding at all, as they are considered non-programmatic extensions.
000 supports extension development in various languges like C++, Java, Basic, Python, Ruby, etc. It is suggested that you choose a language that is platform-independent to write extensions, in order to avoid recompilation of code for each platform. Extensions written in Basic are considered as macros, Automate Your Work with OpenOffice.org Macros, Page 52. This month I will explain programming with Java, with the help of the NetBeans plug-in.
Setting up the IDE
Download and install the latest version of the NetBeans IDE-the current version as of today is 6.5.
Go to Tools-+Plugins-+Available plugins. Select OpenOjJic.org API Plugin, download and install it currently, 2.0.4 is the latest version.
Go to Tools-+ Options-+Miscellaneous-+ 000 API Plugin. By default, the SDK path is detected automatically-if so, verify it; else, provide the correct path.
Now the SDK and NetBeans are configured properly, and we're ready to get started with our extensions development.
Types uf projects
You can create four types of projects with the help of this plug-in: OpenOffice.org Add-On: An add-on is a VI extension in the form of a menu item or tool bar item. OpenOffice.org Calc Add-In: A Calc Add-In provides custom functions to spreadsheets.
OpenOffice.org Component: It helps to develop UNO based applications. OpenOffice.org Client Application: It helps to create client applications to bootstrap UNO and get a reference for running an office instance locally or remotely.
A simple add-on project
In this example, we'll create a simple add-on, which will load a new Calc document, _insert a new sheet into it with the name "Hello", and change the contents of the Al cell to 20.
Start the Add-on wizard using File -+ New Project-+ OpenOffice.org -+ OpenOffice.org Add-on. In the next screen, fill in the project name, say "Simple", which will be the default name for the Main class also. Then fill in a suitable package name, say org.lfy.example, and a suitable location to store the project. Finally, select whether the add-on should come as a menu item, a toolbar item or both.
In the next screen (Figure 2) give a suitable name for the command, say cmd Test in place of' Command', which is there by default, and the display name as Test. We can leave the 'Icon' field empty for the moment. Note that we can create more than one command using the Add Command button; however, in this example we will restrict ourselves to one command only.