Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.BlankRecord


        iterator = valueRecord.getIterator();
        assertTrue( iterator.hasNext() );
    }

    public void testRemoveCell() {
        BlankRecord blankRecord1 = newBlankRecord();
        valueRecord.insertCell( blankRecord1 );
        BlankRecord blankRecord2 = newBlankRecord();
        valueRecord.removeCell( blankRecord2 );
        Iterator iterator = valueRecord.getIterator();
        assertFalse( iterator.hasNext() );

        // removing an already empty cell just falls through
View Full Code Here


        valueRecord.removeCell( blankRecord2 );
    }

    public void testGetPhysicalNumberOfCells() {
        assertEquals(0, valueRecord.getPhysicalNumberOfCells());
        BlankRecord blankRecord1 = newBlankRecord();
        valueRecord.insertCell( blankRecord1 );
        assertEquals(1, valueRecord.getPhysicalNumberOfCells());
        valueRecord.removeCell( blankRecord1 );
        assertEquals(0, valueRecord.getPhysicalNumberOfCells());
    }
View Full Code Here

        return newBlankRecord( 2, 2 );
    }

    private static BlankRecord newBlankRecord( int col, int row)
    {
        BlankRecord blankRecord = new BlankRecord();
        blankRecord.setRow( row );
        blankRecord.setColumn( (short) col );
        return blankRecord;
    }
View Full Code Here

        Sheet sheet = Sheet.createSheet();

        RowRecord rr = new RowRecord(5);
        sheet.addRow(rr);

        CellValueRecordInterface cvr = new BlankRecord();
        cvr.setColumn((short)0);
        cvr.setRow(5);
        sheet.addValueRecord(5, cvr);


        int dbCellRecordPos = getDbCellRecordPos(sheet);
        if (dbCellRecordPos == 252) {
View Full Code Here

    case SSTRecord.sid:
      sstRecord = (SSTRecord) record;
      break;

    case BlankRecord.sid:
      BlankRecord brec = (BlankRecord) record;

      thisRow = brec.getRow();
      thisColumn = brec.getColumn();
      thisStr = "";
      break;
    case BoolErrRecord.sid:
      BoolErrRecord berec = (BoolErrRecord) record;
View Full Code Here

                }
                _record = lrec;
                break;

            case CELL_TYPE_BLANK :
                BlankRecord brec = null;

                if (cellType != _cellType)
                {
                    brec = new BlankRecord();
                }
                else
                {
                    brec = ( BlankRecord ) _record;
                }
                brec.setColumn(col);

                // During construction the cellStyle may be null for a Blank cell.
                brec.setXFIndex(styleIndex);
                brec.setRow(row);
                _record = brec;
                break;

            case CELL_TYPE_BOOLEAN :
                BoolErrRecord boolRec = null;
View Full Code Here

  }

  private static List<Record> testData() {
    List<Record> records = new ArrayList<Record>();
    FormulaRecord formulaRecord = new FormulaRecord();
    BlankRecord blankRecord = new BlankRecord();
    formulaRecord.setRow(1);
    formulaRecord.setColumn((short) 1);
    blankRecord.setRow(2);
    blankRecord.setColumn((short) 2);
    records.add(formulaRecord);
    records.add(blankRecord);
    records.add(new WindowTwoRecord());
    return records;
  }
View Full Code Here

    @SuppressWarnings("deprecation") // uses deprecated {@link ValueRecordsAggregate#getValueRecords()}
  public void testInsertCell() {
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    assertEquals(0, cvrs.length);

    BlankRecord blankRecord = newBlankRecord();
    valueRecord.insertCell( blankRecord );
    cvrs = valueRecord.getValueRecords();
    assertEquals(1, cvrs.length);
  }
View Full Code Here

    assertEquals(1, cvrs.length);
  }

    @SuppressWarnings("deprecation") // uses deprecated {@link ValueRecordsAggregate#getValueRecords()}
  public void testRemoveCell() {
    BlankRecord blankRecord1 = newBlankRecord();
    valueRecord.insertCell( blankRecord1 );
    BlankRecord blankRecord2 = newBlankRecord();
    valueRecord.removeCell( blankRecord2 );
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    assertEquals(0, cvrs.length);

    // removing an already empty cell just falls through
View Full Code Here

    valueRecord.removeCell( blankRecord2 );
  }

  public void testGetPhysicalNumberOfCells() {
    assertEquals(0, valueRecord.getPhysicalNumberOfCells());
    BlankRecord blankRecord1 = newBlankRecord();
    valueRecord.insertCell( blankRecord1 );
    assertEquals(1, valueRecord.getPhysicalNumberOfCells());
    valueRecord.removeCell( blankRecord1 );
    assertEquals(0, valueRecord.getPhysicalNumberOfCells());
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.BlankRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.