gnumeric r16534 - in branches/gnumeric-1-8: . src



Author: mortenw
Date: Tue Apr 29 14:19:02 2008
New Revision: 16534
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16534&view=rev

Log:
2008-04-29  Morten Welinder  <terra gnome org>

	* src/ranges.c (range_is_sane): Fix escaped G_MAXINT/2.  We're not
	ready for that just yet.
	(range_init_full_sheet): Ditto.



Modified:
   branches/gnumeric-1-8/ChangeLog
   branches/gnumeric-1-8/src/ranges.c

Modified: branches/gnumeric-1-8/src/ranges.c
==============================================================================
--- branches/gnumeric-1-8/src/ranges.c	(original)
+++ branches/gnumeric-1-8/src/ranges.c	Tue Apr 29 14:19:02 2008
@@ -37,10 +37,11 @@
 {
 	r->start.col = 0;
 	r->start.row = 0;
-	r->end.col = G_MAXINT / 2;
-	r->end.row = G_MAXINT / 2;
+	r->end.col = gnm_sheet_get_max_cols (NULL) - 1;
+	r->end.row = gnm_sheet_get_max_rows (NULL) - 1;
 	return r;
 }
+
 GnmRange *
 range_init_cols (GnmRange *r, int start_col, int end_col)
 {
@@ -699,10 +700,10 @@
 	g_return_val_if_fail (range != NULL, FALSE);
 	g_return_val_if_fail (range->start.col >= 0, FALSE);
 	g_return_val_if_fail (range->end.col >= range->start.col, FALSE);
-	g_return_val_if_fail (range->end.col < G_MAXINT / 2, FALSE);
+	g_return_val_if_fail (range->end.col < gnm_sheet_get_max_cols (NULL), FALSE);
 	g_return_val_if_fail (range->start.row >= 0, FALSE);
 	g_return_val_if_fail (range->end.row >= range->start.row, FALSE);
-	g_return_val_if_fail (range->end.row < G_MAXINT / 2, FALSE);
+	g_return_val_if_fail (range->end.row < gnm_sheet_get_max_rows (NULL), FALSE);
 
 	return TRUE;
 }



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