From: PJ Fanning Date: Mon, 4 Mar 2024 12:49:02 +0000 (+0000) Subject: [bug-68703] fix issue with XSLFTextRuns in XSLFTableCells X-Git-Tag: REL_5_3_0~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1c156c4005173605dd520f31edc514546e447fe9;p=poi.git [bug-68703] fix issue with XSLFTextRuns in XSLFTableCells git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916105 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java index 60b648244b..d8bcd25f1d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java @@ -75,7 +75,7 @@ public class XSLFTextParagraph implements TextParagraph cellParagraphs = cell.getTextParagraphs(); + List cellTextRuns = cellParagraphs.get(0).getTextRuns(); + PaintStyle fontColor = cellTextRuns.get(0).getFontColor(); + assertNotNull(fontColor); + assertTrue(fontColor instanceof PaintStyle.SolidPaint); + assertEquals(Color.black, ((PaintStyle.SolidPaint) fontColor).getSolidColor().getColor()); + } + } + } diff --git a/test-data/slideshow/bug68703.pptx b/test-data/slideshow/bug68703.pptx new file mode 100644 index 0000000000..ac62bce13b Binary files /dev/null and b/test-data/slideshow/bug68703.pptx differ