package jxl.read.biff;

import jxl.CellType;
import jxl.LabelCell;
import jxl.WorkbookSettings;
import jxl.biff.FormattingRecords;
import jxl.biff.IntegerHelper;
import jxl.biff.StringHelper;

/* JADX INFO: loaded from: classes.dex */
public class LabelRecord extends CellValue implements LabelCell {
    public static Biff7 biff7 = new Biff7();
    private int length;
    private String string;

    public static class Biff7 {
        private Biff7() {
        }
    }

    public LabelRecord(Record record, FormattingRecords formattingRecords, SheetImpl sheetImpl, WorkbookSettings workbookSettings) {
        super(record, formattingRecords, sheetImpl);
        byte[] data = getRecord().getData();
        int i2 = IntegerHelper.getInt(data[6], data[7]);
        this.length = i2;
        if (data[8] == 0) {
            this.string = StringHelper.getString(data, i2, 9, workbookSettings);
        } else {
            this.string = StringHelper.getUnicodeString(data, i2, 9);
        }
    }

    @Override // jxl.read.biff.CellValue, jxl.Cell
    public String getContents() {
        return this.string;
    }

    @Override // jxl.LabelCell
    public String getString() {
        return this.string;
    }

    @Override // jxl.read.biff.CellValue, jxl.Cell
    public CellType getType() {
        return CellType.LABEL;
    }

    public LabelRecord(Record record, FormattingRecords formattingRecords, SheetImpl sheetImpl, WorkbookSettings workbookSettings, Biff7 biff72) {
        super(record, formattingRecords, sheetImpl);
        byte[] data = getRecord().getData();
        int i2 = IntegerHelper.getInt(data[6], data[7]);
        this.length = i2;
        this.string = StringHelper.getString(data, i2, 8, workbookSettings);
    }
}
