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); return CharacterSprmUncompressor.uncompressCHP( ss, baseStyle, getGrpprl(), 0); }
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 ); if (baseStyle == null) baseStyle = new CharacterProperties(); CharacterProperties props = CharacterSprmUncompressor.uncompressCHP( baseStyle, getGrpprl(), 0 ); return props; }
/** * Sets the character properties of the list numbers. * * @param level the level number that the properties should apply to. * @param chp The character properties. */ public void setLevelNumberProperties(int level, CharacterProperties chp) { ListLevel listLevel = _listData.getLevel(level); int styleIndex = _listData.getLevelStyle(level); CharacterProperties base = _styleSheet.getCharacterStyle(styleIndex); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(chp, base); listLevel.setNumberProperties(grpprl); }
/** * Sets the character properties of the list numbers. * * @param level * the level number that the properties should apply to. * @param chp * The character properties. */ public void setLevelNumberProperties( int level, CharacterProperties chp ) { ListLevel listLevel = _listData.getLevel( level ); int styleIndex = _listData.getLevelStyle( level ); CharacterProperties base = _styleSheet.getCharacterStyle( styleIndex ); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty( chp, base ); listLevel.setNumberProperties( grpprl ); }
/** * Inserts text into the front of this range and it gives that text the * CharacterProperties specified in props. * * @param text * The text to insert. * @param props * The CharacterProperties to give the text. * @return A new CharacterRun that has the given text and properties and is * n ow a part of the document. * @deprecated POI 3.8 beta 4. User code should not work with {@link CharacterProperties} */ @Deprecated private CharacterRun insertBefore(String text, CharacterProperties props) { initAll(); PAPX papx = _paragraphs.get(_parStart); short istd = papx.getIstd(); StyleSheet ss = _doc.getStyleSheet(); CharacterProperties baseStyle = ss.getCharacterStyle(istd); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle); SprmBuffer buf = new SprmBuffer(grpprl, 0); _doc.getCharacterTable().insert(_charStart, _start, buf); return insertBefore(text); }
/** * Inserts text onto the end of this range and gives that text the * CharacterProperties specified in props. * * @param text * The text to insert. * @param props * The CharacterProperties to give the text. * @return A new CharacterRun that has the given text and properties and is * n ow a part of the document. * @deprecated POI 3.8 beta 4. User code should not work with {@link CharacterProperties} */ @Deprecated private CharacterRun insertAfter(String text, CharacterProperties props) { initAll(); PAPX papx = _paragraphs.get(_parEnd - 1); short istd = papx.getIstd(); StyleSheet ss = _doc.getStyleSheet(); CharacterProperties baseStyle = ss.getCharacterStyle(istd); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle); SprmBuffer buf = new SprmBuffer(grpprl, 0); _doc.getCharacterTable().insert(_charEnd, _end, buf); _charEnd++; return insertAfter(text); }
/** * Inserts text onto the end of this range and gives that text the * CharacterProperties specified in props. * * @param text * The text to insert. * @param props * The CharacterProperties to give the text. * @return A new CharacterRun that has the given text and properties and is * n ow a part of the document. * @deprecated User code should not work with {@link CharacterProperties} */ @Deprecated public CharacterRun insertAfter(String text, CharacterProperties props) // throws UnsupportedEncodingException { initAll(); PAPX papx = _paragraphs.get(_parEnd - 1); short istd = papx.getIstd(); StyleSheet ss = _doc.getStyleSheet(); CharacterProperties baseStyle = ss.getCharacterStyle(istd); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle); SprmBuffer buf = new SprmBuffer(grpprl, 0); _doc.getCharacterTable().insert(_charEnd, _end, buf); _charEnd++; return insertAfter(text); }
/** * Inserts text into the front of this range and it gives that text the * CharacterProperties specified in props. * * @param text * The text to insert. * @param props * The CharacterProperties to give the text. * @return A new CharacterRun that has the given text and properties and is * n ow a part of the document. * @deprecated User code should not work with {@link CharacterProperties} */ @Deprecated public CharacterRun insertBefore(String text, CharacterProperties props) // throws UnsupportedEncodingException { initAll(); PAPX papx = _paragraphs.get(_parStart); short istd = papx.getIstd(); StyleSheet ss = _doc.getStyleSheet(); CharacterProperties baseStyle = ss.getCharacterStyle(istd); byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle); SprmBuffer buf = new SprmBuffer(grpprl, 0); _doc.getCharacterTable().insert(_charStart, _start, buf); return insertBefore(text); }
StyleSheet ss = _doc.getStyleSheet(); ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex); CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
StyleSheet ss = _doc.getStyleSheet(); ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex); CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
StyleSheet ss = _doc.getStyleSheet(); ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex); CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
StyleSheet ss = _doc.getStyleSheet(); ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex); CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);