Example #1
0
//-----------------------------------------------------------------------------
// pasteColumnsAbove will insert columns after the last column in the selection
void TColumnSelection::pasteColumnsAbove() {
  std::set<int> indices;
  if (isEmpty()) {  // in case that no columns are selected
    TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
    indices.insert(xsh->getFirstFreeColumnIndex());
  } else
    indices.insert(*m_indices.rbegin() + 1);
  ColumnCmd::pasteColumns(indices);
}