projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d36426b
)
CTABLES: Support setting the title, caption, ...
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 2 Jan 2022 03:27:42 +0000
(19:27 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 13 Mar 2022 23:56:02 +0000
(16:56 -0700)
src/language/stats/ctables.c
patch
|
blob
|
history
diff --git
a/src/language/stats/ctables.c
b/src/language/stats/ctables.c
index ca02ebbae8d43e7b6a79905040bec85a59f05a99..53b99519dcadb8bdfb853e44edb0158c30b95df4 100644
(file)
--- 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 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++)
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++)