Bug 59702 - Setting background color in slide master
Summary: Setting background color in slide master
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.15-dev
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-14 19:02 UTC by András Gábor Kis
Modified: 2016-06-18 23:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description András Gábor Kis 2016-06-14 19:02:30 UTC
The slide master doesn't seem to have a CTShapeProperties entry. The only thing I tried to do is change the background color (currently i'm using a template slide to permanently set it), but it will throw:
java.lang.IllegalStateException: CTShapeProperties was not found.

Theres a method to create one, but thats unimplemented.

I would really prefer not to use the messy whatever tool Microsoft has provided for the task.
Comment 1 Javen O'Neal 2016-06-14 19:07:38 UTC
Could you be more specific about what's not working, such as a code example demonstrating the problem?
Comment 2 András Gábor Kis 2016-06-14 20:04:07 UTC
https://github.com/Frontrider/PowerPointGenerator

The github link to the project.

The location of the "error" is in hu.frontrider.pptgen.Writeppt.kt, line 48.
Comment 3 Andreas Beeker 2016-06-14 23:05:37 UTC
I've already fixed that issue locally, but now I try to make it more general, so the setFillStyle/setFillColor works with table cells, group shapes, backgrounds and of course normal shapes too.

I'll commit it in the next few days ..
Comment 4 András Gábor Kis 2016-06-16 22:24:44 UTC
I see beta 2 is planned to be released enxt month. Theres any way for me to get my hands on the fix earlier?
Comment 6 Andreas Beeker 2016-06-18 23:53:57 UTC
Patched via r1749108
The test code is in TestXSLFSlideShow.testMasterBackground()

I've started to wrap the ooxml properties into delegates, to handle them alike, 
but I would actually prefer to enhance the xml schema classes with interfaces.
Although this change is sufficient for this issue - the delegate usage will be 
extended for the other XSLF classes.
If I have more or less complete set of interfaces, I'll probably modify the xml 
schemas, but that's to be discussed on the dev list ...