From 2929a4a6e811ddc2c2073158f50d2e20170c6c6a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 30 May 2022 20:28:24 +0300 Subject: Autocommit at 30.05.2022 @ 20:28 --- src/Models/Table.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Models/Table.cpp') 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(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); } -- cgit v1.3.1-23-gd82d