diff options
| Commit | da44817c4faa2d15c4e08637d51b52e78e99e54c (patch) | |
|---|---|---|
| Author | 2022-05-29 08:13:51 +0300 | |
| Committer | 2022-05-29 08:13:51 +0300 | |
| Files | 7165016250da99934e569cebf2d9fc04b8cda434 /src | |
| FMI-OOP-P2_Tables-da44817c4faa2d15c4e08637d51b52e78e99e54c.tar FMI-OOP-P2_Tables-da44817c4faa2d15c4e08637d51b52e78e99e54c.tar.gz FMI-OOP-P2_Tables-da44817c4faa2d15c4e08637d51b52e78e99e54c.zip | ||
| Parent | 1ba06048bfd4f007fec254bc964f2983c1793169 (diff) | |
Autocommit at 29.05.2022 @ 08:13
3 files changed, 9 insertions, 5 deletions
| -rw-r--r-- | src/Models/CellFormula.cpp | 2 | ||||
| -rw-r--r-- | src/Models/CellInt.cpp | 4 | ||||
| -rw-r--r-- | src/UserInterface/UserInterface.cpp | 8 |
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index cf1c2cd..4e84681 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -39,7 +39,7 @@ CellFormula::CellFormula(const char* str, const List<List<Cell*>>* tableCells) : } double CellFormula::getNumeralValue() { - return 0; + return calculate(); } String CellFormula::getValueForPrint() { diff --git a/src/Models/CellInt.cpp b/src/Models/CellInt.cpp index a8f2db5..c6239e0 100644 --- a/src/Models/CellInt.cpp +++ b/src/Models/CellInt.cpp @@ -5,6 +5,10 @@ CellInt::CellInt(int value) { this->value = value; } +double CellInt::getNumeralValue() { + return value; +} + String CellInt::getValueForPrint() { return String() += value; } diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index 8698a71..a536345 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -11,14 +11,14 @@ void UserInterface::com_print(const char* params) { /* Public */ -UserInterface::UserInterface(Table& table) : menu() { +UserInterface::UserInterface(Table& inTable) : menu() { if (!instantiated) { - this->table = table; + table = inTable; instantiated = true; } - menu.addCommand(Command("print", com_print)); - menu.addCommand(Command("edit", com_edit)); + menu.addCommand(Command("print", &UserInterface::com_print)); + menu.addCommand(Command("edit", &UserInterface::com_edit)); } void UserInterface::run() { |
