Our chart library needs the word feature "Invert if negative" for solid fills (bar charts), but docx4j doesn't seem support them. At least I didn't find a way to unmarshal the required XML code or programmatically implement them.
"Invert if negative" is in Word implemented like this:
- Code: Select all
<c:extLst>
<c:ext uri="{6F2FDCE9-48DA-4B69-8628-5D25D57E5C99}" xmlns:c14="http://schemas.microsoft.com/office/drawing/2007/8/2/chart">
<c14:invertSolidFillFmt>
<c14:spPr xmlns:c14="http://schemas.microsoft.com/office/drawing/2007/8/2/chart">
<a:solidFill>
<a:srgbClr val="C0504D"/>
</a:solidFill>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c14:spPr>
</c14:invertSolidFillFmt>
</c:ext>
</c:extLst>
The docx4j webapp is able to generate c:extLst and c:ext. Everything below that node is missing. The required tags are in chart20070802.xsd.
Before I try to implement the required classes by hand (ouch), I'd like to know whether someone from the docx4j team could commit these classes to the repository. Or maybe someone could explain how to generate these classes from the schema definition. I tried the following command:
- Code: Select all
xjc chart20070802.xsd -d foo -no-header -target 2.0 –extension
But parsing failed with three warnings and one error.
- Warnings: Missing orel.xsd, oartspproperties.xsd, ChartDrawing.xsd, Chart.xsd.
- Error: a:CT_ShapeProperties couldn’t be resolved as “type definition”
Is there any chance to implement c14:invertSolidFillFmt, c14:spPr, a:solidFill ...?