Sets the visible area of the table in a way that the given cell is central
| 457 | |
| 458 | // Sets the visible area of the table in a way that the given cell is central |
| 459 | void CsvGrid::setVisibleArea(int R, int C) { |
| 460 | DEBUG_PRINTF("#### CsvGrid::setVisibleArea: %d, %d\n", R, C); |
| 461 | int r1, r2, c1, c2; |
| 462 | visible_cells(r1, r2, c1, c2); |
| 463 | if( C >= c2 ) { |
| 464 | col_position( c1 + (C - c2 + 1) ); |
| 465 | } else if( C < c1) { |
| 466 | col_position( C ); |
| 467 | } |
| 468 | if( R >= r2 ) { |
| 469 | row_position( r1 + (R - r2 + 1) ); |
| 470 | } else if( R < r1 ) { |
| 471 | row_position( R ); |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | |
| 476 |
no outgoing calls
no test coverage detected