Package org.apache.poi.hwpf.sprm

Examples of org.apache.poi.hwpf.sprm.SprmBuffer


            // copy Grpprl from dataStream
            System.arraycopy(datastream, hugeGrpprlOffset + 2, hugeGrpprl, 2,
                             grpprlSize);
            // save a pointer to where we got the huge Grpprl from
            _hugeGrpprlOffset = hugeGrpprlOffset;
            return new SprmBuffer(hugeGrpprl);
          }
        }
      }
    }
    return null;
View Full Code Here


    short istd = papx.getIstd();

    StyleSheet ss = _doc.getStyleSheet();
    CharacterProperties baseStyle = ss.getCharacterStyle(istd);
    byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
    SprmBuffer buf = new SprmBuffer(grpprl);
    _doc.getCharacterTable().insert(_charStart, _start, buf);

    return insertBefore(text);
  }
View Full Code Here

    short istd = papx.getIstd();

    StyleSheet ss = _doc.getStyleSheet();
    CharacterProperties baseStyle = ss.getCharacterStyle(istd);
    byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
    SprmBuffer buf = new SprmBuffer(grpprl);
    _doc.getCharacterTable().insert(_charEnd, _end, buf);
    _charEnd++;
    return insertAfter(text);
  }
View Full Code Here

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
    byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
    LittleEndian.putShort(withIndex, (short)styleIndex);
    System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
    SprmBuffer buf = new SprmBuffer(withIndex);

    _doc.getParagraphTable().insert(_parStart, _start, buf);
    insertBefore(text, baseChp);
    return getParagraph(0);
  }
View Full Code Here

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
    byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
    LittleEndian.putShort(withIndex, (short)styleIndex);
    System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
    SprmBuffer buf = new SprmBuffer(withIndex);

    _doc.getParagraphTable().insert(_parEnd, _end, buf);
    _parEnd++;
    insertAfter(text, baseChp);
    return getParagraph(numParagraphs() - 1);
View Full Code Here

    else
    {
      PAPX currentPap = (PAPX)_paragraphs.get(listIndex);
      if (currentPap != null && currentPap.getStart() < cpStart)
      {
        SprmBuffer clonedBuf = null;
        try
        {
          clonedBuf = (SprmBuffer)currentPap.getSprmBuf().clone();
        }
        catch (CloneNotSupportedException exc)
View Full Code Here

    short istd = papx.getIstd();

    StyleSheet ss = _doc.getStyleSheet();
    CharacterProperties baseStyle = ss.getCharacterStyle(istd);
    byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
    SprmBuffer buf = new SprmBuffer(grpprl);
    _doc.getCharacterTable().insert(_charStart, _start, buf);

    return insertBefore(text);
  }
View Full Code Here

    short istd = papx.getIstd();

    StyleSheet ss = _doc.getStyleSheet();
    CharacterProperties baseStyle = ss.getCharacterStyle(istd);
    byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
    SprmBuffer buf = new SprmBuffer(grpprl);
    _doc.getCharacterTable().insert(_charEnd, _end, buf);
    _charEnd++;
    return insertAfter(text);
  }
View Full Code Here

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
    byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
    LittleEndian.putShort(withIndex, (short) styleIndex);
    System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
    SprmBuffer buf = new SprmBuffer(withIndex);

    _doc.getParagraphTable().insert(_parStart, _start, buf);
    insertBefore(text, baseChp);
    return getParagraph(0);
  }
View Full Code Here

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
    byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
    LittleEndian.putShort(withIndex, (short) styleIndex);
    System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
    SprmBuffer buf = new SprmBuffer(withIndex);

    _doc.getParagraphTable().insert(_parEnd, _end, buf);
    _parEnd++;
    insertAfter(text, baseChp);
    return getParagraph(numParagraphs() - 1);
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.sprm.SprmBuffer

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.