Commit ebc1d288 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Convert most of the routines to take 'Scalar' rather than '?' which did


2000-07-31  Jody Goldberg <jgoldberg@home.com>

	* src/functions/fn-date.c (date_functions_ini) : Convert most of the
	  routines to take 'Scalar' rather than '?' which did not handle
	  ranges or arrays.

	* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
	  'Scalar'

	* src/func.c (function_marshal_arg) : Add 'S' scalar.

2000-07-28  Jody Goldberg <jgoldberg@home.com>

	* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
	  signature change for gnome_font_family_list.
parent 3c798202
......@@ -4,6 +4,10 @@ and longer term bugs.
Release Critical
----------------
- Amny of the Valye -> date routines do not handle error arguments properly.
- expressions -> strings loose the format used to parse values.
- saving the entered_text then parsing in locale C on restore is broken.
- We should save per row/col maximums.
- Changing the size of all rows/cols creates big xml files.
- Saving xml should not rely on changing the textdomain to disable translation
of TRUE/FALSE.
......@@ -44,8 +48,7 @@ Long term breakage
- The File->Print Preview icon is too big. Use the stock version when the next
release of gnome-libs is made. (tigert is adding to gnome-libs)
- Names : Sheet local vs workbook local vs application global (does that exist ?)
: addresses not changing with row/col ins/del.
- Names : addresses not changing with row/col ins/del.
- Underline should scale with font size. (Say, max (1, font->descent/4?)
gnome-print has a function we could use for printing which returns the
......@@ -58,7 +61,7 @@ Long term breakage
Something more comprehensive is necessary.
- Functions like SUMPRODUCT need to have better support for sparse ranges.
We should probably create synchroneously_walk_ranges. (XL goes kaboom on
We should probably create synchronously_walk_ranges. (XL goes kaboom on
large ranges also, but we ought to be smarter.)
Dialogs
......@@ -74,10 +77,6 @@ Dialogs
: Switching between multiple function at the same level.
: Better communication and handling of parse errors.
Sorting
-------
- Hidden rows/cols should not be sorted.
Function Breakage
-----------------
- Index : does not support 0,0 or reference syntax.
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
2000-07-31 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-date.c (date_functions_ini) : Convert most of the
routines to take 'Scalar' rather than '?' which did not handle
ranges or arrays.
* src/dialogs/dialog-function-wizard.c (formula_guru_arg_new) : Handle
'Scalar'
* src/func.c (function_marshal_arg) : Add 'S' scalar.
2000-07-28 Jody Goldberg <jgoldberg@home.com>
* src/global-gnome-font.c (global_gnome_font_init) : Adjust to
signature change for gnome_font_family_list.
2000-07-26 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (parse_string_as_value_or_name) : Check for names
......
......@@ -256,6 +256,7 @@ a : An Array eg. {1,2,3;4,5,6} ( a 3x2 array ) - See 'A'
A : Either an Array or a Range: Use the
value_area set of functions to simplify the code.
see expr.h.
S : Scalar, anything OTHER than an array or range
? : Any type, the type must be checked from value->type.
| : This designates that the arguments in the token string
following this character are optional.
......@@ -256,6 +256,7 @@ a : An Array eg. {1,2,3;4,5,6} ( a 3x2 array ) - See 'A'
A : Either an Array or a Range: Use the
value_area set of functions to simplify the code.
see expr.h.
S : Scalar, anything OTHER than an array or range
? : Any type, the type must be checked from value->type.
| : This designates that the arguments in the token string
following this character are optional.
......@@ -592,7 +592,7 @@ static char *help_workday = {
"@DESCRIPTION="
"Returns the day which is @days working days "
"from the @start_date. Weekends and holidays optionaly "
"from the @start_date. Weekends and holidays optionally "
"supplied in @holidays are respected."
"\n"
"Returns #NUM! if @start_date or @days are invalid."
......@@ -657,7 +657,7 @@ static char * help_networkdays = {
"@DESCRIPTION="
"Returns the number of non-weekend non-holidays between @start_date "
"and @end_date. Holidays optionaly supplied in @holidays."
"and @end_date. Holidays optionally supplied in @holidays."
"\n"
"Returns #NUM if start_date or end_date are invalid"
"\n"
......@@ -772,15 +772,15 @@ date_functions_init(void)
&help_date, gnumeric_date);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "datevalue", "?",
def = function_add_args (cat, "datevalue", "S",
"date_str",
&help_datevalue, gnumeric_datevalue);
def = function_add_args (cat, "day", "?",
def = function_add_args (cat, "day", "S",
"date",
&help_day, gnumeric_day);
def = function_add_args (cat, "days360", "??|f",
def = function_add_args (cat, "days360", "SS|f",
"date1,date2,method",
&help_days360, gnumeric_days360);
......@@ -789,24 +789,24 @@ date_functions_init(void)
&help_edate, gnumeric_edate);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "eomonth", "?|f",
def = function_add_args (cat, "eomonth", "S|f",
"start_date,months",
&help_eomonth, gnumeric_eomonth);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "hour", "?",
def = function_add_args (cat, "hour", "S",
"time",
&help_hour, gnumeric_hour );
def = function_add_args (cat, "minute", "?",
def = function_add_args (cat, "minute", "S",
"time",
&help_minute, gnumeric_minute );
def = function_add_args (cat, "month", "?",
def = function_add_args (cat, "month", "S",
"date",
&help_month, gnumeric_month);
def = function_add_args (cat, "networkdays", "??|?",
def = function_add_args (cat, "networkdays", "SS|?",
"start_date,end_date,holidays",
&help_networkdays, gnumeric_networkdays );
......@@ -814,7 +814,7 @@ date_functions_init(void)
"",
&help_now, gnumeric_now );
def = function_add_args (cat, "second", "?",
def = function_add_args (cat, "second", "S",
"time",
&help_second, gnumeric_second );
......@@ -823,7 +823,7 @@ date_functions_init(void)
&help_time, gnumeric_time );
auto_format_function_result (def, AF_TIME);
def = function_add_args (cat, "timevalue", "?",
def = function_add_args (cat, "timevalue", "S",
"",
&help_timevalue, gnumeric_timevalue );
......@@ -832,15 +832,15 @@ date_functions_init(void)
&help_today, gnumeric_today );
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "weekday", "?",
def = function_add_args (cat, "weekday", "S",
"date",
&help_weekday, gnumeric_weekday);
def = function_add_args (cat, "workday", "?f|?",
def = function_add_args (cat, "workday", "Sf|?",
"date,days,holidays",
&help_workday, gnumeric_workday);
def = function_add_args (cat, "year", "?",
def = function_add_args (cat, "year", "S",
"date",
&help_year, gnumeric_year);
}
......@@ -406,6 +406,7 @@ formula_guru_arg_new (char * const name,
case 'r': txt = _("Range"); break;
case 'a': txt = _("Array"); break;
case 'A': txt = _("Range/Array"); break;
case 'S': txt = _("Scalar"); break;
case '?':
default: txt = _("Any");
}
......
......@@ -406,6 +406,7 @@ formula_guru_arg_new (char * const name,
case 'r': txt = _("Range"); break;
case 'a': txt = _("Array"); break;
case 'A': txt = _("Range/Array"); break;
case 'S': txt = _("Scalar"); break;
case '?':
default: txt = _("Any");
}
......
......@@ -178,7 +178,7 @@ fn_def_new (FunctionCategory *category,
char const *arg_names,
char **help)
{
static char const valid_tokens[] = "fsbraA?|";
static char const valid_tokens[] = "fsbraAS?|";
char const *ptr;
FunctionDefinition *fndef;
......@@ -472,6 +472,17 @@ function_marshal_arg (FunctionEvalInfo *ei,
ei->pos);
}
break;
case 'S':
if (v->type == VALUE_CELLRANGE) {
v = expr_implicit_intersection (ei->pos, v);
if (v == NULL)
break;
}
break;
default :
break;
}
return v;
......
......@@ -50,6 +50,7 @@ void function_category_add_func (FunctionCategory *, FunctionDefinition *);
* r for cell range
* a for cell array
* A for 'area': either range or array
* S for 'scalar': anything OTHER than an array or range
* ? for any kind
* For optional arguments do:
* "ff|ss" where the strings are optional
......
......@@ -592,7 +592,7 @@ static char *help_workday = {
"@DESCRIPTION="
"Returns the day which is @days working days "
"from the @start_date. Weekends and holidays optionaly "
"from the @start_date. Weekends and holidays optionally "
"supplied in @holidays are respected."
"\n"
"Returns #NUM! if @start_date or @days are invalid."
......@@ -657,7 +657,7 @@ static char * help_networkdays = {
"@DESCRIPTION="
"Returns the number of non-weekend non-holidays between @start_date "
"and @end_date. Holidays optionaly supplied in @holidays."
"and @end_date. Holidays optionally supplied in @holidays."
"\n"
"Returns #NUM if start_date or end_date are invalid"
"\n"
......@@ -772,15 +772,15 @@ date_functions_init(void)
&help_date, gnumeric_date);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "datevalue", "?",
def = function_add_args (cat, "datevalue", "S",
"date_str",
&help_datevalue, gnumeric_datevalue);
def = function_add_args (cat, "day", "?",
def = function_add_args (cat, "day", "S",
"date",
&help_day, gnumeric_day);
def = function_add_args (cat, "days360", "??|f",
def = function_add_args (cat, "days360", "SS|f",
"date1,date2,method",
&help_days360, gnumeric_days360);
......@@ -789,24 +789,24 @@ date_functions_init(void)
&help_edate, gnumeric_edate);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "eomonth", "?|f",
def = function_add_args (cat, "eomonth", "S|f",
"start_date,months",
&help_eomonth, gnumeric_eomonth);
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "hour", "?",
def = function_add_args (cat, "hour", "S",
"time",
&help_hour, gnumeric_hour );
def = function_add_args (cat, "minute", "?",
def = function_add_args (cat, "minute", "S",
"time",
&help_minute, gnumeric_minute );
def = function_add_args (cat, "month", "?",
def = function_add_args (cat, "month", "S",
"date",
&help_month, gnumeric_month);
def = function_add_args (cat, "networkdays", "??|?",
def = function_add_args (cat, "networkdays", "SS|?",
"start_date,end_date,holidays",
&help_networkdays, gnumeric_networkdays );
......@@ -814,7 +814,7 @@ date_functions_init(void)
"",
&help_now, gnumeric_now );
def = function_add_args (cat, "second", "?",
def = function_add_args (cat, "second", "S",
"time",
&help_second, gnumeric_second );
......@@ -823,7 +823,7 @@ date_functions_init(void)
&help_time, gnumeric_time );
auto_format_function_result (def, AF_TIME);
def = function_add_args (cat, "timevalue", "?",
def = function_add_args (cat, "timevalue", "S",
"",
&help_timevalue, gnumeric_timevalue );
......@@ -832,15 +832,15 @@ date_functions_init(void)
&help_today, gnumeric_today );
auto_format_function_result (def, AF_DATE);
def = function_add_args (cat, "weekday", "?",
def = function_add_args (cat, "weekday", "S",
"date",
&help_weekday, gnumeric_weekday);
def = function_add_args (cat, "workday", "?f|?",
def = function_add_args (cat, "workday", "Sf|?",
"date,days,holidays",
&help_workday, gnumeric_workday);
def = function_add_args (cat, "year", "?",
def = function_add_args (cat, "year", "S",
"date",
&help_year, gnumeric_year);
}
......@@ -23,11 +23,10 @@ int const gnumeric_point_sizes [] = {
void
global_gnome_font_init (void)
{
GnomeFontClass *gfc = gtk_type_class (gnome_font_get_type ());
int i;
GList *l, *ll;
l = gnome_font_family_list (gfc);
l = gnome_font_family_list ();
for (ll = l; ll; ll = ll->next){
gnumeric_font_family_list = g_list_insert_sorted (
......
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