cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/model TestFormulaParser.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/model TestFormulaParser.java

AviK-5
avik        2005/05/31 12:10:47

  Modified:    src/java/org/apache/poi/hssf/model FormulaParser.java
               src/testcases/org/apache/poi/hssf/model
                        TestFormulaParser.java
  Log:
  bug 35084, reported by Stefano Rocca. fixed in Sheet.java
 
  Revision  Changes    Path
  1.21      +1 -1      jakarta-poi/src/java/org/apache/poi/hssf/model/FormulaParser.java
 
  Index: FormulaParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/model/FormulaParser.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FormulaParser.java 18 May 2005 18:58:57 -0000 1.20
  +++ FormulaParser.java 31 May 2005 19:10:47 -0000 1.21
  @@ -129,7 +129,7 @@
   
       /** Recognize an Alpha Character */
       private boolean IsAlpha(char c) {
  -        return Character.isLetter(c) || c == '$';
  +        return Character.isLetter(c) || c == '$' || c=='_';
       }
       
       
 
 
 
  1.17      +15 -0     jakarta-poi/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
 
  Index: TestFormulaParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestFormulaParser.java 18 May 2005 18:58:57 -0000 1.16
  +++ TestFormulaParser.java 31 May 2005 19:10:47 -0000 1.17
  @@ -388,6 +388,21 @@
           assertTrue("IntPtg",(ptgs[1] instanceof IntPtg));
           assertTrue("DividePtg",(ptgs[2] instanceof DividePtg));
    }
  +
  + /** bug 35027, underscore in sheet name*/
  + public void testUnderscore() {
  + HSSFWorkbook wb = new HSSFWorkbook();
  +    
  +     wb.createSheet("Cash_Flow");;
  +    
  +     HSSFSheet sheet = wb.createSheet("Test");
  +     HSSFRow row = sheet.createRow(0);
  +     HSSFCell cell;
  +    
  +     cell = row.createCell((short)0);
  +     cell.setCellFormula("Cash_Flow!A1");
  +
  + }
   
        public static void main(String [] args) {
           System.out.println("Testing org.apache.poi.hssf.record.formula.FormulaParser");
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/