/** * add a style to the document * * @param style * @throws IOException */ public void addStyle(XWPFStyle style) { listStyle.add(style); ctStyles.addNewStyle(); int pos = ctStyles.sizeOfStyleArray() - 1; ctStyles.setStyleArray(pos, style.getCTStyle()); }
/** * compares the names of the Styles * * @param compStyle */ public boolean hasSameName(XWPFStyle compStyle) { CTStyle ctCompStyle = compStyle.getCTStyle(); String name = ctCompStyle.getName().getVal(); return name.equals(ctStyle.getName().getVal()); }
public static CTPPr getPPr( XWPFStyle style ) { if ( style == null ) { return null; } CTStyle ctStyle = style.getCTStyle(); if ( ctStyle == null ) { return null; } return ctStyle.getPPr(); }
public static CTPPr getPPr( XWPFStyle style ) { if ( style == null ) { return null; } CTStyle ctStyle = style.getCTStyle(); if ( ctStyle == null ) { return null; } return ctStyle.getPPr(); }
/** * Returns CTRPr from style. * * @param style * @return */ public static CTRPr getRPr( XWPFStyle style ) { if ( style == null ) { return null; } CTStyle ctStyle = style.getCTStyle(); if ( ctStyle == null ) { return null; } return ctStyle.getRPr(); }
/** * add a style to the document * @param style * @throws IOException */ public void addStyle(XWPFStyle style){ listStyle.add(style); ctStyles.addNewStyle(); int pos = (ctStyles.getStyleList().size()) - 1; ctStyles.setStyleArray(pos, style.getCTStyle()); } /**
/** * add a style to the document * * @param style * @throws IOException */ public void addStyle(XWPFStyle style) { listStyle.add(style); ctStyles.addNewStyle(); int pos = ctStyles.sizeOfStyleArray() - 1; ctStyles.setStyleArray(pos, style.getCTStyle()); }
/** * compares the names of the Styles * * @param compStyle */ public boolean hasSameName(XWPFStyle compStyle) { CTStyle ctCompStyle = compStyle.getCTStyle(); String name = ctCompStyle.getName().getVal(); return name.equals(ctStyle.getName().getVal()); }
/** * compares the names of the Styles * @param compStyle */ public boolean hasSameName(XWPFStyle compStyle){ CTStyle ctCompStyle = compStyle.getCTStyle(); String name = ctCompStyle.getName().getVal(); return name.equals(ctStyle.getName().getVal()); }
XWPFStyle xStyle = xdoc.getStyles().getStyle(styleID); if (xStyle.getType() == STStyleType.CHARACTER) { System.out.println(xStyle.getCTStyle());
CTPPr xwpfParagraphProperties = style.getCTStyle().getPPr(); if ( xwpfParagraphProperties != null ) if ( style.getCTStyle().getRPr() != null ) FontInfos fontInfos = processRPR( style.getCTStyle().getRPr() ); paragraphProperties.setFontInfos( fontInfos ); CTTblPrBase xwpfTableProperties = style.getCTStyle().getTblPr(); if ( xwpfTableProperties != null )
color.setVal(hexToBytes(hexColor)); rpr.setColor(color); style.getCTStyle().setRPr(rpr);
CTPPr xwpfParagraphProperties = style.getCTStyle().getPPr(); if ( xwpfParagraphProperties != null ) maptStyleParagraphProperties( xwpfParagraphProperties ); CTStyle ctStyle = style.getCTStyle(); CTRPr rpr = ctStyle.getRPr(); processRPR( rpr );