aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-06-18 05:59:31 +0000
committerDominik Stadler <centic@apache.org>2017-06-18 05:59:31 +0000
commit5c5475a09933b24713895cab8ce16c1041bb284c (patch)
tree81a03de589781dec678d7c10519724bbff88249a /src/java
parenteb417057c483a0dd1842096954f58aca53691acd (diff)
downloadpoi-5c5475a09933b24713895cab8ce16c1041bb284c.tar.gz
poi-5c5475a09933b24713895cab8ce16c1041bb284c.zip
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
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawFreeformShape.java7
1 files 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<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;
}
}