Commit 3e99c7f9 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

off by 1. off by 1.

2001-09-19  Jody Goldberg <jgoldberg@home.com>

	* src/cell-draw.c (cell_draw) : off by 1.
	* src/print-cell.c (print_cell) : off by 1.

	* src/sheet.c (sheet_cell_calc_span) : support SPANCALC_NO_DRAW
	  and don't bother rendering calculated cells.
	(cb_max_cell_width) : render if necessary.
parent eaa8c4c8
2001-09-19 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : off by 1.
* src/print-cell.c (print_cell) : off by 1.
* src/sheet.c (sheet_cell_calc_span) : support SPANCALC_NO_DRAW
and don't bother rendering calculated cells.
(cb_max_cell_width) : render if necessary.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
......
......@@ -20,8 +20,10 @@ Jody:
* Add simple bucketing of range dependencies.
* Add minor formating extension.
* Some simple recalc tuning speeds things up by a factor of 2.
* Basic version of just in time rendering for another factor of 2.
* Cleanup the DOM based xml import/export utilities.
* Remove irritating frame around bonobo objects.
* Off by 1 pixel/pt error when handling right/center alignment.
* Improve sheet object menus.
* Remove the eval queue
* Improve INDIRECT.
......
2001-09-19 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : off by 1.
* src/print-cell.c (print_cell) : off by 1.
* src/sheet.c (sheet_cell_calc_span) : support SPANCALC_NO_DRAW
and don't bother rendering calculated cells.
(cb_max_cell_width) : render if necessary.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
......
2001-09-19 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : off by 1.
* src/print-cell.c (print_cell) : off by 1.
* src/sheet.c (sheet_cell_calc_span) : support SPANCALC_NO_DRAW
and don't bother rendering calculated cells.
(cb_max_cell_width) : render if necessary.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
......
2001-09-19 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : off by 1.
* src/print-cell.c (print_cell) : off by 1.
* src/sheet.c (sheet_cell_calc_span) : support SPANCALC_NO_DRAW
and don't bother rendering calculated cells.
(cb_max_cell_width) : render if necessary.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
......
......@@ -203,8 +203,8 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
rect.x = x1 + 1 + ci->margin_a;
rect.y = y1 + 1 + ri->margin_a;
rect.width = width;
rect.height = height;
rect.width = width + 1;
rect.height = height + 1;
style_font = scg_get_style_font (sheet, mstyle);
font = style_font_gdk_font (style_font);
......
......@@ -447,8 +447,8 @@ print_cell (Cell const *cell, MStyle const *mstyle, GnomePrintContext *context,
* excluding the surrounding grid lines and margins */
rect_x = x1 + 1 + ci->margin_a;
rect_y = y1 - 1 - ri->margin_a;
rect_width = width;
rect_height = height;
rect_width = width + 1;
rect_height = height + 1;
font_height = style_font->size;
valign = mstyle_get_align_v (mstyle);
......@@ -484,7 +484,7 @@ print_cell (Cell const *cell, MStyle const *mstyle, GnomePrintContext *context,
/* Do not allow text to impinge upon the grid lines or margins
* FIXME : Should use margins from spaninfo->left and spaninfo->right
*
* NOTE : postscript clip paths exclude the border, gdk includes it.
* NOTE : postscript clip paths exclude near the border, gdk includes it.
*/
gnome_print_gsave (context);
print_make_rectangle_path (context,
......
......@@ -368,7 +368,7 @@ sheet_range_calc_spans (Sheet *sheet, Range const *r, SpanCalcFlags flags)
}
void
sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags)
sheet_cell_calc_span (Cell *cell, SpanCalcFlags flags)
{
CellSpanInfo const * span;
int left, right;
......@@ -384,9 +384,14 @@ sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags)
if ((flags & SPANCALC_RENDER) && cell->rendered_value == NULL)
render = TRUE;
if (render)
cell_render_value ((Cell *)cell, TRUE);
else if (resize)
if (render) {
if (!cell_has_expr (cell))
cell_render_value ((Cell *)cell, TRUE);
else if (cell->rendered_value) {
rendered_value_destroy (cell->rendered_value);
cell->rendered_value = NULL;
}
} else if (resize)
rendered_value_calc_size (cell);
/* Is there an existing span ? clear it BEFORE calculating new one */
......@@ -422,7 +427,7 @@ sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags)
min_col = merged->start.col;
if (max_col < merged->end.col)
max_col = merged->end.col;
} else {
} else if (!(flags & SPANCALC_NO_DRAW)) {
sheet_redraw_cell (cell);
return;
}
......@@ -448,8 +453,9 @@ sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags)
cell_register_span (cell, left, right);
}
sheet_redraw_partial_row (cell->base.sheet, cell->pos.row,
min_col, max_col);
if (!(flags & SPANCALC_NO_DRAW))
sheet_redraw_partial_row (cell->base.sheet,
cell->pos.row, min_col, max_col);
}
/**
......@@ -1242,10 +1248,8 @@ cb_max_cell_width (Sheet *sheet, int col, int row, Cell *cell,
{
int width;
g_return_val_if_fail (cell->rendered_value != NULL, NULL);
/* Dynamic cells must be rerendered */
if (cell->rendered_value->dynamic_width)
if (cell->rendered_value == NULL || cell->rendered_value->dynamic_width)
cell_render_value (cell, FALSE);
width = cell_rendered_width (cell);
......
......@@ -279,7 +279,7 @@ void sheet_range_set_text (EvalPos const *pos, Range const *r, char const *st
void sheet_apply_style (Sheet *sheet, Range const *range, MStyle *mstyle);
void sheet_calc_spans (Sheet const *sheet, SpanCalcFlags flags);
void sheet_range_calc_spans (Sheet *sheet, Range const *r, SpanCalcFlags flags);
void sheet_cell_calc_span (Cell const *cell, SpanCalcFlags flags);
void sheet_cell_calc_span (Cell *cell, SpanCalcFlags flags);
void sheet_regen_adjacent_spans (Sheet *sheet,
int start_col, int start_row,
int end_col, int end_row,
......
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