gnumeric r16903 - in trunk: . src/widgets
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16903 - in trunk: . src/widgets
- Date: Mon, 20 Oct 2008 01:53:57 +0000 (UTC)
Author: jody
Date: Mon Oct 20 01:53:57 2008
New Revision: 16903
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16903&view=rev
Log:
2008-10-19 Jody Goldberg <jody gnome org>
* gnumeric-expr-entry.c (gee_prepare_range) : fix the rationalization
of merges. The rangeref can be using relative references coming
in, normalize it first.
Modified:
trunk/NEWS
trunk/src/widgets/ChangeLog
trunk/src/widgets/gnumeric-expr-entry.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Oct 20 01:53:57 2008
@@ -1,3 +1,9 @@
+Gnumeric 1.9.4
+
+Jody:
+ * Display top-left when selecting a rel ref to a merged region.
+
+--------------------------------------------------------------------------
Gnumeric 1.9.3
Andreas:
@@ -46,7 +52,6 @@
* XLS : support anachronistic objs in newer versions. [#546887]
* WIN32 : build fixes
* WIN32 : Fix Decimal keypad character. [#555522]
- * Fix reading magic version of ancient file format. [#555933]
J.H.M. Dassen (Ray):
* Understand and ignore byte-order markers for CSV/stf probing and
@@ -64,6 +69,7 @@
* Fix problems with saving undefined names. [#554325]
* Fix parser crash. [Part of #552750]
* Fix clipboard leak.
+ * Fix reading magic version of ancient file format. [#555933]
Nakai:
* Enable Perl plugin again. [#553939]
Modified: trunk/src/widgets/gnumeric-expr-entry.c
==============================================================================
--- trunk/src/widgets/gnumeric-expr-entry.c (original)
+++ trunk/src/widgets/gnumeric-expr-entry.c Mon Oct 20 01:53:57 2008
@@ -760,6 +760,7 @@
* @dst :
*
* Adjust @dst as necessary to conform to @gee's requirements
+ * Produces the _logical_ range, a merge is displayed as only the topleft.
**/
static void
gee_prepare_range (GnmExprEntry const *gee, GnmRangeRef *dst)
@@ -768,6 +769,8 @@
*dst = rs->ref;
+ if (dst->a.sheet == NULL && !(gee->flags & GNM_EE_SHEET_OPTIONAL))
+ dst->a.sheet = gee->sheet;
if (gee->flags & GNM_EE_FULL_ROW) {
dst->a.col = 0;
dst->b.col = gnm_sheet_get_max_cols (gee->sheet) - 1;
@@ -779,22 +782,18 @@
/* special case a single merge to be only corner */
if (!(gee->flags & (GNM_EE_FULL_ROW|GNM_EE_FULL_COL))) {
+ GnmEvalPos ep;
+ GnmRange r;
GnmRange const *merge;
- GnmCellPos corner;
-
- corner.col = MIN (dst->a.col, dst->b.col);
- corner.row = MIN (dst->a.row, dst->b.row);
- merge = gnm_sheet_merge_is_corner (gee->sheet, &corner);
- if (merge != NULL &&
- merge->end.col == MAX (dst->a.col, dst->b.col) &&
- merge->end.row == MAX (dst->a.row, dst->b.row)) {
- dst->b.col = dst->a.col;
- dst->b.row = dst->a.row;
- }
+ Sheet *start_sheet, *end_sheet;
+ gnm_rangeref_normalize(dst,
+ eval_pos_init_pos (&ep, gee->sheet, &gee->pp.eval),
+ &start_sheet, &end_sheet,
+ &r);
+ merge = gnm_sheet_merge_is_corner (gee->sheet, &r.start);
+ if (merge != NULL && range_equal (merge, &r))
+ dst->b = dst->a;
}
-
- if (dst->a.sheet == NULL && !(gee->flags & GNM_EE_SHEET_OPTIONAL))
- dst->a.sheet = gee->sheet;
}
static char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]