if (paint == null) {
// fill color was not found, check if it is defined in the theme
CTShapeStyle style = _shape.getSpStyle();
if (style != null) {
// get a reference to a fill style within the style matrix.
CTStyleMatrixReference fillRef = style.getFillRef();
// The idx attribute refers to the index of a fill style or
// background fill style within the presentation's style matrix, defined by the fmtScheme element.
// value of 0 or 1000 indicates no background,
// values 1-999 refer to the index of a fill style within the fillStyleLst element
// values 1001 and above refer to the index of a background fill style within the bgFillStyleLst element.
int idx = (int)fillRef.getIdx();
CTSchemeColor phClr = fillRef.getSchemeClr();
XSLFSheet sheet = _shape.getSheet();
XSLFTheme theme = sheet.getTheme();
XmlObject fillProps = null;
if(idx >= 1 && idx <= 999){
fillProps = theme.getXmlObject().