Commit 3c5f135d authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Make the selected column and row be always fully visible (ie, use the

1998-08-18  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
	Make the selected column and row be always fully visible (ie, use
	the ->last_full_[col|row] instead of last_visible_[col|row].

	* src/cell.c (cell_set_format): Call cell_queue_redraw after
	changing the cell contents.
parent ccd87b37
1998-08-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
Make the selected column and row be always fully visible (ie, use
the ->last_full_[col|row] instead of last_visible_[col|row].
* src/cell.c (cell_set_format): Call cell_queue_redraw after
changing the cell contents.
1998-08-18 Chris Lahey <clahey@jennifer.reshall.umich.edu>
* src/format.c (format_number): Fixed the small '.' error.
......
1998-08-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
Make the selected column and row be always fully visible (ie, use
the ->last_full_[col|row] instead of last_visible_[col|row].
* src/cell.c (cell_set_format): Call cell_queue_redraw after
changing the cell contents.
1998-08-18 Chris Lahey <clahey@jennifer.reshall.umich.edu>
* src/format.c (format_number): Fixed the small '.' error.
......
1998-08-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
Make the selected column and row be always fully visible (ie, use
the ->last_full_[col|row] instead of last_visible_[col|row].
* src/cell.c (cell_set_format): Call cell_queue_redraw after
changing the cell contents.
1998-08-18 Chris Lahey <clahey@jennifer.reshall.umich.edu>
* src/format.c (format_number): Fixed the small '.' error.
......
1998-08-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
Make the selected column and row be always fully visible (ie, use
the ->last_full_[col|row] instead of last_visible_[col|row].
* src/cell.c (cell_set_format): Call cell_queue_redraw after
changing the cell contents.
1998-08-18 Chris Lahey <clahey@jennifer.reshall.umich.edu>
* src/format.c (format_number): Fixed the small '.' error.
......
......@@ -214,4 +214,5 @@ cell_set_format (Cell *cell, char *format)
/* re-render the cell text */
cell_render_value (cell);
cell_queue_redraw (cell);
}
......@@ -204,12 +204,13 @@ move_cursor (GnumericSheet *gsheet, int col, int row, int clear_selection)
if (clear_selection)
sheet_selection_clear_only (gsheet->sheet);
gnumeric_sheet_make_cell_visible (gsheet, col, row);
if (clear_selection)
sheet_selection_append (gsheet->sheet, col, row);
item_cursor_set_bounds (item_cursor, col, row, col, row);
gnumeric_sheet_make_cell_visible (gsheet, col, row);
gnumeric_sheet_load_cell_val (gsheet);
}
......@@ -778,21 +779,19 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row)
/* Find the new gsheet->top_col */
if (col < gsheet->top_col){
new_top_col = col;
} else if (col > gsheet->last_visible_col){
} else if (col > gsheet->last_full_col){
ColRowInfo *ci;
int width = canvas->width;
int first_col = col;
int allocated = 0;
int first_col;
ci = sheet_col_get_info (sheet, col);
allocated = ci->pixels;
do {
first_col--;
for (first_col = col; first_col > 0; first_col--){
ci = sheet_col_get_info (sheet, first_col);
if (allocated + ci->pixels > width)
break;
allocated += ci->pixels;
} while ((first_col > 0) && (width - allocated > 0));
}
new_top_col = first_col+1;
} else
new_top_col = gsheet->top_col;
......@@ -800,21 +799,19 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row)
/* Find the new gsheet->top_row */
if (row < gsheet->top_row){
new_top_row = row;
} else if (row > gsheet->last_visible_row){
} else if (row > gsheet->last_full_row){
ColRowInfo *ri;
int height = canvas->height;
int first_row = row;
int allocated = 0;
int first_row;
ri = sheet_row_get_info (sheet, row);
allocated = ri->pixels;
do {
first_row--;
for (first_row = row; first_row > 0; first_row--){
ri = sheet_row_get_info (sheet, first_row);
if (allocated + ri->pixels > height)
break;
allocated += ri->pixels;
} while ((first_row > 0) && (height - allocated > 0));
}
new_top_row = first_row+1;
} else
new_top_row = gsheet->top_row;
......
......@@ -204,12 +204,13 @@ move_cursor (GnumericSheet *gsheet, int col, int row, int clear_selection)
if (clear_selection)
sheet_selection_clear_only (gsheet->sheet);
gnumeric_sheet_make_cell_visible (gsheet, col, row);
if (clear_selection)
sheet_selection_append (gsheet->sheet, col, row);
item_cursor_set_bounds (item_cursor, col, row, col, row);
gnumeric_sheet_make_cell_visible (gsheet, col, row);
gnumeric_sheet_load_cell_val (gsheet);
}
......@@ -778,21 +779,19 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row)
/* Find the new gsheet->top_col */
if (col < gsheet->top_col){
new_top_col = col;
} else if (col > gsheet->last_visible_col){
} else if (col > gsheet->last_full_col){
ColRowInfo *ci;
int width = canvas->width;
int first_col = col;
int allocated = 0;
int first_col;
ci = sheet_col_get_info (sheet, col);
allocated = ci->pixels;
do {
first_col--;
for (first_col = col; first_col > 0; first_col--){
ci = sheet_col_get_info (sheet, first_col);
if (allocated + ci->pixels > width)
break;
allocated += ci->pixels;
} while ((first_col > 0) && (width - allocated > 0));
}
new_top_col = first_col+1;
} else
new_top_col = gsheet->top_col;
......@@ -800,21 +799,19 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row)
/* Find the new gsheet->top_row */
if (row < gsheet->top_row){
new_top_row = row;
} else if (row > gsheet->last_visible_row){
} else if (row > gsheet->last_full_row){
ColRowInfo *ri;
int height = canvas->height;
int first_row = row;
int allocated = 0;
int first_row;
ri = sheet_row_get_info (sheet, row);
allocated = ri->pixels;
do {
first_row--;
for (first_row = row; first_row > 0; first_row--){
ri = sheet_row_get_info (sheet, first_row);
if (allocated + ri->pixels > height)
break;
allocated += ri->pixels;
} while ((first_row > 0) && (height - allocated > 0));
}
new_top_row = first_row+1;
} else
new_top_row = gsheet->top_row;
......
......@@ -1696,8 +1696,16 @@ sheet_selection_paste (Sheet *sheet, int dest_col, int dest_row, int paste_flags
clipboard_paste_region (content, sheet, dest_col, dest_row, paste_flags);
}
void
sheet_insert_col (Sheet *sheet, int col, int row, int count)
{
}
void
sheet_style_attach (Sheet *sheet, int start_col, int start_row, int end_col, int end_row, Style *style)
{
printf ("WARNING: sheet_style_attach not implemeneted yet\n");
}
......@@ -199,11 +199,11 @@ void sheet_redraw_all (Sheet *sheet);
void sheet_update_auto_expr (Sheet *sheet);
/* Sheet information manipulation */
void sheet_shift_column (Sheet *sheet,
int column, int row,
void sheet_insert_col (Sheet *sheet,
int col, int row,
int count);
void sheet_shift_row (Sheet *sheet,
int column, int row,
void sheet_insert_row (Sheet *sheet,
int col, int row,
int count);
void sheet_style_attach (Sheet *sheet,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment