IFillFormatEffectiveData.getSolidFillColor Method Throws InvalidOperationException

Hi,

We recently upgraded to your latest version of Aspose Slides for Java (v21.10) and then noticed that one method (getSolidFillColor(), class IFillFormatEffectiveData) has a different behavior compared to v21.2 (from which we upgraded to v21 .10). Is this the expected behavior?

If you have made any changes to your API in the meantime (since version 21.2) please send a sample of the code that should provide the same functionality.

Nenad

report.zip (3.6 MB)

@zpredojevic,
Thank you for contacting support.

It looks like the behavior of the getSolidFillColor method has been changed. You should check the FillType field first and then get the color, if it is available, as shown below:

if(portionFormatEffectiveData.getUnderlineFillFormat().getFillType() == FillType.Solid) {
    Color underlineColor = portionFormatEffectiveData.getUnderlineFillFormat().getSolidFillColor();
    // ...
}

API Reference: FillType Class