+}
+
+static void
+write_table_layer (struct odt_driver *odt, const struct pivot_table *pt,
+ const size_t *layer_indexes)
+{
+ struct table *title, *layers, *body, *caption, *footnotes;
+ pivot_output (pt, layer_indexes, true, &title, &layers, &body,
+ &caption, &footnotes, NULL, NULL);
+
+ /* Write a heading for the table */
+ write_table__ (odt, pt, title);
+ write_table__ (odt, pt, layers);