*heightp = 0;
struct string body = DS_EMPTY_INITIALIZER;
- bool numeric = pivot_value_format_body (cell->value, a->pt, &body);
+ bool numeric = pivot_value_format (cell->value, a->pt, &body);
/* Calculate length; if it's zero, then there's nothing to do. */
if (ds_is_empty (&body))
/* Appends a text representation of VALUE to OUT. Settings on
PT control whether variable and value labels are included.
- Subscripts and footnotes are included. */
-void
+ Subscripts and footnotes are included.
+
+ Returns true if OUT is a number (or a number plus a value label), false
+ otherwise. */
+bool
pivot_value_format (const struct pivot_value *value,
const struct pivot_table *pt,
struct string *out)
{
- pivot_value_format_body (value, pt, out);
+ bool numeric = pivot_value_format_body (value, pt, out);
if (value->n_subscripts)
{
ds_put_byte (out, ']');
}
+
+ return numeric;
}
/* Returns a text representation of VALUE. The caller must free the string,
char *pivot_value_to_string (const struct pivot_value *,
const struct pivot_table *);
char *pivot_value_to_string_defaults (const struct pivot_value *);
-void pivot_value_format (const struct pivot_value *,
+bool pivot_value_format (const struct pivot_value *,
const struct pivot_table *, struct string *);
bool pivot_value_format_body (const struct pivot_value *,
const struct pivot_table *,