/** * Delegate the call to the underlying slide master. */ @Override public TextPropCollection getPropCollection(final int txtype, final int level, final String name, final boolean isCharacter) { final HSLFMasterSheet master = getMasterSheet(); return (master == null) ? null : master.getPropCollection(txtype, level, name, isCharacter); }
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(); }
private <T extends TextProp> T getMasterProp(final String name) { final int txtype = parentParagraph.getRunType(); final HSLFSheet sheet = parentParagraph.getSheet(); if (sheet == null) { logger.log(POILogger.ERROR, "Sheet is not available"); return null; } final HSLFMasterSheet master = sheet.getMasterSheet(); if (master == null) { logger.log(POILogger.WARN, "MasterSheet is not available"); return null; } final TextPropCollection col = master.getPropCollection(txtype, parentParagraph.getIndentLevel(), name, true); return (col == null) ? null : col.findByName(name); }
TextPropCollection masterProps = master.getPropCollection(txtype, getIndentLevel(), pn, isChar); if (masterProps != null) { T prop = masterProps.findByName(pn);