diff options
| Commit | 2cd58d14ae14b19c16b04bf1a848bc3dbd073ea9 (patch) | |
|---|---|---|
| Author | 2022-06-14 13:09:11 +0300 | |
| Committer | 2022-06-14 13:09:11 +0300 | |
| Files | d94f37dbcf0a75fef04556599e876ae2e7839296 /src | |
| FMI-OOP-P2_Tables-2cd58d14ae14b19c16b04bf1a848bc3dbd073ea9.tar FMI-OOP-P2_Tables-2cd58d14ae14b19c16b04bf1a848bc3dbd073ea9.tar.gz FMI-OOP-P2_Tables-2cd58d14ae14b19c16b04bf1a848bc3dbd073ea9.zip | ||
| Parent | d12937b1468a73041c6ee62a8fc6d5ab7d829cd2 (diff) | |
Autocommit at 14.06.2022 @ 13:09
2 files changed, 1 insertions, 5 deletions
| -rw-r--r-- | src/Models/CellString.cpp | 4 | ||||
| -rw-r--r-- | src/Models/Table.cpp | 2 |
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); |
