From 5381a80cb066eb7274e5e60c494f76465f33984c Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Mon, 24 Oct 2011 17:02:43 +0000 Subject: [PATCH] restore JDK5 compatibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1188233 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xslf/usermodel/XSLFConnectorShape.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 bdaa58620..beb23bdec 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);