X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo-fsm.c;h=bedf3147ea281d4cba8ccd1c3b579cc052eb5844;hb=f7870951c8cbadda63214d99cd2bbcf8abd58662;hp=183cdb0b7ff925a3aff80a2dccaca337957bf643;hpb=29917c4f5908454803e663d2ad78bca4bc35e805;p=pspp diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index 183cdb0b7f..bedf3147ea 100644 --- a/src/output/cairo-fsm.c +++ b/src/output/cairo-fsm.c @@ -742,23 +742,23 @@ xr_layout_cell_text (struct xr_fsm *xr, const struct table_cell *cell, PANGO_UNDERLINE_SINGLE)); } - const struct pivot_value *value = cell->value; - if (value->n_footnotes || value->n_subscripts) + const struct pivot_value_ex *ex = pivot_value_ex (cell->value); + if (ex->n_footnotes || ex->n_subscripts) { size_t subscript_ofs = ds_length (&body); - for (size_t i = 0; i < value->n_subscripts; i++) + for (size_t i = 0; i < ex->n_subscripts; i++) { if (i) ds_put_byte (&body, ','); - ds_put_cstr (&body, value->subscripts[i]); + ds_put_cstr (&body, ex->subscripts[i]); } size_t footnote_ofs = ds_length (&body); size_t n_footnotes = 0; - for (size_t i = 0; i < value->n_footnotes; i++) + for (size_t i = 0; i < ex->n_footnotes; i++) { const struct pivot_footnote *f - = pt->footnotes[value->footnote_indexes[i]]; + = pt->footnotes[ex->footnote_indexes[i]]; if (f->show) { if (n_footnotes++) @@ -769,7 +769,7 @@ xr_layout_cell_text (struct xr_fsm *xr, const struct table_cell *cell, /* Allow footnote markers to occupy the right margin. That way, numbers in the column are still aligned. */ - if (value->n_footnotes && halign == TABLE_HALIGN_RIGHT) + if (ex->n_footnotes && halign == TABLE_HALIGN_RIGHT) { /* Measure the width of the footnote marker, so we know how much we need to make room for. */ @@ -804,10 +804,10 @@ xr_layout_cell_text (struct xr_fsm *xr, const struct table_cell *cell, PANGO_ATTR_INDEX_TO_TEXT_END); add_attr (attrs, pango_attr_scale_new (PANGO_SCALE_SMALL), subscript_ofs, PANGO_ATTR_INDEX_TO_TEXT_END); - if (value->n_subscripts) + if (ex->n_subscripts) add_attr (attrs, pango_attr_rise_new (-3000), subscript_ofs, footnote_ofs - subscript_ofs); - if (value->n_footnotes) + if (ex->n_footnotes) { bool superscript = pt->look->footnote_marker_superscripts; add_attr (attrs, pango_attr_rise_new (superscript ? 3000 : -3000), @@ -990,9 +990,7 @@ xr_fsm_create (const struct output_item *item_, item = output_item_ref (item_); break; - case OUTPUT_ITEM_GROUP_OPEN: - case OUTPUT_ITEM_GROUP_CLOSE: - case OUTPUT_ITEM_PAGE_SETUP: + case OUTPUT_ITEM_GROUP: return NULL; case OUTPUT_ITEM_MESSAGE: @@ -1148,11 +1146,9 @@ xr_fsm_measure (struct xr_fsm *fsm, cairo_t *cr, int *wp, int *hp) fsm->cairo = NULL; break; - case OUTPUT_ITEM_GROUP_OPEN: - case OUTPUT_ITEM_GROUP_CLOSE: + case OUTPUT_ITEM_GROUP: case OUTPUT_ITEM_MESSAGE: case OUTPUT_ITEM_PAGE_BREAK: - case OUTPUT_ITEM_PAGE_SETUP: case OUTPUT_ITEM_TEXT: default: NOT_REACHED (); @@ -1213,11 +1209,9 @@ xr_fsm_draw_region (struct xr_fsm *fsm, cairo_t *cr, fsm->cairo = NULL; break; - case OUTPUT_ITEM_GROUP_OPEN: - case OUTPUT_ITEM_GROUP_CLOSE: + case OUTPUT_ITEM_GROUP: case OUTPUT_ITEM_MESSAGE: case OUTPUT_ITEM_PAGE_BREAK: - case OUTPUT_ITEM_PAGE_SETUP: case OUTPUT_ITEM_TEXT: NOT_REACHED (); } @@ -1346,10 +1340,8 @@ xr_fsm_draw_slice (struct xr_fsm *fsm, cairo_t *cr, int space) used = xr_fsm_draw_table (fsm, space); break; - case OUTPUT_ITEM_GROUP_OPEN: - case OUTPUT_ITEM_GROUP_CLOSE: + case OUTPUT_ITEM_GROUP: case OUTPUT_ITEM_MESSAGE: - case OUTPUT_ITEM_PAGE_SETUP: case OUTPUT_ITEM_TEXT: default: NOT_REACHED ();