| 2439 | |
| 2440 | |
| 2441 | void CsvApplication::addCol(bool before) { |
| 2442 | int row_top, row_bottom, col_top, col_bottom; |
| 2443 | int winIndex = app.getTopWindow(); |
| 2444 | windows[winIndex].grid->get_selection(row_top, col_top, row_bottom, col_bottom); |
| 2445 | showImWorkingWindow("Adding column ..."); |
| 2446 | windows[winIndex].addUndoStateTable("Add column"); |
| 2447 | windows[winIndex].setChanged(true); |
| 2448 | windows[winIndex].setUsed(true); |
| 2449 | if( before ) { |
| 2450 | windows[winIndex].table->addCol(col_top, true); |
| 2451 | windows[winIndex].grid->moveSelection(0,1); |
| 2452 | } else { |
| 2453 | windows[winIndex].table->addCol(col_bottom, false); |
| 2454 | } |
| 2455 | hideImWorkingWindow(); |
| 2456 | windows[winIndex].grid->rows( windows[winIndex].table->getNumberRows() ); |
| 2457 | windows[winIndex].grid->cols( windows[winIndex].table->getNumberCols() ); |
| 2458 | windows[winIndex].grid->redraw(); |
| 2459 | Fl::check(); |
| 2460 | } |
| 2461 | |
| 2462 | |
| 2463 | void CsvApplication::addRow(bool before) { |
no test coverage detected