work
[pspp] / src / output / pivot-table.c
index d0588365a143529ba2812fcc31a0918f21bc86d9..561e45657d2cbd0dc41f1a8059fed475b38b64a5 100644 (file)
@@ -396,6 +396,10 @@ pivot_category_set_rc (struct pivot_category *category, const char *s)
     category->dimension->table, s);
   if (format)
     category->format = *format;
+
+  struct pivot_value *name = category->name;
+  if (name->type == PIVOT_VALUE_NUMERIC && !name->numeric.format.w)
+    name->numeric.format = format ? *format : *settings_get_format ();
 }
 
 static void
@@ -789,6 +793,12 @@ pivot_result_class_change (const char *s_, const struct fmt_spec *format)
 
   return rc != NULL;
 }
+
+bool
+is_pivot_result_class (const char *s)
+{
+  return pivot_result_class_find (s) != NULL;
+}
 \f
 /* Pivot tables. */
 
@@ -1368,8 +1378,8 @@ pivot_category_assign_label_depth (struct pivot_category *category,
 
 static bool
 pivot_axis_assign_label_depth (struct pivot_table *table,
-                             enum pivot_axis_type axis_type,
-                             bool dimension_labels_in_corner)
+                               enum pivot_axis_type axis_type,
+                               bool dimension_labels_in_corner)
 {
   struct pivot_axis *axis = &table->axes[axis_type];
   bool any_label_shown_in_corner = false;
@@ -1401,10 +1411,6 @@ pivot_table_assign_label_depth (struct pivot_table *table)
   pivot_axis_assign_label_depth (table, PIVOT_AXIS_LAYER, false);
 }
 \f
-/* Footnotes. */
-
-\f
-\f
 static void
 indent (int indentation)
 {