| 475 | |
| 476 | |
| 477 | void CsvGrid::deleteSelection() { |
| 478 | DEBUG_PRINTF("#### CsvGrid::deleteSelection\n"); |
| 479 | int myrow, mycol; |
| 480 | int s_left, s_top, s_right, s_bottom; |
| 481 | |
| 482 | get_selection(s_top, s_left, s_bottom, s_right); |
| 483 | |
| 484 | if( s_top == s_bottom && s_left == s_right) { |
| 485 | windows[app.getTopWindow()].addUndoStateCell(dataTable->getCell(s_top,s_left), s_top, s_left, "Delete Selection"); |
| 486 | } else { |
| 487 | windows[app.getTopWindow()].addUndoStateTable("Delete Selection"); |
| 488 | } |
| 489 | windows[app.getTopWindow()].setUsed(true); |
| 490 | windows[app.getTopWindow()].setChanged(true); |
| 491 | |
| 492 | for(myrow = s_top; myrow <= s_bottom; myrow++) { |
| 493 | for(mycol = s_left; mycol <= s_right; mycol++) { |
| 494 | dataTable->setCell("", myrow, mycol); |
| 495 | } |
| 496 | } |
| 497 | this->redraw(); |
| 498 | } |
| 499 | |
| 500 | |
| 501 | void CsvGrid::selectAll() { |
nothing calls this directly
no test coverage detected