Commit 53975274 authored by Morten Welinder's avatar Morten Welinder

Number match: disallow fraction match for general cells.

parent 099db96c
2010-12-30 Morten Welinder <terra@gnome.org>
* src/number-match.c (format_match_fraction): Add option for
accepting mixed-format numbers only.
(format_match): When the existing format is "General", allow only
mixed-format number.
2010-12-26 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/go-data-cache-field.c (go_data_cache_field_get_val): protect
* src/go-data-cache-field.c (go_data_cache_field_get_val): protect
against crashes
2010-12-26 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-control-gui.c (scg_scale_changed): reposition sheet objects to
......@@ -18,7 +25,7 @@
* src/commands.h (cmd_analysis_tool): add argument
* src/commands.c (cmd_analysis_tool): use always_take_ownership
argument
2010-12-17 Jean Brefort <jean.brefort@normalesup.org>
* src/gnm-so-line.c (so_line_view_set_bounds): take zoom level into
......
......@@ -20,6 +20,7 @@ Morten:
* Fix array intersection problem with IF. [#633433]
* Make sure columns are wide enough for dates in csv import.
* Plug a few leaks.
* Fix number-match issue regarding fraction.
--------------------------------------------------------------------------
Gnumeric 1.10.12
......
......@@ -854,7 +854,7 @@ format_match_datetime (char const *text,
* The number of digits in the denominator is stored in @denlen.
*/
static GnmValue *
format_match_fraction (char const *text, int *denlen)
format_match_fraction (char const *text, int *denlen, gboolean mixed_only)
{
char sign = 0;
gnm_float whole, num, den, f;
......@@ -874,6 +874,8 @@ format_match_fraction (char const *text, int *denlen)
SKIP_SPACES (text);
if (*text == '/') {
if (mixed_only)
return NULL;
whole = 0;
} else {
whole = gnm_strto (start, NULL);
......@@ -1215,7 +1217,7 @@ format_match (char const *text, GOFormat const *cur_fmt,
}
case GO_FORMAT_FRACTION:
v = format_match_fraction (text, &denlen);
v = format_match_fraction (text, &denlen, FALSE);
if (!v)
v = format_match_decimal_number (text, &fam);
if (!v)
......@@ -1263,7 +1265,7 @@ format_match (char const *text, GOFormat const *cur_fmt,
if (v)
return v;
v = format_match_fraction (text, &denlen);
v = format_match_fraction (text, &denlen, TRUE);
if (v) {
char fmtstr[20];
char const *qqq = "?????" + 5;
......
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