Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.cpp
diff options
context:
space:
mode:
1 files changed, 7 insertions, 0 deletions
-rw-r--r--src/Models/Table.cpp7
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp
index 8c1f54d..c0fe315 100644
--- a/src/Models/Table.cpp
+++ b/src/Models/Table.cpp
@@ -84,7 +84,14 @@ void Table::readFromFile(std::ifstream& inFile) {
}
res += inFile.get();
}
+
+ if (*res.get_cstr() == '=')
+ cells[cells.get_count() - 1].add(new CellFormula(res.get_cstr(), &cells));
+ else
+ cells[cells.get_count() - 1].add(new CellString(res.get_cstr()));
}
+ else
+ throw std::logic_error(fileLocationExceptionMsg("Error: Could not determine type of value at row ", cells.get_count(), inFile.tellg() % cells.get_count() + 1));
}
}