diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:09:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:17 +0200 |
commit | ff0ad0493ee1729c726587f667761b04101d774c (patch) | |
tree | 8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /xmerge/source | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'xmerge/source')
6 files changed, 9 insertions, 9 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java index 4ed8f865c9bf..0234a1b4a6ea 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java @@ -542,7 +542,7 @@ public class ParaStyle extends Style implements Cloneable { if (isSet[LINE_HEIGHT]) { String stringVal; if ((value[LINE_HEIGHT] & LH_PCT) != 0) - stringVal = (new Integer(value[LINE_HEIGHT] & LH_VALUEMASK)).toString() + "%"; + stringVal = (Integer.valueOf(value[LINE_HEIGHT] & LH_VALUEMASK)).toString() + "%"; else { double temp = (value[LINE_HEIGHT] & LH_VALUEMASK) / 100.0; stringVal = (new Double(temp)).toString() + "mm"; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java index c3b4857e7f5c..9c79c9898c9f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java @@ -559,7 +559,7 @@ public class TextStyle extends Style implements Cloneable { node.setAttribute("style:text-position", "sub 58%"); if (sizeInPoints != 0) { - Integer fs = new Integer(sizeInPoints); + Integer fs = Integer.valueOf(sizeInPoints); node.setAttribute("fo:font-size", fs.toString() + "pt"); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index e907dd481822..1bde03f48da2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -412,7 +412,7 @@ public class CellStyle extends Style implements Cloneable { node.setAttribute("style:text-position", "sub 58%"); if (fmt.getFontSize() != 0) { - Integer fs = new Integer(fmt.getFontSize()); + Integer fs = Integer.valueOf(fmt.getFontSize()); node.setAttribute("fo:font-size", fs.toString() + "pt"); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index c9bee878fd23..c79abc3a1406 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -400,7 +400,7 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, // Get the number of times the row is repeated String rowsRepeatedString = rowsRepeatedNode.getNodeValue(); - Integer rowsRepeatedInt = new Integer(rowsRepeatedString); + Integer rowsRepeatedInt = Integer.valueOf(rowsRepeatedString); rowsRepeated = rowsRepeatedInt.intValue(); @@ -594,7 +594,7 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, // Get the number of times the cell is repeated String colsRepeatedString = colsRepeatedNode.getNodeValue(); - Integer colsRepeatedInt = new Integer(colsRepeatedString); + Integer colsRepeatedInt = Integer.valueOf(colsRepeatedString); colsRepeated = colsRepeatedInt.intValue(); } else { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java index f66c71abed06..ba76967ea63f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java @@ -81,7 +81,7 @@ public class IntArrayList { int needToAdd = minCapacity - list.size(); if (needToAdd > 0) { for (int i = 0; i < needToAdd; i++) { - list.add(new Integer(fillValue)); + list.add(Integer.valueOf(fillValue)); } } } @@ -97,7 +97,7 @@ public class IntArrayList { * selected element of the list. */ public void set(int index, int value) { - list.set(index, new Integer(value)); + list.set(index, Integer.valueOf(value)); } @@ -108,7 +108,7 @@ public class IntArrayList { * element that we are appending to the list. */ public void add(int value) { - list.add(new Integer(value)); + list.add(Integer.valueOf(value)); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java index 35cf0eb9bbad..eef2ded2e76f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java @@ -101,7 +101,7 @@ public class OfficeUtil implements OfficeConstants { Element spaceNode = parentDoc.createElement(TAG_SPACE); spaceNode.setAttribute(ATTRIBUTE_SPACE_COUNT, - new Integer(nrSpaces).toString()); + Integer.valueOf(nrSpaces).toString()); nodeVec.add(spaceNode); text = text.substring(nrSpaces); } |