From: Sergey Vladimirov Date: Mon, 24 Oct 2011 17:02:43 +0000 (+0000) Subject: restore JDK5 compatibility X-Git-Tag: REL_3_8_BETA5~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e2891cf6d92860e8c86f877b56e83e0a9819c0ba;p=poi.git restore JDK5 compatibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1188233 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java index bdaa586204..beb23bdec0 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java @@ -260,9 +260,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape { break; case ARROW: GeneralPath arrow = new GeneralPath(); - arrow.moveTo(-lineWidth * 3, -lineWidth * 2); + arrow.moveTo((float) (-lineWidth * 3), (float) (-lineWidth * 2)); arrow.lineTo(0, 0); - arrow.lineTo(-lineWidth * 3, lineWidth * 2); + arrow.lineTo((float) (-lineWidth * 3), (float) (lineWidth * 2)); shape = arrow; at.translate(x2, y2); at.rotate(alpha); @@ -271,9 +271,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape { scaleY = tailWidth.ordinal() + 1; scaleX = tailLength.ordinal() + 1; GeneralPath triangle = new GeneralPath(); - triangle.moveTo(-lineWidth * scaleX, -lineWidth * scaleY/2); + triangle.moveTo((float) (-lineWidth * scaleX), (float) (-lineWidth * scaleY / 2)); triangle.lineTo(0, 0); - triangle.lineTo(-lineWidth * scaleX, lineWidth * scaleY/2); + triangle.lineTo((float) (-lineWidth * scaleX), (float) (lineWidth * scaleY / 2)); triangle.closePath(); shape = triangle; at.translate(x2, y2); @@ -314,9 +314,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape { case STEALTH: case ARROW: GeneralPath arrow = new GeneralPath(); - arrow.moveTo(lineWidth * 3 * scaleX, -lineWidth * scaleY * 2); + arrow.moveTo((float) (lineWidth * 3 * scaleX), (float) (-lineWidth * scaleY * 2)); arrow.lineTo(0, 0); - arrow.lineTo(lineWidth * 3 * scaleX, lineWidth * scaleY * 2); + arrow.lineTo((float) (lineWidth * 3 * scaleX), (float) (lineWidth * scaleY * 2)); shape = arrow; at.translate(x1, y1); at.rotate(alpha); @@ -325,9 +325,9 @@ public class XSLFConnectorShape extends XSLFSimpleShape { scaleY = headWidth.ordinal() + 1; scaleX = headLength.ordinal() + 1; GeneralPath triangle = new GeneralPath(); - triangle.moveTo(lineWidth * scaleX, -lineWidth * scaleY/2); + triangle.moveTo((float) (lineWidth * scaleX), (float) (-lineWidth * scaleY / 2)); triangle.lineTo(0, 0); - triangle.lineTo(lineWidth * scaleX, lineWidth * scaleY/2); + triangle.lineTo((float) (lineWidth * scaleX), (float) (lineWidth * scaleY / 2)); triangle.closePath(); shape = triangle; at.translate(x1, y1);