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
This commit is contained in:
Dominik Stadler 2017-06-18 05:59:31 +00:00
parent 128ba623f8
commit 66bf6c5ad7

View 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;
}
}