aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-03-21 18:25:38 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-03-21 18:25:38 +0000
commitd3de3636cfb3b6ae89b64069292b515bd2702a96 (patch)
tree1463969117794baa1484c3d932b53907e224238e /src/java/org/apache
parent8130d2c70fb1de5ff31b476698c75b407a418f8a (diff)
downloadpoi-d3de3636cfb3b6ae89b64069292b515bd2702a96.tar.gz
poi-d3de3636cfb3b6ae89b64069292b515bd2702a96.zip
#64241 - XSLF - Wrong scheme colors used when rendering
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875499 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawSimpleShape.java4
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawTextParagraph.java4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/java/org/apache/poi/sl/draw/DrawSimpleShape.java b/src/java/org/apache/poi/sl/draw/DrawSimpleShape.java
index cc50ed737c..98e8286be8 100644
--- a/src/java/org/apache/poi/sl/draw/DrawSimpleShape.java
+++ b/src/java/org/apache/poi/sl/draw/DrawSimpleShape.java
@@ -139,13 +139,11 @@ public class DrawSimpleShape extends DrawShape {
}
protected Paint getFillPaint(Graphics2D graphics) {
- final PaintStyle ps = getShape().getFillStyle().getPaint();
DrawPaint drawPaint = DrawFactory.getInstance(graphics).getPaint(getShape());
- return drawPaint.getPaint(graphics, ps);
+ return drawPaint.getPaint(graphics, getShape().getFillStyle().getPaint());
}
protected Paint getLinePaint(Graphics2D graphics) {
- final PaintStyle ps = getShape().getFillStyle().getPaint();
DrawPaint drawPaint = DrawFactory.getInstance(graphics).getPaint(getShape());
return drawPaint.getPaint(graphics, getShape().getStrokeStyle().getPaint());
}
diff --git a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
index c1de9c90e1..c68eb44e0e 100644
--- a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
+++ b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
@@ -568,7 +568,7 @@ public class DrawTextParagraph implements Drawable {
text = new StringBuilder();
}
- PlaceableShape<?,?> ps = getParagraphShape();
+ final DrawPaint dp = new DrawPaint(getParagraphShape());
DrawFontManager dfm = DrawFactory.getInstance(graphics).getFontManager(graphics);
assert(dfm != null);
@@ -587,7 +587,7 @@ public class DrawTextParagraph implements Drawable {
int endIndex = text.length();
PaintStyle fgPaintStyle = run.getFontColor();
- Paint fgPaint = new DrawPaint(ps).getPaint(graphics, fgPaintStyle);
+ Paint fgPaint = dp.getPaint(graphics, fgPaintStyle);
attList.add(new AttributedStringData(TextAttribute.FOREGROUND, fgPaint, beginIndex, endIndex));
Double fontSz = run.getFontSize();