@Deprecated protected Paragraph( PAPX papx, Range parent, int start ) { super( Math.max( parent._start, start ), Math.min( parent._end, papx.getEnd() ), parent ); _props = papx.getParagraphProperties( _doc.getStyleSheet() ); _papx = papx.getSprmBuf(); _istd = papx.getIstd(); }
@Deprecated protected Paragraph( int startIdxInclusive, int endIdxExclusive, Table parent ) { super( startIdxInclusive, endIdxExclusive, parent ); initAll(); PAPX papx = _paragraphs.get( _parEnd - 1 ); _props = papx.getParagraphProperties( _doc.getStyleSheet() ); _papx = papx.getSprmBuf(); _istd = papx.getIstd(); }
@Deprecated protected Paragraph( PAPX papx, Range parent ) { super( Math.max( parent._start, papx.getStart() ), Math.min( parent._end, papx.getEnd() ), parent ); _props = papx.getParagraphProperties( _doc.getStyleSheet() ); _papx = papx.getSprmBuf(); _istd = papx.getIstd(); }
CharacterRun chp = new CharacterRun( chpx, _doc.getStyleSheet(), istd, this );
return new CharacterRun( chpx, _doc.getStyleSheet(), istd, this);
public void dumpChpx( boolean withProperties, boolean withSprms ) { for ( CHPX chpx : _doc.getCharacterTable().getTextRuns() ) { System.out.println( chpx ); if ( withProperties ) { System.out.println( chpx.getCharacterProperties( _doc.getStyleSheet(), (short) StyleSheet.NIL_STYLE ) ); } if ( withSprms ) { SprmIterator sprmIt = new SprmIterator( chpx.getGrpprl(), 0 ); while ( sprmIt.hasNext() ) { SprmOperation sprm = sprmIt.next(); System.out.println( "\t" + sprm); } } String text = new Range( chpx.getStart(), chpx.getEnd(), _doc.getOverallRange() ) { public String toString() { return "CHPX range (" + super.toString() + ")"; } }.text(); StringBuilder stringBuilder = new StringBuilder(); for ( char c : text.toCharArray() ) { if ( c < 30 ) stringBuilder.append("\\0x").append(Integer.toHexString(c)); else stringBuilder.append( c ); } System.out.println( stringBuilder ); } }
public HWPFList getList() { if ( getIlfo() == 0x000 || getIlfo() == 0xF801 ) { throw new IllegalStateException( "Paragraph not in list" ); } return new HWPFList( getDocument().getStyleSheet(), getDocument().getListTables(), getIlfo() ); }
_doc.getStyleSheet(), (short) StyleSheet.NIL_STYLE ) );
/** * 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);
StyleSheet styleSheet = doc.getStyleSheet();
StyleSheet styleSheet = doc.getStyleSheet();