Georg Baum wrote:
If you touch this then please add support for multirow-cells. It should not
be too much more effort if you rip this code apart anyway.

hi georg,

good idea. i thought of waiting with that, but i agree that it makes sense to do it now since i am at it

I don't know. I do know (because I have some experience with grid-like data
in other contexts) that it will be some work to support
multicolumn/multirow cells even if you do not store dummy cells, because
then you have to do the bookkeeping elsewhere.
One probably has to implement it fully and see whether it is better.

i think that things become a bit cleaner, there was already indexing going keeping track of the row/column of each cell, but in addition there was a cellno attribute, and this

CELL_NORMAL
CELL_BEGIN_OF_MULTICOLUMN
CELL_PART_OF_MULTICOLUMN

stuff. we can now also iterate over cells in the output methods without adding extra checks.

there was a lot of specialisation going, and that we now get rid of:

-       bool setWidthOfMulticolCell(idx_type cell, int new_width);
-       void recalculateMulticolumnsOfColumn(col_type column);
-       bool calculate_width_of_column_NMC(col_type column);
-       idx_type cells_in_multicolumn(idx_type cell) const;
-       void fixCellNums();

perhaps because the person who wrote this stuff was a noodle brain (resulting in the unavoidable noodle code), but having a cell for a cell makes sense to me.

and finally, it is a good reason to stick my arms in the mud...

i'll continue to iron out some rough edges, comments still welcome of course...

regards, ed.

Reply via email to