@Override public HSLFHyperlink createHyperlink() { if (link == null) { link = HSLFHyperlink.createHyperlink(this); parentParagraph.setDirty(); } return link; }
/** * Sets the value of the given Paragraph TextProp, add if required * @param propName The name of the Paragraph TextProp * @param val The value to set for the TextProp */ public void setParagraphTextPropVal(String propName, Integer val) { setPropVal(_paragraphStyle, propName, val); setDirty(); }
public void setType(TabStopType type) { tabStop.setType(type); setDirty(); } }
public void setPositionInPoints(double position) { tabStop.setPositionInPoints(position); setDirty(); }
/** * Set the value of the given flag in the CharFlagsTextProp, adding * it if required. */ private void setCharFlagsTextPropVal(int index, boolean value) { // TODO: check if paragraph/chars can be handled the same ... if (getFlag(index) != value) { setFlag(index, value); parentParagraph.setDirty(); } }
private void setFlag(int index, boolean value) { BitMaskTextProp tp = (BitMaskTextProp)_paragraphStyle.addWithName(ParagraphFlagsTextProp.NAME); tp.setSubValue(value, index); setDirty(); }
/** * Change the text */ @Override public void setText(String text) { if (text == null) { throw new HSLFException("text must not be null"); } String newText = HSLFTextParagraph.toInternalString(text); if (!newText.equals(_runText)) { _runText = newText; if (HSLFSlideShow.getLoadSavePhase() == HSLFSlideShow.LoadSavePhase.LOADED) { parentParagraph.setDirty(); } } }
private void setPropValInner(final TextPropCollection props, final String name, Consumer<? extends TextProp> handler) { final boolean isChar = props.getTextPropType() == TextPropType.character; final TextPropCollection pc; if (_sheet instanceof HSLFMasterSheet) { pc = ((HSLFMasterSheet)_sheet).getPropCollection(getRunType(), getIndentLevel(), "*", isChar); if (pc == null) { throw new HSLFException("Master text property collection can't be determined."); } } else { pc = props; } if (handler == null) { pc.removeByName(name); } else { // Fetch / Add the TextProp handler.accept(pc.addWithName(name)); } setDirty(); }