aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl/draw
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2018-12-25 09:59:58 +0000
committerDominik Stadler <centic@apache.org>2018-12-25 09:59:58 +0000
commit19884d0ca33018d1e417fafd253ec63cf8c31ccd (patch)
tree4d62b20301f3c4cb1c5995742d27fa6a6068dd34 /src/java/org/apache/poi/sl/draw
parent7421bc9a17d6f3803d2d9e44e6535d6004a6090b (diff)
downloadpoi-19884d0ca33018d1e417fafd253ec63cf8c31ccd.tar.gz
poi-19884d0ca33018d1e417fafd253ec63cf8c31ccd.zip
Code-style: Unify how arrays are specified from C-style to normal Java-style
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/sl/draw')
-rw-r--r--src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java2
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawFactory.java2
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawFontManagerDefault.java2
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawShape.java4
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawTableShape.java8
-rw-r--r--src/java/org/apache/poi/sl/draw/ImageRenderer.java2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
index c37ce006a0..145791f401 100644
--- a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
+++ b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
@@ -72,7 +72,7 @@ public class BitmapImageRenderer implements ImageRenderer {
}
@Override
- public void loadImage(byte data[], String contentType) throws IOException {
+ public void loadImage(byte[] data, String contentType) throws IOException {
img = readImage(new ByteArrayInputStream(data), contentType);
}
diff --git a/src/java/org/apache/poi/sl/draw/DrawFactory.java b/src/java/org/apache/poi/sl/draw/DrawFactory.java
index 99c9942b67..6a032d6c6e 100644
--- a/src/java/org/apache/poi/sl/draw/DrawFactory.java
+++ b/src/java/org/apache/poi/sl/draw/DrawFactory.java
@@ -211,7 +211,7 @@ public class DrawFactory {
}
}
-
+
/**
* Return a FontManager, either registered beforehand or a default implementation
*
diff --git a/src/java/org/apache/poi/sl/draw/DrawFontManagerDefault.java b/src/java/org/apache/poi/sl/draw/DrawFontManagerDefault.java
index a428943699..7dcd704c4e 100644
--- a/src/java/org/apache/poi/sl/draw/DrawFontManagerDefault.java
+++ b/src/java/org/apache/poi/sl/draw/DrawFontManagerDefault.java
@@ -76,7 +76,7 @@ public class DrawFontManagerDefault implements DrawFontManager {
public static String mapSymbolChars(String text) {
// wingdings doesn't contain high-surrogates, so chars are ok
boolean changed = false;
- char chrs[] = text.toCharArray();
+ char[] chrs = text.toCharArray();
for (int i=0; i<chrs.length; i++) {
// only change valid chars
if ((0x20 <= chrs[i] && chrs[i] <= 0x7f) ||
diff --git a/src/java/org/apache/poi/sl/draw/DrawShape.java b/src/java/org/apache/poi/sl/draw/DrawShape.java
index 0c6054c8a9..67162ac4a8 100644
--- a/src/java/org/apache/poi/sl/draw/DrawShape.java
+++ b/src/java/org/apache/poi/sl/draw/DrawShape.java
@@ -65,7 +65,7 @@ public class DrawShape implements Drawable {
final Rectangle2D anchor = getAnchor(graphics, ps);
- char cmds[] = isHSLF ? new char[]{ 'h','v','r' } : new char[]{ 'r','h','v' };
+ char[] cmds = isHSLF ? new char[]{'h', 'v', 'r'} : new char[]{'r', 'h', 'v'};
for (char ch : cmds) {
switch (ch) {
case 'h':
@@ -232,7 +232,7 @@ public class DrawShape implements Drawable {
lineDash = LineDash.SOLID;
}
- int dashPatI[] = lineDash.pattern;
+ int[] dashPatI = lineDash.pattern;
final float dash_phase = 0;
float[] dashPatF = null;
if (dashPatI != null) {
diff --git a/src/java/org/apache/poi/sl/draw/DrawTableShape.java b/src/java/org/apache/poi/sl/draw/DrawTableShape.java
index 703fb04d82..1974f0d9a7 100644
--- a/src/java/org/apache/poi/sl/draw/DrawTableShape.java
+++ b/src/java/org/apache/poi/sl/draw/DrawTableShape.java
@@ -165,7 +165,7 @@ public class DrawTableShape extends DrawShape {
final int rows = table.getNumberOfRows();
final int cols = table.getNumberOfColumns();
- BorderEdge edges[] = { BorderEdge.top, BorderEdge.left, null, null };
+ BorderEdge[] edges = {BorderEdge.top, BorderEdge.left, null, null};
for (int row = 0; row < rows; row++) {
for (int col = 0; col < cols; col++) {
edges[2] = (col == cols - 1) ? BorderEdge.right : null;
@@ -189,7 +189,7 @@ public class DrawTableShape extends DrawShape {
final int rows = table.getNumberOfRows();
final int cols = table.getNumberOfColumns();
- BorderEdge edges[] = new BorderEdge[4];
+ BorderEdge[] edges = new BorderEdge[4];
for (int row = 0; row < rows; row++) {
for (int col = 0; col < cols; col++) {
edges[0] = (col == 0) ? BorderEdge.left : null;
@@ -215,7 +215,7 @@ public class DrawTableShape extends DrawShape {
final int rows = table.getNumberOfRows();
final int cols = table.getNumberOfColumns();
- BorderEdge edges[] = new BorderEdge[2];
+ BorderEdge[] edges = new BorderEdge[2];
for (int row = 0; row < rows; row++) {
for (int col = 0; col < cols; col++) {
edges[0] = (col > 0 && col < cols - 1) ? BorderEdge.right : null;
@@ -232,7 +232,7 @@ public class DrawTableShape extends DrawShape {
* @param edges the border edges
* @param args the border attributes
*/
- private static void setEdges(TableCell<?,?> cell, BorderEdge edges[], Object... args) {
+ private static void setEdges(TableCell<?,?> cell, BorderEdge[] edges, Object... args) {
if (cell == null) {
return;
}
diff --git a/src/java/org/apache/poi/sl/draw/ImageRenderer.java b/src/java/org/apache/poi/sl/draw/ImageRenderer.java
index b2355b3012..330c02ab01 100644
--- a/src/java/org/apache/poi/sl/draw/ImageRenderer.java
+++ b/src/java/org/apache/poi/sl/draw/ImageRenderer.java
@@ -96,7 +96,7 @@ public interface ImageRenderer {
* @param data the raw image bytes
* @param contentType the content type
*/
- void loadImage(byte data[], String contentType) throws IOException;
+ void loadImage(byte[] data, String contentType) throws IOException;
/**
* @return the dimension of the buffered image