+ if (!cell->IsTerminalCell())
+ {
+ // Container cell indicates new line
+ if (curLineWidth > m_MaxTotalWidth)
+ m_MaxTotalWidth = curLineWidth;
+
+ if (wxMax(cell->GetWidth(), cell->GetMaxTotalWidth()) > m_MaxTotalWidth)
+ m_MaxTotalWidth = cell->GetMaxTotalWidth();
+ curLineWidth = 0;
+ }
+ else
+ // Normal cell, add maximum cell width to line width
+ curLineWidth += cell->GetMaxTotalWidth();
+