aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-07-13 18:09:12 +0000
committerNick Burch <nick@apache.org>2015-07-13 18:09:12 +0000
commit35e6255609427defb3dbd3b06ed8098b61cea78c (patch)
treeedaf063281b7f7c8d87d87379516266a8866ecd4 /src/java
parentd33eaaf6456821376fcfab8b67ec8d8af8177e17 (diff)
downloadpoi-35e6255609427defb3dbd3b06ed8098b61cea78c.tar.gz
poi-35e6255609427defb3dbd3b06ed8098b61cea78c.zip
Enable CFRule12 use #58130
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690783 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/hssf/dev/BiffViewer.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/CFRuleBase.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/CFRuleRecord.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/RecordFactory.java1
4 files changed, 5 insertions, 2 deletions
diff --git a/src/java/org/apache/poi/hssf/dev/BiffViewer.java b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
index 58753048c7..3afd25a4ac 100644
--- a/src/java/org/apache/poi/hssf/dev/BiffViewer.java
+++ b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
@@ -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);
diff --git a/src/java/org/apache/poi/hssf/record/CFRuleBase.java b/src/java/org/apache/poi/hssf/record/CFRuleBase.java
index b7db3a7a09..449594414f 100644
--- a/src/java/org/apache/poi/hssf/record/CFRuleBase.java
+++ b/src/java/org/apache/poi/hssf/record/CFRuleBase.java
@@ -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);
diff --git a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java
index a00fde7311..52678c0fda 100644
--- a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java
+++ b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java
@@ -114,7 +114,7 @@ public final class CFRuleRecord extends CFRuleBase {
}
protected int getDataSize() {
- return 12 + getFormattingBlockSize() +
+ return 6 + getFormattingBlockSize() +
getFormulaSize(getFormula1())+
getFormulaSize(getFormula2());
}
diff --git a/src/java/org/apache/poi/hssf/record/RecordFactory.java b/src/java/org/apache/poi/hssf/record/RecordFactory.java
index 6163fc0009..c1a0f5707e 100644
--- a/src/java/org/apache/poi/hssf/record/RecordFactory.java
+++ b/src/java/org/apache/poi/hssf/record/RecordFactory.java
@@ -151,6 +151,7 @@ public final class RecordFactory {
CFHeaderRecord.class,
CFHeader12Record.class,
CFRuleRecord.class,
+ CFRule12Record.class,
ChartRecord.class,
ChartTitleFormatRecord.class,
CodepageRecord.class,