private static CTLineProperties getLn(XSLFShape shape, boolean create) { XmlObject pr = shape.getShapeProperties(); if (!(pr instanceof CTShapeProperties)) { LOG.log(POILogger.WARN, shape.getClass() +" doesn't have line properties"); return null; } CTShapeProperties spr = (CTShapeProperties)pr; return (spr.isSetLn() || !create) ? spr.getLn() : spr.addNewLn(); } }
@Override public boolean fetch(XSLFShape shape) { XmlObject xo = shape.getShapeProperties(); if (xo instanceof CTShapeProperties && ((CTShapeProperties)xo).isSetXfrm()) { setValue(((CTShapeProperties)xo).getXfrm()); return true; } return false; } };
@Override public boolean fetch(XSLFShape shape) { XSLFEffectProperties ep = XSLFPropertiesDelegate.getEffectDelegate(shape.getShapeProperties()); if (ep != null && ep.isSetEffectLst()) { CTOuterShadowEffect obj = ep.getEffectLst().getOuterShdw(); setValue(obj == null ? NO_SHADOW : obj); return true; } return false; } };
@Override public boolean fetch(XSLFShape shape) { XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(shape.getShapeProperties()); if (fp == null) { return false; } if (fp.isSetNoFill()) { setValue(null); return true; } PackagePart pp = shape.getSheet().getPackagePart(); PaintStyle paint = selectPaint(fp, null, pp, theme, hasPlaceholder); if (paint != null) { setValue(paint); return true; } CTShapeStyle style = shape.getSpStyle(); if (style != null) { fp = XSLFPropertiesDelegate.getFillDelegate(style.getFillRef()); paint = selectPaint(fp, null, pp, theme, hasPlaceholder); } if (paint != null) { setValue(paint); return true; } return false; } };
private static CTLineProperties getLn(XSLFShape shape, boolean create) { XmlObject pr = shape.getShapeProperties(); if (!(pr instanceof CTShapeProperties)) { LOG.log(POILogger.WARN, shape.getClass() +" doesn't have line properties"); return null; } CTShapeProperties spr = (CTShapeProperties)pr; return (spr.isSetLn() || !create) ? spr.getLn() : spr.addNewLn(); } }
@Override public boolean fetch(XSLFShape shape) { XmlObject xo = shape.getShapeProperties(); if (xo instanceof CTShapeProperties && ((CTShapeProperties)xo).isSetXfrm()) { setValue(((CTShapeProperties)xo).getXfrm()); return true; } return false; } };
@Override public boolean fetch(XSLFShape shape) { XSLFEffectProperties ep = XSLFPropertiesDelegate.getEffectDelegate(shape.getShapeProperties()); if (ep != null && ep.isSetEffectLst()) { CTOuterShadowEffect obj = ep.getEffectLst().getOuterShdw(); setValue(obj == null ? NO_SHADOW : obj); return true; } return false; } };
@Override public boolean fetch(XSLFShape shape) { XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(shape.getShapeProperties()); if (fp == null) { return false; } if (fp.isSetNoFill()) { setValue(null); return true; } PackagePart pp = shape.getSheet().getPackagePart(); PaintStyle paint = selectPaint(fp, null, pp, theme, hasPlaceholder); if (paint != null) { setValue(paint); return true; } CTShapeStyle style = shape.getSpStyle(); if (style != null) { fp = XSLFPropertiesDelegate.getFillDelegate(style.getFillRef()); paint = selectPaint(fp, null, pp, theme, hasPlaceholder); } if (paint != null) { setValue(paint); return true; } return false; } };