Examples of CharacterProperties


Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

   */
  @Deprecated
  private void createChp(int istd)
  {
      StyleDescription sd = _styleDescriptions[istd];
      CharacterProperties chp = sd.getCHP();
      byte[] chpx = sd.getCHPX();
      int baseIndex = sd.getBaseStyle();
     
      if(baseIndex == istd) {
         // Oh dear, this isn't allowed...
         // The word file seems to be corrupted
         // Switch to using the nil style so that
         //  there's a chance we can read it
         baseIndex = NIL_STYLE;
      }
     
      // Build and decompress the Chp if required
      if(chp == null && chpx != null)
      {
          CharacterProperties parentCHP = new CharacterProperties();
          if(baseIndex != NIL_STYLE)
          {

              parentCHP = _styleDescriptions[baseIndex].getCHP();
              if(parentCHP == null)
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

    public CharacterProperties getCharacterProperties( StyleSheet ss, short istd )
    {
        if ( ss == null )
        {
            // TODO Fix up for Word 6/95
            return new CharacterProperties();
        }

        CharacterProperties baseStyle = ss.getCharacterStyle( istd );
        CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(
                ss, baseStyle, getGrpprl(), 0 );
        return props;
    }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

    @Deprecated
    public static CharacterProperties uncompressCHP(
            CharacterProperties parent, byte[] grpprl, int offset )
    {
        CharacterProperties newProperties = parent.clone();
        applySprms( parent, grpprl, offset, true, newProperties );
        return newProperties;
    }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

    }

    public static CharacterProperties uncompressCHP( StyleSheet styleSheet,
            CharacterProperties parStyle, byte[] grpprl, int offset )
    {
        CharacterProperties newProperties;
        if ( parStyle == null )
        {
            parStyle = new CharacterProperties();
            newProperties = new CharacterProperties();
        }
        else
        {
            newProperties = parStyle.clone();
        }

        /*
         * not fully conform to specification, but the fastest way to make it
         * work. Shall be rewritten if any errors would be found -- vlsergey
         */
        Integer style = getIstd( grpprl, offset );
        if ( style != null )
        {
            try
            {
                applySprms( parStyle, styleSheet.getCHPX( style ), 0, false,
                        newProperties );
            }
            catch ( Exception exc )
            {
                logger.log( POILogger.ERROR, "Unable to apply all style ",
                        style, " CHP SPRMs to CHP: ", exc, exc );
            }
        }

        CharacterProperties styleProperties = newProperties;
        newProperties = styleProperties.clone();

        try
        {
            applySprms( styleProperties, grpprl, offset, true, newProperties );
        }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

   *        CharacterProperties object from.
   */
  private void createChp(int istd)
  {
      StyleDescription sd = _styleDescriptions[istd];
      CharacterProperties chp = sd.getCHP();
      byte[] chpx = sd.getCHPX();
      int baseIndex = sd.getBaseStyle();
     
      if(baseIndex == istd) {
         // Oh dear, this isn't allowed...
         // The word file seems to be corrupted
         // Switch to using the nil style so that
         //  there's a chance we can read it
         baseIndex = NIL_STYLE;
      }
     
      // Build and decompress the Chp if required
      if(chp == null && chpx != null)
      {
          CharacterProperties parentCHP = new CharacterProperties();
          if(baseIndex != NIL_STYLE)
          {

              parentCHP = _styleDescriptions[baseIndex].getCHP();
              if(parentCHP == null)
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

    return (SprmBuffer)_buf;
  }

  public CharacterProperties getCharacterProperties(StyleSheet ss, short istd)
  {
    CharacterProperties baseStyle = ss.getCharacterStyle(istd);
    CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(baseStyle, getGrpprl(), 0);
    return props;
  }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

   *        CharacterProperties object from.
   */
  private void createChp(int istd)
  {
      StyleDescription sd = _styleDescriptions[istd];
      CharacterProperties chp = sd.getCHP();
      byte[] chpx = sd.getCHPX();
      int baseIndex = sd.getBaseStyle();
      if(chp == null && chpx != null)
      {
          CharacterProperties parentCHP = new CharacterProperties();
          if(baseIndex != NIL_STYLE)
          {

              parentCHP = _styleDescriptions[baseIndex].getCHP();
              if(parentCHP == null)
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

  public static CharacterProperties uncompressCHP(CharacterProperties parent,
                                                  byte[] grpprl,
                                                  int offset)
  {
    CharacterProperties newProperties = null;
    try
    {
      newProperties = (CharacterProperties) parent.clone();
    }
    catch (CloneNotSupportedException cnse)
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.CharacterProperties

   *        CharacterProperties object from.
   */
  private void createChp(int istd)
  {
      StyleDescription sd = _styleDescriptions[istd];
      CharacterProperties chp = sd.getCHP();
      byte[] chpx = sd.getCHPX();
      int baseIndex = sd.getBaseStyle();
     
      if(baseIndex == istd) {
         // Oh dear, this isn't allowed...
         // The word file seems to be corrupted
         // Switch to using the nil style so that
         //  there's a chance we can read it
         baseIndex = NIL_STYLE;
      }
     
      // Build and decompress the Chp if required
      if(chp == null && chpx != null)
      {
          CharacterProperties parentCHP = new CharacterProperties();
          if(baseIndex != NIL_STYLE)
          {

              parentCHP = _styleDescriptions[baseIndex].getCHP();
              if(parentCHP == null)
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.