From a329c3c167b8d570a656b2eed5af23e6afe8096b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 28 May 2022 16:19:02 +0300 Subject: Autocommit at 28.05.2022 @ 16:19 --- src/Models/CellFormula.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Models/CellFormula.cpp') diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index e488b0f..2c28d4b 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -1,9 +1,15 @@ #include "CellFormula.h" #include +double CellFormula::calculate(unsigned index) { + switch(formula[index].right) { + case none: return formula[index].left; + } +} + String CellFormula::getValueForPrint() { - double result = 0; - return String() += value; + double result = calculate(); + return ""; } void CellFormula::parseAndSetValue(const char* str) { -- cgit v1.3.1-23-gd82d