Enable CFRule12 use #58130
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
010e67c749
commit
72f0f10882
@ -179,6 +179,8 @@ public final class BiffViewer {
|
||||
case CFHeaderRecord.sid: return new CFHeaderRecord(in);
|
||||
case CFHeader12Record.sid: return new CFHeader12Record(in);
|
||||
case CFRuleRecord.sid: return new CFRuleRecord(in);
|
||||
case CFRule12Record.sid: return new CFRule12Record(in);
|
||||
// TODO Add CF Ex, and remove from UnknownRecord
|
||||
case CalcCountRecord.sid: return new CalcCountRecord(in);
|
||||
case CalcModeRecord.sid: return new CalcModeRecord(in);
|
||||
case CategorySeriesAxisRecord.sid:return new CategorySeriesAxisRecord(in);
|
||||
|
@ -347,7 +347,7 @@ public abstract class CFRuleBase extends StandardRecord {
|
||||
}
|
||||
|
||||
protected int getFormattingBlockSize() {
|
||||
return
|
||||
return 6 +
|
||||
(containsFontFormattingBlock()?_fontFormatting.getRawRecord().length:0)+
|
||||
(containsBorderFormattingBlock()?8:0)+
|
||||
(containsPatternFormattingBlock()?4:0);
|
||||
|
@ -114,7 +114,7 @@ public final class CFRuleRecord extends CFRuleBase {
|
||||
}
|
||||
|
||||
protected int getDataSize() {
|
||||
return 12 + getFormattingBlockSize() +
|
||||
return 6 + getFormattingBlockSize() +
|
||||
getFormulaSize(getFormula1())+
|
||||
getFormulaSize(getFormula2());
|
||||
}
|
||||
|
@ -151,6 +151,7 @@ public final class RecordFactory {
|
||||
CFHeaderRecord.class,
|
||||
CFHeader12Record.class,
|
||||
CFRuleRecord.class,
|
||||
CFRule12Record.class,
|
||||
ChartRecord.class,
|
||||
ChartTitleFormatRecord.class,
|
||||
CodepageRecord.class,
|
||||
|
@ -402,8 +402,7 @@ public final class TestCFRuleRecord extends TestCase {
|
||||
assertArrayEquals(serializedRecord, serializedClone);
|
||||
}
|
||||
|
||||
// TODO Fix this test!
|
||||
public void IGNORED_testBug57231_rewrite() {
|
||||
public void testBug57231_rewrite() {
|
||||
HSSFWorkbook wb = HSSFITestDataProvider.instance.openSampleWorkbook("57231_MixedGasReport.xls");
|
||||
assertEquals(7, wb.getNumberOfSheets());
|
||||
wb = HSSFITestDataProvider.instance.writeOutAndReadBack(wb);
|
||||
|
Loading…
Reference in New Issue
Block a user