Commit 51b0b48a authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

Fix a few glitches with printing hidden cols/rows.

2000-01-19  Jody Goldberg <jgoldberg@home.com>

	* src/print-cell.c (print_cell_grid) : Don't print grid lines for
	  hidden cols/rows.

	* src/print.c (compute_groups) : Hidden cols/rows exist.  They just
	  don't take up any space.

	* src/parser.y : array_cols remove null production.  We can have
	  empty array_rows OR we can have empty array_cols.  Not both.
parent 78ec7e2c
2000-01-19 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell_grid) : Don't print grid lines for
hidden cols/rows.
* src/print.c (compute_groups) : Hidden cols/rows exist. They just
don't take up any space.
* src/parser.y : array_cols remove null production. We can have
empty array_rows OR we can have empty array_cols. Not both.
2000-01-18 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (eval_expr_real) : Add OPER_UNARY_PLUS.
......
2000-01-19 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell_grid) : Don't print grid lines for
hidden cols/rows.
* src/print.c (compute_groups) : Hidden cols/rows exist. They just
don't take up any space.
* src/parser.y : array_cols remove null production. We can have
empty array_rows OR we can have empty array_cols. Not both.
2000-01-18 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (eval_expr_real) : Add OPER_UNARY_PLUS.
......
......@@ -440,7 +440,6 @@ array_cols: array_row {
$$ = g_list_prepend ($3, $1);
register_expr_list_list_allocation ($$);
}
| { $$ = NULL; }
;
%%
......
......@@ -533,7 +533,7 @@ print_cell_grid (GnomePrintContext *context,
for (col = start_col; col <= end_col; col++) {
ColRowInfo *ci = sheet_col_get_info (sheet, col);
if (ci) {
if (ci && ci->pixels >= 0) {
vline (context, x, base_y, base_y - height);
x += ci->units + ci->margin_a_pt + ci->margin_b_pt;
}
......@@ -543,12 +543,9 @@ print_cell_grid (GnomePrintContext *context,
for (row = start_row; row <= end_row; row++){
ColRowInfo *ri = sheet_row_get_info (sheet, row);
if (ri) {
if (ri && ri->pixels >= 0) {
hline (context, base_x, base_x + width, y);
y -= ri->units + ri->margin_a_pt + ri->margin_b_pt;
}
}
}
......@@ -357,20 +357,23 @@ compute_groups (Sheet *sheet, int start, int end, int usable,
info = (*get_info) (sheet, idx);
units += info->units + info->margin_a_pt + info->margin_b_pt;
if (units > usable){
if (count == 0){
result = g_list_prepend (result, GINT_TO_POINTER (1));
units = 0;
count = 0;
} else {
result = g_list_prepend (result, GINT_TO_POINTER (count));
count = 0;
units = 0;
continue;
}
}
/* Hidden ColRows are ignored */
if (info->pixels >= 0) {
units += info->units + info->margin_a_pt + info->margin_b_pt;
if (units > usable){
if (count == 0){
result = g_list_prepend (result, GINT_TO_POINTER (1));
units = 0;
count = 0;
} else {
result = g_list_prepend (result, GINT_TO_POINTER (count));
count = 0;
units = 0;
continue;
}
}
}
idx++;
count++;
}
......
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