X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo-fsm.c;h=bedf3147ea281d4cba8ccd1c3b579cc052eb5844;hb=8b416a04a5b9cf0d3f380dbd821d337267248759;hp=5377c28b1c1bcd847b665bfa706aa6bc5b287e85;hpb=507ebaea36737618ef8265a60cd3e9005d9f3457;p=pspp diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index 5377c28b1c..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), @@ -991,7 +991,6 @@ xr_fsm_create (const struct output_item *item_, break; case OUTPUT_ITEM_GROUP: - case OUTPUT_ITEM_PAGE_SETUP: return NULL; case OUTPUT_ITEM_MESSAGE: @@ -1150,7 +1149,6 @@ xr_fsm_measure (struct xr_fsm *fsm, cairo_t *cr, int *wp, int *hp) 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 (); @@ -1214,7 +1212,6 @@ xr_fsm_draw_region (struct xr_fsm *fsm, cairo_t *cr, case OUTPUT_ITEM_GROUP: case OUTPUT_ITEM_MESSAGE: case OUTPUT_ITEM_PAGE_BREAK: - case OUTPUT_ITEM_PAGE_SETUP: case OUTPUT_ITEM_TEXT: NOT_REACHED (); } @@ -1345,7 +1342,6 @@ xr_fsm_draw_slice (struct xr_fsm *fsm, cairo_t *cr, int space) case OUTPUT_ITEM_GROUP: case OUTPUT_ITEM_MESSAGE: - case OUTPUT_ITEM_PAGE_SETUP: case OUTPUT_ITEM_TEXT: default: NOT_REACHED ();