X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fodt.c;h=abb30cb530c7c1c85b3edd46afdd825fbe573fe6;hb=f20d313de2b85419c3e2e22a78cdcdce499af43d;hp=683d19bcf59b31cb48206ead9a1eeb9705e8fe97;hpb=29917c4f5908454803e663d2ad78bca4bc35e805;p=pspp diff --git a/src/output/odt.c b/src/output/odt.c index 683d19bcf5..abb30cb530 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -285,7 +285,6 @@ odt_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o UNUSED) { struct output_driver *d; - struct odt_driver *odt; struct zip_writer *zip; const char *file_name = fh_get_file_name (fh); @@ -293,7 +292,7 @@ odt_create (struct file_handle *fh, enum settings_output_devices device_type, if (zip == NULL) return NULL; - odt = xzalloc (sizeof *odt); + struct odt_driver *odt = XZALLOC (struct odt_driver); d = &odt->driver; output_driver_init (d, &odt_driver_class, file_name, device_type); @@ -446,8 +445,8 @@ write_table_item_cell (struct odt_driver *odt, xmlTextWriterWriteString (odt->content_wtr, _xml (ds_cstr (&body))); ds_destroy (&body); - write_footnotes (odt, pt, cell->value->footnote_indexes, - cell->value->n_footnotes); + const struct pivot_value_ex *ex = pivot_value_ex (cell->value); + write_footnotes (odt, pt, ex->footnote_indexes, ex->n_footnotes); } static void @@ -597,10 +596,7 @@ odt_submit (struct output_driver *driver, const struct output_item *item) case OUTPUT_ITEM_CHART: break; - case OUTPUT_ITEM_GROUP_OPEN: - break; - - case OUTPUT_ITEM_GROUP_CLOSE: + case OUTPUT_ITEM_GROUP: break; case OUTPUT_ITEM_IMAGE: @@ -617,9 +613,6 @@ odt_submit (struct output_driver *driver, const struct output_item *item) case OUTPUT_ITEM_PAGE_BREAK: break; - case OUTPUT_ITEM_PAGE_SETUP: - break; - case OUTPUT_ITEM_TABLE: write_table (odt, item->table); break; @@ -639,8 +632,7 @@ struct output_driver_factory odt_driver_factory = static const struct output_driver_class odt_driver_class = { - "odf", - odt_destroy, - odt_submit, - NULL, + .name = "odf", + .destroy = odt_destroy, + .submit = odt_submit, };