Official website for Linux User & Developer
FOLLOW US ON:
Mar
17

Optimise OpenOffice.org

by Sukrit Dhandania

OpenOffice.org is the greatest open source alternative to Microsoft’s Office suite. Over the years OpenOffice has evolved to become much more than just an alternative to MS Office however. Let’s look at some hacks that will allow you to become more of a power user of OpenOffice, enabling you to be more productive with the software. We’ll explain how to create your own macros and extensions and more besides…

Create an OpenOffice.org extension
Now execute the macro you want to convert into an extension. You should see a new floating button pop up on your screen. This is the BasicAddonBuilder. Click on the button and it will launch a window outlining the process of converting your macro into a plug-in. This is a wizard that will run you through the creation of the extension step by step. Here you have the option of adding menu items for the extension. This is particularly useful if you have two or more macros in one extension.

Follow the steps in the wizard and hit Forward for each step. Once you are done, hit the Finish button. This will result in the creation of an .oxt file. This is the extension, all ready to be shared. You can find extensive documentation on the BasicAddonBuilder here.

Customise menu and toolbar
Writer is a productivity-oriented word processor. It doesn’t come across as a very attractive piece of software, but it’s very effective. There have been a few who have asked for themes for Writer. However, their wishes haven’t been fulfilled yet. Writer does, however, allow you to change the items and their order in the menu and toolbar. Go to Tools>Customize. In the window that pops up, you will find a couple of tabs quite useful: Menus and Toolbars. Rearrange the order of items and add or remove something. Once you are done, hit OK to save the changes.

Extract Writer files
The default format used by OpenOffice Writer is ‘.odt’. As OpenOffice is a standards-compliant program, it uses XML for all its document settings and info. The ‘.odt’ that your document is saved as is nothing but a zip file containing XML and other files. So you can extract a ‘.odt’ file by running the command “# unzip filename.odt”. This command will extract the ‘.odt’ file and you should see a few XML files and some folders at the location where you have extracted the file. Check out the extracted files. If you are familiar with XML you should be able to modify them. This is quite useful if you want to automatically modify your Writer files using another application. Because all the files use the same XML markup, you can easily extract and modify the files from other applications.

Portable keyboard shortcuts
You can view and change the keyboard shortcuts used by Writer by going to Tools>Customize>Keyboard. Note that you need to click on the radio button titled ‘Writer’ at the top-right corner of your screen to view Writer-specific shortcuts. Once you are done modifying the keyboard shortcuts to your taste, you can hit the OK button to continue working in Writer. You can also choose to save your customisation of the keyboard shortcuts to a file by clicking on the Save option, instead. This allows you to choose from several shortcut options. If you want to import the keyboard shortcut settings from a file, hit the Load option. You can take the saved file to another computer if you want to create the same set of shortcuts there.

Install extensions and add features
There are several very useful OpenOffice Writer extensions out there. Some favourite ones are ‘Sun PDF Import Extension’, ‘Professional Template Pack II – English’ and the ‘Writer’s Tools’. ‘Sun PDF Import Extension’ is a very useful extension that lets you import a PDF document and edit it. If you install the ‘Professional Template Pack II – English’ extension, you will get several new professionally designed templates for your documents. ‘Writer’s Tools’ is a collection of tools that try to make OpenOffice Writer a more complete office suite. This is a must-have for power users. It offers great document back-up options, a timer, task management tools, etc.

Pages: 1 2 3
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.

    6 Comments »

    • A. Lurker said:

      You missed the biggest tip of all: How to properly print to an envelope. I have the vanilla-ist of printers; an HP Laserjet 4. I have looked at maybe a dozen web articles telling me how to print envelopes in Openoffice and none of them worked. Printing in Slackware 7.1 to my Deskjet 520 worked better than this. Printing to envelopes; now there’s a story for you.

    • anonymous said:

      i have opened 10 tickets with open office so far since it was star office and it cannot do basic new line search and replace.
      10 times my ticket was closed in 10 years telling me its not important feature that needs attention

    • Silverlokk said:

      Find, More options, Regular expressions does it, although you do have to know regular expressions. OTOH, how would you search for new lines in MS Word?

    • Silverlokk said:

      BTW, in keeping with the spirit of the article: I would take a text file which has new lines between lines, and two new lines between paragraphs, and record a macro that would have new lines only between paragraphs. Take a README file, for instance. Anyway, first thing to *before* recording is check the Edit > Find dialog to see if it does Regular Expressions. Depending on your preferences, you may leave that box unchecked first, and let the macro take care of checking it upon start, then unchecking it when it exits. Or, if you keep it checked, you’ll record the macro from the time you do the Edit > Find.

      Enter \n\n in the “Search for: box, and ~!~ in the “Replace with” box, then click on the Replace All button. That replaces all the double line feeds with the string “~!~”. I’m doing this because I’ll replace single occurrences of \n with a space. If my first find-and-replace was for the single occurrences of \n, paragraphs would run into each other.

      The Search-and-replace dialog box stays on-screen. Now, Enter ~!~ in the “Search for” box, and \n\n in the “Replace with” box, then click on the Replace All button. That one breaks paragraphs with two line feeds.

      If you prefer to keep Regular Expressions disabled, uncheck the relevant check box. Close the Find-Replace dialog box, stop the macro recording.

      One thing I haven’t checked is the effect of paragraph styles on the macro. Like, in my default style sheets, I have two line feed between paragraphs. If that’s also the case for your default style sheet, your replacement string for ~!~ will be a single \n.

      As to the ~!~ thingy, I chose that on the assumption that text normally wouldn’t contain that character. Might be safer to use a longer string, e.g., ThisStringIsTemporaryParagraphBreak — since this is a macro, you’ll be doing that only once anyway :)

    • Silverlokk said:

      Sorry, forgot an important step. After doing the search-and-replace of \n\n with ~!~, next enter \n in the “Search for” box, and a single space in the “Replace with” box, then Replace All. After this, Search for: ~!~, then Replace with: \n\n, etc…

    • Silverlokk said:

      Update: my style sheet automagically inserts two line feeds between paragraphs, so when I do the last step of the macro-to-be , I only need to replace the ~!~ with a single \n. Of course, I recommend a style sheet if you consistently want two line feeds between paragraphs, and to save it as the default style.

    What's your opinion?

    Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.

    * Required fields