| 904 | } |
| 905 | |
| 906 | void MatrixView::insertEmptyColumns() { |
| 907 | int first = firstSelectedColumn(); |
| 908 | int last = lastSelectedColumn(); |
| 909 | if (first < 0) |
| 910 | return; |
| 911 | int current = first; |
| 912 | |
| 913 | WAIT_CURSOR; |
| 914 | m_matrix->beginMacro(i18n("%1: insert empty column(s)", m_matrix->name())); |
| 915 | while (current <= last) { |
| 916 | current = first + 1; |
| 917 | while (current <= last && isColumnSelected(current)) |
| 918 | current++; |
| 919 | const int count = current - first; |
| 920 | m_matrix->insertColumns(first, count); |
| 921 | current += count; |
| 922 | last += count; |
| 923 | while (current <= last && isColumnSelected(current)) |
| 924 | current++; |
| 925 | first = current; |
| 926 | } |
| 927 | m_matrix->endMacro(); |
| 928 | RESET_CURSOR; |
| 929 | } |
| 930 | |
| 931 | void MatrixView::removeSelectedColumns() { |
| 932 | int first = firstSelectedColumn(); |
nothing calls this directly
no test coverage detected