Revert "fixes #0003361: Spreadsheet: Inserting Row Cause Crash - FC Daily v0.17"

This reverts commit f485a0786f.
This commit is contained in:
Eivind Kvedalen
2018-07-29 19:37:23 +02:00
committed by Yorik van Havre
parent cd0b26a69c
commit 13da3dd830

View File

@@ -358,9 +358,7 @@ Cell * PropertySheet::cellAt(CellAddress address)
// address actually inside a merged cell
if (j != mergedCells.end()) {
std::map<CellAddress, Cell*>::const_iterator i = data.find(j->second);
//assert(i != data.end());
if (i == data.end())
return nullptr;
assert(i != data.end());
return i->second;
}
@@ -380,9 +378,7 @@ const Cell * PropertySheet::cellAt(CellAddress address) const
// address actually inside a merged cell
if (j != mergedCells.end()) {
std::map<CellAddress, Cell*>::const_iterator i = data.find(j->second);
//assert(i != data.end());
if (i == data.end())
return nullptr;
assert(i != data.end());
return i->second;
}
@@ -889,9 +885,7 @@ void PropertySheet::getSpans(CellAddress address, int & rows, int & cols) const
if (i != mergedCells.end()) {
CellAddress anchor = i->second;
const Cell* cell = cellAt(anchor);
if (cell)
cell->getSpans(rows, cols);
cellAt(anchor)->getSpans(rows, cols);
}
else {
rows = cols = 1;