mirror of https://github.com/apache/poi.git
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:
parent
314f7f53ea
commit
2dff049db9
|
@ -902,7 +902,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
public void setSpacingAfter(int spaces) {
|
public void setSpacingAfter(int spaces) {
|
||||||
CTSpacing spacing = getCTSpacing(true);
|
CTSpacing spacing = getCTSpacing(true);
|
||||||
if (spacing != null) {
|
if (spacing != null) {
|
||||||
BigInteger bi = new BigInteger("" + spaces);
|
BigInteger bi = new BigInteger(Integer.toString(spaces));
|
||||||
spacing.setAfter(bi);
|
spacing.setAfter(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -939,7 +939,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setSpacingAfterLines(int spaces) {
|
public void setSpacingAfterLines(int spaces) {
|
||||||
CTSpacing spacing = getCTSpacing(true);
|
CTSpacing spacing = getCTSpacing(true);
|
||||||
BigInteger bi = new BigInteger("" + spaces);
|
BigInteger bi = new BigInteger(Integer.toString(spaces));
|
||||||
spacing.setAfterLines(bi);
|
spacing.setAfterLines(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setSpacingBefore(int spaces) {
|
public void setSpacingBefore(int spaces) {
|
||||||
CTSpacing spacing = getCTSpacing(true);
|
CTSpacing spacing = getCTSpacing(true);
|
||||||
BigInteger bi = new BigInteger("" + spaces);
|
BigInteger bi = new BigInteger(Integer.toString(spaces));
|
||||||
spacing.setBefore(bi);
|
spacing.setBefore(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -998,7 +998,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setSpacingBeforeLines(int spaces) {
|
public void setSpacingBeforeLines(int spaces) {
|
||||||
CTSpacing spacing = getCTSpacing(true);
|
CTSpacing spacing = getCTSpacing(true);
|
||||||
BigInteger bi = new BigInteger("" + spaces);
|
BigInteger bi = new BigInteger(Integer.toString(spaces));
|
||||||
spacing.setBeforeLines(bi);
|
spacing.setBeforeLines(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1119,7 +1119,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setIndentationLeft(int indentation) {
|
public void setIndentationLeft(int indentation) {
|
||||||
CTInd indent = getCTInd(true);
|
CTInd indent = getCTInd(true);
|
||||||
BigInteger bi = new BigInteger("" + indentation);
|
BigInteger bi = new BigInteger(Integer.toString(indentation));
|
||||||
indent.setLeft(bi);
|
indent.setLeft(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1158,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setIndentationRight(int indentation) {
|
public void setIndentationRight(int indentation) {
|
||||||
CTInd indent = getCTInd(true);
|
CTInd indent = getCTInd(true);
|
||||||
BigInteger bi = new BigInteger("" + indentation);
|
BigInteger bi = new BigInteger(Integer.toString(indentation));
|
||||||
indent.setRight(bi);
|
indent.setRight(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1196,7 +1196,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
|
|
||||||
public void setIndentationHanging(int indentation) {
|
public void setIndentationHanging(int indentation) {
|
||||||
CTInd indent = getCTInd(true);
|
CTInd indent = getCTInd(true);
|
||||||
BigInteger bi = new BigInteger("" + indentation);
|
BigInteger bi = new BigInteger(Integer.toString(indentation));
|
||||||
indent.setHanging(bi);
|
indent.setHanging(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1237,7 +1237,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||||
*/
|
*/
|
||||||
public void setIndentationFirstLine(int indentation) {
|
public void setIndentationFirstLine(int indentation) {
|
||||||
CTInd indent = getCTInd(true);
|
CTInd indent = getCTInd(true);
|
||||||
BigInteger bi = new BigInteger("" + indentation);
|
BigInteger bi = new BigInteger(Integer.toString(indentation));
|
||||||
indent.setFirstLine(bi);
|
indent.setFirstLine(bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -807,7 +807,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setFontSize(int size) {
|
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();
|
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
|
||||||
CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz();
|
CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz();
|
||||||
ctSize.setVal(bint.multiply(new BigInteger("2")));
|
ctSize.setVal(bint.multiply(new BigInteger("2")));
|
||||||
|
@ -851,7 +851,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
|
||||||
* values will lower it.
|
* values will lower it.
|
||||||
*/
|
*/
|
||||||
public void setTextPosition(int val) {
|
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();
|
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
|
||||||
CTSignedHpsMeasure position = pr.isSetPosition() ? pr.getPosition() : pr.addNewPosition();
|
CTSignedHpsMeasure position = pr.isSetPosition() ? pr.getPosition() : pr.addNewPosition();
|
||||||
position.setVal(bint);
|
position.setVal(bint);
|
||||||
|
|
|
@ -278,7 +278,7 @@ public class XWPFTable implements IBodyElement, ISDTContents {
|
||||||
public void setWidth(int width) {
|
public void setWidth(int width) {
|
||||||
CTTblPr tblPr = getTblPr();
|
CTTblPr tblPr = getTblPr();
|
||||||
CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr.addNewTblW();
|
CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr.addNewTblW();
|
||||||
tblWidth.setW(new BigInteger("" + width));
|
tblWidth.setW(new BigInteger(Integer.toString(width)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class XWPFTableRow {
|
||||||
public void setHeight(int height) {
|
public void setHeight(int height) {
|
||||||
CTTrPr properties = getTrPr();
|
CTTrPr properties = getTrPr();
|
||||||
CTHeight h = properties.sizeOfTrHeightArray() == 0 ? properties.addNewTrHeight() : properties.getTrHeightArray(0);
|
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() {
|
private CTTrPr getTrPr() {
|
||||||
|
|
Loading…
Reference in New Issue