gnumeric r17292 - in trunk: . src



Author: mortenw
Date: Fri Apr  3 13:31:55 2009
New Revision: 17292
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17292&view=rev

Log:
2009-04-03  Morten Welinder  <terra gnome org>

	* src/ranges.c (range_make_full): Take sheet argument for size.
	Caller changed.



Modified:
   trunk/ChangeLog
   trunk/src/expr.c
   trunk/src/ranges.c
   trunk/src/ranges.h

Modified: trunk/src/expr.c
==============================================================================
--- trunk/src/expr.c	(original)
+++ trunk/src/expr.c	Fri Apr  3 13:31:55 2009
@@ -1925,7 +1925,7 @@
 	if (reloc_range (rinfo->details, start_sheet, end_sheet, &r) ||
 	    rinfo->from_inside) {
 		GnmRangeRef res = v->cell;
-		range_make_full (&r, full_col, full_row);
+		range_make_full (&r, end_sheet, full_col, full_row);
 		if (reloc_restore_cellref (rinfo, start_sheet, &r.start, &res.a) ||
 		    reloc_restore_cellref (rinfo, end_sheet,   &r.end,   &res.b))
 			return gnm_expr_new_constant (value_new_error_REF (NULL));

Modified: trunk/src/ranges.c
==============================================================================
--- trunk/src/ranges.c	(original)
+++ trunk/src/ranges.c	Fri Apr  3 13:31:55 2009
@@ -590,12 +590,13 @@
  * @full_row : Make @r a full row ref  (_column_ [0..MAX))
  **/
 void
-range_make_full	(GnmRange *r, gboolean full_col, gboolean full_row)
+range_make_full	(GnmRange *r, Sheet const *sheet,
+		 gboolean full_col, gboolean full_row)
 {
 	if (full_col)
-		r->start.row = 0, r->end.row = gnm_sheet_get_max_rows (NULL) - 1;
+		r->start.row = 0, r->end.row = gnm_sheet_get_last_row (sheet);
 	if (full_row)
-		r->start.col = 0, r->end.col = gnm_sheet_get_max_cols (NULL) - 1;
+		r->start.col = 0, r->end.col = gnm_sheet_get_last_col (sheet);
 }
 
 /**

Modified: trunk/src/ranges.h
==============================================================================
--- trunk/src/ranges.h	(original)
+++ trunk/src/ranges.h	Fri Apr  3 13:31:55 2009
@@ -78,7 +78,8 @@
 int	    range_height	(GnmRange const *r);
 gboolean    range_is_singleton  (GnmRange const *r);
 gboolean    range_is_full	(GnmRange const *r, gboolean horiz);
-void        range_make_full	(GnmRange *r, gboolean full_col, gboolean full_row);
+void        range_make_full	(GnmRange *r, Sheet const *sheet,
+				 gboolean full_col, gboolean full_row);
 void        range_clip_to_finite(GnmRange *range, Sheet *sheet);
 gboolean    range_contained     (GnmRange const *a, GnmRange const *b);
 gboolean    range_intersection  (GnmRange *r,



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