Commit 0e783b9d authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Take a Range pointer, not a Range structure as argument. All callers

2000-12-18  Morten Welinder  <terra@diku.dk>

	* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
 	Range structure as argument.  All callers changed.
parent 1b2ed6af
2000-12-18 Morten Welinder <terra@diku.dk>
* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
Range structure as argument. All callers changed.
2000-12-18 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page): Fix bug: We must use gnome-print
......
2000-12-18 Morten Welinder <terra@diku.dk>
* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
Range structure as argument. All callers changed.
2000-12-18 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page): Fix bug: We must use gnome-print
......
2000-12-18 Morten Welinder <terra@diku.dk>
* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
Range structure as argument. All callers changed.
2000-12-18 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page): Fix bug: We must use gnome-print
......
2000-12-18 Morten Welinder <terra@diku.dk>
* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
Range structure as argument. All callers changed.
2000-12-18 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page): Fix bug: We must use gnome-print
......
2000-12-18 Morten Welinder <terra@diku.dk>
* src/eval.c (sheet_region_get_deps): Take a Range pointer, not a
Range structure as argument. All callers changed.
2000-12-18 Jon K Hellan <hellan@acm.org>
* src/print.c (print_page): Fix bug: We must use gnome-print
......
......@@ -63,6 +63,16 @@ AC_SUBST(gnomelocaledir)
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_PATH_PROG(TPUT_CMD,tput,no)
if test "$TPUT_CMD" = no; then
marker_ok="<yes >"
marker_fail="<FAIL>"
marker_no="<NO >"
else
marker_ok="<`$TPUT_CMD bold`yes`$TPUT_CMD sgr0` >"
marker_fail="<`$TPUT_CMD bold`fail`$TPUT_CMD sgr0`>"
marker_no="<`$TPUT_CMD bold`no`$TPUT_CMD sgr0` >"
fi
dnl
dnl On Solaris finite() needs ieeefp.h
......@@ -92,7 +102,7 @@ if xml-config --libs > /dev/null 2>&1; then
awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$vers" -ge 1008005; then
if test "$vers" -lt 2000000; then
AC_MSG_RESULT(<yes > found $verstxt)
AC_MSG_RESULT($marker_ok found $verstxt)
xml_ok=yes
else
AC_MSG_RESULT(<FAIL> found unsupported $verstxt)
......
......@@ -400,7 +400,7 @@ clipboard_paste_region (WorkbookControl *wbc,
sheet_style_optimize (pt->sheet, pt->range);
if (pt->paste_flags & (PASTE_CONTENT | PASTE_AS_VALUES)) {
GList *deps = sheet_region_get_deps (pt->sheet, pt->range);
GList *deps = sheet_region_get_deps (pt->sheet, &pt->range);
if (deps)
dependent_queue_recalc_list (deps, TRUE);
sheet_range_calc_spans (pt->sheet, pt->range, SPANCALC_RENDER);
......
......@@ -648,7 +648,7 @@ cmd_area_set_text_redo (GnumericCommand *cmd, WorkbookControl *wbc)
/* mark content as dirty */
sheet_flag_status_update_range (me->pos.sheet, r);
deps = sheet_region_get_deps (me->pos.sheet, *r);
deps = sheet_region_get_deps (me->pos.sheet, r);
if (deps)
dependent_queue_recalc_list (deps, TRUE);
}
......@@ -2200,7 +2200,7 @@ cmd_autofill_redo (GnumericCommand *cmd, WorkbookControl *wbc)
me->base_col, me->base_row,
me->end_col, me->end_row);
deps = sheet_region_get_deps (me->dst.sheet, me->dst.range);
deps = sheet_region_get_deps (me->dst.sheet, &me->dst.range);
if (deps)
dependent_queue_recalc_list (deps, TRUE);
sheet_range_calc_spans (me->dst.sheet, me->dst.range, SPANCALC_RENDER);
......
......@@ -957,7 +957,7 @@ workbook_recalc_all (Workbook *wb)
}
typedef struct {
Range r;
const Range *r;
GList *list;
} get_range_dep_closure_t;
......@@ -968,7 +968,7 @@ search_range_deps (gpointer key, gpointer value, gpointer closure)
Range *range = &(deprange->range);
get_range_dep_closure_t *c = closure;
if (!range_overlap (range, &c->r))
if (!range_overlap (range, c->r))
return;
c->list = g_list_concat (c->list, g_list_copy (deprange->dependent_list));
......@@ -982,9 +982,9 @@ search_range_deps (gpointer key, gpointer value, gpointer closure)
* @range : The target range.
*/
GList *
sheet_region_get_deps (const Sheet *sheet, Range range)
sheet_region_get_deps (const Sheet *sheet, const Range *range)
{
int ix, iy;
int ix, iy, end_row, end_col;
get_range_dep_closure_t closure;
g_return_val_if_fail (sheet != NULL, NULL);
......@@ -995,14 +995,11 @@ sheet_region_get_deps (const Sheet *sheet, Range range)
g_hash_table_foreach (sheet->deps->range_hash,
&search_range_deps, &closure);
if (range.end.col > sheet->cols.max_used)
range.end.col = sheet->cols.max_used;
end_col = MIN (range->end.col, sheet->cols.max_used);
end_row = MIN (range->end.row, sheet->rows.max_used);
if (range.end.row > sheet->rows.max_used)
range.end.row = sheet->rows.max_used;
for (ix = range.start.col; ix <= range.end.col; ix++) {
for (iy = range.start.row; iy <= range.end.row; iy++) {
for (ix = range->start.col; ix <= end_col; ix++) {
for (iy = range->start.row; iy <= end_row; iy++) {
GList *l = get_single_dependencies (sheet, ix, iy);
closure.list = g_list_concat (closure.list, l);
......
......@@ -13,9 +13,9 @@ void sheet_deps_destroy (Sheet *sheet);
void sheet_recalc_dependencies (Sheet *sheet);
#if 0
/* Write this it will be useful */
void sheet_region_recalc_deps (const Sheet *sheet, Range r);
void sheet_region_recalc_deps (const Sheet *sheet, const Range *r);
#endif
GList *sheet_region_get_deps (const Sheet *sheet, Range r);
GList *sheet_region_get_deps (const Sheet *sheet, const Range *r);
/* Convenience routines for Cells */
void cell_eval (Cell *cell);
......
......@@ -957,7 +957,7 @@ workbook_recalc_all (Workbook *wb)
}
typedef struct {
Range r;
const Range *r;
GList *list;
} get_range_dep_closure_t;
......@@ -968,7 +968,7 @@ search_range_deps (gpointer key, gpointer value, gpointer closure)
Range *range = &(deprange->range);
get_range_dep_closure_t *c = closure;
if (!range_overlap (range, &c->r))
if (!range_overlap (range, c->r))
return;
c->list = g_list_concat (c->list, g_list_copy (deprange->dependent_list));
......@@ -982,9 +982,9 @@ search_range_deps (gpointer key, gpointer value, gpointer closure)
* @range : The target range.
*/
GList *
sheet_region_get_deps (const Sheet *sheet, Range range)
sheet_region_get_deps (const Sheet *sheet, const Range *range)
{
int ix, iy;
int ix, iy, end_row, end_col;
get_range_dep_closure_t closure;
g_return_val_if_fail (sheet != NULL, NULL);
......@@ -995,14 +995,11 @@ sheet_region_get_deps (const Sheet *sheet, Range range)
g_hash_table_foreach (sheet->deps->range_hash,
&search_range_deps, &closure);
if (range.end.col > sheet->cols.max_used)
range.end.col = sheet->cols.max_used;
end_col = MIN (range->end.col, sheet->cols.max_used);
end_row = MIN (range->end.row, sheet->rows.max_used);
if (range.end.row > sheet->rows.max_used)
range.end.row = sheet->rows.max_used;
for (ix = range.start.col; ix <= range.end.col; ix++) {
for (iy = range.start.row; iy <= range.end.row; iy++) {
for (ix = range->start.col; ix <= end_col; ix++) {
for (iy = range->start.row; iy <= end_row; iy++) {
GList *l = get_single_dependencies (sheet, ix, iy);
closure.list = g_list_concat (closure.list, l);
......
......@@ -13,9 +13,9 @@ void sheet_deps_destroy (Sheet *sheet);
void sheet_recalc_dependencies (Sheet *sheet);
#if 0
/* Write this it will be useful */
void sheet_region_recalc_deps (const Sheet *sheet, Range r);
void sheet_region_recalc_deps (const Sheet *sheet, const Range *r);
#endif
GList *sheet_region_get_deps (const Sheet *sheet, Range r);
GList *sheet_region_get_deps (const Sheet *sheet, const Range *r);
/* Convenience routines for Cells */
void cell_eval (Cell *cell);
......
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