Tables GSoC Update

Here’s a little update on my GSoC progress. Time really flies and we have less than two weeks left until pencils down!

Some of the things that has happened in KOffice tables land since last time is:

  • Fixed a bug in relative table width loading.
  • Further improved KoTextDebug to work with the new styles for tables, rows, columns and cells.
  • Added support for column width and relative column width. Up until now all columns were hard coded to equal widths.
  • A KoTableAndRowStyleManager has been added for managing column and row styles.
  • Fixed a bug where two subsequent tables were painted on top of each other.
  • Added support for minimum row height.
  • I began to re-factor the table layout to use a list of rectangles that describes the table instead of a simple rectangle, and started thinking about table breaking. Pretty soon though I realized that I was probably in over my head, and passed the torch to Casper, who has been hard at work trying to get the first pieces in the breaking puzzle, hard row breaks, to work. I just got word on IRC that he may just have it working (!).
  • Finally fixed the issue with an empty line above tables. This text block is there by necessity; it’s mandated by Qt Scribe. Me, Thomas and Casper discussed a bit on how to best handle this. And at least for now, we’ve chosen to solve it like Qt does in its own layout engine, which is putting the empty block to the left of the table. We might do some improvements to the user interaction here though.
  • Added three new classes; KoTableFormat and its subclasses KoTableColumnFormat and KoTableRowFormat. These are very much like the QTextFormat classes in Qt in that they’re simple implicitly shared classes that hold a set of properties. They are not used yet, but will be soon.
  • Fixed bug in justify aligned tables when an explicit width is also specified.
  • Fixed up the table layout code to handle nested tables, as it was totally oblivious to them up until now.

In addition to these things there were some other small fixes, and I’ve also worked a bit on the tests, which all needed fixing after Casper’s re-factor. More work to be done on testing though and right now I’m looking at adding some loading tests to the test suite that Girish created.

On Tuesday last week I fell terribly ill, with high fever, and was mostly in bed or on the couch for a good two days. I’m back to full health now though. I think it might have been food poisoning.

The future of the column and row style manager I mentioned above is unsure though. At the moment it’s just a container for pointers to the styles, and the loading code tosses them in there and decorates the QTextTable with a property containing a pointer to the manager. Not really the prettiest of setups, and we need to find a better solution. The format classes I added are a part of this puzzle, but the question is; where do we store these formats?

I’m sure we’ll work it out though, and now I need to get back to coding. Sorry if this post was a little duller than my previous ones, but to cheer you up, here’s a screencast in which I save a set of nested tables in Writer and open them in KWord to edit them a bit :)

Nested Tables from OO.o to KWord
Nested Tables from OO.o to KWord

Direct link (15 MB, Ogg/Theora)

3 thoughts on “Tables GSoC Update

  1. Cool! Even more reason to move away from OpenOffice: I can read all my documents in KWord!

    OK, so the only reason I’m not using KWord is because of some other showstopper bug, but this is good news anyway.

Leave a Reply

Your email address will not be published. Required fields are marked *