The problem is that this routine fails for multirows:
Assume this table
a b c
e f g
i j k
by setting cell "e" and "i" a a multirow, appendParagraphs leads to
this cell content
No this is not the fault of appendParagraphs. You shouldn't be looking
into that function at all.
"efgi"
but I need
"ei".
This is caused by the for-loop:
for (idx_type i = 1; i < number; ++i) {
...
}
If you supply number == 4 in the setMultiRow function, he will iterate
from 1 to 4, thus adding e,f,g and i.
I guess you need somehing like :
int column = cellColumn(cell);
int row = cellRow(cell);
CellData & cs = cellInfo(cell);
cs.multirow = CELL_BEGIN_OF_MULTIROW;
[..]
for (int i = 1; i < number; ++i)
CellData & cs1 = cell_info[row+i][column];
cs1.multirow = CELL_PART_OF_MULTIROW;
cs.inset->appendParagraphs(cs1.inset->paragraphs());
cs1.inset->clear();
}
The problem is that appendParagraphs counts the paragraphs from left
o right and I need to count from them from top to bottom.
appendParagraphs doesn't count the cells. It only takes the
paragraphList of all paragraphs _in one cell_.
I know now the problem but are not familiar with the paragraph code. I
cannot figure out how to write a routine that does what I need. Our
code is often not documented and lines like
for_each(pit, plist.end(),
bind(&ParagraphList::push_back, ref(pl), _1));
don't bother.
This is just like:
for (pit = plist.begin(); pit != plist.end(); ++pit)
pl.push_back((*pit))
just copying all paragraphs from plist into pl.
makes me headache since I'm only a hobby programmer and not a
professional one.
Don't ask me then, I'm nothing like a professional programmer.
Can you perhaps help me here?
I hope I did.
thanks again and regards
Uwe
Vincent