mirror of
https://github.com/apache/poi.git
synced 2025-03-06 17:09:08 +00:00
[github-366] remove unnecessary local vars. Thanks to Arturo Bernal. This closes #366
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3247a4160e
commit
eaa27548fa
@ -408,11 +408,10 @@ public abstract class XDDFChartAxis implements HasShapeProperties {
|
||||
}
|
||||
|
||||
protected long getNextAxId(CTPlotArea plotArea) {
|
||||
long totalAxisCount = 0L
|
||||
return 0L
|
||||
+ plotArea.sizeOfValAxArray()
|
||||
+ plotArea.sizeOfCatAxArray()
|
||||
+ plotArea.sizeOfDateAxArray()
|
||||
+ plotArea.sizeOfSerAxArray();
|
||||
return totalAxisCount;
|
||||
}
|
||||
}
|
||||
|
@ -492,8 +492,7 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
||||
private boolean isCursorInHdrF(XmlCursor cursor) {
|
||||
try (XmlCursor verify = cursor.newCursor()) {
|
||||
verify.toParent();
|
||||
boolean result = (verify.getObject() == this.headerFooter);
|
||||
return result;
|
||||
return (verify.getObject() == this.headerFooter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,8 +336,7 @@ public class XWPFTableCell implements IBody, ICell {
|
||||
private boolean isCursorInTableCell(XmlCursor cursor) {
|
||||
try (XmlCursor verify = cursor.newCursor()) {
|
||||
verify.toParent();
|
||||
boolean result = (verify.getObject() == this.ctTc);
|
||||
return result;
|
||||
return (verify.getObject() == this.ctTc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -447,8 +447,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||
if (val != null && !val.isEmpty()) {
|
||||
int codepage = ((LongPropertyValue) val.get(0)).getValue();
|
||||
try {
|
||||
String encoding = CodePageUtil.codepageToEncoding(codepage, true);
|
||||
generalcodepage = encoding;
|
||||
generalcodepage = CodePageUtil.codepageToEncoding(codepage, true);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
LOG.atWarn().log("Invalid codepage ID {} set for the message via {}, ignoring", box(codepage), MAPIProperty.MESSAGE_CODEPAGE);
|
||||
}
|
||||
@ -463,8 +462,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||
int codepage = LocaleUtil.getDefaultCodePageFromLCID(lcid);
|
||||
try {
|
||||
if (codepage != 0) {
|
||||
String encoding = CodePageUtil.codepageToEncoding(codepage, true);
|
||||
generalcodepage = encoding;
|
||||
generalcodepage = CodePageUtil.codepageToEncoding(codepage, true);
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
LOG.atWarn().log("Invalid codepage ID {}from locale ID{} set for the message via {}, ignoring", box(codepage), box(lcid), MAPIProperty.MESSAGE_LOCALE_ID);
|
||||
@ -482,8 +480,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||
if (header.toLowerCase(LocaleUtil.getUserLocale()).startsWith("content-type")) {
|
||||
Matcher m = GUESS_7_BIT_ENCODING_PATTERN.matcher(header);
|
||||
if (m.matches()) {
|
||||
String encoding = m.group(1);
|
||||
generalcodepage = encoding;
|
||||
generalcodepage = m.group(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public abstract class GrfhicAbstractType
|
||||
|
||||
public String toString()
|
||||
{
|
||||
String builder = "[Grfhic]\n" +
|
||||
return "[Grfhic]\n" +
|
||||
" .grfhic = " +
|
||||
" ( " + field_1_grfhic + " )\n" +
|
||||
" .fHtmlChecked = " + isFHtmlChecked() + '\n' +
|
||||
@ -103,7 +103,6 @@ public abstract class GrfhicAbstractType
|
||||
" .fHtmlHangingIndentBeneathNumber = " + isFHtmlHangingIndentBeneathNumber() + '\n' +
|
||||
" .fHtmlBuiltInBullet = " + isFHtmlBuiltInBullet() + '\n' +
|
||||
"[/Grfhic]";
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,8 +40,7 @@ public final class Areas implements Function {
|
||||
RefListEval refListEval = (RefListEval) valueEval;
|
||||
result = refListEval.getList().size();
|
||||
}
|
||||
NumberEval numberEval = new NumberEval(new NumberPtg(result));
|
||||
return numberEval;
|
||||
return new NumberEval(new NumberPtg(result));
|
||||
} catch (Exception e) {
|
||||
return ErrorEval.VALUE_INVALID;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user