ASF Bugzilla – Attachment 30988 Details for
Bug 55730
Fix org.apache.poi.ss.usermodel.BuiltinFormats.java for 0x29-0x2c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix org.apache.poi.ss.usermodel.BuiltinFormats.java for 0x29-0x2c w/test fixed
patch.diff (text/plain), 3.50 KB, created by
Eric Peters
on 2013-10-31 23:00:13 UTC
(
hide
)
Description:
Fix org.apache.poi.ss.usermodel.BuiltinFormats.java for 0x29-0x2c w/test fixed
Filename:
MIME Type:
Creator:
Eric Peters
Created:
2013-10-31 23:00:13 UTC
Size:
3.50 KB
patch
obsolete
>From 3bba25eb4fb67eff700b05a0e11c9a52ef39d6bd Mon Sep 17 00:00:00 2001 >From: Eric Peters <eric@peters.org> >Date: Thu, 31 Oct 2013 15:38:56 -0700 >Subject: [PATCH] HSSP Formats > >--- > src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java | 13 +++++++------ > .../hssf/eventusermodel/TestFormatTrackingHSSFListener.java | 3 ++- > 2 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java >index 5fe6e13..2dad6f8 100644 >--- a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java >+++ b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java >@@ -54,10 +54,10 @@ import java.util.Map; > * 0x26, "#,##0_);[Red](#,##0)"<br/> > * 0x27, "#,##0.00_);(#,##0.00)"<br/> > * 0x28, "#,##0.00_);[Red](#,##0.00)"<br/> >- * 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/> > * 0x2d, "mm:ss"<br/> > * 0x2e, "[h]:mm:ss"<br/> > * 0x2f, "mm:ss.0"<br/> >@@ -69,6 +69,7 @@ import java.util.Map; > * @author Yegor Kozlov > * > * Modified 6/17/09 by Stanislav Shor - positive formats don't need starting '(' >+ * Modified 10/31/13 by Eric Peters - * is a repeating/padding character directive, examples needed a space after the asterix (e.i. Accounting format) > * > */ > public final class BuiltinFormats { >@@ -137,8 +138,8 @@ public final class BuiltinFormats { > putFormat(m, 0x28, "#,##0.00_);[Red](#,##0.00)"); > putFormat(m, 0x29, "_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* \"-\"_);_(@_)"); > putFormat(m, 0x2a, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"); >- 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);_(\"$\"* \"-\"??_);_(@_)"); > putFormat(m, 0x2d, "mm:ss"); > putFormat(m, 0x2e, "[h]:mm:ss"); > putFormat(m, 0x2f, "mm:ss.0"); >diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java >index f3bc27b..ad144a2 100644 >--- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java >+++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java >@@ -57,7 +57,8 @@ public final class TestFormatTrackingHSSFListener extends TestCase { > > assertEquals("_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* \"-\"_);_(@_)", listener.getFormatString(41)); > assertEquals("_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)", listener.getFormatString(42)); >- assertEquals("_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* \"-\"??_);_(@_)", listener.getFormatString(43)); >+ assertEquals("_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)", listener.getFormatString(43)); >+ assertEquals("_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* \"-\"??_);_(@_)", listener.getFormatString(44)); > } > > /** >-- >1.7.11.1 >
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 55730
:
30987
| 30988