Package org.apache.poi.hssf.record

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


        HSSFComment comment = null;
        Map<Integer, TextObjectRecord> noteTxo =
                               new HashMap<Integer, 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(note.getShapeId());
View Full Code Here

    /**
     * @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

    if (!(records.get(i) instanceof EOFRecord)) {
      throw new IllegalStateException("Last sheet record should be EOFRecord");
    }
    while (i > 0) {
      i--;
      RecordBase rb = records.get(i);
      if (isDVTPriorRecord(rb)) {
        Record nextRec = (Record) records.get(i + 1);
        if (!isDVTSubsequentRecord(nextRec.getSid())) {
          throw new IllegalStateException("Unexpected (" + nextRec.getClass().getName()
              + ") found after (" + rb.getClass().getName() + ")");
        }
        return i+1;
      }
      Record rec = (Record) rb;
      if (!isDVTSubsequentRecord(rec.getSid())) {
View Full Code Here

  private static int getGutsRecordInsertPos(List<RecordBase> records) {
    int dimensionsIndex = getDimensionsIndex(records);
    int i = dimensionsIndex-1;
    while (i > 0) {
      i--;
      RecordBase rb = records.get(i);
      if (isGutsPriorRecord(rb)) {
        return i+1;
      }
    }
    throw new RuntimeException("Did not find insert point for GUTS");
View Full Code Here

    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

      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

    /**
     * @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

    /**
     * @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

    /**
     * Removes the hyperlink for this cell, if there is one.
     */
    public void removeHyperlink() {
        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()) {
                    it.remove();
                    return;
View Full Code Here

TOP

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

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.