ASF Bugzilla – Attachment 33072 Details for
Bug 58339
[PATCH] Make OFFSET() accept missing parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
offset_missing_arg.patch
offset_missing_arg.patch (text/plain), 1.30 KB, created by
Patrick Böker
on 2015-09-07 11:37:11 UTC
(
hide
)
Description:
offset_missing_arg.patch
Filename:
MIME Type:
Creator:
Patrick Böker
Created:
2015-09-07 11:37:11 UTC
Size:
1.30 KB
patch
obsolete
>diff --git a/src/java/org/apache/poi/ss/formula/functions/Offset.java b/src/java/org/apache/poi/ss/formula/functions/Offset.java >index d9f240d..28ec0ab 100644 >--- a/src/java/org/apache/poi/ss/formula/functions/Offset.java >+++ b/src/java/org/apache/poi/ss/formula/functions/Offset.java >@@ -20,6 +20,7 @@ package org.apache.poi.ss.formula.functions; > import org.apache.poi.ss.formula.eval.AreaEval; > import org.apache.poi.ss.formula.eval.ErrorEval; > import org.apache.poi.ss.formula.eval.EvaluationException; >+import org.apache.poi.ss.formula.eval.MissingArgEval; > import org.apache.poi.ss.formula.eval.OperandResolver; > import org.apache.poi.ss.formula.eval.RefEval; > import org.apache.poi.ss.formula.eval.ValueEval; >@@ -173,9 +174,13 @@ public final class Offset implements Function { > int width = baseRef.getWidth(); > switch(args.length) { > case 5: >- width = evaluateIntArg(args[4], srcCellRow, srcCellCol); >+ if(!(args[4] instanceof MissingArgEval)) { >+ width = evaluateIntArg(args[4], srcCellRow, srcCellCol); >+ } > case 4: >- height = evaluateIntArg(args[3], srcCellRow, srcCellCol); >+ if(!(args[3] instanceof MissingArgEval)) { >+ height = evaluateIntArg(args[3], srcCellRow, srcCellCol); >+ } > } > // Zero height or width raises #REF! error > if(height == 0 || width == 0) {
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 58339
: 33072 |
33073
|
33074