import java.util.List;
import org.apache.poi.hssf.record.BOFRecord;
+import org.apache.poi.hssf.record.CFHeader12Record;
import org.apache.poi.hssf.record.CFHeaderRecord;
import org.apache.poi.hssf.record.CalcCountRecord;
import org.apache.poi.hssf.record.CalcModeRecord;
while (rs.hasNext()) {
int recSid = rs.peekNextSid();
- if ( recSid == CFHeaderRecord.sid ) {
+ if ( recSid == CFHeaderRecord.sid || recSid == CFHeader12Record.sid ) {
condFormatting = new ConditionalFormattingTable(rs);
records.add(condFormatting);
continue;
public boolean getNeedRecalculation() {
// Held on the 1st bit
- return field_2_need_recalculation_and_id % 2 == 1;
+ return (field_2_need_recalculation_and_id & 1) == 1;
}
public void setNeedRecalculation(boolean b) {
// held on the first bit
- if (b == getNeedRecalculation()) return;
- if (b) field_2_need_recalculation_and_id++;
- else field_2_need_recalculation_and_id--;
+ if (b == getNeedRecalculation()) {
+ return;
+ } else if (b) {
+ field_2_need_recalculation_and_id++;
+ } else {
+ field_2_need_recalculation_and_id--;
+ }
}
public int getID() {
// Remaining 15 bits of field 2
boolean needsRecalc = getNeedRecalculation();
field_2_need_recalculation_and_id = (id<<1);
- if (needsRecalc) field_2_need_recalculation_and_id++;
+ if (needsRecalc) {
+ field_2_need_recalculation_and_id++;
+ }
}
public CellRangeAddress getEnclosingCellRange() {