! * Removes all rows in the spreadsheet in which the value of one or more of its columns is missing/empty. */
| 339 | * Removes all rows in the spreadsheet in which the value of one or more of its columns is missing/empty. |
| 340 | */ |
| 341 | void Spreadsheet::removeEmptyRows() { |
| 342 | const auto& rows = rowsWithMissingValues(); |
| 343 | if (rows.isEmpty()) |
| 344 | return; |
| 345 | |
| 346 | WAIT_CURSOR; |
| 347 | beginMacro(i18n("%1: remove rows with missing values", name())); |
| 348 | |
| 349 | for (int row = rows.count() - 1; row >= 0; --row) |
| 350 | removeRows(rows.at(row), 1); |
| 351 | |
| 352 | endMacro(); |
| 353 | RESET_CURSOR; |
| 354 | } |
| 355 | |
| 356 | /*! |
| 357 | * Masks all rows in the spreadsheet in which the value of one or more of its columns is missing/empty. |