[gnumeric] Fix loading of arrays from ods files (and general array partitioning) [#581953]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Fix loading of arrays from ods files (and general array partitioning) [#581953]
- Date: Sat, 9 May 2009 03:15:06 -0400 (EDT)
commit 5c7f5be0ee0b851957fb102e16d349da1044b492
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sat May 9 01:14:44 2009 -0600
Fix loading of arrays from ods files (and general array partitioning) [#581953]
2009-05-10 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/cell.c (gnm_cell_is_nonsingleton_array): don't use
simply gnm_cell_is_array_corner since it returns NULL for
other array elements
---
ChangeLog | 6 ++++++
NEWS | 2 ++
src/cell.c | 8 +++++++-
3 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7f69871..b80947e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-10 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/cell.c (gnm_cell_is_nonsingleton_array): don't use
+ simply gnm_cell_is_array_corner since it returns NULL for
+ other array elements
+
2009-05-09 Morten Welinder <terra gnome org>
* src/sheet-style.c (cell_tile_optimize): Fix crash. #581931.
diff --git a/NEWS b/NEWS
index c60a91b..bf04b7e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ Andreas:
* Save and load text formatting of comments [#580838]
* Save and load text formatting of sheet object labels [#580979]
* Write all formulas to an odf file [#581937]
+ * Fix loading of arrays from ods files (and general array
+ partitioning) [#581953]
Jody:
* Closer to a turnkey win32 build.
diff --git a/src/cell.c b/src/cell.c
index 490f598..6771b8e 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -440,8 +440,14 @@ gnm_cell_is_array (GnmCell const *cell)
gboolean
gnm_cell_is_nonsingleton_array (GnmCell const *cell)
{
- GnmExprArrayCorner const *corner = gnm_cell_is_array_corner (cell);
+ GnmExprArrayCorner const *corner;
+ if ((cell == NULL) || !gnm_cell_has_expr (cell))
+ return FALSE;
+ if (gnm_expr_top_is_array_elem (cell->base.texpr, NULL, NULL))
+ return TRUE;
+
+ corner = gnm_expr_top_get_array_corner (cell->base.texpr);
return corner && (corner->cols > 1 || corner->rows > 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]