[gnumeric] collect: improve blank handling.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] collect: improve blank handling.
- Date: Fri, 11 Jun 2010 16:39:05 +0000 (UTC)
commit 1c04467acae03e8345caa3ff8ca16bc95bacb6e6
Author: Morten Welinder <terra gnome org>
Date: Fri Jun 11 12:38:46 2010 -0400
collect: improve blank handling.
src/collect.c | 4 ++++
src/collect.h | 4 +++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/collect.c b/src/collect.c
index e8cd3db..7260ad9 100644
--- a/src/collect.c
+++ b/src/collect.c
@@ -229,6 +229,10 @@ callback_function_collect (GnmEvalPos const *ep, GnmValue const *value,
case VALUE_EMPTY:
if (cl->flags & COLLECT_IGNORE_BLANKS)
ignore = TRUE;
+ else if (cl->flags & COLLECT_ZERO_BLANKS)
+ x = 0;
+ else
+ return value_new_error_VALUE (ep);
break;
case VALUE_BOOLEAN:
diff --git a/src/collect.h b/src/collect.h
index f9f3197..1ff54d2 100644
--- a/src/collect.h
+++ b/src/collect.h
@@ -18,7 +18,9 @@ typedef enum {
COLLECT_IGNORE_ERRORS = 0x100,
COLLECT_IGNORE_BLANKS = 0x1000,
- COLLECT_IGNORE_SUBTOTAL = 0x2000,
+ COLLECT_ZERO_BLANKS = 0x2000,
+
+ COLLECT_IGNORE_SUBTOTAL = 0x4000,
COLLECT_SORT = 0x10000,
COLLECT_ORDER_IRRELEVANT = 0x20000,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]