! * Inserts \c count rows before the \c before row index in the spreadsheet. * @param count The number of rows to insert. * @param before The row index before which the rows are inserted. */
| 309 | * @param before The row index before which the rows are inserted. |
| 310 | */ |
| 311 | void Spreadsheet::insertRows(int before, int count) { |
| 312 | if (count < 1 || before < 0 || before > rowCount()) |
| 313 | return; |
| 314 | |
| 315 | WAIT_CURSOR; |
| 316 | beginMacro(i18np("%1: insert 1 row", "%1: insert %2 rows", name(), count)); |
| 317 | for (auto* col : children<Column>()) |
| 318 | col->insertRows(before, count); |
| 319 | endMacro(); |
| 320 | RESET_CURSOR; |
| 321 | } |
| 322 | |
| 323 | /*! |
| 324 | * Inserts \c count rows before the last row index in the spreadsheet. |
no test coverage detected