/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * * @return <code>true</code> if the strike property is applied */ @Override public boolean isStrikeThrough() { CTRPr pr = getRunProperties(false); return pr != null && pr.isSetStrike() && isCTOnOff(pr.getStrike()); }
/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * <p> * This formatting property is a toggle property, which specifies that its * behaviour differs between its use within a style definition and its use as * direct formatting. When used as part of a style definition, setting this * property shall toggle the current state of that property as specified up * to this point in the hierarchy (i.e. applied to not applied, and vice * versa). Setting it to false (or an equivalent) shall result in the * current setting remaining unchanged. However, when used as direct * formatting, setting this property to true or false shall set the absolute * state of the resulting property. * </p> * <p> * If this element is not present, the default value is to leave the * formatting applied at previous level in the style hierarchy. If this * element is never applied in the style hierarchy, then strikethrough shall * not be applied to the contents of this run. * </p> * * @param value <code>true</code> if the strike property is applied to * this run */ @Override public void setStrikeThrough(boolean value) { CTRPr pr = getRunProperties(true); CTOnOff strike = pr.isSetStrike() ? pr.getStrike() : pr.addNewStrike(); strike.setVal(value ? STOnOff.TRUE : STOnOff.FALSE); }
private static Boolean isStrike( CTRPr pr ) { if ( pr == null || !pr.isSetStrike() ) { return null; } return XWPFUtils.isCTOnOff( pr.getStrike() ); }
private static Boolean isStrike( CTRPr pr ) { if ( pr == null || !pr.isSetStrike() ) { return null; } return XWPFUtils.isCTOnOff( pr.getStrike() ); }
private static Boolean isStrike( CTRPr pr ) { if ( pr == null || !pr.isSetStrike() ) { return null; } return XWPFUtils.isCTOnOff( pr.getStrike() ); }
private static Boolean isStrike( CTRPr pr ) { if ( pr == null || !pr.isSetStrike() ) { return null; } return XWPFUtils.isCTOnOff( pr.getStrike() ); }
/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * * @return <code>true</code> if the strike property is applied */ public boolean isStrike() { CTRPr pr = run.getRPr(); if(pr == null || !pr.isSetStrike()) return false; return isCTOnOff(pr.getStrike()); }
/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * * @return <code>true</code> if the strike property is applied */ @Override public boolean isStrikeThrough() { CTRPr pr = getRunProperties(false); return pr != null && pr.isSetStrike() && isCTOnOff(pr.getStrike()); }
/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * <p> * This formatting property is a toggle property, which specifies that its * behaviour differs between its use within a style definition and its use as * direct formatting. When used as part of a style definition, setting this * property shall toggle the current state of that property as specified up * to this point in the hierarchy (i.e. applied to not applied, and vice * versa). Setting it to false (or an equivalent) shall result in the * current setting remaining unchanged. However, when used as direct * formatting, setting this property to true or false shall set the absolute * state of the resulting property. * </p> * <p> * If this element is not present, the default value is to leave the * formatting applied at previous level in the style hierarchy. If this * element is never applied in the style hierarchy, then strikethrough shall * not be applied to the contents of this run. * </p> * * @param value <code>true</code> if the strike property is applied to * this run */ @Override public void setStrikeThrough(boolean value) { CTRPr pr = getRunProperties(true); CTOnOff strike = pr.isSetStrike() ? pr.getStrike() : pr.addNewStrike(); strike.setVal(value ? STOnOff.TRUE : STOnOff.FALSE); }
/** * Specifies that the contents of this run shall be displayed with a single * horizontal line through the center of the line. * <p/> * This formatting property is a toggle property, which specifies that its * behavior differs between its use within a style definition and its use as * direct formatting. When used as part of a style definition, setting this * property shall toggle the current state of that property as specified up * to this point in the hierarchy (i.e. applied to not applied, and vice * versa). Setting it to false (or an equivalent) shall result in the * current setting remaining unchanged. However, when used as direct * formatting, setting this property to true or false shall set the absolute * state of the resulting property. * </p> * <p/> * If this element is not present, the default value is to leave the * formatting applied at previous level in the style hierarchy. If this * element is never applied in the style hierarchy, then strikethrough shall * not be applied to the contents of this run. * </p> * * @param value <code>true</code> if the strike property is applied to * this run */ public void setStrike(boolean value) { CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr(); CTOnOff strike = pr.isSetStrike() ? pr.getStrike() : pr.addNewStrike(); strike.setVal(value ? STOnOff.TRUE : STOnOff.FALSE); }