Commit fbe5bab5 authored by Jean Bréfort's avatar Jean Bréfort

Fix data labels when the source is a range with several rows and columns. [#761048]

parent aa8dd954
2016-01-28 Jean Brefort <jean.brefort@normalesup.org>
* src/graph.c (gnm_go_data_vector_get_str): fix for a range value. [#761048]
2016-01-27 Morten Welinder <terra@gnome.org>
* src/wbc-gtk.c (cb_add_menus_toolbars): Work around gtk+ bug with
......
......@@ -7,7 +7,9 @@ Andreas:
* Fix NETWORKDAYS. [#760576]
Jean:
* Fuzzed file fixes. [#760546]
* Fuzzed file fix. [#760546]
* Fix data labels when the source is a range with several rows and
columns. [#761048]
Morten:
* Teach ssconvert to split sheets into separate .txt files [#694408]
......@@ -15,11 +17,9 @@ Morten:
* Fuzzed file fixes. [#760046] [#760085] [#760087] [#760089]
[#760043] [#760103] [#760102] [#760101] [#760105] [#760106]
[#760104] [#760229] [#760231] [#760232] [#760544] [#760545]
[#761023]
* Fix R.DBINOM extreme-value case. [#760230]
* New function AGM.
* Fix canvas problem leaving grab in place. [#760639]
* Work around gtk+ bug causing growing windows. [#761142]
--------------------------------------------------------------------------
Gnumeric 1.12.26
......
......@@ -929,6 +929,28 @@ gnm_go_data_vector_get_str (GODataVector *dat, unsigned i)
}
if (vec->strs && vec->strs->len > i)
v = g_ptr_array_index (vec->strs, i);
} else if (VALUE_IS_CELLRANGE (vec->val)) {
Sheet *start_sheet, *end_sheet;
GnmRange r;
if (vec->strs == NULL)
vec->strs = g_ptr_array_new ();
gnm_rangeref_normalize (&vec->val->v_range.cell,
eval_pos_init_dep (&ep, &vec->dep),
&start_sheet, &end_sheet, &r);
/* clip here rather than relying on sheet_foreach
* because that only clips if we ignore blanks */
if (r.end.row > start_sheet->rows.max_used)
r.end.row = start_sheet->rows.max_used;
if (r.end.col > start_sheet->cols.max_used)
r.end.col = start_sheet->cols.max_used;
if (r.start.col <= r.end.col && r.start.row <= r.end.row)
sheet_foreach_cell_in_range (start_sheet, CELL_ITER_IGNORE_FILTERED,
r.start.col, r.start.row, r.end.col, r.end.row,
(CellIterFunc)cb_assign_string, vec->strs);
if (vec->strs && vec->strs->len > i)
v = g_ptr_array_index (vec->strs, i);
}
if (vec->as_col)
j = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment