woensdag 23 maart 2011

Working with OpenDocument is really cool .. orange!

One of the features why LibreOffice en OpenOffice.org excel is the native use of the open, ISO-certified ODF file format.
ODF is evolved from the first complex XML fike format designed for office-documents, back in 2000 by the at that time very new OpenOffice.org project. One of the features of an xml based file is that the content can be read and edited as flat text. Not rather convenient for daily use; however very powerful for automated tasks and small extra tricks. I want to share an example of the last possibility here.
Basic is, that everything that you can set in a document for formatting, content end so forth, can be found in standardised xml documents. Therefore sometimes new features in your favourite ODF supporting suite, can only be implemented as a standard, once the ODF file format is extended for that use. A recent example: coloured tabs in Calc.
The other way round is possible too: there can be a feature supported by the file format, that you do not (yet) find in the user interface. This happened today, when a customer brought the requests for a new set of templates. Studying those, I saw a coloured separator for footnotes in Writer. Now it is possible to set a whole bunch of characteristics for the page style, including some of the separator for footnotes ... but not the color.
No time to bother: I took an optimistic dive in the file styles.xml, which is one of the components of the ODF container file. And there I found the property 'color' of the 'style:footnote-sep'. I changed the value "#000000" in "#FFA500", saved the xml file in the ODF file again, and the Writer document perfectly showed an orange separator on top of the foot-notes.
This is not something to do too often, but it is not problem of course to do this once for a template. Makes me feel satisfied and a customer happy :-)