poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53644] New: [PATCH] XLS formula bugfix (CalFieldFunc) + WeekDay addon
Date Thu, 02 Aug 2012 14:37:47 GMT

          Priority: P2
            Bug ID: 53644
          Assignee: dev@poi.apache.org
           Summary: [PATCH] XLS formula bugfix (CalFieldFunc) + WeekDay
          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

View raw message