Am 16.01.2010 00:19, schrieb Vincent van Ravesteijn:
I think the cells aren't really merged. It is only that the
"cellInfo(cell).multicolumn" is set to one of these values:
///
enum {
///
CELL_NORMAL = 0,
///
CELL_BEGIN_OF_MULTICOLUMN,
///
CELL_PART_OF_MULTICOLUMN
};
So, If cell 1 and 2 are merged, the first one sets the multicolumn to
.._BEGIN_... the second one to .._PART_...
But this doesn't work here: I have this enum
enum {
///
CELL_NORMAL = 0,
///
CELL_BEGIN_OF_MULTICOLUMN,
///
CELL_PART_OF_MULTICOLUMN,
///
CELL_BEGIN_OF_MULTIROW,
///
CELL_PART_OF_MULTIROW
};
When setting two cells to be a multirow I set the first one as CELL_BEGIN_OF_MULTIROW and all other
selected ones to CELL_PART_OF_MULTIROW:
void Tabular::setMultiRow(idx_type cell, idx_type number)
{
CellData & cs = cellInfo(cell);
cs.multirow = CELL_BEGIN_OF_MULTIROW;
cs.alignment = column_info[cellColumn(cell)].alignment;
setBottomLine(cell, bottomLine(cell + number - 1));
for (idx_type i = 1; i < number; ++i) {
CellData & cs1 = cellInfo(cell + i);
cs1.multirow = CELL_PART_OF_MULTIROW;
cs.inset->appendParagraphs(cs1.inset->paragraphs());
cs1.inset->clear();
}
updateIndexes();
}
However, this doesn't work and I can't figure out why.
Btw. what does this line in the above routine do?:
cs.inset->appendParagraphs(cs1.inset->paragraphs());
thanks and regards
Uwe