Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.cpp
diff options
context:
space:
mode:
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);
}