Created attachment 39609 [details] Zip file containing a Maven project that reproduces the issue Affected Version: 5.2.5 (5.2.4 possibly affected as well) Issue: When parsing some PowerPoint files with tables in Apache POI version 5.2.5 (and possibly 5.2.4), attempting to retrieve the font color for text runs within the table cell triggers the following exception: ``` Exception in thread "main" java.lang.IllegalArgumentException: Unexpected color choice: class org.openxmlformats.schemas.drawingml.x2006.main.impl.CTFontCollectionImpl at org.apache.poi.xslf.usermodel.XSLFColor.toColor(XSLFColor.java:161) at org.apache.poi.xslf.usermodel.XSLFColor.<init>(XSLFColor.java:66) at org.apache.poi.xslf.usermodel.XSLFTableCell$XSLFCellTextRun.getFontColor(XSLFTableCell.java:755) at com.example.Main.main(Main.java:21) ``` Steps to Reproduce: 1. Download the attached zip file containing a Maven project. 2. Unzip the folder and navigate to its directory using the command line. 3. Run `mvn install` followed by `mvn exec:java`. 4. Observe the `IllegalArgumentException` that is thrown during execution. We suspect that the commit causing this issue is https://github.com/apache/poi/commit/624f83431065e1a7613f1f044f1820c27e504266#diff-f80c56131e376f24468d40928f5717820b38f1ebea9d16147b870763f8b682c7R78
Looks like you are right about that newTextRun change. The XSLFTableCell class overrides this method and returns an XSLFCellTextRun instead of a XSLFTextRun. I will revert that change.
added r1916105
reverted with r1916106 - I will have to come back to this. With POI these days, it seems almost impossible to change code to suit one user without breaking the code for another.
trying again with r1916108