]> source.dussan.org Git - poi.git/commitdiff
restore JDK5 compatibility
authorSergey Vladimirov <sergey@apache.org>
Mon, 24 Oct 2011 17:02:43 +0000 (17:02 +0000)
committerSergey Vladimirov <sergey@apache.org>
Mon, 24 Oct 2011 17:02:43 +0000 (17:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1188233 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java

index bdaa58620456c9464a307c6f2ec3a59f65039b2e..beb23bdec0b910b71553d534759ed5d472566975 100644 (file)
@@ -260,9 +260,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape {
                 break;\r
             case ARROW:\r
                 GeneralPath arrow = new GeneralPath();\r
-                arrow.moveTo(-lineWidth * 3, -lineWidth * 2);\r
+                arrow.moveTo((float) (-lineWidth * 3), (float) (-lineWidth * 2));\r
                 arrow.lineTo(0, 0);\r
-                arrow.lineTo(-lineWidth * 3, lineWidth * 2);\r
+                arrow.lineTo((float) (-lineWidth * 3), (float) (lineWidth * 2));\r
                 shape = arrow;\r
                 at.translate(x2, y2);\r
                 at.rotate(alpha);\r
@@ -271,9 +271,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape {
                 scaleY = tailWidth.ordinal() + 1;\r
                 scaleX = tailLength.ordinal() + 1;\r
                 GeneralPath triangle = new GeneralPath();\r
-                triangle.moveTo(-lineWidth * scaleX, -lineWidth * scaleY/2);\r
+                triangle.moveTo((float) (-lineWidth * scaleX), (float) (-lineWidth * scaleY / 2));\r
                 triangle.lineTo(0, 0);\r
-                triangle.lineTo(-lineWidth * scaleX, lineWidth * scaleY/2);\r
+                triangle.lineTo((float) (-lineWidth * scaleX), (float) (lineWidth * scaleY / 2));\r
                 triangle.closePath();\r
                 shape = triangle;\r
                 at.translate(x2, y2);\r
@@ -314,9 +314,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape {
             case STEALTH:\r
             case ARROW:\r
                 GeneralPath arrow = new GeneralPath();\r
-                arrow.moveTo(lineWidth * 3 * scaleX, -lineWidth * scaleY * 2);\r
+                arrow.moveTo((float) (lineWidth * 3 * scaleX), (float) (-lineWidth * scaleY * 2));\r
                 arrow.lineTo(0, 0);\r
-                arrow.lineTo(lineWidth * 3 * scaleX, lineWidth * scaleY * 2);\r
+                arrow.lineTo((float) (lineWidth * 3 * scaleX), (float) (lineWidth * scaleY * 2));\r
                 shape = arrow;\r
                 at.translate(x1, y1);\r
                 at.rotate(alpha);\r
@@ -325,9 +325,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape {
                 scaleY = headWidth.ordinal() + 1;\r
                 scaleX = headLength.ordinal() + 1;\r
                 GeneralPath triangle = new GeneralPath();\r
-                triangle.moveTo(lineWidth * scaleX, -lineWidth * scaleY/2);\r
+                triangle.moveTo((float) (lineWidth * scaleX), (float) (-lineWidth * scaleY / 2));\r
                 triangle.lineTo(0, 0);\r
-                triangle.lineTo(lineWidth * scaleX, lineWidth * scaleY/2);\r
+                triangle.lineTo((float) (lineWidth * scaleX), (float) (lineWidth * scaleY / 2));\r
                 triangle.closePath();\r
                 shape = triangle;\r
                 at.translate(x1, y1);\r