thanks for the patches, applied in r1553247 and r1553248

Yegor


On Mon, Dec 23, 2013 at 9:00 PM, Eric Peters <[email protected]> wrote:

> Another patch that needs some code review/commit love that should be pretty
> straightforward:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=55730
>
> Another person on stackoverflow saw/verified this same issue:
> http://stackoverflow.com/questions/16668122/poi-default-formats-issue &
> found a Microsoft Documentation reference for these (
> http://support.microsoft.com/kb/147942) which matches the current proposed
> patch I've included.
>
> There's two primary fixes/changes:
>
> 1) Correct repeating character formatting in the Java Doc documentation
>
> - *       0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"<br/>
> - *       0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"<br/>
> - *       0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"<br/>
> - *       0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"<br/>
> + *       0x29, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"<br/>
> + *       0x2a, "_($* #,##0_);_($* (#,##0);_($* \"-\"_);_(@_)"<br/>
> + *       0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)"<br/>
> + *       0x2c, "_($* #,##0.00_);_($* (#,##0.00);_($* \"-\"??_);_(@_)"<br/>
>
>
> http://office.microsoft.com/en-us/excel-help/number-format-codes-HP005198679.aspx
>
> * is a repeating character (for padding), The character following the
> asterix is suppose to be repeated to fit the cell width - so an example
> would be an accounting format would have:
>
> "$     2.24"
>
> to fit the cell width, at some point the javadoc removed the spaces after
> the * character, I've simply added them back.
>
> 2) Swap the 0x2b and the 0x2c to match the documentation (and what they
> actually are in practice) - it's also worth noting that the implementation
> of the formats had the spaces after the repeating character * that weren't
> reflected in the above documentation
>
> -               putFormat(m, 0x2b, "_(\"$\"* #,##0.00_);_(\"$\"*
> (#,##0.00);_(\"$\"* \"-\"??_);_(@_)");
> -               putFormat(m, 0x2c, "_(* #,##0.00_);_(* (#,##0.00);_(*
> \"-\"??_);_(@_)");
> +               putFormat(m, 0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(*
> \"-\"??_);_(@_)");
> +               putFormat(m, 0x2c, "_(\"$\"* #,##0.00_);_(\"$\"*
> (#,##0.00);_(\"$\"* \"-\"??_);_(@_)");
>
> Thanks,
>
> Eric
>

Reply via email to