From 5c5475a09933b24713895cab8ce16c1041bb284c Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 18 Jun 2017 05:59:31 +0000 Subject: [PATCH] Need to do the casting differently to make the code compile with Java 6 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799038 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/sl/draw/DrawFreeformShape.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java b/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java index de9dd5322d..d0025cb4fd 100644 --- a/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java +++ b/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java @@ -29,6 +29,7 @@ import org.apache.poi.sl.draw.geom.Path; import org.apache.poi.sl.usermodel.FillStyle; import org.apache.poi.sl.usermodel.FreeformShape; import org.apache.poi.sl.usermodel.StrokeStyle; +import org.apache.poi.sl.usermodel.TextShape; public class DrawFreeformShape extends DrawAutoShape { public DrawFreeformShape(FreeformShape shape) { @@ -37,7 +38,7 @@ public class DrawFreeformShape extends DrawAutoShape { protected Collection computeOutlines(Graphics2D graphics) { List lst = new ArrayList(); - FreeformShape fsh = getShape(); + FreeformShape fsh = (FreeformShape) getShape(); Path2D sh = fsh.getPath(); AffineTransform tx = (AffineTransform)graphics.getRenderingHint(Drawable.GROUP_TRANSFORM); @@ -55,7 +56,7 @@ public class DrawFreeformShape extends DrawAutoShape { } @Override - protected FreeformShape getShape() { - return (FreeformShape)shape; + protected TextShape getShape() { + return (TextShape)shape; } }