Author: centic
Date: Fri Mar 19 09:40:10 2021
New Revision: 1887802

URL: http://svn.apache.org/viewvc?rev=1887802&view=rev
Log:
Allow negative numbers in conditional part of format string

Closes #229

Modified:
    poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java
    poi/trunk/test-data/spreadsheet/FormatConditionTests.xlsx

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java?rev=1887802&r1=1887801&r2=1887802&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java Fri Mar 19 
09:40:10 2021
@@ -108,7 +108,7 @@ public class CellFormatPart {
     static {
         // A condition specification
         String condition = "([<>=]=?|!=|<>)    # The operator\n" +
-                "  \\s*([0-9]+(?:\\.[0-9]*)?)\\s*  # The constant to test 
against\n";
+                "  \\s*(-?[0-9]+(?:\\.[0-9]*)?)\\s*  # The constant to test 
against\n";
 
         // A currency symbol / string, in a specific locale
         String currency = "(\\[\\$.{0,3}-[0-9a-f]{3}\\])";

Modified: poi/trunk/test-data/spreadsheet/FormatConditionTests.xlsx
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/FormatConditionTests.xlsx?rev=1887802&r1=1887801&r2=1887802&view=diff
==============================================================================
Binary files - no diff available.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to