Package org.apache.poi.hssf.record

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


        Iterator cIt = row.cellIterator();
        while(cIt.hasNext()) {
          HSSFCell cell = (HSSFCell)cIt.next();
          if(cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {
            HSSFRichTextString rtr = cell.getRichStringCellValue();
            UnicodeString u = rtr.getRawUnicodeString();
           
            // Have we done this string already?
            if(! doneUnicodeStrings.contains(u)) {
              // Update for each new position
              for(short i=5; i<newPos.length; i++) {
                if(i != newPos[i]) {
                  u.swapFontUse(i, newPos[i]);
                }
              }
             
              // Mark as done
              doneUnicodeStrings.add(u);
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 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

                    if ((getStringCellValue() != null)
                            && (!getStringCellValue().equals("")))
                    {
                        int sst = 0;

                        UnicodeString str = getRichStringCellValue().getUnicodeString();
//jmh                        if (encoding == ENCODING_COMPRESSED_UNICODE)
//jmh                        {
//                      jmh                            str.setCompressedUnicode();
//                      jmh                        } else if (encoding == ENCODING_UTF_16)
//                      jmh                        {
View Full Code Here

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

        UnicodeString str = value.getUnicodeString();
        index = book.getWorkbook().addSSTString(str);
        (( LabelSSTRecord ) record).setSSTIndex(index);
        stringValue = value;
        stringValue.setWorkbookReferences(book.getWorkbook(), (( LabelSSTRecord ) record));
        stringValue.setUnicodeString(book.getWorkbook().getSSTString(index));
View Full Code Here

    SupBookRecord ebr = _externalBookBlocks[ebIx].getExternalBookRecord();
    if (!ebr.isExternalReferences()) {
      return null;
    }
    int shIx = _externSheetRecord.getFirstSheetIndexFromRefIndex(extRefIndex);
    UnicodeString usSheetName = ebr.getSheetNames()[shIx];
    return new String[] {
        ebr.getURL(),
        usSheetName.getString(),
    };
  }
View Full Code Here

    }

    private Object parseArrayItem() {
        SkipWhite();
        switch(look) {
            case '"': return new UnicodeString(parseStringLiteral());
            case '#': return ErrorConstant.valueOf(parseErrorLiteral());
            case 'F': case 'f':
            case 'T': case 't':
                return parseBooleanLiteral();
        }
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

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

TOP

Related Classes of org.apache.poi.hssf.record.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.