From c4f20f5e0aaf5489236188a9b138c47dfb23f36b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 22 Jan 2023 12:34:08 -0800 Subject: [PATCH] monolithic rendering fixes --- src/output/pivot-output.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/output/pivot-output.c b/src/output/pivot-output.c index e50c273faf..55d3d5d33b 100644 --- a/src/output/pivot-output.c +++ b/src/output/pivot-output.c @@ -137,9 +137,10 @@ fill_cell_spanned (struct table *t, int x1, int y1, int x2, int y2, static void fill_cell_owned (struct table *t, int x1, int y1, int x2, int y2, - int style_idx, struct string *s, bool rotate_label) + int style_idx, struct string *s, bool rotate_label, + int options) { - int options = style_idx << TABLE_CELL_STYLE_SHIFT; + options |= style_idx << TABLE_CELL_STYLE_SHIFT; if (rotate_label) options |= TABLE_CELL_ROTATE; @@ -343,7 +344,7 @@ compose_headings (struct table *t, if (d->root->show_label_in_corner && h_ofs > area[h][0]) { int bb[TABLE_N_AXES][2]; - bb[h][0] = 0; + bb[h][0] = area[h][0]; bb[h][1] = h_ofs - 1; bb[v][0] = top_row; bb[v][1] = top_row + d->label_depth - 1; @@ -487,7 +488,8 @@ put_layers (struct table *t, const struct pivot_table *pt, struct string s = DS_EMPTY_INITIALIZER; pivot_value_format (d->data_leaves[layer_indexes[i]]->name, pt, &s); int y = y2 - i; - fill_cell_owned (t, x1, y, x2, y, PIVOT_AREA_LAYERS, &s, false); + fill_cell_owned (t, x1, y, x2, y, PIVOT_AREA_LAYERS, &s, false, + TABLE_CELL_FULL_WIDTH); } } @@ -526,7 +528,8 @@ put_footnotes (struct table *t, const struct pivot_table *pt, ds_put_cstr (&s, ". "); pivot_value_format (f[i]->content, pt, &s); int y = y1 + i; - fill_cell_owned (t, x1, y, x2, y, PIVOT_AREA_FOOTER, &s, false); + fill_cell_owned (t, x1, y, x2, y, PIVOT_AREA_FOOTER, &s, false, + TABLE_CELL_FULL_WIDTH); } } @@ -841,8 +844,7 @@ pivot_output_monolithic (const struct pivot_table *pt, && stub[H] && stub[V]) fill_cell_spanned (t, body[H][0], body[V][0], body[H][0] + stub[H] - 1, body[V][0] + stub[V] - 1, - PIVOT_AREA_CORNER, pt->corner_text, false, - TABLE_CELL_FULL_WIDTH); + PIVOT_AREA_CORNER, pt->corner_text, false, 0); if (body[H][1] >= body[H][0] && body[V][1] >= body[V][0]) { -- 2.30.2