+ return xtr;
+}
+
+
+
+struct spreadsheet *
+ods_probe (const char *filename, bool report_errors)
+{
+ int sheet_count;
+ struct ods_reader *r = xzalloc (sizeof *r);
+ xmlTextReaderPtr xtr;
+ struct zip_reader *zr;
+
+ ds_init_empty (&r->zip_errs);
+
+ zr = zip_reader_create (filename, &r->zip_errs);
+
+ if (zr == NULL)
+ {
+ if (report_errors)
+ {
+ msg (ME, _("Cannot open %s as a OpenDocument file: %s"),
+ filename, ds_cstr (&r->zip_errs));
+ }
+ ds_destroy (&r->zip_errs);
+ free (r);
+ return NULL;
+ }
+
+ sheet_count = get_sheet_count (zr);
+
+ r->zreader = zr;
+ r->spreadsheet.ref_cnt = 1;