View | Details | Raw Unified | Return to bug 10735
Collapse All | Expand All

(-)jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java (-2 / +11 lines)
Lines 89-94 Link Here
89
    
89
    
90
    private String formulaString;
90
    private String formulaString;
91
    private int pointer=0;
91
    private int pointer=0;
92
    private int formulaLength;
92
    
93
    
93
    private List tokens = new java.util.Stack();
94
    private List tokens = new java.util.Stack();
94
    //private Stack tokens = new java.util.Stack();
95
    //private Stack tokens = new java.util.Stack();
Lines 112-122 Link Here
112
        formulaString = formula;
113
        formulaString = formula;
113
        pointer=0;
114
        pointer=0;
114
        this.book = book;
115
        this.book = book;
116
	formulaLength = formulaString.length();
115
    }
117
    }
116
    
118
    
117
119
118
    /** Read New Character From Input Stream */
120
    /** Read New Character From Input Stream */
119
    private void GetChar() {
121
    private void GetChar() {
122
        // Check to see if we've walked off the end of the string.
123
	// Just return if so and reset Look to smoething to keep 
124
	// SkipWhitespace from spinning
125
        if (pointer == formulaLength) {
126
            Look = (char)0;
127
	    return;
128
	}
120
        Look=formulaString.charAt(pointer++);
129
        Look=formulaString.charAt(pointer++);
121
        //System.out.println("Got char: "+Look);
130
        //System.out.println("Got char: "+Look);
122
    }
131
    }
Lines 419-426 Link Here
419
        while (IsAddop(Look)) {
428
        while (IsAddop(Look)) {
420
            if ( Look == '+' )  Add();
429
            if ( Look == '+' )  Add();
421
            if (Look == '-') Subtract();
430
            if (Look == '-') Subtract();
422
            // if (Look == '*') Multiply();
431
            if (Look == '*') Multiply();
423
           // if (Look == '/') Divide();
432
            if (Look == '/') Divide();
424
        }
433
        }
425
    }
434
    }
426
    
435
    

Return to bug 10735