diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-09-19 21:33:52 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-09-19 21:33:52 +0200 |
commit | abd446c2eebe1f96764b6d95f1c6c61ae9bc40b2 (patch) | |
tree | b313bbeebf50fd53369d303824edab57aa69d016 /dw/table.cc | |
parent | b0b0cddaff10b4cff371b8bb7aa21e045f8e3915 (diff) | |
parent | 0caf22a3f7c33578a073cee42c6cfa61f971bc42 (diff) |
merge
Diffstat (limited to 'dw/table.cc')
-rw-r--r-- | dw/table.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dw/table.cc b/dw/table.cc index 6708b3f0..8a46ce7c 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -320,11 +320,19 @@ void Table::addCell (Widget *widget, int colspan, int rowspan) for (int col = 0; col < colspanEff; col++) for (int row = 0; row < rowspan; row++) if (!(col == 0 && row == 0)) { + int i = (curRow + row) * numCols + curCol + col; + + child = children->get(i); + if (child) { + MSG("Overlapping spans in table.\n"); + assert(child->type == Child::SPAN_SPACE); + delete child; + } child = new Child (); child->type = Child::SPAN_SPACE; child->spanSpace.startCol = curCol; child->spanSpace.startRow = curRow; - children->set ((curRow + row) * numCols + curCol + col, child); + children->set (i, child); } // Set the "root" cell. |