use Integer.toString to convert ints to strings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1825457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-02-27 14:24:50 +00:00
parent 314f7f53ea
commit 2dff049db9
4 changed files with 12 additions and 12 deletions

View File

@ -902,7 +902,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
public void setSpacingAfter(int spaces) {
CTSpacing spacing = getCTSpacing(true);
if (spacing != null) {
BigInteger bi = new BigInteger("" + spaces);
BigInteger bi = new BigInteger(Integer.toString(spaces));
spacing.setAfter(bi);
}
@ -939,7 +939,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setSpacingAfterLines(int spaces) {
CTSpacing spacing = getCTSpacing(true);
BigInteger bi = new BigInteger("" + spaces);
BigInteger bi = new BigInteger(Integer.toString(spaces));
spacing.setAfterLines(bi);
}
@ -967,7 +967,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setSpacingBefore(int spaces) {
CTSpacing spacing = getCTSpacing(true);
BigInteger bi = new BigInteger("" + spaces);
BigInteger bi = new BigInteger(Integer.toString(spaces));
spacing.setBefore(bi);
}
@ -998,7 +998,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setSpacingBeforeLines(int spaces) {
CTSpacing spacing = getCTSpacing(true);
BigInteger bi = new BigInteger("" + spaces);
BigInteger bi = new BigInteger(Integer.toString(spaces));
spacing.setBeforeLines(bi);
}
@ -1119,7 +1119,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setIndentationLeft(int indentation) {
CTInd indent = getCTInd(true);
BigInteger bi = new BigInteger("" + indentation);
BigInteger bi = new BigInteger(Integer.toString(indentation));
indent.setLeft(bi);
}
@ -1158,7 +1158,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setIndentationRight(int indentation) {
CTInd indent = getCTInd(true);
BigInteger bi = new BigInteger("" + indentation);
BigInteger bi = new BigInteger(Integer.toString(indentation));
indent.setRight(bi);
}
@ -1196,7 +1196,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
public void setIndentationHanging(int indentation) {
CTInd indent = getCTInd(true);
BigInteger bi = new BigInteger("" + indentation);
BigInteger bi = new BigInteger(Integer.toString(indentation));
indent.setHanging(bi);
}
@ -1237,7 +1237,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*/
public void setIndentationFirstLine(int indentation) {
CTInd indent = getCTInd(true);
BigInteger bi = new BigInteger("" + indentation);
BigInteger bi = new BigInteger(Integer.toString(indentation));
indent.setFirstLine(bi);
}

View File

@ -807,7 +807,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
*/
@Override
public void setFontSize(int size) {
BigInteger bint = new BigInteger("" + size);
BigInteger bint = new BigInteger(Integer.toString(size));
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz();
ctSize.setVal(bint.multiply(new BigInteger("2")));
@ -851,7 +851,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
* values will lower it.
*/
public void setTextPosition(int val) {
BigInteger bint = new BigInteger("" + val);
BigInteger bint = new BigInteger(Integer.toString(val));
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
CTSignedHpsMeasure position = pr.isSetPosition() ? pr.getPosition() : pr.addNewPosition();
position.setVal(bint);

View File

@ -278,7 +278,7 @@ public class XWPFTable implements IBodyElement, ISDTContents {
public void setWidth(int width) {
CTTblPr tblPr = getTblPr();
CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr.addNewTblW();
tblWidth.setW(new BigInteger("" + width));
tblWidth.setW(new BigInteger(Integer.toString(width)));
}
/**

View File

@ -115,7 +115,7 @@ public class XWPFTableRow {
public void setHeight(int height) {
CTTrPr properties = getTrPr();
CTHeight h = properties.sizeOfTrHeightArray() == 0 ? properties.addNewTrHeight() : properties.getTrHeightArray(0);
h.setVal(new BigInteger("" + height));
h.setVal(new BigInteger(Integer.toString(height)));
}
private CTTrPr getTrPr() {