You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/06/18 05:59:31 UTC
svn commit: r1799038 -
/poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java
Author: centic
Date: Sun Jun 18 05:59:31 2017
New Revision: 1799038
URL: http://svn.apache.org/viewvc?rev=1799038&view=rev
Log:
Need to do the casting differently to make the code compile with Java 6
Modified:
poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java
Modified: poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java?rev=1799038&r1=1799037&r2=1799038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java Sun Jun 18 05:59:31 2017
@@ -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 D
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 D
}
@Override
- protected FreeformShape<?,?> getShape() {
- return (FreeformShape<?,?>)shape;
+ protected TextShape<?,?> getShape() {
+ return (TextShape<?,?>)shape;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org