- Self-reference bug

- Refactoring/clean-up of code
- Dependency tracking of aliased cells
- Various resolution errors
- Rewriting of ranges when columns/rows are inserted/removed
- References to aliases keep their units.
This commit is contained in:
Eivind Kvedalen
2015-03-04 22:14:35 +01:00
committed by wmayer
parent da9f2f2ff8
commit b4dc4d97f4
20 changed files with 382 additions and 178 deletions

View File

@@ -147,10 +147,10 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
if (role == Qt::ToolTipRole) {
QString v;
std::set<std::string> deps = sheet->dependsOn(row, col);
std::set<std::string> deps = sheet->dependsOn(CellAddress(row, col));
std::set<std::string> provides;
sheet->providesTo(row, col, provides);
sheet->providesTo(CellAddress(row, col), provides);
if (deps.size() > 0) {
v += QString::fromUtf8("Depends on:");
@@ -196,7 +196,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
}
// Get display value as computed property
std::string address = addressToString(CellAddress(row, col));
std::string address = CellAddress(row, col).toString();
Property * prop = sheet->getPropertyByName(address.c_str());
if (prop == 0)
@@ -394,8 +394,8 @@ bool SheetModel::setData(const QModelIndex & index, const QVariant & value, int
CellAddress address(index.row(), index.column());
try {
std::string strAddress = addressToString(address);
std::string next_address = addressToString(CellAddress(address.row() + 1, address.col()));
std::string strAddress = address.toString();
std::string next_address = CellAddress(address.row() + 1, address.col()).toString();
QString str = value.toString();
std::string content;
Cell * cell = sheet->getCell(address);