Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gnumeric
Commits
587388f9
Commit
587388f9
authored
Jan 05, 2021
by
Morten Welinder
Browse files
ods: fix import problem with crazy named expressions.
"19" as a name was throwing us off.
parent
c9f96e0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
587388f9
...
...
@@ -20,6 +20,7 @@ Morten:
* Fix ssconvert sheet selection for csv. [#555]
* Test suite improvements.
* Fix ods import problem with irregular sheet sizes.
* Fix ods import problem with crazy named expressions. [#557]
--------------------------------------------------------------------------
Gnumeric 1.12.48
...
...
plugins/openoffice/openoffice-read.c
View file @
587388f9
...
...
@@ -2074,8 +2074,22 @@ odf_fix_en_collect (G_GNUC_UNUSED gconstpointer key_,
here[i] = '_';
}
}
// If the name is inherently invalid ("19" as in #557) then mangle
// it first.
if (!expr_name_validate (str->str)) {
g_string_insert (str, 0, "NAME");
if (!expr_name_validate (str->str)) {
char *p;
for (p = str->str; *p; p++)
if (!g_ascii_isalnum (*p))
*p = 'X';
}
}
while (!odf_fix_en_validate (str->str, fen))
g_string_append_c (str, '_');
odf_fix_expr_names_t_add (fen, name, g_string_free (str, FALSE));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment