PaintStyle getThemePaint(CTShapeStyle style, PackagePart pp) { // get a reference to a line style within the style matrix. CTStyleMatrixReference lnRef = style.getLnRef(); if (lnRef == null) { return null; } int idx = (int)lnRef.getIdx(); CTSchemeColor phClr = lnRef.getSchemeClr(); if(idx <= 0){ return null; } CTLineProperties props = theme.getXmlObject().getThemeElements().getFmtScheme().getLnStyleLst().getLnArray(idx - 1); XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(props); return selectPaint(fp, phClr, pp, theme, hasPlaceholder); } };
return null; CTStyleMatrix styleMatrix = styles.getFmtScheme(); if (styleMatrix == null) { return null;
CTStyleMatrix styleMatrix = getSheet().getTheme().getXmlObject().getThemeElements().getFmtScheme(); CTEffectStyleItem ef = styleMatrix.getEffectStyleLst().getEffectStyleArray(idx - 1); obj = ef.getEffectLst().getOuterShdw();
CTStyleMatrix matrix = theme.getXmlObject().getThemeElements().getFmtScheme(); final XmlObject styleLst; int childIdx;
/** * Get default line properties defined in the theme (if any). * Used internally to resolve shape properties. * * @return line propeties from the theme of null */ CTLineProperties getDefaultLineProperties() { CTLineProperties ln = null; CTShapeStyle style = getSpStyle(); if (style != null) { // 1-based index of a line style within the style matrix int idx = (int) style.getLnRef().getIdx(); CTStyleMatrix styleMatrix = _sheet.getTheme().getXmlObject().getThemeElements().getFmtScheme(); ln = styleMatrix.getLnStyleLst().getLnArray(idx - 1); } return ln; }
PaintStyle getThemePaint(CTShapeStyle style, PackagePart pp) { // get a reference to a line style within the style matrix. CTStyleMatrixReference lnRef = style.getLnRef(); if (lnRef == null) { return null; } int idx = (int)lnRef.getIdx(); CTSchemeColor phClr = lnRef.getSchemeClr(); if(idx <= 0){ return null; } CTLineProperties props = theme.getXmlObject().getThemeElements().getFmtScheme().getLnStyleLst().getLnArray(idx - 1); XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(props); return selectPaint(fp, phClr, pp, theme, hasPlaceholder); } };
return null; CTStyleMatrix styleMatrix = styles.getFmtScheme(); if (styleMatrix == null) { return null;
if(idx >= 1 && idx <= 999){ fillProps = theme.getXmlObject(). getThemeElements().getFmtScheme().getFillStyleLst().selectPath("*")[idx - 1]; } else if (idx >= 1001 ){ fillProps = theme.getXmlObject(). getThemeElements().getFmtScheme().getBgFillStyleLst().selectPath("*")[idx - 1001];
CTStyleMatrix styleMatrix = _sheet.getTheme().getXmlObject().getThemeElements().getFmtScheme(); CTEffectStyleItem ef = styleMatrix.getEffectStyleLst().getEffectStyleArray(idx - 1); obj = ef.getEffectLst().getOuterShdw();
XSLFTheme theme = _shape.getSheet().getTheme(); XmlObject lnProps = theme.getXmlObject(). getThemeElements().getFmtScheme().getLnStyleLst().selectPath("*")[idx - 1]; paint = getPaint(graphics, lnProps, phClr);
/** * @return the Paint object to fill */ Paint getPaint(Graphics2D graphics){ RenderableShape rShape = new RenderableShape(this); Paint fill = null; CTBackground bg = (CTBackground)getXmlObject(); if(bg.isSetBgPr()){ XmlObject spPr = bg.getBgPr(); fill = rShape.getPaint(graphics, spPr, null); } else if (bg.isSetBgRef()){ CTStyleMatrixReference bgRef= bg.getBgRef(); CTSchemeColor phClr = bgRef.getSchemeClr(); int idx = (int)bgRef.getIdx() - 1001; XSLFTheme theme = getSheet().getTheme(); CTBackgroundFillStyleList bgStyles = theme.getXmlObject().getThemeElements().getFmtScheme().getBgFillStyleLst(); XmlObject bgStyle = bgStyles.selectPath("*")[idx]; fill = rShape.selectPaint(graphics, bgStyle, phClr, theme.getPackagePart()); } return fill; }
CTStyleMatrix styleMatrix = getSheet().getTheme().getXmlObject().getThemeElements().getFmtScheme(); CTEffectStyleItem ef = styleMatrix.getEffectStyleLst().getEffectStyleArray(idx - 1); obj = ef.getEffectLst().getOuterShdw();
CTStyleMatrix matrix = theme.getXmlObject().getThemeElements().getFmtScheme(); final XmlObject styleLst; int childIdx;