package jxl.biff.formula;

import common.Assert;
import common.Logger;
import jxl.Cell;
import jxl.WorkbookSettings;
import jxl.biff.WorkbookMethods;

/* JADX INFO: loaded from: classes.dex */
public class FormulaParser {
    static /* synthetic */ Class class$jxl$biff$formula$FormulaParser;
    private static final Logger logger;
    private Parser parser;

    static {
        Class clsClass$ = class$jxl$biff$formula$FormulaParser;
        if (clsClass$ == null) {
            clsClass$ = class$("jxl.biff.formula.FormulaParser");
            class$jxl$biff$formula$FormulaParser = clsClass$;
        }
        logger = Logger.getLogger(clsClass$);
    }

    public FormulaParser(byte[] bArr, Cell cell, ExternalSheet externalSheet, WorkbookMethods workbookMethods, WorkbookSettings workbookSettings) throws FormulaException {
        if (externalSheet.getWorkbookBof() != null && !externalSheet.getWorkbookBof().isBiff8()) {
            throw new FormulaException(FormulaException.BIFF8_SUPPORTED);
        }
        Assert.verify(workbookMethods != null);
        this.parser = new TokenFormulaParser(bArr, cell, externalSheet, workbookMethods, workbookSettings);
    }

    static /* synthetic */ Class class$(String str) {
        try {
            return Class.forName(str);
        } catch (ClassNotFoundException e) {
            throw new NoClassDefFoundError(e.getMessage());
        }
    }

    public void adjustRelativeCellReferences(int i2, int i3) {
        this.parser.adjustRelativeCellReferences(i2, i3);
    }

    public void columnInserted(int i2, int i3, boolean z) {
        this.parser.columnInserted(i2, i3, z);
    }

    public void columnRemoved(int i2, int i3, boolean z) {
        this.parser.columnRemoved(i2, i3, z);
    }

    public byte[] getBytes() {
        return this.parser.getBytes();
    }

    public String getFormula() throws FormulaException {
        return this.parser.getFormula();
    }

    public boolean handleImportedCellReferences() {
        return this.parser.handleImportedCellReferences();
    }

    public void parse() throws FormulaException {
        this.parser.parse();
    }

    public void rowInserted(int i2, int i3, boolean z) {
        this.parser.rowInserted(i2, i3, z);
    }

    public void rowRemoved(int i2, int i3, boolean z) {
        this.parser.rowRemoved(i2, i3, z);
    }

    public FormulaParser(String str, ExternalSheet externalSheet, WorkbookMethods workbookMethods, WorkbookSettings workbookSettings) {
        this.parser = new StringFormulaParser(str, externalSheet, workbookMethods, workbookSettings);
    }
}
