Wednesday, June 13, 2007

Progression on my Summer of Code work...

Today (and monday late) I started implementing support for line through text styles.
That's quite a lot of work because that's not supported by Qt4 scribe :/
I'm really happy because it's basically working, and that's not something I expected to be that easy. Ok, still a lot of work to do, but the basis are working. And the next parts are only going to be writing boring code to implement the various attributes for line through text...
Something interesting with this : OpenOffice doesn't fully implement this. It does support only line through text types and letter through text. Nothing else. We support near of fully line through text styles, what's left is types, color and width. We don't support letter through text, but that'll be easy.
No screen shot currently because the result is still a little weird...

Saturday, June 2, 2007

Fun with the testsuite...

Well I wasn't able to do a lot of work on KWord recently : my KDE4 copy broke totally, I had to build it again from scratch...
But now I can continue my fun work : playing with the ODF testsuite. This testsuite is extremely interesting : its files are quite small, testing one feature totally...
Really good.
But some test cases are broken. For instance, no suite should be able to pass the font size test case totally except openoffice because the file isn't valid regarding the spec (there is no "Default" style defined in the spec, and it's mentionned in the file but not defined).
A problem with manipulating ODF files such as these : you must unzip them, then you can open each XML file in KWrite.. That's quite boring. I just wrote a ~20 lines Q&D python program (Quick and Dirty) to help me with this. It's showing on the left the file list, and on the right it shows the file, in raw text. Fast and simple. Now, I can just drop an ODF file from konqueror to the icon on my desktop and voila.
Mandatory screenshot : http://www.pinaraf.info/ODF_viewer.png
The source code (using Python + PyQt4) : http://www.pinaraf.info/ODF_explorer.tar.bz2
If you consider this small piece of code usefull or a good idea or a "should be improved" thing... send my an email or post a comment. I don't plan to extend it really, it's doing its job for me, I don't need more... but if you want more, perhaps you'll get more :)

That's all folks...



P.S : I upgraded this small python thing : now it's automatically pretty-printing the ODF files, and there is some basic coloration of the XML file... Far far better :)