On Tue, Dec 19, 2006 at 08:52:08AM -0500, Mihai Ibanescu wrote:
> I've compiled and installed gnumeric 1.7.6 last night, and it turns out the
> autoformat templates are broken.
> Here's the output I see:
> 
> ** (gnumeric:26940): WARNING **: Invalid template file:
> /usr/share/gnumeric/1.7.6/autoformat-templates/Colourful/autoformat.Colourful.banana.xml
> 
> 
> The files are there and they are readable, and seem to be valid XML. I
> didn't take my investigations any further.
> 
> Is this a known issue, or should I file it?

It's known now :-)
Our sparkling new automated test suite doesn't look at dialogs yet.
The patch is simple, and will be in the next release.
2006-12-19  Jody Goldberg <[EMAIL PROTECTED]>

	* src/format-template.c (xml_read_format_template_members) : revert
	  inadvertent renaming of the xml element names.
	(format_template_new_from_file) : ditto.
	(xml_write_format_template_members) : ditto.

Index: src/format-template.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/format-template.c,v
retrieving revision 1.74
diff -u -w -p -r1.74 format-template.c
--- src/format-template.c	11 Nov 2006 18:01:09 -0000	1.74
+++ src/format-template.c	19 Dec 2006 14:23:43 -0000
@@ -415,7 +415,7 @@ xml_read_format_template_members (XmlPar
 {
 	xmlNode *child;
 
-	g_return_val_if_fail (!strcmp (tree->name, "GnmFormatTemplate"), FALSE);
+	g_return_val_if_fail (!strcmp (tree->name, "FormatTemplate"), FALSE);
 
 	child = e_xml_get_child_by_name_by_lang (tree, "Information");
 	if (child) {
@@ -474,7 +474,7 @@ format_template_new_from_file (char cons
 	if (doc->xmlRootNode != NULL) {
 		xmlNs *ns = xmlSearchNsByHref (doc, doc->xmlRootNode,
 			CC2XML ("http://www.gnome.org/gnumeric/format-template/v1";));
-		if (ns != NULL && !strcmp (doc->xmlRootNode->name, "GnmFormatTemplate")) {
+		if (ns != NULL && !strcmp (doc->xmlRootNode->name, "FormatTemplate")) {
 			XmlParseContext *ctxt = xml_parse_ctx_new (doc, ns, NULL);
 
 			ft = format_template_new ();
@@ -552,7 +552,7 @@ xml_write_format_template_members (XmlPa
 	xmlNs   *ns;
 	GSList  *member;
 
-	root = xmlNewDocNode (ctxt->doc, NULL, CC2XML ("GnmFormatTemplate"), NULL);
+	root = xmlNewDocNode (ctxt->doc, NULL, CC2XML ("FormatTemplate"), NULL);
 	if (root == NULL)
 		return NULL;
 
_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to