Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.UnicodeString$UnicodeRecordStats


              LittleEndian.putDouble(array, pos+offset, ((Double)o).doubleValue());
              pos+=8;
            } else if (o instanceof UnicodeString) {
              array[pos+offset] = 0x02;
              pos++;             
              UnicodeString s = (UnicodeString)o;
              //JMH TBD Handle string continuation. Id do it now but its 4am.
                  UnicodeString.UnicodeRecordStats stats = new UnicodeString.UnicodeRecordStats();
                  s.serialize(stats, pos + offset, array);
                  pos += stats.recordSize;
            } else throw new RuntimeException("Coding error");
          }
        }
        return pos;
View Full Code Here


    public HSSFRichTextString( String string )
    {
        if (string == null)
          string = "";
        this.string = new UnicodeString(string);
    }
View Full Code Here

     *  be affected by changes tat we make to this string.
     */
    private UnicodeString cloneStringIfRequired() {
      if (book == null)
        return string;
      UnicodeString s = (UnicodeString)string.clone();
      return s;
    }
View Full Code Here

                addTextCell(record, label.getValue());
                break;

            case LabelSSTRecord.sid: // Ref. a string in the shared string table
                LabelSSTRecord sst = (LabelSSTRecord) record;
                UnicodeString unicode = sstRecord.getString(sst.getSSTIndex());
                addTextCell(record, unicode.getString());
                break;

            case NumberRecord.sid: // Contains a numeric cell value
                NumberRecord number = (NumberRecord) record;
                addCell(record, new NumberCell(number.getValue()));
View Full Code Here

                 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);
View Full Code Here

    /** @deprecated Do not call this method from your applications. Use the methods
     *  available in the HSSFRow to add string HSSFCells
     */
    public int addSSTString(String string)
    {
        return workbook.addSSTString(new UnicodeString(string));
    }
View Full Code Here

    public HSSFRichTextString( String string )
    {
        if (string == null)
          string = "";
        this.string = new UnicodeString(string);
    }
View Full Code Here

     *  be affected by changes tat we make to this string.
     */
    private UnicodeString cloneStringIfRequired() {
      if (book == null)
        return string;
      UnicodeString s = (UnicodeString)string.clone();
      return s;
    }
View Full Code Here

    Object[] values = ptg.getTokenArrayValues();
    assertEquals(6, values.length);
   
   
    assertEquals(Boolean.TRUE, values[0]);
    assertEquals(new UnicodeString("ABCD"), values[1]);
    assertEquals(new Double(0), values[3]);
    assertEquals(Boolean.FALSE, values[4]);
    assertEquals(new UnicodeString("FG"), values[5]);
   
    byte[] outBuf = new byte[ENCODED_CONSTANT_DATA.length];
    ptg.writeTokenValueBytes(outBuf, 0);
   
    if(outBuf[0] == 4) {
View Full Code Here

                addTextCell(record, label.getValue());
                break;

            case LabelSSTRecord.sid: // Ref. a string in the shared string table
                LabelSSTRecord sst = (LabelSSTRecord) record;
                UnicodeString unicode = sstRecord.getString(sst.getSSTIndex());
                addTextCell(record, unicode.getString());
                break;

            case NumberRecord.sid: // Contains a numeric cell value
                NumberRecord number = (NumberRecord) record;
                addCell(record, new NumberCell(number.getValue()));
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.UnicodeString$UnicodeRecordStats

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.