use of org.apache.poi.hssf.record.CFHeader12Record in project poi by apache.
the class CFRecordsAggregate method toString.
/**
* String representation of CFRecordsAggregate
*/
public String toString() {
StringBuilder buffer = new StringBuilder();
String type = "CF";
if (header instanceof CFHeader12Record) {
type = "CF12";
}
buffer.append("[").append(type).append("]\n");
if (header != null) {
buffer.append(header);
}
for (CFRuleBase cfRule : rules) {
buffer.append(cfRule);
}
buffer.append("[/").append(type).append("]\n");
return buffer.toString();
}
use of org.apache.poi.hssf.record.CFHeader12Record in project poi by apache.
the class CFRecordsAggregate method createHeader.
private static CFHeaderBase createHeader(CellRangeAddress[] regions, CFRuleBase[] rules) {
final CFHeaderBase header;
if (rules.length == 0 || rules[0] instanceof CFRuleRecord) {
header = new CFHeaderRecord(regions, rules.length);
} else {
header = new CFHeader12Record(regions, rules.length);
}
// set the "needs recalculate" by default to avoid Excel handling conditional formatting incorrectly
// see bug 52122 for details
header.setNeedRecalculation(true);
return header;
}
Aggregations