Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models
diff options
context:
space:
mode:
2 files changed, 1 insertions, 5 deletions
-rw-r--r--src/Models/CellString.cpp4
-rw-r--r--src/Models/Table.cpp2
diff --git a/src/Models/CellString.cpp b/src/Models/CellString.cpp
index 1b7010f..9c010c3 100644
--- a/src/Models/CellString.cpp
+++ b/src/Models/CellString.cpp
@@ -2,11 +2,7 @@
#include <cstring>
CellString::CellString(const char* str) {
- if (*str == '"') str++;
value = String(str);
- if (value[value.get_length() - 1] != '"')
- throw std::logic_error("Error: Missing closing bracket!");
-
}
double CellString::getNumeralValue() const {
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp
index a1063f5..db90f75 100644
--- a/src/Models/Table.cpp
+++ b/src/Models/Table.cpp
@@ -146,7 +146,7 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) {
while (*rawValue == ' ') rawValue++;
if (*rawValue == '"') {
- rawValue++;
+ String temp(rawValue);
newCell = (*rawValue == '=')
? (Cell*)new CellFormula(rawValue, &cells)
: (Cell*)new CellString(rawValue);