poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1156551 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java
Date Thu, 11 Aug 2011 09:17:13 GMT
Author: yegor
Date: Thu Aug 11 09:17:12 2011
New Revision: 1156551

URL: http://svn.apache.org/viewvc?rev=1156551&view=rev
Log:
keep compiler from JDK 1.5.22 happy 

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java?rev=1156551&r1=1156550&r2=1156551&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java Thu Aug
11 09:17:12 2011
@@ -121,24 +121,24 @@ public class XSLFFreeformShape extends X
             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 X
         return ct;
     }
 
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message