From abad8d1b09c57f6b6753a71f582ce0ba0c03cf05 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Thu, 11 Aug 2011 09:17:12 +0000 Subject: [PATCH] keep compiler from JDK 1.5.22 happy git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1156551 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xslf/usermodel/XSLFFreeformShape.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java index a494a3cab9..a0b3ab0558 100755 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java @@ -121,24 +121,24 @@ public class XSLFFreeformShape extends XSLFAutoShape { for(XmlObject ch : spPath.selectPath("*")){ if(ch instanceof CTPath2DMoveTo){ CTAdjPoint2D pt = ((CTPath2DMoveTo)ch).getPt(); - path.moveTo(Units.toPoints((Long)pt.getX() + x0), - Units.toPoints((Long)pt.getY() + y0)); + path.moveTo((float)Units.toPoints((Long)pt.getX() + x0), + (float)Units.toPoints((Long)pt.getY() + y0)); } else if (ch instanceof CTPath2DLineTo){ CTAdjPoint2D pt = ((CTPath2DLineTo)ch).getPt(); - path.lineTo(Units.toPoints((Long)pt.getX() + x0), - Units.toPoints((Long)pt.getY() + y0)); + path.lineTo((float)Units.toPoints((Long)pt.getX() + x0), + (float)Units.toPoints((Long)pt.getY() + y0)); } else if (ch instanceof CTPath2DCubicBezierTo){ CTPath2DCubicBezierTo bez = ((CTPath2DCubicBezierTo)ch); CTAdjPoint2D pt1 = bez.getPtArray(0); CTAdjPoint2D pt2 = bez.getPtArray(1); CTAdjPoint2D pt3 = bez.getPtArray(2); path.curveTo( - Units.toPoints((Long) pt1.getX() + x0), - Units.toPoints((Long) pt1.getY() + y0), - Units.toPoints((Long) pt2.getX() + x0), - Units.toPoints((Long) pt2.getY() + y0), - Units.toPoints((Long) pt3.getX() + x0), - Units.toPoints((Long) pt3.getY() + y0) + (float)Units.toPoints((Long) pt1.getX() + x0), + (float)Units.toPoints((Long) pt1.getY() + y0), + (float)Units.toPoints((Long) pt2.getX() + x0), + (float)Units.toPoints((Long) pt2.getY() + y0), + (float)Units.toPoints((Long) pt3.getX() + x0), + (float)Units.toPoints((Long) pt3.getY() + y0) ); } else if (ch instanceof CTPath2DClose){ @@ -175,4 +175,4 @@ public class XSLFFreeformShape extends XSLFAutoShape { return ct; } -} \ No newline at end of file +} -- 2.39.5