Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commitd8702e3f599bf3a4179c7196ad95649ac40c1f1e (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 14:30:06 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 14:30:06 +0300
Files50524223a54d391106fa36a86b745da62ca7f40c /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-d8702e3f599bf3a4179c7196ad95649ac40c1f1e.tar
FMI-OOP-P2_Tables-d8702e3f599bf3a4179c7196ad95649ac40c1f1e.tar.gz
FMI-OOP-P2_Tables-d8702e3f599bf3a4179c7196ad95649ac40c1f1e.zip
Parent3b9fc2b837f42f1b3f5137b98e6edbcf22e99f73 (diff)
Autocommit at 29.05.2022 @ 14:30
1 files changed, 4 insertions, 3 deletions
-rw-r--r--src/Models/CellFormula.cpp7
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
index 5252e30..b85d790 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -87,10 +87,11 @@ void CellFormula::parseAndSetValue(const char* str) {
}
if (currOp == '-') {
- currOp = '+';
- formula.add({new CellDouble(-1.0), '*'});
+ formula.add({cellToAdd, '+'});
+ localCells.add(CellDouble(-1.0));
+ formula.add({&localCells[localCells.get_count() - 1], '*'});
}
- formula.add({cellToAdd, currOp});
+ else formula.add({cellToAdd, currOp});
}
}