Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.cpp
diff options
context:
space:
mode:
Commit2929a4a6e811ddc2c2073158f50d2e20170c6c6a (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-30 20:28:24 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-30 20:28:24 +0300
Files2fc70dc8ce6d25859696484b2810b381af13cba4 /src/Models/Table.cpp
FMI-OOP-P2_Tables-2929a4a6e811ddc2c2073158f50d2e20170c6c6a.tar
FMI-OOP-P2_Tables-2929a4a6e811ddc2c2073158f50d2e20170c6c6a.tar.gz
FMI-OOP-P2_Tables-2929a4a6e811ddc2c2073158f50d2e20170c6c6a.zip
Parentd5f4221f7820a774fd209c7a75a8a526aeec7ee2 (diff)
Autocommit at 30.05.2022 @ 20:28
1 files changed, 5 insertions, 0 deletions
-rw-r--r--src/Models/Table.cpp5
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp
index 4aab10e..a4103be 100644
--- a/src/Models/Table.cpp
+++ b/src/Models/Table.cpp
@@ -113,6 +113,10 @@ Table::Table(unsigned rows, unsigned cols) {
cells[i] = List<Cell*>(cols);
}
+unsigned Table::get_rows() const {
+ return cells.get_length();
+}
+
unsigned Table::get_cols() const {
return cells[0].get_length();
}
@@ -128,6 +132,7 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) {
? (Cell*)new CellDouble(doubleParse) : (Cell*)new CellInt(intPart);
}
else if (*rawValue == '"') {
+ rawValue++;
newCell = (*rawValue == '=')
? (Cell*)new CellFormula(rawValue, &cells) : (Cell*)new CellString(rawValue);
}