diff options
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java | 8 | ||||
-rw-r--r-- | poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTableCell.java | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java index d22ab8df19..a77617a381 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java @@ -752,8 +752,12 @@ public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape, } XSLFTheme theme = getSheet().getTheme(); - final XSLFColor c = new XSLFColor(txStyle, theme, phClr, getSheet()); - return DrawPaint.createSolidPaint(c.getColorStyle()); + try { + final XSLFColor c = new XSLFColor(txStyle, theme, phClr, getSheet()); + return DrawPaint.createSolidPaint(c.getColorStyle()); + } catch (IllegalArgumentException e) { + return super.getFontColor(); + } } } } diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTableCell.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTableCell.java index 86db08d097..87bb0ce6a2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTableCell.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTableCell.java @@ -27,7 +27,6 @@ import java.util.List; import org.apache.poi.sl.usermodel.PaintStyle; import org.apache.poi.xslf.XSLFTestDataSamples; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; class TestXSLFTableCell @@ -229,7 +228,6 @@ class TestXSLFTableCell ppt.close(); } - @Disabled @Test void testBug68703() throws IOException { try(XMLSlideShow pptx = XSLFTestDataSamples.openSampleDocument("bug68703.pptx")) { |