gnumeric r16817 - trunk/src/tools



Author: guelzow
Date: Sun Sep 21 18:55:47 2008
New Revision: 16817
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16817&view=rev

Log:
2008-09-21  Andreas J. Guelzow <aguelzow pyrshep ca>

	* analysis-tools.c (analysis_tool_calc_length): count columns when the 
	  data is grouped in rows.




Modified:
   trunk/src/tools/ChangeLog
   trunk/src/tools/analysis-tools.c

Modified: trunk/src/tools/analysis-tools.c
==============================================================================
--- trunk/src/tools/analysis-tools.c	(original)
+++ trunk/src/tools/analysis-tools.c	Sun Sep 21 18:55:47 2008
@@ -686,7 +686,9 @@
 		GnmValue    *current = dataset->data;
 		int      given_length;
 
-		given_length = current->v_range.cell.b.row - current->v_range.cell.a.row + 1;
+		given_length = (info->group_by == GROUPED_BY_COL) ? 
+			(current->v_range.cell.b.row - current->v_range.cell.a.row + 1) :
+			(current->v_range.cell.b.col - current->v_range.cell.a.col + 1);
 		if (given_length > result)
 			result = given_length;
 	}



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