Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7558AD0FB for ; Thu, 2 Aug 2012 14:38:12 +0000 (UTC) Received: (qmail 72984 invoked by uid 500); 2 Aug 2012 14:38:12 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 72943 invoked by uid 500); 2 Aug 2012 14:38:12 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 72935 invoked by uid 99); 2 Aug 2012 14:38:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 14:38:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 14:38:09 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id DB1EE58D1; Thu, 2 Aug 2012 14:37:48 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 53644] New: [PATCH] XLS formula bugfix (CalFieldFunc) + WeekDay addon Date: Thu, 02 Aug 2012 14:37:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: HSSF X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: twapache@online.de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity classification reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=53644 Priority: P2 Bug ID: 53644 Assignee: dev@poi.apache.org Summary: [PATCH] XLS formula bugfix (CalFieldFunc) + WeekDay addon Severity: normal Classification: Unclassified Reporter: twapache@online.de Hardware: PC Status: NEW Version: 3.9-dev Component: HSSF Product: POI Created attachment 29155 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29155&action=edit ant-generated patch text file Bugfixes and addons of some formula evaluations. I used EXCEL 2010 as basis to get the excel behaviour. I used the modifications on a quite complex XLS with HSSFWorkbook only. Changes in detail: - FunctionEval + added function no. 70 (WeekdayFunc) - WeekdayFunc + complete new implementation + tested manually for several cases (unit tests todo, sorry) - Address + third parameter can be left out, support for this added - TestAddress + unit test for above situation added - BooleanFunction + parameters can be left out (e.g. "OR(true,,false,)", support for this added - DateUtil + made some constants public because they are of general use and the class is the right place + added getJavaCalendar() functions that are similar to existing getJavaDate() but return a Calendar + getJavaDate() use the new getJavaCalendar() internally (because the originally create a Calendar and drop it) + commented out an "if (false)" because this is just a comment inside, so no need for dead code - CalendarFieldFunction + bug fix: XLS performs rounding on sub-second level + bug fix: XLS HOUR() does not care about daylight saving, so use UTC timezone for getting hour + uses new DateUtil methods (see above) - TestCalendarFieldFunction + unit tests for above fixed situations added - eval-devguide.xml + some typos fixed + weekday mentioned - patch.xml + the regexps were to generic, the generated patch for the above files included "Address.java" and "TestAdress.java" as new files because the contain a capital "A". The svn change indicator is in the first column, so added a ^ in the regexp. PLEASE, TEST THIS in different development environments, because I am not sure, if this change is generically correct or just works for me. A side note to the POI developers: Setup of the project is great. "svn checkout" + "ant jar" worked out of the box (for me). With this "organisational stuff" working without problems, giving back own modifications/fixes to the POI project is fun. Keep up the great work! -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org