| 963 | } |
| 964 | |
| 965 | void MatrixView::insertEmptyRows() { |
| 966 | int first = firstSelectedRow(); |
| 967 | int last = lastSelectedRow(); |
| 968 | int current = first; |
| 969 | |
| 970 | if (first < 0) |
| 971 | return; |
| 972 | |
| 973 | WAIT_CURSOR; |
| 974 | m_matrix->beginMacro(i18n("%1: insert empty rows(s)", m_matrix->name())); |
| 975 | while (current <= last) { |
| 976 | current = first + 1; |
| 977 | while (current <= last && isRowSelected(current)) |
| 978 | current++; |
| 979 | const int count = current - first; |
| 980 | m_matrix->insertRows(first, count); |
| 981 | current += count; |
| 982 | last += count; |
| 983 | while (current <= last && !isRowSelected(current)) |
| 984 | current++; |
| 985 | first = current; |
| 986 | } |
| 987 | m_matrix->endMacro(); |
| 988 | RESET_CURSOR; |
| 989 | } |
| 990 | |
| 991 | void MatrixView::removeSelectedRows() { |
| 992 | int first = firstSelectedRow(); |
nothing calls this directly
no test coverage detected