IllegalStateException when trying to setFillColor using Apache POI XSLF -
i'm trying set background fill color pptx file using apache poi xslf library. code looks this:
xslfslidemaster defaultmaster = ppt.getslidemasters().get(0); xslfslidelayout layout = defaultmaster.getlayout(slidelayout.blank); xslfbackground background = layout.getbackground(); background.setfillcolor(color.black);
which results in
exception in thread "main" java.lang.illegalstateexception: ctshapeproperties not found. @ org.apache.poi.xslf.usermodel.xslfshape.getsppr(xslfshape.java:240) @ org.apache.poi.xslf.usermodel.xslfsimpleshape.setfillcolor(xslfsimpleshape.java:549)
i've tried calling on slidemaster's background, layout's background, , slide's background , result in same error.
this fixed in poi 3.15-beta2 via #59702.
the "problem" ooxml properties or poi implementation or xmlbeans schemas is, similar attributes colors stored below different schema types , old code didn't cover parent nodes. patch introduced delegates wrap differences , xslf usermodel methods can more uniform.
Comments
Post a Comment