diff options
| Commit | 607c79ae427222d7799e3431f3813492b7fe124b (patch) | |
|---|---|---|
| Author | 2022-06-14 14:14:27 +0300 | |
| Committer | 2022-06-14 14:14:27 +0300 | |
| Files | fabee36f3bf649d892c78fccef223b957735d962 /src | |
| FMI-OOP-P2_Tables-607c79ae427222d7799e3431f3813492b7fe124b.tar FMI-OOP-P2_Tables-607c79ae427222d7799e3431f3813492b7fe124b.tar.gz FMI-OOP-P2_Tables-607c79ae427222d7799e3431f3813492b7fe124b.zip | ||
| Parent | 2a447176dda4ce347795585abd53a823799a1954 (diff) | |
Autocommit at 14.06.2022 @ 14:14
4 files changed, 13 insertions, 3 deletions
| -rw-r--r-- | src/Models/Table.cpp | 2 | ||||
| -rw-r--r-- | src/s1.table | 5 | ||||
| -rw-r--r-- | src/s2.table | 5 | ||||
| -rw-r--r-- | src/test.table | 4 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index a3c03fe..14e72ed 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -184,7 +184,7 @@ List<String> Table::getAllCells() const { List<String> toRet; for (unsigned i = 0; i < cells.get_count(); i++) { for (unsigned j = 0; j < get_cols(); j++) { - if (cells[i].get_count() - 1 >= j && cells[i][j] != nullptr) + if (cells[i].get_count() > j && cells[i][j] != nullptr) toRet.add(cells[i][j]->getValueForPrint()); else toRet.add(""); diff --git a/src/s1.table b/src/s1.table new file mode 100644 index 0000000..459979d --- /dev/null +++ b/src/s1.table @@ -0,0 +1,5 @@ +10, 20, 30, 40 + +10,,1000, +,,, +,10 diff --git a/src/s2.table b/src/s2.table new file mode 100644 index 0000000..3b5fd67 --- /dev/null +++ b/src/s2.table @@ -0,0 +1,5 @@ +10, 20 , 30 , 40 + +10, , 1000, + , , , + , 10 diff --git a/src/test.table b/src/test.table index 10791e1..d1f3b00 100644 --- a/src/test.table +++ b/src/test.table @@ -1,3 +1,3 @@ -8.6,3,"String","= 3 * R1C2 + R1C1 ^ R1C2 * 27 / R1C2 - 2 * 2.5 * 2 * 2 + R1C3 ^ R1C3","", -"HELLL YEAH BROTHER","Bruh","=R1C0 + R1C1",, ++8.6,+3,"String","= 3 * R1C2 + R1C1 ^ R1C2 * 27 / R1C2 - 2 * 2.5 * 2 * 2 + R1C3 ^ R1C3","", +"HELLL YEAH BROTHER","Bruh","=R1C0 + R1C1",-19.2441,-2,, |
