[gnumeric] handle plain is-true-formula validation
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] handle plain is-true-formula validation
- Date: Fri, 13 May 2011 06:39:17 +0000 (UTC)
commit 69774a1e83f1eaf1354ee14052026e32444a7780
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri May 13 00:38:13 2011 -0600
handle plain is-true-formula validation
2011-05-13 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_validation_new_single_expr): make argument const
(odf_validation_new_pair_expr): ditto
(odf_validations_analyze): handle (plain) is-true-formula
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-read.c | 9 ++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 24c699f..3a43bec 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
2011-05-13 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-read.c (odf_validation_new_single_expr): make argument const
+ (odf_validation_new_pair_expr): ditto
+ (odf_validations_analyze): handle (plain) is-true-formula
+
+2011-05-13 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-read.c (odf_validation_new_list): add argument and
permit non-zero offset
(odf_validation_new_general): renamed to odf_validation_new_single_expr
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index fbc25d7..78a1c56 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1497,7 +1497,7 @@ odf_validation_new_list (GsfXMLIn *xin, odf_validation_t *val, guint offset)
static GnmValidation *
odf_validation_new_single_expr (GsfXMLIn *xin, odf_validation_t *val,
- char * start, ValidationType val_type,
+ char const *start, ValidationType val_type,
ValidationOp val_op)
{
OOParseState *state = (OOParseState *)xin->user_state;
@@ -1541,7 +1541,7 @@ odf_validation_new_single_expr (GsfXMLIn *xin, odf_validation_t *val,
static GnmValidation *
odf_validation_new_pair_expr (GsfXMLIn *xin, odf_validation_t *val,
- char * start, ValidationType val_type,
+ char const *start, ValidationType val_type,
ValidationOp val_op)
{
OOParseState *state = (OOParseState *)xin->user_state;
@@ -1705,7 +1705,10 @@ odf_validations_analyze (GsfXMLIn *xin, odf_validation_t *val, guint offset, Val
(xin, val, str - val->condition + strlen ("cell-content-is-time() and"),
VALIDATION_TYPE_AS_TIME);
else if (g_str_has_prefix (str, "is-true-formula"))
- /* validation = odf_validation_new_ (xin, val, str - val->condition + strlen (), vtype) */;
+ /* What do we do if vtype != VALIDATION_TYPE_ANY ?*/
+ return odf_validation_new_single_expr
+ (xin, val, str + strlen ("is-true-formula"), VALIDATION_TYPE_CUSTOM,
+ VALIDATION_OP_NONE);
else if (g_str_has_prefix (str, "cell-content()"))
return odf_validation_new_op
(xin, val, str - val->condition + strlen ("cell-content()"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]