gnumeric r17008 - in trunk: . src test



Author: mortenw
Date: Sat Dec 13 18:20:11 2008
New Revision: 17008
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17008&view=rev

Log:
2008-12-13  Morten Welinder  <terra gnome org>

	* src/xml-sax-write.c (xml_write_number_system): New function to
	dump information on the number system used.
	(xml_write_calculation): Call xml_write_number_system.
	(gnm_cellregion_to_xml): Call xml_write_number_system.
	(gnm_xml_file_save): Move call to xml_write_calculation before the
	sheets.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/xml-sax-write.c
   trunk/test/t5900-sc.pl
   trunk/test/t5901-qpro.pl
   trunk/test/t5902-applix.pl
   trunk/test/t5903-sylk.pl

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sat Dec 13 18:20:11 2008
@@ -53,6 +53,7 @@
 	* Fix export of Gnumeric-specific patterns to xls.  [#564078]
 	* Improve guess of csv parsing parameters.  [#498912]
 	* Fix problem with saving huge values.  [#552464]
+	* Dump information about number system into xml.
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.3

Modified: trunk/src/xml-sax-write.c
==============================================================================
--- trunk/src/xml-sax-write.c	(original)
+++ trunk/src/xml-sax-write.c	Sat Dec 13 18:20:11 2008
@@ -1214,6 +1214,20 @@
 }
 
 static void
+xml_write_number_system (GnmOutputXML *state)
+{
+	/*
+	 * These numbers define how to interpret decimal values in the
+	 * file.  They are not yet used, but should be used when the
+	 * number system of the loading Gnumeric is different from the
+	 * number system of the saving Gnumeric.
+	 */
+	gsf_xml_out_add_int (state->output, "FloatRadix", FLT_RADIX);
+	gsf_xml_out_add_int (state->output, "FloatDigits", GNM_MANT_DIG);
+}
+
+
+static void
 xml_write_calculation (GnmOutputXML *state)
 {
 	gsf_xml_out_start_element (state->output, GNM "Calculation");
@@ -1227,6 +1241,7 @@
 		"IterationTolerance",	state->wb->iteration.tolerance, -1);
 	xml_write_date_conventions_as_attr (state,
 					    workbook_date_conv (state->wb));
+	xml_write_number_system (state);
 	gsf_xml_out_end_element (state->output); /* </gnm:Calculation> */
 }
 
@@ -1305,12 +1320,12 @@
 	xml_write_attributes	    (&state);
 	xml_write_meta_data	    (&state);
 	xml_write_conventions	    (&state);	/* DEPRECATED, moved to Calculation */
+	xml_write_calculation	    (&state);
 	xml_write_sheet_names	    (&state);
 	xml_write_named_expressions (&state, state.wb->names);
 	xml_write_geometry	    (&state);
 	xml_write_sheets	    (&state);
 	xml_write_uidata	    (&state);
-	xml_write_calculation	    (&state);
 	go_doc_write (GO_DOC (state.wb), state.output);
 
 	gsf_xml_out_end_element (state.output); /* </Workbook> */
@@ -1399,6 +1414,7 @@
 		xml_write_date_conventions_as_attr
 			(&state.state,
 			 workbook_date_conv (cr->origin_sheet->workbook));
+	xml_write_number_system (&state.state);
 	if (cr->not_as_contents)
 		gsf_xml_out_add_bool (state.state.output, "NotAsContent", TRUE);
 

Modified: trunk/test/t5900-sc.pl
==============================================================================
--- trunk/test/t5900-sc.pl	(original)
+++ trunk/test/t5900-sc.pl	Sat Dec 13 18:20:11 2008
@@ -9,5 +9,5 @@
 my $mode = ((shift @ARGV) || "check");
 
 &message ("Check the sc importer.");
-&test_importer ("$samples/sc/demo_func", "53d6a70a2ee23b41c6756facc399b39a68076980", $mode);
-&test_importer ("$samples/sc/demo_math", "af1ae27b470296a27f6525f3231729e02961b0b2", $mode);
+&test_importer ("$samples/sc/demo_func", "5379732356003b160465d5eacde8345ff4204b2a", $mode);
+&test_importer ("$samples/sc/demo_math", "ec51e6cd522ef69777e34f75c7d4e95696568c06", $mode);

Modified: trunk/test/t5901-qpro.pl
==============================================================================
--- trunk/test/t5901-qpro.pl	(original)
+++ trunk/test/t5901-qpro.pl	Sat Dec 13 18:20:11 2008
@@ -9,4 +9,4 @@
 my $mode = ((shift @ARGV) || "check");
 
 &message ("Check the Quattro Pro importer.");
-&test_importer ("$samples/qpro/gantt.wb3", "f7f2f4999762809e65ceae36d83f9f7661f78afe", $mode);
+&test_importer ("$samples/qpro/gantt.wb3", "2f97e63e5308c70400ad0cc2f044c4661f40f397", $mode);

Modified: trunk/test/t5902-applix.pl
==============================================================================
--- trunk/test/t5902-applix.pl	(original)
+++ trunk/test/t5902-applix.pl	Sat Dec 13 18:20:11 2008
@@ -9,4 +9,4 @@
 my $mode = ((shift @ARGV) || "check");
 
 &message ("Check the applix importer.");
-&test_importer ("$samples/applix/sample.as", "04ec7bcbf5edd60f16ba85a5912f956284f2ef9a", $mode);
+&test_importer ("$samples/applix/sample.as", "f3b0c75693b93933da82512e59b11d78a43972a7", $mode);

Modified: trunk/test/t5903-sylk.pl
==============================================================================
--- trunk/test/t5903-sylk.pl	(original)
+++ trunk/test/t5903-sylk.pl	Sat Dec 13 18:20:11 2008
@@ -9,5 +9,5 @@
 my $mode = ((shift @ARGV) || "check");
 
 &message ("Check the sylk importer.");
-&test_importer ("$samples/sylk/test.sylk", "484b3510db7bad9ab62f5d668ffd55ac1697b22b", $mode);
-&test_importer ("$samples/sylk/encoding.sylk", "004f25ce96e7a2b48d8b4521105b0648f527c779", $mode);
+&test_importer ("$samples/sylk/test.sylk", "e908820fa86b3e1021856e549f11ebb46786ecab", $mode);
+&test_importer ("$samples/sylk/encoding.sylk", "be9944ed11138b3b0433fe450cfc1ca2bfa5f8a1", $mode);



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