Examples of NoteRecord


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

      } else {
        thisStr = '"' + sstRecord.getString(lsrec.getSSTIndex()).toString() + '"';
      }
      break;
    case NoteRecord.sid:
      NoteRecord nrec = (NoteRecord) record;

      thisRow = nrec.getRow();
      thisColumn = nrec.getColumn();
      // TODO: Find object to match nrec.getShapeId()
      thisStr = '"' + "(TODO)" + '"';
      break;
    case NumberRecord.sid:
      NumberRecord numrec = (NumberRecord) record;
View Full Code Here

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

                               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());
                        if(txo != null){
                            comment = new HSSFComment(note, txo);
                            comment.setRow(note.getRow());
                            comment.setColumn(note.getColumn());
                            comment.setAuthor(note.getAuthor());
                            comment.setVisible(note.getFlags() == NoteRecord.NOTE_VISIBLE);
                            comment.setString(txo.getStr());    
                        } else{
                            log.log(POILogger.WARN, "Failed to match NoteRecord and TextObjectRecord, row: " + row + ", column: " + column);
                         }
                    } else {
View Full Code Here

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

            //  destination row. Note that comments can
            //  exist for cells which are null
            if(moveComments) {
                // This code would get simpler if NoteRecords could be organised by HSSFRow.
                for(int i=noteRecs.length-1; i>=0; i--) {
                    NoteRecord nr = noteRecs[i];
                    if (nr.getRow() != rowNum) {
                        continue;
                    }
                    HSSFComment comment = getCellComment(rowNum, nr.getColumn());
                    if (comment != null) {
                       comment.setRow(rowNum + n);
                    }
                }
            }
View Full Code Here

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

      } else {
        thisStr = '"' + sstRecord.getString(lsrec.getSSTIndex()).toString() + '"';
      }
      break;
    case NoteRecord.sid:
      NoteRecord nrec = (NoteRecord) record;

      thisRow = nrec.getRow();
      thisColumn = nrec.getColumn();
      // TODO: Find object to match nrec.getShapeId()
      thisStr = '"' + "(TODO)" + '"';
      break;
    case NumberRecord.sid:
      NumberRecord numrec = (NumberRecord) record;
View Full Code Here

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

        obj.addSubRecord(e);
        return obj;
    }

    private NoteRecord createNoteRecord(){
        NoteRecord note = new NoteRecord();
        note.setFlags(NoteRecord.NOTE_HIDDEN);
        note.setAuthor("");
        return note;
    }
View Full Code Here

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

        TextObjectRecord txo = (TextObjectRecord) getTextObjectRecord().cloneViaReserialise();
        EscherContainerRecord spContainer = new EscherContainerRecord();
        byte [] inSp = getEscherContainer().serialize();
        spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory());
        ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise();
        NoteRecord note = (NoteRecord) getNoteRecord().cloneViaReserialise();
        return new HSSFComment(spContainer, obj, txo, note);
    }
View Full Code Here

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

            //  destination row. Note that comments can
            //  exist for cells which are null
            if(moveComments) {
                // This code would get simpler if NoteRecords could be organised by HSSFRow.
                for(int i=noteRecs.length-1; i>=0; i--) {
                    NoteRecord nr = noteRecs[i];
                    if (nr.getRow() != rowNum) {
                        continue;
                    }
                    HSSFComment comment = getCellComment(rowNum, nr.getColumn());
                    if (comment != null) {
                       comment.setRow(rowNum + n);
                    }
                }
            }
View Full Code Here

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

              // Move comments from the source column to the
              //  destination column. Note that comments can
              //  exist for cells which are null
              if(moveComments) {
                  for(int i=noteRecs.length-1; i>=0; i--) {
                      NoteRecord nr = noteRecs[i];
                      if (nr.getColumn() != colNum) {
                          continue;
                      }
                      HSSFComment comment = getCellComment(nr.getRow(), colNum);
                      if (comment != null) {
                         comment.setColumn(newColNum);
                      }
                  }
              }
View Full Code Here

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

              // Move comments from the source column to the
              //  destination column. Note that comments can
              //  exist for cells which are null
              if(moveComments) {
                  for(int i=noteRecs.length-1; i>=0; i--) {
                      NoteRecord nr = noteRecs[i];
                      if (nr.getColumn() != colNum || nr.getRow() < tRow || nr.getRow() > bRow) { //not in range
                          continue;
                      }
                      HSSFComment comment = getCellComment(nr.getRow(), colNum);
                      if (comment != null) {
                         comment.setColumn(newColNum);
                      }
                  }
              }
View Full Code Here

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

            //  destination row. Note that comments can
            //  exist for cells which are null
            if(moveComments) {
                // This code would get simpler if NoteRecords could be organised by HSSFRow.
                for(int i=noteRecs.length-1; i>=0; i--) {
                    NoteRecord nr = noteRecs[i];
                    if (nr.getRow() != rowNum || nr.getColumn() < lCol || nr.getColumn() > rCol) {
                        continue;
                    }
                    HSSFComment comment = getCellComment(rowNum, nr.getColumn());
                    if (comment != null) {
                       comment.setRow(rowNum + n);
                    }
                }
            }
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.