Examples of LabelSSTRecord


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

            LabelRecord lrec = (LabelRecord) record;
              thisRow = lrec.getRow();
              thisText = lrec.getValue();
              break;
          case LabelSSTRecord.sid:
            LabelSSTRecord lsrec = (LabelSSTRecord) record;
              thisRow = lsrec.getRow();
              if(sstRecord == null) {
                throw new IllegalStateException("No SST record found");
              }
              thisText = sstRecord.getString(lsrec.getSSTIndex()).toString();
              break;
          case NoteRecord.sid:
            NoteRecord nrec = (NoteRecord) record;
            thisRow = nrec.getRow();
            // TODO: Find object to match nrec.getShapeId()
View Full Code Here

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

   
    // Find the cell at 0,0
    int cell00 = -1;
    for(int i=0; i<r.length; i++) {
      if(r[i] instanceof LabelSSTRecord) {
        LabelSSTRecord lr = (LabelSSTRecord)r[i];
        if(lr.getRow() == 0 && lr.getColumn() == 0) { cell00 = i; }
      }
    }
    assertTrue(cell00 > -1);
   
    // We have rows 0, 1, 2, 20 and 21
View Full Code Here

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

   
    // Find the cell at 0,0
    int cell00 = -1;
    for(int i=0; i<r.length; i++) {
      if(r[i] instanceof LabelSSTRecord) {
        LabelSSTRecord lr = (LabelSSTRecord)r[i];
        if(lr.getRow() == 0 && lr.getColumn() == 0) { cell00 = i; }
      }
    }
    assertTrue(cell00 > -1);
   
    // We have rows 0, 1, 2, 20 and 21
View Full Code Here

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

            thisRow = lrec.getRow();
            thisColumn = lrec.getColumn();
            thisStr = '"' + lrec.getValue() + '"';
            break;
        case LabelSSTRecord.sid:
          LabelSSTRecord lsrec = (LabelSSTRecord) record;
         
            thisRow = lsrec.getRow();
            thisColumn = lsrec.getColumn();
            if(sstRecord == null) {
              thisStr = '"' + "(No SST Record, can't identify string)" + '"';
            } else {
              thisStr = '"' + sstRecord.getString(lsrec.getSSTIndex()).toString() + '"';
            }
            break;
        case NoteRecord.sid:
          NoteRecord nrec = (NoteRecord) record;
         
View Full Code Here

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

             if (rec.getSid() == LabelRecord.sid)
             {
                 LabelRecord oldrec = ( LabelRecord ) rec;

                 records.remove(k);
                 LabelSSTRecord newrec   = new LabelSSTRecord();
                 int            stringid =
                     workbook.addSSTString(new UnicodeString(oldrec.getValue()));

                 newrec.setRow(oldrec.getRow());
                 newrec.setColumn(oldrec.getColumn());
                 newrec.setXFIndex(oldrec.getXFIndex());
                 newrec.setSSTIndex(stringid);
                       records.add(k, newrec);
             }
         }
         if (log.check( POILogger.DEBUG ))
             log.log(POILogger.DEBUG, "convertLabelRecords exit");
View Full Code Here

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

                nrec.setRow(row);
                _record = nrec;
                break;

            case CELL_TYPE_STRING :
                LabelSSTRecord lrec;

                if (cellType == _cellType) {
                    lrec = (LabelSSTRecord) _record;
                } else {
                    lrec = new LabelSSTRecord();
                    lrec.setColumn(col);
                    lrec.setRow(row);
                    lrec.setXFIndex(styleIndex);
                }
                if (setValue) {
                    String str = convertCellValueToString();
                    int sstIndex = _book.getWorkbook().addSSTString(new UnicodeString(str));
                    lrec.setSSTIndex(sstIndex);
                    UnicodeString us = _book.getWorkbook().getSSTString(sstIndex);
                    _stringValue = new HSSFRichTextString();
                    _stringValue.setUnicodeString(us);
                }
                _record = lrec;
View Full Code Here

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

                (( NumberRecord ) record).setValue(( short ) 0);
                (( NumberRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_STRING :
                record = new LabelSSTRecord();
                (( LabelSSTRecord ) record).setColumn(col);
                (( LabelSSTRecord ) record).setRow(row);
                (( LabelSSTRecord ) record).setXFIndex(( short ) 0);
                break;
View Full Code Here

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

                nrec.setRow(row);
                record = nrec;
                break;

            case CELL_TYPE_STRING :
                LabelSSTRecord lrec = null;

                if (cellType != this.cellType)
                {
                    lrec = new LabelSSTRecord();
                }
                else
                {
                    lrec = ( LabelSSTRecord ) record;
                }
                lrec.setColumn(getCellNum());
                lrec.setRow(row);
                lrec.setXFIndex(( short ) cellStyle.getIndex());
                if (setValue)
                {
                    if ((getStringCellValue() != null)
                            && (!getStringCellValue().equals("")))
                    {
                        int sst = 0;

                        if (encoding == ENCODING_COMPRESSED_UNICODE)
                        {
                            sst = book.addSSTString(getStringCellValue());
                        }
                        if (encoding == ENCODING_UTF_16)
                        {
                            sst = book.addSSTString(getStringCellValue(),
                                                    true);
                        }
                        lrec.setSSTIndex(sst);
                    }
                }
                record = lrec;
                break;
View Full Code Here

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

                (( NumberRecord ) record).setValue(( short ) 0);
                (( NumberRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_STRING :
                record = new LabelSSTRecord();
                (( LabelSSTRecord ) record).setColumn(col);
                (( LabelSSTRecord ) record).setRow(row);
                (( LabelSSTRecord ) record).setXFIndex(( short ) 0);
                break;
View Full Code Here

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

                nrec.setRow(row);
                record = nrec;
                break;

            case CELL_TYPE_STRING :
                LabelSSTRecord lrec = null;

                if (cellType != this.cellType)
                {
                    lrec = new LabelSSTRecord();
                }
                else
                {
                    lrec = ( LabelSSTRecord ) record;
                }
                lrec.setColumn(getCellNum());
                lrec.setRow(row);
                lrec.setXFIndex(( short ) cellStyle.getIndex());
                if (setValue)
                {
                    if ((getStringCellValue() != null)
                            && (!getStringCellValue().equals("")))
                    {
                        int sst = 0;

                        if (encoding == ENCODING_COMPRESSED_UNICODE)
                        {
                            sst = book.addSSTString(getStringCellValue());
                        }
                        if (encoding == ENCODING_UTF_16)
                        {
                            sst = book.addSSTString(getStringCellValue(),
                                                    true);
                        }
                        lrec.setSSTIndex(sst);
                    }
                }
                record = lrec;
                break;
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.