X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fods-reader.c;h=77da78ca51a3cff610b509e7bcd04cae9bc261e6;hb=415dbf964ef32c89d6283a19487a6eb188f32ed2;hp=d12223013c79367b22cdd87d717c47c57a2ffe63;hpb=914de38795f84f8372fadfe100f5687f412c65e5;p=pspp diff --git a/src/data/ods-reader.c b/src/data/ods-reader.c index d12223013c..77da78ca51 100644 --- a/src/data/ods-reader.c +++ b/src/data/ods-reader.c @@ -33,7 +33,7 @@ #if !ODF_READ_SUPPORT struct casereader * -ods_open_reader (const struct spreadsheet_read_info *gri, struct spreadsheet_read_options *opts, +ods_open_reader (const struct spreadsheet_read_options *opts, struct dictionary **dict) { msg (ME, _("Support for %s files was not compiled into this installation of PSPP"), "OpenDocument"); @@ -368,7 +368,7 @@ get_sheet_count (struct zip_reader *zreader) return -1; } -struct spreadsheet *ods_probe (const char *filename) +struct spreadsheet *ods_probe (const char *filename, bool report_errors) { struct ods_reader *r; struct string errs; @@ -404,7 +404,7 @@ struct spreadsheet *ods_probe (const char *filename) r = xzalloc (sizeof *r); r->xtr = xtr; r->spreadsheet.type = SPREADSHEET_ODS; - r->spreadsheet.sheets = sheet_count; + r->spreadsheet.n_sheets = sheet_count; ds_destroy (&errs); @@ -419,7 +419,7 @@ struct spreadsheet *ods_probe (const char *filename) struct casereader * ods_make_reader (struct spreadsheet *spreadsheet, - const struct spreadsheet_read_info *gri, struct spreadsheet_read_options *opts) + const struct spreadsheet_read_options *opts) { intf ret = 0; xmlChar *type = NULL; @@ -433,7 +433,7 @@ ods_make_reader (struct spreadsheet *spreadsheet, xmlChar *val_string = NULL; assert (r); - r->read_names = gri->read_names; + r->read_names = opts->read_names; ds_init_empty (&r->ods_errs); if ( opts->cell_range ) @@ -488,7 +488,7 @@ ods_make_reader (struct spreadsheet *spreadsheet, goto error; } - if ( gri->read_names) + if ( opts->read_names) { while (1 == (ret = xmlTextReaderRead (r->xtr))) { @@ -537,7 +537,7 @@ ods_make_reader (struct spreadsheet *spreadsheet, { int idx; process_node (r); - if ( r->row >= r->start_row + 1 + gri->read_names) + if ( r->row >= r->start_row + 1 + opts->read_names) break; if ( r->col < r->start_col) @@ -575,7 +575,7 @@ ods_make_reader (struct spreadsheet *spreadsheet, struct fmt_spec fmt; struct variable *var = NULL; char *name = dict_make_unique_var_name (r->dict, var_spec[i].name, &vstart); - int width = xmv_to_width (&var_spec[i].firstval, gri->asw); + int width = xmv_to_width (&var_spec[i].firstval, opts->asw); dict_create_var (r->dict, name, width); free (name);