Number and Currency Styles in ODFDOM

December 29th, 2008 by David in ODFDOM

Here’s a NetBeans project that uses utility routines for creating number and currency styles from format strings. The source for the OdfNumberStyleExtra and OdfCurrencyStyleExtra classes is contained in the dist/lib/odf_convenience.jar file.


Creating an ODP file

December 26th, 2008 by David in ODFDOM

Someone on the odftoolkit.org forums wanted to know how to add images and tables to an ODP file. Here is an example. The file is a NetBeans project; go to the misc directory for the README.TXT instructions.


ODTransform no longer needed

November 13th, 2008 by admin in General Information

I did the rewrite of ODTransform so it would correctly transform a single member of an ODF package. I did this several weeks ago, and forgot where I put it.  I rewrote it a couple of nights ago, and then discover that the ODF Toolkit Project appears to have written something much like it with more options.


Revised OdfListStyleBuilder

November 9th, 2008 by admin in ODFDOM

I’ve updated the List Style Builder to work with version 0.6.15 of the ODFDOM API. Instead of it creating a list style all by itself, you give it a <text:list-style> element and specifications of what the list should look like, and it builds the sub-elements for you.

Here’s the tarball.


Why no activity?

September 6th, 2008 by David in General Information, ODFDOM

I haven’t posted much lately, because the new semester at the school just started on Tuesday, and I’ve been busy (to say the least).

Also, I’m waiting for the ODF toolkit folks to release version 0.7, which may make some of the examples easier to write. (Yeah, I know I should try 0.6.11, but I’m busy!)


ODTransform

August 19th, 2008 by David in General Information

The ODTransform.java program that I wrote for the previous work doesn’t really do what I need it to do; it doesn’t copy over all the files that it doesn’t transform. Looks like it’s time for a rewrite. It’s late, though, and I will wait until tomorrow to do the rewrite.


odfpy: ODF List Styles Made Easy

August 7th, 2008 by David in ODFPy

Creating a <text:list-style> element with all of its child <text:list-level-style-number> (or -bullet) elements takes a lot of code.

The easyliststyle.py module lets you specify the level styles in a delimited string. Read the rest of this entry »


ODFDOM: ODF List Styles Made Easy

August 3rd, 2008 by David in ODFDOM

Creating a <text:list-style> element with all of its child <text:list-level-style-number> (or -bullet) elements takes a lot of code.

[NOTE: Changed constructor signatures on 4 Aug 08; fixed bugs and changed tarball name 7 Aug 08.]

The OdfEasyListStyle class extends OdfListStyle and lets you specify the level styles in a delimited string. Read the rest of this entry »


Perl OODoc: Handling Whitespace

July 23rd, 2008 by David in OODoc

Surprise! This toolkit handles \t and \n properly. It does not handle multiple spaces in a text string, but I was able to write an approximately 16-line patch that processes spaces correctly. I submitted it to the toolkit author, and it may make it into a future version.


odfpy: Handling Whitespace

July 20th, 2008 by David in ODFPy

While it is possible to use addText() to create text in an ODF document, it won’t create the appropriate <text:s>, <text:tab>, or <text:line-break> elements for whitespace embedded in the string. Here is a class that solves the problem for the odfpy toolkit.