Project

General

Profile

Actions

Bug #3993

closed

[wt-3.3.4] Crash on WTable::insertColumn()

Added by Стойчо Стефанов Stoycho Stefanov over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
04/20/2015
Due date:
% Done:

0%

Estimated time:

Description

Hey,

I cannot insert a column in a WTable. See the test case in attachment. The application crashes.

Regards,

Stoycho


Files

WTable_insertColumn.cpp (904 Bytes) WTable_insertColumn.cpp inserting column test case Стойчо Стефанов Stoycho Stefanov, 04/20/2015 12:51 PM
WTable_moveColumn.cpp (1.26 KB) WTable_moveColumn.cpp move column Стойчо Стефанов Stoycho Stefanov, 04/21/2015 01:43 PM
Actions #1

Updated by Стойчо Стефанов Stoycho Stefanov over 9 years ago

Of course, there are other ways to achieve the inserting, but the method has to work as well:

int insertIndex(0);
table->elementAt(table->rowCount()-1,table->columnCount());
table->moveColumn(table->columnCount()-1,insertIndex);
Actions #2

Updated by Стойчо Стефанов Stoycho Stefanov over 9 years ago

I get segmentation fault on moving column that contains the "header" cell (i.e., a cell spanned over all columns) too.

The lines that are commented out fix the problem.

Perhaps moveColumn should shrink spanned cells before moving?

Regards,

Stoycho

Actions #3

Updated by Wim Dumon over 9 years ago

  • Status changed from New to Resolved

Hello,

I fixed the bug related to insertColumns(). Without this fix insertColumns() is broken in 3.3.4 unless you add columns at the end.

For the moveColumns() case, since WTable will usually add columns/rows in order to resolve issues related to the size of the table, I also made moveColumn() add extra columns if a span requires it. And I also did the same for moveRows().

Wim.

Actions #4

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF