! * Move column at \c from index to \c to index. * @param from The current index of the column. * @param to The future index of the column. */
| 741 | * @param to The future index of the column. |
| 742 | */ |
| 743 | void Spreadsheet::moveColumn(int from, int to) { |
| 744 | const auto& columns = children<Column>(); |
| 745 | auto* col = columns.at(from); |
| 746 | beginMacro(i18n("%1: move column %2 from position %3 to %4.", name(), col->name(), from + 1, to + 1)); |
| 747 | col->remove(); |
| 748 | insertChildBefore(col, columns.at(to)); |
| 749 | endMacro(); |
| 750 | } |
| 751 | |
| 752 | /*! |
| 753 | * Clears all values in the specified columns. |
no test coverage detected