[gnumeric] Import reference unions from ODF.[#750627]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Import reference unions from ODF.[#750627]
- Date: Fri, 19 Jun 2015 01:06:41 +0000 (UTC)
commit dc62fe9a210e82656bbb056570dcda8e4f9eea18
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Thu Jun 18 19:02:51 2015 -0600
Import reference unions from ODF.[#750627]
2015-06-18 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (oo_conventions_new): set union_char
2015-06-18 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/parse-util.h (_GnmConventions): add union_char field
* src/parser.y (yylex): handle union_char
(setup_state): set union_char
ChangeLog | 6 ++++++
NEWS | 1 +
plugins/openoffice/ChangeLog | 4 ++++
plugins/openoffice/openoffice-read.c | 1 +
src/parse-util.h | 2 ++
src/parser.y | 4 ++++
6 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5390fc2..6c33d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-18 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/parse-util.h (_GnmConventions): add union_char field
+ * src/parser.y (yylex): handle union_char
+ (setup_state): set union_char
+
2015-06-18 Morten Welinder <terra gnome org>
* src/xml-sax-read.c (xml_sax_read_obj): Only allow type names
diff --git a/NEWS b/NEWS
index a0369f2..769783f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Andreas:
and QUARTILE.EXC.
* Fuzzed file fixes. [#751060]
* Fix ODF import of named expressions. [#750627]
+ * Import reference unions from ODF.[#750627]
Jean:
* Fix xlsx import of plot area manual layout. [#748016]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index e4dc600..97918fa 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-18 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (oo_conventions_new): set union_char
+
2015-06-18 Morten Welinder <terra gnome org>
* openoffice-read.c (go_plugin_init): Derive the preparse dtd from
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 44fb7d1..24aeede 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -2161,6 +2161,7 @@ oo_conventions_new (OOParseState *state, GsfXMLIn *xin)
conv->exp_is_left_associative = TRUE;
conv->intersection_char = '!';
+ conv->union_char = '~';
conv->decimal_sep_dot = TRUE;
conv->range_sep_colon = TRUE;
conv->arg_sep = ';';
diff --git a/src/parse-util.h b/src/parse-util.h
index 4112ba2..dbe69df 100644
--- a/src/parse-util.h
+++ b/src/parse-util.h
@@ -119,6 +119,8 @@ struct _GnmConventions {
/* What character denotes range intersection? */
gunichar intersection_char;
+ /* What character denotes range union? */
+ gunichar union_char;
/* What characters are range separators? */
gboolean range_sep_colon; /* A1:B2 */
diff --git a/src/parser.y b/src/parser.y
index a042b58..a77e912 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -185,6 +185,7 @@ typedef struct {
/* loaded from convs with locale specific mappings */
gunichar decimal_point;
gunichar arg_sep;
+ gunichar union_char;
gunichar array_col_sep;
gunichar array_row_sep;
/* if arg_sep conflicts with array_col_sep or array_row_sep */
@@ -1163,6 +1164,8 @@ yylex (void)
if (c == state->arg_sep)
return eat_space (state, state->in_array ? state->in_array_sep_is : ARG_SEP);
+ if ((c == state->union_char) && (state->union_char != 0))
+ return eat_space (state, ARG_SEP);
if (c == state->array_col_sep)
return eat_space (state, ARRAY_COL_SEP);
if (c == state->array_row_sep)
@@ -1515,6 +1518,7 @@ setup_state (ParserState *pstate, const char *str,
pstate->arg_sep = pstate->convs->arg_sep;
else
pstate->arg_sep = go_locale_get_arg_sep ();
+ pstate->union_char = pstate->convs->union_char;
if (pstate->convs->array_col_sep != 0)
pstate->array_col_sep = pstate->convs->array_col_sep;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]