Commit bfddce7f authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

If everything is hidden we can get into odd states.


2001-05-12  Jody Goldberg <jgoldberg@home.com>

	* src/item-grid.c (item_grid_draw) : If everything is hidden we can
	  get into odd states.
parent 93b81f20
2001-05-12 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : If everything is hidden we can
get into odd states.
* src/expr.c (eval_expr_real) : New peek code generated some spurious
errors when concatenating blanks.
......
2001-05-12 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : If everything is hidden we can
get into odd states.
* src/expr.c (eval_expr_real) : New peek code generated some spurious
errors when concatenating blanks.
......
2001-05-12 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : If everything is hidden we can
get into odd states.
* src/expr.c (eval_expr_real) : New peek code generated some spurious
errors when concatenating blanks.
......
2001-05-12 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : If everything is hidden we can
get into odd states.
* src/expr.c (eval_expr_real) : New peek code generated some spurious
errors when concatenating blanks.
......
2001-05-12 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : If everything is hidden we can
get into odd states.
* src/expr.c (eval_expr_real) : New peek code generated some spurious
errors when concatenating blanks.
......
......@@ -734,6 +734,7 @@ cell_convert_expr_to_value (Cell *cell)
cell_dirty (cell);
}
guint
cellpos_hash (CellPos const *key)
{
......
......@@ -263,7 +263,7 @@ item_grid_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
* However, that feels like more hassle that it is worth. Look into this someday.
*/
int x, y, col, row, n;
int const start_col = gnumeric_sheet_find_col (gsheet, draw_x-2, &x);
int start_col = gnumeric_sheet_find_col (gsheet, draw_x-2, &x);
int end_col = gnumeric_sheet_find_col (gsheet, draw_x+width+2, NULL);
int const diff_x = x - draw_x;
int start_row = gnumeric_sheet_find_row (gsheet, draw_y-2, &y);
......@@ -288,13 +288,23 @@ item_grid_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
printf ("%s%d <= %d vs %d\n", col_name(end_col), end_row+1, y, draw_y);
#endif
/* Skip any hidden rows at the start */
/* Skip any hidden cols/rows at the start */
for (; start_col <= end_col ; ++start_col) {
ri = sheet_col_get_info (sheet, start_col);
if (ri->visible)
break;
}
for (; start_row <= end_row ; ++start_row) {
ri = sheet_row_get_info (sheet, start_row);
if (ri->visible)
break;
}
/* if everything is hidden no need to draw */
if (end_col < 0 || start_col >= SHEET_MAX_COLS ||
end_row < 0 || start_row >= SHEET_MAX_ROWS)
return;
/* Fill entire region with default background (even past far edge) */
gdk_draw_rectangle (drawable, ig->gc.fill, TRUE,
draw_x, draw_y, width, height);
......
......@@ -94,7 +94,7 @@ typedef enum {
#define append_type(t) do { guint8 x = t; match_types = g_byte_array_append (match_types, &x, 1); } while (0)
static char *
format_create_regexp (const unsigned char *format, GByteArray **dest)
format_create_regexp (unsigned char const *format, GByteArray **dest)
{
GString *regexp;
GByteArray *match_types;
......
......@@ -263,8 +263,7 @@ rendered_value_calc_size_ext (Cell const *cell, MStyle *mstyle)
char *
rendered_value_get_text (RenderedValue const *rv)
{
g_return_val_if_fail (rv->rendered_text != NULL,
g_strdup ("ERROR"));
g_return_val_if_fail (rv->rendered_text != NULL, g_strdup ("ERROR"));
return g_strdup (rv->rendered_text->str);
}
......@@ -281,8 +280,7 @@ rendered_value_get_text (RenderedValue const *rv)
char *
cell_get_rendered_text (Cell const *cell)
{
g_return_val_if_fail (cell != NULL,
g_strdup("ERROR"));
g_return_val_if_fail (cell != NULL, g_strdup("ERROR"));
return rendered_value_get_text (cell->rendered_value);
}
......
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