[gnumeric] Dif: match spec, not excel.



commit a660c30e9f79180d654ec49c59a6c8177e163a57
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 3 10:45:50 2011 -0500

    Dif: match spec, not excel.

 NEWS                  |    3 +++
 plugins/dif/ChangeLog |    6 ++++++
 plugins/dif/dif.c     |    7 ++-----
 3 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 4eb4340..089a13c 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,9 @@ Morten:
 	* Fix xml reading of constraints.  [Redhat #680572]
 	* Fix lpsolve/glpk writing of affine part.
 
+Stanley Pinchak:
+	* Improve "dif" output.
+
 --------------------------------------------------------------------------
 Gnumeric 1.10.13
 
diff --git a/plugins/dif/ChangeLog b/plugins/dif/ChangeLog
index ece8ec0..ffcdf89 100644
--- a/plugins/dif/ChangeLog
+++ b/plugins/dif/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-03  Morten Welinder  <terra gnome org>
+
+	* dif.c (dif_file_save): Swap row/column counts so we match the
+	spec (and thus differ from Excel).  Avoid extre "BOT".  Fixes
+	#624771.  Patch by Stanley Pinchak.
+
 2011-02-02  Morten Welinder <terra gnome org>
 
 	* Release 1.10.13
diff --git a/plugins/dif/dif.c b/plugins/dif/dif.c
index cc880d2..fb920bb 100644
--- a/plugins/dif/dif.c
+++ b/plugins/dif/dif.c
@@ -319,8 +319,8 @@ dif_file_save (GOFileSaver const *fs, GOIOContext *io_context,
 
 	/* Write out the standard headers */
 	gsf_output_puts   (out, "TABLE\n"   "0,1\n" "\"GNUMERIC\"\n");
-	gsf_output_printf (out, "VECTORS\n" "0,%d\n" "\"\"\n", r.end.row+1);
-	gsf_output_printf (out, "TUPLES\n"  "0,%d\n" "\"\"\n", r.end.col+1);
+	gsf_output_printf (out, "VECTORS\n" "0,%d\n" "\"\"\n", r.end.col+1);
+	gsf_output_printf (out, "TUPLES\n"  "0,%d\n" "\"\"\n", r.end.row+1);
 	gsf_output_puts   (out, "DATA\n"    "0,0\n"  "\"\"\n");
 
 	locale = gnm_push_C_locale ();
@@ -355,9 +355,6 @@ dif_file_save (GOFileSaver const *fs, GOIOContext *io_context,
 		}
 	}
 
-	/* This BOT is not required as far as I can tel, but MS seems to puts
-	 * one here, and it may be useful to be compatible  */
-	gsf_output_puts (out, "-1,0\n" "BOT\n");
 	gsf_output_puts (out, "-1,0\n" "EOD\n");
 
 	gnm_pop_C_locale (locale);



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