private CTLineProperties setBorderDefaults(BorderEdge edge) {
final CTLineProperties ln = getCTLine(edge, true);
if (ln == null) {
- return null;
+ throw new IllegalStateException("CTLineProperties couldn't be initialized");
}
if (ln.isSetNoFill()) {
}
CTLineProperties ln = setBorderDefaults(edge);
+ if (!ln.isSetPrstDash()) {
+ ln.addNewPrstDash();
+ }
ln.getPrstDash().setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
}
@Override
public void resize(double scale){
XSSFClientAnchor anchor = getClientAnchor();
+ if (anchor == null) {
+ logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
+ return;
+ }
XSSFClientAnchor pref = getPreferredSize(scale);
*/
public XSSFClientAnchor getPreferredSize(double scale){
XSSFClientAnchor anchor = getClientAnchor();
+ if (anchor == null) {
+ logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
+ return null;
+ }
XSSFPictureData data = getPictureData();
Dimension size = getImageDimension(data.getPackagePart(), data.getPictureType());