@Override protected void appendValueText(StringBuilder sb) { if (isBoolean()) { sb.append(" .boolVal = "); sb.append(getBooleanValue()); } else { sb.append(" .errCode = "); sb.append(FormulaError.forInt(getErrorValue()).getString()); sb.append(" (").append(HexDump.byteToHex(getErrorValue())).append(")"); } } @Override
/** * get the value of the cell as a boolean. For strings, numbers, and errors, we throw an exception. * For blank cells we return a false. */ @Override public boolean getBooleanCellValue() { switch(_cellType) { case BLANK: return false; case BOOLEAN: return (( BoolErrRecord ) _record).getBooleanValue(); case FORMULA: break; default: throw typeMismatch(CellType.BOOLEAN, _cellType, false); } FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord(); checkFormulaCachedValueType(CellType.BOOLEAN, fr); return fr.getCachedBooleanValue(); }
return (( BoolErrRecord ) _record).getBooleanValue(); case STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
case BoolErrRecord.sid: // 布尔类型 BoolErrRecord berec = (BoolErrRecord) record; rowCellList.add(berec.getColumn(), berec.getBooleanValue()); break; case FormulaRecord.sid: // 公式类型
case BoolErrRecord.sid: // 布尔类型 BoolErrRecord berec = (BoolErrRecord) record; rowCellList.add(berec.getColumn(), berec.getBooleanValue()); break; case FormulaRecord.sid: // 公式类型
return ""; case BOOLEAN: return ((BoolErrRecord) _record).getBooleanValue() ? "TRUE" : "FALSE"; case STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
@Override protected void appendValueText(StringBuilder sb) { if (isBoolean()) { sb.append(" .boolVal = "); sb.append(getBooleanValue()); } else { sb.append(" .errCode = "); sb.append(ErrorConstants.getText(getErrorValue())); sb.append(" (").append(HexDump.byteToHex(getErrorValue())).append(")"); } } @Override
@Override protected void appendValueText(StringBuilder sb) { if (isBoolean()) { sb.append(" .boolVal = "); sb.append(getBooleanValue()); } else { sb.append(" .errCode = "); sb.append(ErrorConstants.getText(getErrorValue())); sb.append(" (").append(HexDump.byteToHex(getErrorValue())).append(")"); } } @Override
@Override protected void appendValueText(StringBuilder sb) { if (isBoolean()) { sb.append(" .boolVal = "); sb.append(getBooleanValue()); } else { sb.append(" .errCode = "); sb.append(FormulaError.forInt(getErrorValue()).getString()); sb.append(" (").append(HexDump.byteToHex(getErrorValue())).append(")"); } } @Override
/** * get the value of the cell as a boolean. For strings, numbers, and errors, we throw an exception. * For blank cells we return a false. */ @Override public boolean getBooleanCellValue() { switch(_cellType) { case BLANK: return false; case BOOLEAN: return (( BoolErrRecord ) _record).getBooleanValue(); case FORMULA: break; default: throw typeMismatch(CellType.BOOLEAN, _cellType, false); } FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord(); checkFormulaCachedValueType(CellType.BOOLEAN, fr); return fr.getCachedBooleanValue(); }
/** * get the value of the cell as a boolean. For strings, numbers, and errors, we throw an exception. * For blank cells we return a false. */ public boolean getBooleanCellValue() { switch(_cellType) { case CELL_TYPE_BLANK: return false; case CELL_TYPE_BOOLEAN: return (( BoolErrRecord ) _record).getBooleanValue(); default: throw typeMismatch(CELL_TYPE_BOOLEAN, _cellType, false); case CELL_TYPE_FORMULA: break; } FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord(); checkFormulaCachedValueType(CELL_TYPE_BOOLEAN, fr); return fr.getCachedBooleanValue(); }
/** * get the value of the cell as a boolean. For strings, numbers, and errors, we throw an exception. * For blank cells we return a false. */ public boolean getBooleanCellValue() { switch(_cellType) { case CELL_TYPE_BLANK: return false; case CELL_TYPE_BOOLEAN: return (( BoolErrRecord ) _record).getBooleanValue(); default: throw typeMismatch(CELL_TYPE_BOOLEAN, _cellType, false); case CELL_TYPE_FORMULA: break; } FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord(); checkFormulaCachedValueType(CELL_TYPE_BOOLEAN, fr); return fr.getCachedBooleanValue(); }
return (( BoolErrRecord ) _record).getBooleanValue(); case STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
return (( BoolErrRecord ) _record).getBooleanValue(); case CELL_TYPE_STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
return (( BoolErrRecord ) _record).getBooleanValue(); case CELL_TYPE_STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
case BoolErrRecord.sid: // 布尔类型 BoolErrRecord berec = (BoolErrRecord) record; rowCellList.add(berec.getColumn(), berec.getBooleanValue()); break; case FormulaRecord.sid: // 公式类型
return ""; case CELL_TYPE_BOOLEAN: return ((BoolErrRecord) _record).getBooleanValue() ? "TRUE" : "FALSE"; case CELL_TYPE_STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
return ""; case CELL_TYPE_BOOLEAN: return ((BoolErrRecord) _record).getBooleanValue() ? "TRUE" : "FALSE"; case CELL_TYPE_STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
return ""; case BOOLEAN: return ((BoolErrRecord) _record).getBooleanValue() ? "TRUE" : "FALSE"; case STRING: int sstIndex = ((LabelSSTRecord)_record).getSSTIndex();
final BoolErrRecord brec = (BoolErrRecord) cell; if (brec.isBoolean()) { return brec.getBooleanValue(); } else { return FormulaError.forInt(brec.getErrorValue()).getString();