Commit 2b7bf48d authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

Check versioning in descending order. (gnumeric_xml_read_workbook) : Add


2000-05-09  Jody Goldberg <jgoldberg@home.com>

	* src/xml-io.c (xml_probe) : Check versioning in descending order.
	(gnumeric_xml_read_workbook) : Add check for v3.
parent 8082daef
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_probe) : Check versioning in descending order.
(gnumeric_xml_read_workbook) : Add check for v3.
2000-05-09 Valek Filippov <frob@df.ru>
* src/dialogs/cell-format.glade.h: inserted /* xgettext:no-c-format */
......
......@@ -10,6 +10,7 @@
#include "gnumeric.h"
#include "gnumeric-util.h"
#include "func.h"
#include "dialogs.h"
#include "workbook.h"
typedef struct {
......
......@@ -3046,11 +3046,14 @@ xml_probe (const char *filename)
return FALSE;
}
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/");
/*
* Do a bit of checking, get the namespaces, and check the top elem.
*/
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/v3");
if (gmr == NULL)
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/v2");
if (gmr == NULL)
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/v3");
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/");
if (res->root->name == NULL || strcmp (res->root->name, "Workbook") || (gmr == NULL)){
xmlFreeDoc (res);
......@@ -3173,11 +3176,13 @@ gnumeric_xml_read_workbook (CommandContext *context, Workbook *wb,
return -1;
}
/*
* Do a bit of checking, get the namespaces, and chech the top elem.
* Do a bit of checking, get the namespaces, and check the top elem.
*/
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/");
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/v3");
if (gmr == NULL)
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/v2");
if (gmr == NULL)
gmr = xmlSearchNsByHref (res, res->root, "http://www.gnome.org/gnumeric/");
if (strcmp (res->root->name, "Workbook") || (gmr == NULL)) {
xmlFreeDoc (res);
gnumeric_error_read
......
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