Search in sources :

Example 6 with MulBlankRecord

use of org.apache.poi.hssf.record.MulBlankRecord in project poi by apache.

the class TestValueRecordsAggregate method testMultipleBlanks.

/**
	 * Tests various manipulations of blank cells, to make sure that {@link MulBlankRecord}s
	 * are use appropriately
	 */
@Test
public void testMultipleBlanks() {
    BlankRecord brA2 = newBlankRecord(0, 1);
    BlankRecord brB2 = newBlankRecord(1, 1);
    BlankRecord brC2 = newBlankRecord(2, 1);
    BlankRecord brD2 = newBlankRecord(3, 1);
    BlankRecord brE2 = newBlankRecord(4, 1);
    BlankRecord brB3 = newBlankRecord(1, 2);
    BlankRecord brC3 = newBlankRecord(2, 2);
    valueRecord.insertCell(brA2);
    valueRecord.insertCell(brB2);
    valueRecord.insertCell(brD2);
    confirmMulBlank(3, 1, 1);
    valueRecord.insertCell(brC3);
    confirmMulBlank(4, 1, 2);
    valueRecord.insertCell(brB3);
    valueRecord.insertCell(brE2);
    confirmMulBlank(6, 3, 0);
    valueRecord.insertCell(brC2);
    confirmMulBlank(7, 2, 0);
    valueRecord.removeCell(brA2);
    confirmMulBlank(6, 2, 0);
    valueRecord.removeCell(brC2);
    confirmMulBlank(5, 2, 1);
    valueRecord.removeCell(brC3);
    confirmMulBlank(4, 1, 2);
}
Also used : MulBlankRecord(org.apache.poi.hssf.record.MulBlankRecord) BlankRecord(org.apache.poi.hssf.record.BlankRecord) Test(org.junit.Test)

Aggregations

MulBlankRecord (org.apache.poi.hssf.record.MulBlankRecord)6 BlankRecord (org.apache.poi.hssf.record.BlankRecord)5 BOFRecord (org.apache.poi.hssf.record.BOFRecord)3 FormulaRecord (org.apache.poi.hssf.record.FormulaRecord)3 Record (org.apache.poi.hssf.record.Record)3 RowRecord (org.apache.poi.hssf.record.RowRecord)3 StringRecord (org.apache.poi.hssf.record.StringRecord)3 WindowTwoRecord (org.apache.poi.hssf.record.WindowTwoRecord)3 AssertionFailedError (junit.framework.AssertionFailedError)2 LastCellOfRowDummyRecord (org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord)2 MissingCellDummyRecord (org.apache.poi.hssf.eventusermodel.dummyrecord.MissingCellDummyRecord)2 MissingRowDummyRecord (org.apache.poi.hssf.eventusermodel.dummyrecord.MissingRowDummyRecord)2 DimensionsRecord (org.apache.poi.hssf.record.DimensionsRecord)2 NoteRecord (org.apache.poi.hssf.record.NoteRecord)2 NumberRecord (org.apache.poi.hssf.record.NumberRecord)2 SharedFormulaRecord (org.apache.poi.hssf.record.SharedFormulaRecord)2 Test (org.junit.Test)2 EscherDggRecord (org.apache.poi.ddf.EscherDggRecord)1 CellValueRecordInterface (org.apache.poi.hssf.record.CellValueRecordInterface)1 ColumnInfoRecord (org.apache.poi.hssf.record.ColumnInfoRecord)1