From e4378f5677284cf14afc16bb5a0c1641c8cf82ea Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Thu, 10 Sep 2009 14:02:16 +0000 Subject: [PATCH] built-in positive formats don't need starting '(', see bugzilla 47770 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@813449 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/ss/usermodel/BuiltinFormats.java | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java index 433572cb3..fdb5c99b4 100755 --- a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java +++ b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java @@ -30,10 +30,10 @@ import java.util.Map; * 2, "0.00"
* 3, "#,##0"
* 4, "#,##0.00"
- * 5, "($#,##0_);($#,##0)"
- * 6, "($#,##0_);[Red]($#,##0)"
- * 7, "($#,##0.00);($#,##0.00)"
- * 8, "($#,##0.00_);[Red]($#,##0.00)"
+ * 5, "$#,##0_);($#,##0)"
+ * 6, "$#,##0_);[Red]($#,##0)"
+ * 7, "$#,##0.00);($#,##0.00)"
+ * 8, "$#,##0.00_);[Red]($#,##0.00)"
* 9, "0%"
* 0xa, "0.00%"
* 0xb, "0.00E+00"
@@ -50,10 +50,10 @@ import java.util.Map; * 0x16, "m/d/yy h:mm"
*

* // 0x17 - 0x24 reserved for international and undocumented - * 0x25, "(#,##0_);(#,##0)"
- * 0x26, "(#,##0_);[Red](#,##0)"
- * 0x27, "(#,##0.00_);(#,##0.00)"
- * 0x28, "(#,##0.00_);[Red](#,##0.00)"
+ * 0x25, "#,##0_);(#,##0)"
+ * 0x26, "#,##0_);[Red](#,##0)"
+ * 0x27, "#,##0.00_);(#,##0.00)"
+ * 0x28, "#,##0.00_);[Red](#,##0.00)"
* 0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
* 0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
* 0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
@@ -67,6 +67,9 @@ import java.util.Map; *

* * @author Yegor Kozlov + * + * Modified 6/17/09 by Stanislav Shor - positive formats don't need starting '(' + * */ public final class BuiltinFormats { /** @@ -83,10 +86,10 @@ public final class BuiltinFormats { putFormat(m, 2, "0.00"); putFormat(m, 3, "#,##0"); putFormat(m, 4, "#,##0.00"); - putFormat(m, 5, "($#,##0_);($#,##0)"); - putFormat(m, 6, "($#,##0_);[Red]($#,##0)"); - putFormat(m, 7, "($#,##0.00);($#,##0.00)"); - putFormat(m, 8, "($#,##0.00_);[Red]($#,##0.00)"); + putFormat(m, 5, "$#,##0_);($#,##0)"); + putFormat(m, 6, "$#,##0_);[Red]($#,##0)"); + putFormat(m, 7, "$#,##0.00_);($#,##0.00)"); + putFormat(m, 8, "$#,##0.00_);[Red]($#,##0.00)"); putFormat(m, 9, "0%"); putFormat(m, 0xa, "0.00%"); putFormat(m, 0xb, "0.00E+00"); @@ -108,10 +111,10 @@ public final class BuiltinFormats { putFormat(m, i, "reserved-0x" + Integer.toHexString(i)); } - putFormat(m, 0x25, "(#,##0_);(#,##0)"); - putFormat(m, 0x26, "(#,##0_);[Red](#,##0)"); - putFormat(m, 0x27, "(#,##0.00_);(#,##0.00)"); - putFormat(m, 0x28, "(#,##0.00_);[Red](#,##0.00)"); + putFormat(m, 0x25, "#,##0_);(#,##0)"); + putFormat(m, 0x26, "#,##0_);[Red](#,##0)"); + putFormat(m, 0x27, "#,##0.00_);(#,##0.00)"); + 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);_(*\"-\"??_);_(@_)");