diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-03-04 14:56:20 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-03-04 14:56:20 +0000 |
commit | a3488f6c392871b033ad12650863d786cef735ad (patch) | |
tree | 8ff09cd3306cc3ae27d73419c34098a2a750922a /poi-ooxml/src | |
parent | db635998335852c0824623e3e2d55be23f546f7f (diff) | |
download | poi-a3488f6c392871b033ad12650863d786cef735ad.tar.gz poi-a3488f6c392871b033ad12650863d786cef735ad.zip |
[bug-68703] fix issue with XSLFTextRuns in XSLFTableCells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916108 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-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")) { |