You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deleting a table, if the index of the table to be deleted is smaller than the index of the current table, the index of the current table will not change after deletion, which will cause the array to go out of range.
To fix this bug,you need to add the change to activesheetIndex in the "deleteSheet" function of xlsxworkbook.cpp
bool Workbook::deleteSheet(int index)
{
Q_D(Workbook);
if (d->sheets.size() <= 1)
return false;
if (index < 0 || index >= d->sheets.size())
return false;
d->sheets.removeAt(index);
d->sheetNames.removeAt(index);
if(index <= d->activesheetIndex) d->activesheetIndex--;
return true;
}
The text was updated successfully, but these errors were encountered:
When deleting a table, if the index of the table to be deleted is smaller than the index of the current table, the index of the current table will not change after deletion, which will cause the array to go out of range.
To fix this bug,you need to add the change to activesheetIndex in the "deleteSheet" function of xlsxworkbook.cpp
The text was updated successfully, but these errors were encountered: