LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, ( short ) 16);
LittleEndian.putShort(data, 4 + offset, getRowNumber());
- LittleEndian.putShort(data, 6 + offset, getFirstCol());
- LittleEndian.putShort(data, 8 + offset, getLastCol());
+ LittleEndian.putShort(data, 6 + offset, getFirstCol() == -1 ? (short)0 : getFirstCol());
+ LittleEndian.putShort(data, 8 + offset, getLastCol() == -1 ? (short)0 : getLastCol());
LittleEndian.putShort(data, 10 + offset, getHeight());
LittleEndian.putShort(data, 12 + offset, getOptimize());
LittleEndian.putShort(data, 14 + offset, field_6_reserved);
* get the hssfcell representing a given column (logical cell) 0-based. If you
* ask for a cell that is not defined....you get a null.
*
- * @param cellnum - 0 based column number
- * @returns HSSFCell representing that column or null if undefined.
+ * @param cellnum 0 based column number
+ * @return HSSFCell representing that column or null if undefined.
*/
public HSSFCell getCell(short cellnum)
}
/**
- * @returns cell iterator of the physically defined cells. Note element 4 may
+ * @return cell iterator of the physically defined cells. Note element 4 may
* actually be row cell depending on how many are defined!
*/
assertEquals(-1, row.getLastCellNum());
assertEquals(-1, row.getFirstCellNum());
+ // check the row record actually writes it out as 0's
+ byte[] data = new byte[100];
+ row.getRowRecord().serialize(0, data);
+ assertEquals(0, data[6]);
+ assertEquals(0, data[8]);
+
}
}
import org.apache.poi.hssf.model.Sheet;
import org.apache.poi.hssf.record.VCenterRecord;
import org.apache.poi.hssf.record.WSBoolRecord;
+import org.apache.poi.hssf.record.RowRecord;
import org.apache.poi.hssf.dev.BiffViewer;
import java.io.File;
}
+
}