ASF Bugzilla – Attachment 34799 Details for
Bug 60823
[PATCH] DGET function, correct behavior with multiple result entries but only one non-blank
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dget_multi_blank_result.patch
dget_multi_blank_result.patch (text/plain), 1.04 KB, created by
Patrick Böker
on 2017-03-06 13:05:20 UTC
(
hide
)
Description:
dget_multi_blank_result.patch
Filename:
MIME Type:
Creator:
Patrick Böker
Created:
2017-03-06 13:05:20 UTC
Size:
1.04 KB
patch
obsolete
>diff --git a/src/java/org/apache/poi/ss/formula/functions/DGet.java b/src/java/org/apache/poi/ss/formula/functions/DGet.java >index 0bf9cc2..5cdc292 100644 >--- a/src/java/org/apache/poi/ss/formula/functions/DGet.java >+++ b/src/java/org/apache/poi/ss/formula/functions/DGet.java >@@ -36,10 +36,18 @@ public final class DGet implements IDStarAlgorithm { > { > result = eval; > } >- else // There was a previous match, since there is only exactly one allowed, bail out. >+ else // There was a previous match. Only one non-blank result is allowed. #NUM! on multiple values. > { >- result = ErrorEval.NUM_ERROR; >- return false; >+ if(result instanceof BlankEval) { >+ result = eval; >+ } >+ else { >+ // We have a previous filled result. >+ if(!(eval instanceof BlankEval)) { >+ result = ErrorEval.NUM_ERROR; >+ return false; >+ } >+ } > } > > return true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60823
: 34799 |
34800