! * Masks all rows in the spreadsheet in which the value of one or more of its columns is missing/empty. */
| 357 | * Masks all rows in the spreadsheet in which the value of one or more of its columns is missing/empty. |
| 358 | */ |
| 359 | void Spreadsheet::maskEmptyRows() { |
| 360 | const auto& rows = rowsWithMissingValues(); |
| 361 | if (rows.isEmpty()) |
| 362 | return; |
| 363 | |
| 364 | WAIT_CURSOR; |
| 365 | beginMacro(i18n("%1: mask rows with missing values", name())); |
| 366 | |
| 367 | const auto& columns = children<Column>(); |
| 368 | for (int row : rows) { |
| 369 | for (const auto& col : columns) |
| 370 | col->setMasked(row); |
| 371 | } |
| 372 | |
| 373 | endMacro(); |
| 374 | RESET_CURSOR; |
| 375 | } |
| 376 | |
| 377 | /*! |
| 378 | * returns the list of all rows having at least one missing/empty value. |