boolean fetchThemeProperty(final ParagraphPropertyFetcher<?> visitor) { final XSLFTextShape shape = getParentShape(); if (shape.isPlaceholder()) { return false; } // if it is a plain text box then take defaults from presentation.xml @SuppressWarnings("resource") final XMLSlideShow ppt = shape.getSheet().getSlideShow(); final CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getIndentLevel()); return themeProps != null && visitor.fetch(themeProps); }
boolean fetchThemeProperty(final ParagraphPropertyFetcher<?> visitor) { final XSLFTextShape shape = getParentShape(); if (shape.isPlaceholder()) { return false; } // if it is a plain text box then take defaults from presentation.xml @SuppressWarnings("resource") final XMLSlideShow ppt = shape.getSheet().getSlideShow(); final CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getIndentLevel()); return themeProps != null && visitor.fetch(themeProps); }
private boolean fetchCharacterProperty(CharacterPropertyFetcher fetcher){ boolean ok = false; if(_r.isSetRPr()) ok = fetcher.fetch(getRPr()); if(!ok) { XSLFTextShape shape = _p.getParentShape(); ok = shape.fetchShapeProperty(fetcher); if(!ok){ CTPlaceholder ph = shape.getCTPlaceholder(); if(ph == null){ // if it is a plain text box then take defaults from presentation.xml XMLSlideShow ppt = shape.getSheet().getSlideShow(); CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(_p.getLevel()); if(themeProps != null) { fetcher.isFetchingFromMaster = true; ok = fetcher.fetch(themeProps); } } if (!ok) { CTTextParagraphProperties defaultProps = _p.getDefaultMasterStyle(); if(defaultProps != null) { fetcher.isFetchingFromMaster = true; ok = fetcher.fetch(defaultProps); } } } } return ok; }
private boolean fetchParagraphProperty(ParagraphPropertyFetcher visitor){ boolean ok = false; if(_p.isSetPPr()) ok = visitor.fetch(_p.getPPr()); if(!ok) { XSLFTextShape shape = getParentShape(); ok = shape.fetchShapeProperty(visitor); if(!ok){ CTPlaceholder ph = shape.getCTPlaceholder(); if(ph == null){ // if it is a plain text box then take defaults from presentation.xml XMLSlideShow ppt = getParentShape().getSheet().getSlideShow(); CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getLevel()); if(themeProps != null) ok = visitor.fetch(themeProps); } if(!ok){ // defaults for placeholders are defined in the slide master CTTextParagraphProperties defaultProps = getDefaultMasterStyle(); if(defaultProps != null) ok = visitor.fetch(defaultProps); } } } return ok; }