TableShape Design Notes

A tableshape should be able to be spread over multiple pages

A tableshape's text is contained in a QTextDocument, which can
be shared with other text and table shapes

A tableshape can be nested: tables inside tables are possible

A cell is a shape; if the shape is a text-shape, it can share the QTextDocument with the other cells in the shape and other text and table shapes outside the current table shape.

Every row in a table always has the same number of columns

All cells in a column have the same left-edge position

A cell is based on QTextTableCell

A tableshape is like a complicated textshape: it can be part of the flow
of a document, it contains a pointer to a QTextDocument.

For kword, the table shape needs to be in a KWTableFrame, which is
part of a KW(Text?)FrameSet. It is loaded in KWord through KoTextFrameLoader.
(Is it just me, or is the way text data gets loaded in KWord quite
the opposite of what we had in mind with flake?). It needs a KoTextShapeData
object to get at the QTextDocument. What do we do with the layout?


Query: should the tableshape be a shape or a shape container?

Note: MS Word tables do have variable column widths per row -- see shaheed's remarks on IRC
Note: table cells must be reversed in rtl languages!


Styles: styles are loaded separately and can be retrieved from the KoStyleManager.
On loading, the right style needs to get retrieved from the manager and applied to the
right range as defined by a QTextCursor on the QTextDocument in the table shape. 

On saving, the style id needs to be retrieved from the QTextFormat entries
in the QTextDocument and saved out as references to the (already existing)
style entries in the styles section of the document.
