void xlw::CellMatrix::PushBottom(const CellMatrix& newRows) { CellMatrix newRowsResize(newRows); size_t newColumns = maxi(newRows.ColumnsInStructure(),Columns); if (newColumns > Columns) for (size_t i=0; i < Rows; i++) Cells[i].resize(newColumns); if (newColumns > newRows.Columns) for (size_t i=0; i < newRowsResize.Rows; i++) newRowsResize.Cells[i].resize(newColumns); for (size_t i=0; i < newRowsResize.Rows; i++) Cells.push_back(newRowsResize.Cells[i]); Rows = static_cast<size_t>(Cells.size()); Columns = newColumns; }
void CellMatrix::PushBottom(const CellMatrix& newRows) { CellMatrix newRowsResize(newRows); unsigned long newColumns = maxi(newRows.ColumnsInStructure(),Columns); if (newColumns > Columns) for (unsigned long i=0; i < Rows; i++) Cells[i].resize(newColumns); if (newColumns > newRows.Columns) for (unsigned long i=0; i < newRowsResize.Rows; i++) newRowsResize.Cells[i].resize(newColumns); for (unsigned long i=0; i < newRowsResize.Rows; i++) Cells.push_back(newRowsResize.Cells[i]); Rows = static_cast<unsigned long>(Cells.size()); Columns = newColumns; }