From: Ben Pfaff Date: Sun, 29 Dec 2019 05:50:39 +0000 (+0000) Subject: pivot-table: Add support for hiding the caption. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96db814fbc3a1ec3bf063e447999444e695c6f93;hp=0c15548837a299334adf32401f9d8dc2806cb320;p=pspp pivot-table: Add support for hiding the caption. This will receive its first real user in an upcoming commit that adds support for SPV files. --- diff --git a/src/output/pivot-output.c b/src/output/pivot-output.c index fc41cb870f..1394af4d09 100644 --- a/src/output/pivot-output.c +++ b/src/output/pivot-output.c @@ -483,7 +483,7 @@ pivot_table_submit_layer (const struct pivot_table *pt, table_item_layers_destroy (layers); } - if (pt->caption) + if (pt->caption && pt->show_caption) { struct table_item_text *caption = pivot_value_to_table_item_text ( pt->caption, &pt->areas[PIVOT_AREA_CAPTION], footnotes, diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index ead1a1cc47..cc7ca59d0f 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -701,6 +701,7 @@ pivot_table_create__ (struct pivot_value *title, const char *subtype) { struct pivot_table *table = xzalloc (sizeof *table); table->ref_cnt = 1; + table->show_caption = true; table->weight_format = (struct fmt_spec) { FMT_F, 40, 0 }; table->title = title; table->subtype = pivot_value_new_text (subtype); diff --git a/src/output/pivot-table.h b/src/output/pivot-table.h index f2f0c564ab..e36565bd48 100644 --- a/src/output/pivot-table.h +++ b/src/output/pivot-table.h @@ -385,6 +385,7 @@ struct pivot_table bool rotate_outer_row_labels; bool row_labels_in_corner; bool show_grid_lines; + bool show_caption; bool omit_empty; /* Omit empty rows and columns? */ size_t *current_layer; /* axis[PIVOT_AXIS_LAYER].n_dimensions elements. */ char *table_look;