[gnumeric] ssdiff: improve xml format for sheets.



commit cc196be5ccf879c351e34c82256b8af03144a090
Author: Morten Welinder <terra gnome org>
Date:   Fri Dec 28 10:48:14 2012 -0500

    ssdiff: improve xml format for sheets.

 ChangeLog    |    2 ++
 src/ssdiff.c |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d5b42f5..f360da5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 	range offset here.  This may need to move further.
 	* src/ssdiff.c (cb_diff_sheets_styles_2): From here.
 	(diff_sheets_cells): Ignore completely empty cells.
+	(xml_sheet_start): Change meaning of Old and New attributes to be
+	index_in_wb and absent when workbook doesn't have the sheet.
 
 2012-12-27  Morten Welinder  <terra gnome org>
 
diff --git a/src/ssdiff.c b/src/ssdiff.c
index 29b22e0..0ec145a 100644
--- a/src/ssdiff.c
+++ b/src/ssdiff.c
@@ -226,8 +226,10 @@ xml_sheet_start (GnmDiffState *state, Sheet const *os, Sheet const *ns)
 
 	gsf_xml_out_start_element (state->xml, DIFF "Sheet");
 	gsf_xml_out_add_cstr (state->xml, "Name", sheet->name_unquoted);
-	gsf_xml_out_add_int (state->xml, "Old", os != NULL);
-	gsf_xml_out_add_int (state->xml, "New", ns != NULL);
+	if (os)
+		gsf_xml_out_add_int (state->xml, "Old", os->index_in_wb);
+	if (ns)
+		gsf_xml_out_add_int (state->xml, "New", ns->index_in_wb);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]