pivot-table: Implement hiding footnotes.
[pspp] / src / output / spv / spv-writer.c
index c5a600571a8e869a4ceb5d6700c43e4a1fd0a7ce..58cb308fadbaa1e563d3cc995dcc08a2e002692f 100644 (file)
@@ -323,7 +323,6 @@ spv_writer_put_text (struct spv_writer *w, const struct text_item *text,
     spv_writer_close_file (w, "");
 }
 
-#ifdef HAVE_CAIRO
 static cairo_status_t
 write_to_zip (void *zw_, const unsigned char *data, unsigned int length)
 {
@@ -363,7 +362,6 @@ spv_writer_put_image (struct spv_writer *w, cairo_surface_t *image)
 
   free (uri);
 }
-#endif
 
 void
 spv_writer_eject_page (struct spv_writer *w)
@@ -859,9 +857,10 @@ put_light_table (struct buf *buf, uint64_t table_id,
   put_u32 (buf, table->n_footnotes);
   for (size_t i = 0; i < table->n_footnotes; i++)
     {
-      put_value (buf, table->footnotes[i]->content);
-      put_optional_value (buf, table->footnotes[i]->marker);
-      put_u32 (buf, 0);
+      const struct pivot_footnote *f = table->footnotes[i];
+      put_value (buf, f->content);
+      put_optional_value (buf, f->marker);
+      put_u32 (buf, f->show ? 1 : -1);
     }
 
   /* Areas. */