(cellRefs.length * CellRangeAddress.ENCODED_SIZE)
+rgbFeat.length;
}
+
+ public int getIsf_sharedFeatureType() {
+ return isf_sharedFeatureType;
+ }
+ public void setIsf_sharedFeatureType(int isfSharedFeatureType) {
+ isf_sharedFeatureType = isfSharedFeatureType;
+ }
+
+ public long getCbFeatData() {
+ return cbFeatData;
+ }
+ public void setCbFeatData(long cbFeatData) {
+ this.cbFeatData = cbFeatData;
+ }
+
+ public CellRangeAddress[] getCellRefs() {
+ return cellRefs;
+ }
+ public void setCellRefs(CellRangeAddress[] cellRefs) {
+ this.cellRefs = cellRefs;
+ }
+
+ public byte[] getRgbFeat() {
+ return rgbFeat;
+ }
+ public void setRgbFeat(byte[] rgbFeat) {
+ this.rgbFeat = rgbFeat;
+
+ if(isf_sharedFeatureType == FeatHdrRecord.SHAREDFEATURES_ISFFEC2) {
+ cbFeatData = rgbFeat.length;
+ } else {
+ cbFeatData = 0;
+ }
+ }
}
InternalWorkbook wb = HSSFTestHelper.getWorkbookForTest(hssf);
FeatRecord fr = null;
+ FeatHdrRecord fhr = null;
assertEquals(1, hssf.getNumberOfSheets());
countFR++;
}
if(r instanceof FeatHdrRecord) {
+ fhr = (FeatHdrRecord)r;
countFRH++;
} else if (r.getSid() == FeatHdrRecord.sid) {
countFRH++;
assertEquals(1, countFR);
assertEquals(1, countFRH);
assertNotNull(fr);
+ assertNotNull(fhr);
// Now check the contents are as expected
+ assertEquals(
+ FeatHdrRecord.SHAREDFEATURES_ISFFEC2,
+ fr.getIsf_sharedFeatureType()
+ );
+
+ // Applies to one cell only
+ assertEquals(1, fr.getCellRefs().length);
+ assertEquals(0, fr.getCellRefs()[0].getFirstRow());
+ assertEquals(0, fr.getCellRefs()[0].getLastRow());
+ assertEquals(0, fr.getCellRefs()[0].getFirstColumn());
+ assertEquals(0, fr.getCellRefs()[0].getLastColumn());
+
+ // TODO - more checking of shared features stuff
+ assertEquals(4, fr.getCbFeatData());
+ assertEquals(4, fr.getRgbFeat().length);
}
}