Examples of RecordBase


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

     * @return never <code>null</code>, typically empty array
     */
    public NoteRecord[] getNoteRecords() {
        List<NoteRecord> temp = new ArrayList<NoteRecord>();
        for(int i=records.size()-1; i>=0; i--) {
            RecordBase rec = records.get(i);
            if (rec instanceof NoteRecord) {
                temp.add((NoteRecord) rec);
            }
        }
        if (temp.size() < 1) {
View Full Code Here

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

    HSSFChart lastChart = null;
   
    // Find records of interest
    List records = sheet.getSheet().getRecords();
    for(Iterator it = records.iterator(); it.hasNext();) {
      RecordBase r = (RecordBase)it.next();
     
      if(r instanceof ChartRecord) {
        lastChart = new HSSFChart((ChartRecord)r);
        charts.add(lastChart);
      }
View Full Code Here

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

    HSSFChart lastChart = null;

    // Find records of interest
    List records = sheet.getSheet().getRecords();
    for(Iterator it = records.iterator(); it.hasNext();) {
      RecordBase r = (RecordBase)it.next();

      if(r instanceof ChartRecord) {
        lastChart = new HSSFChart((ChartRecord)r);
        charts.add(lastChart);
      }
View Full Code Here

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

        // TODO - optimise this code by searching backwards, find NoteRecord first, quit if not found. Find one TXO by id
        HSSFComment comment = null;
        ArrayList<TextObjectRecord> noteTxo = new ArrayList<TextObjectRecord>();
        int i = 0;
        for (Iterator<RecordBase> it = sheet.getRecords().iterator(); it.hasNext();) {
            RecordBase rec = it.next();
            if (rec instanceof NoteRecord) {
                NoteRecord note = (NoteRecord) rec;
                if (note.getRow() == row && note.getColumn() == column) {
                    if(i < noteTxo.size()) {
                        TextObjectRecord txo = noteTxo.get(i);
View Full Code Here

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

    /**
     * @return hyperlink associated with this cell or <code>null</code> if not found
     */
    public HSSFHyperlink getHyperlink(){
        for (Iterator<RecordBase> it = _sheet.getSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = it.next();
            if (rec instanceof HyperlinkRecord){
                HyperlinkRecord link = (HyperlinkRecord)rec;
                if(link.getFirstColumn() == _record.getColumn() && link.getFirstRow() == _record.getRow()){
                    return new HSSFHyperlink(link);
                }
View Full Code Here

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

    if (_recs.isEmpty()) {
      return;
    }
    rv.visitRecord(_bofRec);
    for (int i = 0; i < _recs.size(); i++) {
      RecordBase rb = _recs.get(i);
      if (rb instanceof RecordAggregate) {
        ((RecordAggregate) rb).visitContainedRecords(rv);
      } else {
        rv.visitRecord((Record) rb);
      }
View Full Code Here

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

    if(rowCells == null) {
      return 0;
    }
    int result = 0;
    for (int i = 0; i < rowCells.length; i++) {
      RecordBase cvr = (RecordBase) rowCells[i];
      if(cvr == null) {
        continue;
      }
      int nBlank = countBlanks(rowCells, i);
      if (nBlank > 1) {
        result += (10 + 2*nBlank);
        i+=nBlank-1;
      } else {
        result += cvr.getRecordSize();
      }
    }
    return result;
  }
View Full Code Here

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

      throw new IllegalArgumentException("Row [" + rowIndex + "] is empty");
    }


    for (int i = 0; i < rowCells.length; i++) {
      RecordBase cvr = (RecordBase) rowCells[i];
      if(cvr == null) {
        continue;
      }
      int nBlank = countBlanks(rowCells, i);
      if (nBlank > 1) {
View Full Code Here

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

    if (_recs.isEmpty()) {
      return;
    }
    rv.visitRecord(_begin);
    for (int i = 0; i < _recs.size(); i++) {
      RecordBase rb = _recs.get(i);
      if (rb instanceof RecordAggregate) {
        ((RecordAggregate) rb).visitContainedRecords(rv);
      } else {
        rv.visitRecord((Record) rb);
      }
View Full Code Here

Examples of org.zkoss.poi.hssf.record.RecordBase

     */
    private void shiftHyperlinks(int tRow, int bRow, int nRow, int lCol, int rCol, int nCol) {
      final int maxcol = SpreadsheetVersion.EXCEL97.getLastColumnIndex();
      final int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex();
        for (Iterator<RecordBase> it = _helper.getInternalSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = it.next();
            if (rec instanceof HyperlinkRecord){
                final HyperlinkRecord link = (HyperlinkRecord)rec;
                final int col = link.getFirstColumn();
                final int row = link.getFirstRow();
                if (inRange(row, tRow, bRow) && inRange(col, lCol, rCol)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.