From fcb095cdbdee891365054a978533a9a0480ff03b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 28 May 2022 19:19:43 +0300 Subject: Autocommit at 28.05.2022 @ 19:19 --- src/Models/CellFormula.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Models/CellFormula.cpp') diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index 3029a19..395e31c 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -2,7 +2,8 @@ #include "CellDouble.h" #include -CellFormula::CellFormula(const char* str) : referencedCells(), formula(), rawFormula() { +CellFormula::CellFormula(const char* str, const List>* tableCells) : referencedCells(), formula(), rawFormula() { + this->tableCells = tableCells; parseAndSetValue(str); } @@ -35,9 +36,13 @@ String CellFormula::getValueForPrint() { } void CellFormula::parseAndSetValue(const char* str) { + rawFormula = String(str); + str++; while (*str == ' ') str++; - double number = atof(str); + if (*str == 'R') { + unsigned row = atoi(++str); + } } void CellFormula::readFromFile(std::ifstream& file) { -- cgit v1.3.1-23-gd82d