@example
X1 =>
- bool byte[x15] bool[x16]
+ bool
+ byte[show-title]
+ bool[x16]
byte[lang]
byte[show-variables]
byte[show-values]
available, 3 to display both. Again, the most common value is 0,
which probably means to use a global default.
+@code{show-title} is 1 to show the caption, 10 to hide it.
+
@code{show-caption} is true to show the caption, false to hide it.
-A writer may safely use false for @code{x14}, 1 for @code{x15}, false
+A writer may safely use false for @code{x14}, false
for @code{x16}, -1 for @code{x18} and @code{x19}, and false for
@code{x20}.
struct table_item *ti = table_item_create (table, NULL, NULL, pt->notes);
- if (pt->title)
+ if (pt->title && pt->show_title)
{
struct table_item_text *title = pivot_value_to_table_item_text (
pt->title, &pt->look->areas[PIVOT_AREA_TITLE], footnotes,
{
struct pivot_table *table = xzalloc (sizeof *table);
table->ref_cnt = 1;
+ table->show_title = true;
table->show_caption = true;
table->weight_format = (struct fmt_spec) { FMT_F, 40, 0 };
table->title = title;
bool rotate_inner_column_labels;
bool rotate_outer_row_labels;
bool show_grid_lines;
+ bool show_title;
bool show_caption;
size_t *current_layer; /* axis[PIVOT_AXIS_LAYER].n_dimensions elements. */
enum settings_value_show show_values;
Y2 => CustomCurrency byte[missing] bool[x17]
X1 =>
- bool[x14] byte[x15] bool[x16]
+ bool[x14]
+ byte[show-title]
+ bool[x16]
byte[lang]
byte[show-variables]
byte[show-values]
out->rotate_outer_row_labels = in->header->rotate_outer_row_labels;
out->look->row_labels_in_corner = in->ts->show_row_labels_in_corner;
out->show_grid_lines = in->borders->show_grid_lines;
+ out->show_title = true;
out->show_caption = true;
out->look->footnote_marker_superscripts = in->ts->footnote_marker_superscripts;
out->look->omit_empty = in->ts->omit_empty;
goto error;
out->show_caption = x1->show_caption;
+ out->show_title = x1->show_title != 10;
}
/* Column and row display settings. */
static void
put_x1 (struct buf *buf, const struct pivot_table *table)
{
- put_bytes (buf, "\0\1\0", 3);
+ put_byte (buf, 0);
+ put_byte (buf, table->show_title ? 1 : 10);
+ put_byte (buf, 0);
put_byte (buf, 0);
put_show_values (buf, table->show_variables);
put_show_values (buf, table->show_values);
for (int i = 0; i < 17; i++)
put_byte (buf, 0);
put_bool (buf, false);
- put_byte (buf, 1);
+ put_byte (buf, table->show_caption);
}
static void