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

(-)java/org/apache/poi/hssf/record/SharedFormulaRecord.java (-3 / +7 lines)
Lines 144-157 Link Here
144
144
145
    /**
145
    /**
146
     * @return the equivalent {@link Ptg} array that the formula would have, were it not shared.
146
     * @return the equivalent {@link Ptg} array that the formula would have, were it not shared.
147
     * 
148
     * Modified 6/17/09 by Udalov Pete - wrong checks. There is problem in evaluation of similar sheets
149
     *  in one workbook(One sheet expands another).
150
     *  
147
     */
151
     */
148
    public Ptg[] getFormulaTokens(FormulaRecord formula) {
152
    public Ptg[] getFormulaTokens(FormulaRecord formula) {
149
        int formulaRow = formula.getRow();
153
        int formulaRow = formula.getRow();
150
        int formulaColumn = formula.getColumn();
154
        int formulaColumn = formula.getColumn();
151
        //Sanity checks
155
        //Sanity checks
152
        if (!isInRange(formulaRow, formulaColumn)) {
156
//        if (!isInRange(formulaRow, formulaColumn)) {
153
            throw new RuntimeException("Shared Formula Conversion: Coding Error");
157
//            throw new RuntimeException("Shared Formula Conversion: Coding Error");
154
        }
158
//        }
155
159
156
        return convertSharedFormulas(field_7_parsed_expr.getTokens(), formulaRow, formulaColumn);
160
        return convertSharedFormulas(field_7_parsed_expr.getTokens(), formulaRow, formulaColumn);
157
    }
161
    }

Return to bug 47747