/** * Set the style ID for the paragraph * * @param styleId ID (not name) of the style to set for the paragraph, e.g. "Heading1" (not "Heading 1"). */ public void setStyle(String styleId) { CTPPr pr = getCTPPr(); CTString style = pr.getPStyle() != null ? pr.getPStyle() : pr.addNewPStyle(); style.setVal(styleId); }
/** * Return styleID of the paragraph if style exist for this paragraph * if not, null will be returned * * @return styleID as String */ public String getStyleID() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getPStyle() != null) { if (paragraph.getPPr().getPStyle().getVal() != null) { return paragraph.getPPr().getPStyle().getVal(); } } } return null; }
/** * @return the style of the paragraph */ public String getStyle() { CTPPr pr = getCTPPr(); CTString style = pr.isSetPStyle() ? pr.getPStyle() : null; return style != null ? style.getVal() : null; }
/** * Set the style ID for the paragraph * * @param styleId ID (not name) of the style to set for the paragraph, e.g. "Heading1" (not "Heading 1"). */ public void setStyle(String styleId) { CTPPr pr = getCTPPr(); CTString style = pr.getPStyle() != null ? pr.getPStyle() : pr.addNewPStyle(); style.setVal(styleId); }
/** * This method provides a style to the paragraph * This is useful when, e.g. an Heading style has to be assigned * @param newStyle */ public void setStyle(String newStyle) { CTPPr pr = getCTPPr(); CTString style = pr.getPStyle() != null ? pr.getPStyle() : pr.addNewPStyle(); style.setVal(newStyle); }
/** * Return styleID of the paragraph if style exist for this paragraph * if not, null will be returned * @return styleID as String */ public String getStyleID(){ if (paragraph.getPPr() != null){ if(paragraph.getPPr().getPStyle()!= null){ if (paragraph.getPPr().getPStyle().getVal()!= null) return paragraph.getPPr().getPStyle().getVal(); } } return null; } /**
/** * Return styleID of the paragraph if style exist for this paragraph * if not, null will be returned * * @return styleID as String */ public String getStyleID() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getPStyle() != null) { if (paragraph.getPPr().getPStyle().getVal() != null) { return paragraph.getPPr().getPStyle().getVal(); } } } return null; }
/** * @return the style of the paragraph */ public String getStyle() { CTPPr pr = getCTPPr(); CTString style = pr.isSetPStyle() ? pr.getPStyle() : null; return style != null ? style.getVal() : null; }
/** * @return the style of the paragraph */ public String getStyle() { CTPPr pr = getCTPPr(); CTString style = pr.isSetPStyle() ? pr.getPStyle() : null; return style != null ? style.getVal() : null; }
value = getValueFromStyle( pPr.getPStyle(), document ); if ( value != null )
value = getValueFromStyle( pPr.getPStyle(), document ); if ( value != null )
value = getValueFromStyle( pPr.getPStyle(), document ); if ( value != null )
value = getValueFromStyle( pPr.getPStyle(), document ); if ( value != null )