WebODF gains round-tripping support

In my previous blog I talked about converting ODF files to PDF files with WebODF. This is a functionality that is generally useful, but is also one that lets OfficeShots compare WebODFs ODF rendering to that of other office suites.

Another useful feature is round-tripping of ODF. Round-tripping is the process of loading an ODF file in a program and subsequently saving it again. It is an ODF to ODF conversion. OfficeShots uses round-tripping to see if an office suite generates valid ODF. In WebODF, the original ODF file is barely modified. The XML contents of the ODF is parsed and serialized in this step. Any bugs in this process would be exposed by roundtripping.

After building, the round-tripping can be performed like this:
qtjsruntime lib/runtime.js roundtripodf.js myfile.odp

The file will be roundtripped in-place, so make sure to make a copy before trying this.

In the next blog entry I'll talk about WebODF on Android, editing ODF or unhosted.org. Please vote in the comments, come to the irc channel #webodf or post bugs or comments.