#include "libpspp/i18n.h"
#include "libpspp/message.h"
#include "libpspp/version.h"
-#ifdef HAVE_CAIRO
#include "output/cairo-chart.h"
-#endif
#include "output/chart-item.h"
#include "output/driver-provider.h"
#include "output/image-item.h"
struct html_driver
{
struct output_driver driver;
-#ifdef HAVE_CAIRO
struct cell_color fg;
struct cell_color bg;
-#endif
struct file_handle *handle;
char *chart_file_name;
fh_get_file_name (fh)));
html->file = NULL;
html->chart_cnt = 1;
-#ifdef HAVE_CAIRO
html->bg = parse_color (opt (d, o, "background-color", "#FFFFFFFFFFFF"));
html->fg = parse_color (opt (d, o, "foreground-color", "#000000000000"));
-#endif
html->file = fn_open (html->handle, "w");
if (html->file == NULL)
{
struct table_item *table_item = to_table_item (output_item);
html_output_table (html, table_item);
}
-#ifdef HAVE_CAIRO
else if (is_image_item (output_item) && html->chart_file_name != NULL)
{
struct image_item *image_item = to_image_item (output_item);
free (file_name);
}
}
-#endif /* HAVE_CAIRO */
else if (is_text_item (output_item))
{
struct text_item *text_item = to_text_item (output_item);
if (cell->value->n_footnotes > 0)
{
fputs ("<sup>", html->file);
+ size_t n_footnotes = 0;
for (size_t i = 0; i < cell->value->n_footnotes; i++)
{
- if (i > 0)
- putc (',', html->file);
+ const struct pivot_footnote *f
+ = pt->footnotes[cell->value->footnote_indexes[i]];
+ if (f->show)
+ {
+ if (n_footnotes++ > 0)
+ putc (',', html->file);
- size_t idx = cell->value->footnote_indexes[i];
- const struct pivot_footnote *f = pt->footnotes[idx];
- char *marker = pivot_value_to_string (f->marker, pt);
- escape_string (html->file, marker, " ", "<br>");
- free (marker);
+ char *marker = pivot_footnote_marker_string (f, pt);
+ escape_string (html->file, marker, " ", "<br>");
+ free (marker);
+ }
}
fputs ("</sup>", html->file);
}