WPTools version 6.13
Assume the following code:
Code
TParagraph* createCell(TParagraph* aRow) { TParagraph* cell(aRow->AppendNewCell(true)); cell->ASet(WPAT_BorderFlags, WPBRD_DRAW_Left + WPBRD_DRAW_Top + WPBRD_DRAW_Bottom + WPBRD_DRAW_Right); return cell;}void test() { TParagraph* table(Editor->FirstPar->AppendNewPar(false)); table->ParagraphType = wpIsTable; TParagraph* row1(table->AppendNewRow(true)); TParagraph* cell11(createCell(row1)); TParagraph* cell12(createCell(row1)); TParagraph* row2(table->AppendNewRow(true)); TParagraph* cell21(createCell(row2)); TParagraph* cell22(createCell(row2)); Editor->EditOptionsEx = (TWPEditOptionsEx(Editor->EditOptionsEx) << wpKeepCellsWhenCombiningCells); // <insert code here>}
Now if I do the following at the end of the test function:
Code
Editor->SelectCell(cell11, false); Editor->SelectCell(cell21, true); Editor->CombineCellsVertHorz();
I get the following table (note the double line):
If I instead do the following at the end of the test function:
Code
Editor->SelectCell(cell12, false); Editor->SelectCell(cell22, true); Editor->CombineCellsVertHorz();
I get the following table (note the missing line):
So, I'm misusing something or is there a bug in wptools?
Regards
patrik.nyborg(a)genicore.se