diff options
| Commit | 7445d9e0767e95a1be3396fd158e6ef0a2416f00 (patch) | |
|---|---|---|
| Author | 2022-05-29 08:54:06 +0300 | |
| Committer | 2022-05-29 08:54:06 +0300 | |
| Files | f6a674be88594583e4b04fcdb1dea52c3207c9fa /src | |
| FMI-OOP-P2_Tables-7445d9e0767e95a1be3396fd158e6ef0a2416f00.tar FMI-OOP-P2_Tables-7445d9e0767e95a1be3396fd158e6ef0a2416f00.tar.gz FMI-OOP-P2_Tables-7445d9e0767e95a1be3396fd158e6ef0a2416f00.zip | ||
| Parent | bc007452c38bed6ab4f1cf3286990a9a3d6e100c (diff) | |
Autocommit at 29.05.2022 @ 08:54
1 files changed, 5 insertions, 3 deletions
| -rw-r--r-- | src/Models/Table.cpp | 8 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 1a36bd0..edaccf7 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -44,9 +44,11 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { List<String> Table::getAllCells() const { List<String> toRet; - for (unsigned i = 0; i < cells.get_count(); i++) { - for (unsigned j = 0; j < cells[i].get_count(); j++) - toRet.add(cells[i][j]->getValueForPrint()); + for (unsigned i = 0; i < cells.get_length(); i++) { + for (unsigned j = 0; j < cells[i].get_length(); j++) + if (cells[i][j] == nullptr) + toRet.add(""); + else toRet.add(cells[i][j]->getValueForPrint()); } return toRet; } |
