Commit 032b1452 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan
Browse files

Never return -1 without calling gnumeric_error_read

2000-01-31  Jon K Hellan  <hellan@acm.org>

	* src/xml-io.c (gnumeric_xml_read_workbook): Never return -1
	without calling gnumeric_error_read
	(gnumeric_xml_write_workbook): s/read/write/

	* src/file.c (workbook_load_from): Report read failure if all
	probes fail.
parent 0e4df4a3
2000-01-31 Jon K Hellan <hellan@acm.org>
* src/xml-io.c (gnumeric_xml_read_workbook): Never return -1
without calling gnumeric_error_read
(gnumeric_xml_write_workbook): s/read/write/
* src/file.c (workbook_load_from): Report read failure if all
probes fail.
Sun Jan 30 15:40:50 EST 2000 Gregory McLean <gregm@comstar.net>
* gnumeric.spec.in: Added in some logic to autogenerate the
......
2000-01-31 Jon K Hellan <hellan@acm.org>
* src/xml-io.c (gnumeric_xml_read_workbook): Never return -1
without calling gnumeric_error_read
(gnumeric_xml_write_workbook): s/read/write/
* src/file.c (workbook_load_from): Report read failure if all
probes fail.
Sun Jan 30 15:40:50 EST 2000 Gregory McLean <gregm@comstar.net>
* gnumeric.spec.in: Added in some logic to autogenerate the
......
......@@ -177,6 +177,7 @@ workbook_load_from (CommandContext *context, Workbook *wb,
return result;
}
}
gnumeric_error_read (context, NULL);
return -1;
}
......
......@@ -2253,8 +2253,10 @@ gnumeric_xml_read_workbook (CommandContext *context, Workbook *wb,
* Load the file into an XML tree.
*/
res = xmlParseFile (filename);
if (res == NULL)
if (res == NULL) {
gnumeric_error_read (context, "");
return -1;
}
if (res->root == NULL) {
xmlFreeDoc (res);
gnumeric_error_read
......@@ -2305,6 +2307,7 @@ gnumeric_xml_write_workbook (CommandContext *context, Workbook *wb,
*/
xml = xmlNewDoc ("1.0");
if (xml == NULL){
gnumeric_error_save (context, "");
return -1;
}
ctxt.doc = xml;
......@@ -2318,8 +2321,10 @@ gnumeric_xml_write_workbook (CommandContext *context, Workbook *wb,
xmlSetDocCompressMode (xml, 9);
ret = xmlSaveFile (filename, xml);
xmlFreeDoc (xml);
if (ret < 0)
if (ret < 0) {
gnumeric_error_save (context, "");
return -1;
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment