From b07d3956799eff7c7e1579734294405af676d1f1 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 1 Jan 2022 19:27:42 -0800 Subject: [PATCH] CTABLES: Support setting the title, caption, ... --- src/language/stats/ctables.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index ca02ebbae8..53b99519dc 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -2037,7 +2037,18 @@ ctables_execute (struct dataset *ds, struct ctables *ct) { struct ctables_table *t = ct->tables[i]; - struct pivot_table *pt = pivot_table_create (N_("Custom Tables")); + struct pivot_table *pt = pivot_table_create__ ( + (t->title + ? pivot_value_new_user_text (t->title, SIZE_MAX) + : pivot_value_new_text (N_("Custom Tables"))), + NULL); + if (t->caption) + pivot_table_set_caption ( + pt, pivot_value_new_user_text (t->caption, SIZE_MAX)); + if (t->corner) + pivot_table_set_caption ( + pt, pivot_value_new_user_text (t->corner, SIZE_MAX)); + pivot_table_set_look (pt, ct->look); struct pivot_dimension *d[PIVOT_N_AXES]; for (enum pivot_axis_type a = 0; a < PIVOT_N_AXES; a++) -- 2.30.2