]> source.dussan.org Git - poi.git/commitdiff
Need to do the casting differently to make the code compile with Java 6
authorDominik Stadler <centic@apache.org>
Sun, 18 Jun 2017 05:59:31 +0000 (05:59 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 18 Jun 2017 05:59:31 +0000 (05:59 +0000)
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

index de9dd5322d5321864f09588bd799d3779359ba3f..d0025cb4fde1f73d671c91f227f6f1cdd2face80 100644 (file)
@@ -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<Outline> computeOutlines(Graphics2D graphics) {
         List<Outline> lst = new ArrayList<Outline>();
-        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;
     }
 }