Spreadsheet: do not create string property for empty cell
Otherwise may cause massive slow down when, for example, the user changes the entire row/column color, which results in large amount of empty cells.
This commit is contained in:
@@ -683,10 +683,12 @@ void Sheet::updateProperty(CellAddress key)
|
||||
else {
|
||||
std::string s;
|
||||
|
||||
if (cell->getStringContent(s))
|
||||
if (cell->getStringContent(s) && !s.empty())
|
||||
output.reset(new StringExpression(this, s));
|
||||
else
|
||||
output.reset(new StringExpression(this, ""));
|
||||
else {
|
||||
this->removeDynamicProperty(key.toString().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Eval returns either NumberExpression or StringExpression, or
|
||||
|
||||
Reference in New Issue
Block a user