Package org.apache.poi.hssf.record.common

Examples of org.apache.poi.hssf.record.common.UnicodeString


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


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

        if (_cellType != CELL_TYPE_STRING) {
            setCellType(CELL_TYPE_STRING, false, row, col, styleIndex);
        }
        int index = 0;

        UnicodeString str = hvalue.getUnicodeString();
        index = _book.getWorkbook().addSSTString(str);
        (( LabelSSTRecord ) _record).setSSTIndex(index);
        _stringValue = hvalue;
        _stringValue.setWorkbookReferences(_book.getWorkbook(), (( LabelSSTRecord ) _record));
        _stringValue.setUnicodeString(_book.getWorkbook().getSSTString(index));
View Full Code Here

   */
  private static UnicodeString resolveTitleText(String str) {
    if (str == null || str.length() < 1) {
      return NULL_TEXT_STRING;
    }
    return new UnicodeString(str);
  }
View Full Code Here

    }
    return new UnicodeString(str);
  }
 
  private static UnicodeString readUnicodeString(RecordInputStream in) {
    return new UnicodeString(in);
  }
View Full Code Here

    public UnicodeString getSSTString(int str) {
        if (sst == null) {
            insertSST();
        }
        UnicodeString retval = sst.getString(str);

        if (log.check( POILogger.DEBUG ))
            log.log(DEBUG, "Returning SST for index=", Integer.valueOf(str),
                " String= ", retval);
        return retval;
View Full Code Here

        this("");
    }

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

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

                 //Excel only indexes the first 128 buckets.
                 bucketAbsoluteOffsets[index] = rOff;
                 bucketRelativeOffsets[index] = rOff;
              }
          }
          UnicodeString s = getUnicodeString(k);
          s.serialize(out);
        }
    }
View Full Code Here

     */
    public void manufactureStrings( int stringCount, RecordInputStream in )
    {
      for (int i=0;i<stringCount;i++) {
         // Extract exactly the count of strings from the SST record.
         UnicodeString str;
         if(in.available() == 0 && ! in.hasNextRecord()) {
           logger.log( POILogger.ERROR, "Ran out of data before creating all the strings! String at index " + i + "");
            str = new UnicodeString("");
         } else {
            str = new UnicodeString(in);
         }
         addToStringTable( strings, str );
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.common.UnicodeString

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.