diff options
1 files changed, 7 insertions, 0 deletions
| -rw-r--r-- | src/Models/CellFormula.cpp | 7 |
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index 631621d..cc48951 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -48,6 +48,13 @@ void CellFormula::parseAndSetValue(const char* str) { formula.add({(*tableCells)[row][col], (Op)*str}); } + else { + double val = atof(str); + while ((*str >= '0' && *str <= '9') || *str == ' ') str++; + + localCells.add(CellDouble(val)); + formula.add({localCells[localCells.get_count() - 1], (Op)*str}); + } } void CellFormula::readFromFile(std::ifstream& file) { |
