[Spreadsheet] Remove alias from dynamic properties on removeRows/Columns
When removing a row in a spreadsheet which has an assigned alias, the alias will not be removed from the list of dynamic properties. This makes it impossible to create a new alias which uses the same name even if the original was removed (using removeRows/removeColumns) Fixes #4492
This commit is contained in:
@@ -741,6 +741,18 @@ bool PropertySheet::rowSortFunc(const CellAddress & a, const CellAddress & b) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<CellAddress> PropertySheet::getRows(int row, int count) const
|
||||
{
|
||||
std::vector<CellAddress> keys;
|
||||
|
||||
for (const auto &i : data) {
|
||||
auto key = i.first;
|
||||
if (key.row() >= row && key.row() < row + count)
|
||||
keys.push_back(key);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
void PropertySheet::removeRows(int row, int count)
|
||||
{
|
||||
std::vector<CellAddress> keys;
|
||||
@@ -849,6 +861,18 @@ bool PropertySheet::colSortFunc(const CellAddress & a, const CellAddress & b) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<CellAddress> PropertySheet::getColumns(int column, int count) const
|
||||
{
|
||||
std::vector<CellAddress> keys;
|
||||
|
||||
for (const auto &i : data) {
|
||||
auto key = i.first;
|
||||
if (key.col() >= column && key.col() < column + count)
|
||||
keys.push_back(key);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
void PropertySheet::removeColumns(int col, int count)
|
||||
{
|
||||
std::vector<CellAddress> keys;
|
||||
|
||||
Reference in New Issue
Block a user