Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 11954 invoked from network); 9 Oct 2008 06:46:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2008 06:46:42 -0000 Received: (qmail 50175 invoked by uid 500); 9 Oct 2008 06:46:41 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 50139 invoked by uid 500); 9 Oct 2008 06:46:41 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 50130 invoked by uid 99); 9 Oct 2008 06:46:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 23:46:41 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 06:45:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A321223889B2; Wed, 8 Oct 2008 23:46:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r703070 [2/2] - in /poi/branches/ooxml: ./ src/documentation/content/xdocs/ src/java/org/apache/poi/hssf/record/ src/java/org/apache/poi/hssf/record/formula/eval/ src/java/org/apache/poi/hssf/record/formula/functions/ src/java/org/apache/po... Date: Thu, 09 Oct 2008 06:46:19 -0000 To: commits@poi.apache.org From: josh@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081009064621.A321223889B2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/UnitsRecord.java URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/UnitsRecord.java?rev=703070&r1=703069&r2=703070&view=diff ============================================================================== --- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/UnitsRecord.java (original) +++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/UnitsRecord.java Wed Oct 8 23:46:17 2008 @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,24 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - package org.apache.poi.hssf.record; - - -import org.apache.poi.util.*; +import org.apache.poi.util.HexDump; +import org.apache.poi.util.LittleEndian; /** - * The units record describes units. - * NOTE: This source is automatically generated please do not modify this file. Either subclass or - * remove the record in src/records/definitions. - + * The units record describes units.

+ * * @author Glen Stampoultzis (glens at apache.org) */ -public class UnitsRecord - extends Record -{ +public final class UnitsRecord extends Record { public final static short sid = 0x1001; private short field_1_units; @@ -74,9 +67,6 @@ return getRecordSize(); } - /** - * Size of record (exluding 4 byte header) - */ public int getRecordSize() { return 4 + 2; @@ -112,10 +102,4 @@ { this.field_1_units = field_1_units; } - - -} // END OF CLASS - - - - +} Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java?rev=703070&r1=703069&r2=703070&view=diff ============================================================================== --- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java (original) +++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java Wed Oct 8 23:46:17 2008 @@ -23,10 +23,8 @@ import org.apache.poi.util.LittleEndian; /** - * The value range record defines the range of the value axis. - * NOTE: This source is automatically generated please do not modify this file. Either subclass or - * remove the record in src/records/definitions. - + * The value range record defines the range of the value axis.

+ * * @author Glen Stampoultzis (glens at apache.org) */ public final class ValueRangeRecord extends Record { @@ -121,9 +119,6 @@ return getRecordSize(); } - /** - * Size of record (exluding 4 byte header) - */ public int getRecordSize() { return 4 + 8 + 8 + 8 + 8 + 8 + 2; Modified: poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/functions/Count.java URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/functions/Count.java?rev=703070&r1=703069&r2=703070&view=diff ============================================================================== --- poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/functions/Count.java (original) +++ poi/branches/ooxml/src/java/org/apache/poi/hssf/record/formula/functions/Count.java Wed Oct 8 23:46:17 2008 @@ -19,6 +19,7 @@ import org.apache.poi.hssf.record.formula.eval.ErrorEval; import org.apache.poi.hssf.record.formula.eval.Eval; +import org.apache.poi.hssf.record.formula.eval.MissingArgEval; import org.apache.poi.hssf.record.formula.eval.NumberEval; import org.apache.poi.hssf.record.formula.functions.CountUtils.I_MatchPredicate; @@ -64,6 +65,10 @@ // only numbers are counted return true; } + if(valueEval == MissingArgEval.instance) { + // oh yeah, and missing arguments + return true; + } // error values and string values not counted return false; Modified: poi/branches/ooxml/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java?rev=703070&r1=703069&r2=703070&view=diff ============================================================================== --- poi/branches/ooxml/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java (original) +++ poi/branches/ooxml/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java Wed Oct 8 23:46:17 2008 @@ -52,6 +52,7 @@ import org.apache.poi.hssf.record.formula.eval.ErrorEval; import org.apache.poi.hssf.record.formula.eval.Eval; import org.apache.poi.hssf.record.formula.eval.FunctionEval; +import org.apache.poi.hssf.record.formula.eval.MissingArgEval; import org.apache.poi.hssf.record.formula.eval.NameEval; import org.apache.poi.hssf.record.formula.eval.NameXEval; import org.apache.poi.hssf.record.formula.eval.NumberEval; @@ -284,10 +285,7 @@ continue; } if (ptg instanceof MemErrPtg) { continue; } - if (ptg instanceof MissingArgPtg) { - // TODO - might need to push BlankEval or MissingArgEval - continue; - } + Eval opResult; if (ptg instanceof OperationPtg) { OperationPtg optg = (OperationPtg) ptg; @@ -306,6 +304,9 @@ } // logDebug("invoke " + operation + " (nAgs=" + numops + ")"); opResult = invokeOperation(operation, ops, _workbook, sheetIndex, srcRowNum, srcColNum); + if (opResult == MissingArgEval.instance) { + opResult = BlankEval.INSTANCE; + } } else { opResult = getEvalForPtg(ptg, sheetIndex, tracker); } @@ -424,6 +425,9 @@ if (ptg instanceof ErrPtg) { return ErrorEval.valueOf(((ErrPtg) ptg).getErrorCode()); } + if (ptg instanceof MissingArgPtg) { + return MissingArgEval.instance; + } if (ptg instanceof AreaErrPtg ||ptg instanceof RefErrorPtg || ptg instanceof DeletedArea3DPtg || ptg instanceof DeletedRef3DPtg) { return ErrorEval.REF_INVALID; Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/AllFormulaEvalTests.java URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/AllFormulaEvalTests.java?rev=703070&r1=703069&r2=703070&view=diff ============================================================================== --- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/AllFormulaEvalTests.java (original) +++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/AllFormulaEvalTests.java Wed Oct 8 23:46:17 2008 @@ -36,6 +36,7 @@ result.addTestSuite(TestExternalFunction.class); result.addTestSuite(TestFormulaBugs.class); result.addTestSuite(TestFormulasFromSpreadsheet.class); + result.addTestSuite(TestMissingArgEval.class); result.addTestSuite(TestPercentEval.class); result.addTestSuite(TestRangeEval.class); result.addTestSuite(TestUnaryPlusEval.class); Copied: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java (from r702231, poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java) URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java?p2=poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java&p1=poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java&r1=702231&r2=703070&rev=703070&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java (original) +++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/formula/eval/TestMissingArgEval.java Wed Oct 8 23:46:17 2008 @@ -26,7 +26,7 @@ import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.CellValue; +import org.apache.poi.ss.usermodel.CellValue; /** * Tests for {@link MissingArgEval} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org