Let IntelliJ cleanup some code-warnings across the whole code-base: unnecessary toString or semicolon
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791720 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c89d312bad
commit
511c2544a8
@ -142,7 +142,7 @@ public class CopyCompare
|
||||
if (equal(oRoot, cRoot, messages)) {
|
||||
System.out.println("Equal");
|
||||
} else {
|
||||
System.out.println("Not equal: " + messages.toString());
|
||||
System.out.println("Not equal: " + messages);
|
||||
}
|
||||
cpfs.close();
|
||||
opfs.close();
|
||||
|
@ -159,7 +159,7 @@ public class PropertySetDescriptorRenderer extends DocumentDescriptorRenderer
|
||||
b.append(' ');
|
||||
System.arraycopy(value, ((byte[])value).length - 4, buf, 0, 4);
|
||||
} else if (value != null) {
|
||||
b.append(value.toString());
|
||||
b.append(value);
|
||||
} else {
|
||||
b.append("null");
|
||||
}
|
||||
|
@ -89,8 +89,8 @@ public class CheckFunctionsSupported {
|
||||
System.out.println(" All cells evaluated without error");
|
||||
} else {
|
||||
for (CellReference cr : probs.unevaluatableCells.keySet()) {
|
||||
System.out.println(" " + cr.formatAsString() + " - " +
|
||||
probs.unevaluatableCells.get(cr).toString());
|
||||
System.out.println(" " + cr.formatAsString() + " - " +
|
||||
probs.unevaluatableCells.get(cr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class IterateCells {
|
||||
for (Row row : sheet) {
|
||||
System.out.println("rownum: " + row.getRowNum());
|
||||
for (Cell cell : row) {
|
||||
System.out.println(cell.toString());
|
||||
System.out.println(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -198,9 +198,9 @@ public class TestExcelAntWorkbookUtil extends TestCase {
|
||||
precision);
|
||||
|
||||
//System.out.println(result);
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("evaluationCompletedWithError=false"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("returnValue=790.79"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("cellName='MortgageCalculator'!B4"));
|
||||
assertTrue("Had:" + result, result.toString().contains("evaluationCompletedWithError=false"));
|
||||
assertTrue("Had:" + result, result.toString().contains("returnValue=790.79"));
|
||||
assertTrue("Had:" + result, result.toString().contains("cellName='MortgageCalculator'!B4"));
|
||||
assertFalse(result.toString().contains("#N/A"));
|
||||
|
||||
assertFalse(result.evaluationCompleteWithError());
|
||||
@ -220,10 +220,10 @@ public class TestExcelAntWorkbookUtil extends TestCase {
|
||||
precision);
|
||||
|
||||
//System.out.println(result);
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("evaluationCompletedWithError=false"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("returnValue=790.79"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("cellName='MortgageCalculator'!B4"));
|
||||
assertFalse("Should not see an error, but had:" + result.toString(), result.toString().contains("#"));
|
||||
assertTrue("Had:" + result, result.toString().contains("evaluationCompletedWithError=false"));
|
||||
assertTrue("Had:" + result, result.toString().contains("returnValue=790.79"));
|
||||
assertTrue("Had:" + result, result.toString().contains("cellName='MortgageCalculator'!B4"));
|
||||
assertFalse("Should not see an error, but had:" + result, result.toString().contains("#"));
|
||||
|
||||
assertFalse(result.evaluationCompleteWithError());
|
||||
assertFalse(result.didTestPass());
|
||||
@ -242,10 +242,10 @@ public class TestExcelAntWorkbookUtil extends TestCase {
|
||||
precision);
|
||||
|
||||
System.out.println(result);
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("evaluationCompletedWithError=true"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("returnValue=0.0"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("cellName='ErrorCell'!A1"));
|
||||
assertTrue("Had:" + result.toString(), result.toString().contains("#N/A"));
|
||||
assertTrue("Had:" + result, result.toString().contains("evaluationCompletedWithError=true"));
|
||||
assertTrue("Had:" + result, result.toString().contains("returnValue=0.0"));
|
||||
assertTrue("Had:" + result, result.toString().contains("cellName='ErrorCell'!A1"));
|
||||
assertTrue("Had:" + result, result.toString().contains("#N/A"));
|
||||
|
||||
assertTrue(result.evaluationCompleteWithError());
|
||||
assertFalse(result.didTestPass());
|
||||
|
@ -40,10 +40,10 @@ public class HMEFFileHandler extends AbstractFileHandler {
|
||||
|
||||
// there are two test-files that have no body...
|
||||
if(!msg.getSubject().equals("Testing TNEF Message") && !msg.getSubject().equals("TNEF test message with attachments")) {
|
||||
assertNotNull("Had: " + msg.getBody() + ", " + msg.getSubject() + ", " + msg.getAttachments() + ": " + props.toString(),
|
||||
assertNotNull("Had: " + msg.getBody() + ", " + msg.getSubject() + ", " + msg.getAttachments() + ": " + props,
|
||||
msg.getBody());
|
||||
}
|
||||
assertNotNull("Had: " + msg.getBody() + ", " + msg.getSubject() + ", " + msg.getAttachments() + ": " + props.toString(),
|
||||
assertNotNull("Had: " + msg.getBody() + ", " + msg.getSubject() + ", " + msg.getAttachments() + ": " + props,
|
||||
msg.getSubject());
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ public abstract class AbstractEscherOptRecord extends EscherRecord
|
||||
|
||||
for ( EscherProperty property : properties )
|
||||
{
|
||||
stringBuilder.append(" ").append(property.toString()).append(nl);
|
||||
stringBuilder.append(" ").append(property).append(nl);
|
||||
}
|
||||
|
||||
return stringBuilder.toString();
|
||||
|
@ -134,7 +134,7 @@ public final class EscherArrayProperty extends EscherComplexProperty implements
|
||||
+ ", propName: " + EscherProperties.getPropertyName( getPropertyNumber() )
|
||||
+ ", complex: " + isComplex()
|
||||
+ ", blipId: " + isBlipId()
|
||||
+ ", data: " + '\n' + results.toString();
|
||||
+ ", data: " + '\n' + results;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -294,7 +294,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl
|
||||
+ " instance: 0x" + HexDump.toHex( getInstance() ) + nl
|
||||
+ " recordId: 0x" + HexDump.toHex( getRecordId() ) + nl
|
||||
+ " numchildren: " + _childRecords.size() + nl
|
||||
+ children.toString();
|
||||
+ children;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -145,7 +145,7 @@ public final class EscherDggRecord extends EscherRecord {
|
||||
" NumIdClusters: " + getNumIdClusters() + '\n' +
|
||||
" NumShapesSaved: " + field_3_numShapesSaved + '\n' +
|
||||
" DrawingsSaved: " + field_4_drawingsSaved + '\n' +
|
||||
"" + field_5_string.toString();
|
||||
"" + field_5_string;
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public final class EscherDump {
|
||||
{
|
||||
EscherRecord r = recordFactory.createRecord(data, pos);
|
||||
int bytesRead = r.fillFields(data, pos, recordFactory );
|
||||
out.println( r.toString() );
|
||||
out.println(r);
|
||||
pos += bytesRead;
|
||||
}
|
||||
}
|
||||
@ -202,7 +202,7 @@ public final class EscherDump {
|
||||
stringBuf.append( HexDump.toHex( recordBytesRemaining ) );
|
||||
stringBuf.append( "] instance: " );
|
||||
stringBuf.append( HexDump.toHex( ( (short) ( options >> 4 ) ) ) );
|
||||
out.println( stringBuf.toString() );
|
||||
out.println(stringBuf);
|
||||
stringBuf.setLength(0);
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ public final class EscherDump {
|
||||
n8 = (byte) in.read();
|
||||
stringBuf.append( HexDump.toHex( n8 ) );
|
||||
stringBuf.append( getBlipType( n8 ) );
|
||||
out.println( stringBuf.toString() );
|
||||
out.println(stringBuf);
|
||||
|
||||
out.println( " rgbUid:" );
|
||||
HexDump.dump( in, out, 0, 16 );
|
||||
|
@ -136,7 +136,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable
|
||||
if (getChildRecords().size() > 0) {
|
||||
children.append( " children: " + '\n' );
|
||||
for (EscherRecord record : _childRecords) {
|
||||
children.append( record.toString() );
|
||||
children.append(record);
|
||||
children.append( '\n' );
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable
|
||||
" recordId: 0x" + HexDump.toHex( getRecordId() ) + '\n' +
|
||||
" numchildren: " + getChildRecords().size() + '\n' +
|
||||
theDumpHex +
|
||||
children.toString();
|
||||
children;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -415,7 +415,7 @@ public class Property {
|
||||
final Object value = getValue();
|
||||
b.append(", value: ");
|
||||
if (value instanceof String) {
|
||||
b.append(value.toString());
|
||||
b.append(value);
|
||||
final String s = (String) value;
|
||||
final int l = s.length();
|
||||
final byte[] bytes = new byte[l * 2];
|
||||
@ -439,7 +439,7 @@ public class Property {
|
||||
b.append(hex);
|
||||
}
|
||||
} else {
|
||||
b.append(value.toString());
|
||||
b.append(value);
|
||||
}
|
||||
b.append(']');
|
||||
return b.toString();
|
||||
|
@ -982,7 +982,7 @@ public class Section {
|
||||
b.append(getSize());
|
||||
b.append(", properties: [\n");
|
||||
for (int i = 0; i < pa.length; i++) {
|
||||
b.append(pa[i].toString());
|
||||
b.append(pa[i]);
|
||||
b.append(",\n");
|
||||
}
|
||||
b.append(']');
|
||||
|
@ -331,9 +331,9 @@ public class VariantSupport extends Variant {
|
||||
case Variant.VT_I4:
|
||||
if (!(value instanceof Integer)) {
|
||||
throw new ClassCastException("Could not cast an object to "
|
||||
+ Integer.class.toString() + ": "
|
||||
+ value.getClass().toString() + ", "
|
||||
+ value.toString());
|
||||
+ Integer.class + ": "
|
||||
+ value.getClass() + ", "
|
||||
+ value);
|
||||
}
|
||||
length += TypeWriter.writeToStream(out, ((Integer) value).intValue());
|
||||
break;
|
||||
|
@ -256,7 +256,7 @@ public final class BiffViewer {
|
||||
for (String header : recListener.getRecentHeaders()) {
|
||||
ps.println(header);
|
||||
}
|
||||
ps.print(record.toString());
|
||||
ps.print(record);
|
||||
} else {
|
||||
recStream.readRemainder();
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class EFBiffViewer
|
||||
{
|
||||
public void processRecord(Record rec)
|
||||
{
|
||||
System.out.println(rec.toString());
|
||||
System.out.println(rec);
|
||||
}
|
||||
});
|
||||
HSSFEventFactory factory = new HSSFEventFactory();
|
||||
|
@ -132,7 +132,7 @@ public class FormulaViewer
|
||||
}
|
||||
buf.append(sep);
|
||||
buf.append(numArg);
|
||||
System.out.println(buf.toString());
|
||||
System.out.println(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -342,7 +342,7 @@ public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.p
|
||||
case STRING:
|
||||
HSSFRichTextString str = cell.getRichStringCellValue();
|
||||
if(str != null && str.length() > 0) {
|
||||
text.append(str.toString());
|
||||
text.append(str);
|
||||
}
|
||||
break;
|
||||
case NUMERIC:
|
||||
|
@ -91,7 +91,7 @@ public abstract class AbstractEscherHolderRecord extends Record implements Clone
|
||||
if (escherRecords.size() == 0)
|
||||
buffer.append("No Escher Records Decoded" + nl);
|
||||
for (EscherRecord r : escherRecords) {
|
||||
buffer.append(r.toString());
|
||||
buffer.append(r);
|
||||
}
|
||||
buffer.append("[/" + getRecordName() + ']' + nl);
|
||||
|
||||
|
@ -81,14 +81,14 @@ public final class ArrayRecord extends SharedValueRecordBase implements Cloneabl
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(getClass().getName()).append(" [ARRAY]\n");
|
||||
sb.append(" range=").append(getRange().toString()).append("\n");
|
||||
sb.append(" range=").append(getRange()).append("\n");
|
||||
sb.append(" options=").append(HexDump.shortToHex(_options)).append("\n");
|
||||
sb.append(" notUsed=").append(HexDump.intToHex(_field3notUsed)).append("\n");
|
||||
sb.append(" formula:").append("\n");
|
||||
Ptg[] ptgs = _formula.getTokens();
|
||||
for (int i = 0; i < ptgs.length; i++) {
|
||||
Ptg ptg = ptgs[i];
|
||||
sb.append(ptg.toString()).append(ptg.getRVAType()).append("\n");
|
||||
sb.append(ptg).append(ptg.getRVAType()).append("\n");
|
||||
}
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
|
@ -130,7 +130,7 @@ public abstract class CFHeaderBase extends StandardRecord implements Cloneable {
|
||||
buffer.append("\t.enclosingCellRange= ").append(getEnclosingCellRange()).append("\n");
|
||||
buffer.append("\t.cfranges=[");
|
||||
for( int i=0; i<field_4_cell_ranges.countRanges(); i++) {
|
||||
buffer.append(i==0?"":",").append(field_4_cell_ranges.getCellRangeAddress(i).toString());
|
||||
buffer.append(i==0?"":",").append(field_4_cell_ranges.getCellRangeAddress(i));
|
||||
}
|
||||
buffer.append("]\n");
|
||||
buffer.append("[/").append(getRecordName()).append("]\n");
|
||||
|
@ -425,13 +425,13 @@ public final class CFRule12Record extends CFRuleBase implements FutureRecord, Cl
|
||||
buffer.append(" .dxfn12_length =0x").append(Integer.toHexString(ext_formatting_length)).append("\n");
|
||||
buffer.append(" .option_flags =0x").append(Integer.toHexString(getOptions())).append("\n");
|
||||
if (containsFontFormattingBlock()) {
|
||||
buffer.append(_fontFormatting.toString()).append("\n");
|
||||
buffer.append(_fontFormatting).append("\n");
|
||||
}
|
||||
if (containsBorderFormattingBlock()) {
|
||||
buffer.append(_borderFormatting.toString()).append("\n");
|
||||
buffer.append(_borderFormatting).append("\n");
|
||||
}
|
||||
if (containsPatternFormattingBlock()) {
|
||||
buffer.append(_patternFormatting.toString()).append("\n");
|
||||
buffer.append(_patternFormatting).append("\n");
|
||||
}
|
||||
buffer.append(" .dxfn12_ext=").append(HexDump.toHex(ext_formatting_data)).append("\n");
|
||||
buffer.append(" .formula_1 =").append(Arrays.toString(getFormula1().getTokens())).append("\n");
|
||||
|
@ -141,13 +141,13 @@ public final class CFRuleRecord extends CFRuleBase implements Cloneable {
|
||||
buffer.append(" .condition_type =").append(getConditionType()).append("\n");
|
||||
buffer.append(" OPTION FLAGS=0x").append(Integer.toHexString(getOptions())).append("\n");
|
||||
if (containsFontFormattingBlock()) {
|
||||
buffer.append(_fontFormatting.toString()).append("\n");
|
||||
buffer.append(_fontFormatting).append("\n");
|
||||
}
|
||||
if (containsBorderFormattingBlock()) {
|
||||
buffer.append(_borderFormatting.toString()).append("\n");
|
||||
buffer.append(_borderFormatting).append("\n");
|
||||
}
|
||||
if (containsPatternFormattingBlock()) {
|
||||
buffer.append(_patternFormatting.toString()).append("\n");
|
||||
buffer.append(_patternFormatting).append("\n");
|
||||
}
|
||||
buffer.append(" Formula 1 =").append(Arrays.toString(getFormula1().getTokens())).append("\n");
|
||||
buffer.append(" Formula 2 =").append(Arrays.toString(getFormula2().getTokens())).append("\n");
|
||||
|
@ -283,7 +283,7 @@ public final class DVRecord extends StandardRecord implements Cloneable {
|
||||
Ptg[] ptgs = f.getTokens();
|
||||
sb.append('\n');
|
||||
for (Ptg ptg : ptgs) {
|
||||
sb.append('\t').append(ptg.toString()).append('\n');
|
||||
sb.append('\t').append(ptg).append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ public final class EmbeddedObjectRefSubRecord extends SubRecord implements Clone
|
||||
if (field_2_refPtg == null) {
|
||||
sb.append(" .f3unknown = ").append(HexDump.toHex(field_2_unknownFormulaData)).append("\n");
|
||||
} else {
|
||||
sb.append(" .formula = ").append(field_2_refPtg.toString()).append("\n");
|
||||
sb.append(" .formula = ").append(field_2_refPtg).append("\n");
|
||||
}
|
||||
if (field_4_ole_classname != null) {
|
||||
sb.append(" .unicodeFlag = ").append(field_3_unicode_flag).append("\n");
|
||||
|
@ -329,7 +329,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append('[').append(getRecordName()).append(']').append(nl);
|
||||
for (EscherRecord escherRecord : getEscherRecords()) {
|
||||
result.append(escherRecord.toString());
|
||||
result.append(escherRecord);
|
||||
}
|
||||
result.append("[/").append(getRecordName()).append(']').append(nl);
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class ExternSheetRecord extends StandardRecord {
|
||||
sb.append(" numOfRefs = ").append(nItems).append("\n");
|
||||
for (int i=0; i < nItems; i++) {
|
||||
sb.append("refrec #").append(i).append(": ");
|
||||
sb.append(getRef(i).toString());
|
||||
sb.append(getRef(i));
|
||||
sb.append('\n');
|
||||
}
|
||||
sb.append("[/EXTERNSHEET]\n");
|
||||
|
@ -222,7 +222,7 @@ public final class ExternalNameRecord extends StandardRecord {
|
||||
if(field_5_name_definition != null) {
|
||||
Ptg[] ptgs = field_5_name_definition.getTokens();
|
||||
for (Ptg ptg : ptgs) {
|
||||
sb.append(" .namedef = ").append(ptg.toString()).append(ptg.getRVAType()).append("\n");
|
||||
sb.append(" .namedef = ").append(ptg).append(ptg.getRVAType()).append("\n");
|
||||
}
|
||||
}
|
||||
sb.append("[/EXTERNALNAME]\n");
|
||||
|
@ -380,7 +380,7 @@ public final class FormulaRecord extends CellRecord implements Cloneable {
|
||||
}
|
||||
sb.append(" Ptg[").append(k).append("]=");
|
||||
Ptg ptg = ptgs[k];
|
||||
sb.append(ptg.toString()).append(ptg.getRVAType());
|
||||
sb.append(ptg).append(ptg.getRVAType());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,14 +271,14 @@ public class LbsDataSubRecord extends SubRecord {
|
||||
sb.append(" .unknownShort1 =").append(HexDump.shortToHex(_cbFContinued)).append("\n");
|
||||
sb.append(" .formula = ").append('\n');
|
||||
if(_linkPtg != null) {
|
||||
sb.append(_linkPtg.toString()).append(_linkPtg.getRVAType()).append('\n');
|
||||
sb.append(_linkPtg).append(_linkPtg.getRVAType()).append('\n');
|
||||
}
|
||||
sb.append(" .nEntryCount =").append(HexDump.shortToHex(_cLines)).append("\n");
|
||||
sb.append(" .selEntryIx =").append(HexDump.shortToHex(_iSel)).append("\n");
|
||||
sb.append(" .style =").append(HexDump.shortToHex(_flags)).append("\n");
|
||||
sb.append(" .unknownShort10=").append(HexDump.shortToHex(_idEdit)).append("\n");
|
||||
if(_dropData != null) {
|
||||
sb.append('\n').append(_dropData.toString());
|
||||
sb.append('\n').append(_dropData);
|
||||
}
|
||||
sb.append("[/ftLbsData]\n");
|
||||
return sb.toString();
|
||||
|
@ -553,7 +553,7 @@ public final class NameRecord extends ContinuableRecord {
|
||||
Ptg[] ptgs = field_13_name_definition.getTokens();
|
||||
sb.append(" .Formula (nTokens=").append(ptgs.length).append("):") .append("\n");
|
||||
for (Ptg ptg : ptgs) {
|
||||
sb.append(" " + ptg.toString()).append(ptg.getRVAType()).append("\n");
|
||||
sb.append(" " + ptg).append(ptg.getRVAType()).append("\n");
|
||||
}
|
||||
|
||||
sb.append(" .Menu text = ").append(field_14_custom_menu_text).append("\n");
|
||||
|
@ -140,7 +140,7 @@ public final class ObjRecord extends Record implements Cloneable {
|
||||
sb.append("[OBJ]\n");
|
||||
if(subrecords != null) { // there are special cases where this can be, see comments in constructor above
|
||||
for (final SubRecord record : subrecords) {
|
||||
sb.append("SUBRECORD: ").append(record.toString());
|
||||
sb.append("SUBRECORD: ").append(record);
|
||||
}
|
||||
}
|
||||
sb.append("[/OBJ]\n");
|
||||
|
@ -62,7 +62,7 @@ public final class PaletteRecord extends StandardRecord {
|
||||
for (int i = 0; i < _colors.size(); i++) {
|
||||
PColor c = _colors.get(i);
|
||||
buffer.append("* colornum = ").append(i).append('\n');
|
||||
buffer.append(c.toString());
|
||||
buffer.append(c);
|
||||
buffer.append("/*colornum = ").append(i).append('\n');
|
||||
}
|
||||
buffer.append("[/PALETTE]\n");
|
||||
|
@ -80,14 +80,14 @@ public final class SharedFormulaRecord extends SharedValueRecordBase {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
buffer.append("[SHARED FORMULA (").append(HexDump.intToHex(sid)).append("]\n");
|
||||
buffer.append(" .range = ").append(getRange().toString()).append("\n");
|
||||
buffer.append(" .range = ").append(getRange()).append("\n");
|
||||
buffer.append(" .reserved = ").append(HexDump.shortToHex(field_5_reserved)).append("\n");
|
||||
|
||||
Ptg[] ptgs = field_7_parsed_expr.getTokens();
|
||||
for (int k = 0; k < ptgs.length; k++ ) {
|
||||
buffer.append("Formula[").append(k).append("]");
|
||||
Ptg ptg = ptgs[k];
|
||||
buffer.append(ptg.toString()).append(ptg.getRVAType()).append("\n");
|
||||
buffer.append(ptg).append(ptg.getRVAType()).append("\n");
|
||||
}
|
||||
|
||||
buffer.append("[/SHARED FORMULA]\n");
|
||||
|
@ -158,7 +158,7 @@ public final class TableRecord extends SharedValueRecordBase {
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("[TABLE]\n");
|
||||
buffer.append(" .range = ").append(getRange().toString()).append("\n");
|
||||
buffer.append(" .range = ").append(getRange()).append("\n");
|
||||
buffer.append(" .flags = ") .append(HexDump.byteToHex(field_5_flags)).append("\n");
|
||||
buffer.append(" .alwaysClc= ").append(isAlwaysCalc()).append("\n");
|
||||
buffer.append(" .reserved = ").append(HexDump.intToHex(field_6_res)).append("\n");
|
||||
|
@ -199,10 +199,10 @@ public final class CFRecordsAggregate extends RecordAggregate {
|
||||
|
||||
buffer.append("[").append(type).append("]\n");
|
||||
if( header != null ) {
|
||||
buffer.append(header.toString());
|
||||
buffer.append(header);
|
||||
}
|
||||
for (CFRuleBase cfRule : rules) {
|
||||
buffer.append(cfRule.toString());
|
||||
buffer.append(cfRule);
|
||||
}
|
||||
buffer.append("[/").append(type).append("]\n");
|
||||
return buffer.toString();
|
||||
|
@ -59,7 +59,7 @@ public final class SharedValueManager {
|
||||
public SharedFormulaGroup(SharedFormulaRecord sfr, CellReference firstCell) {
|
||||
if (!sfr.isInRange(firstCell.getRow(), firstCell.getCol())) {
|
||||
throw new IllegalArgumentException("First formula cell " + firstCell.formatAsString()
|
||||
+ " is not shared formula range " + sfr.getRange().toString() + ".");
|
||||
+ " is not shared formula range " + sfr.getRange() + ".");
|
||||
}
|
||||
_sfr = sfr;
|
||||
_firstCell = firstCell;
|
||||
@ -94,7 +94,7 @@ public final class SharedValueManager {
|
||||
public final String toString() {
|
||||
StringBuffer sb = new StringBuffer(64);
|
||||
sb.append(getClass().getName()).append(" [");
|
||||
sb.append(_sfr.getRange().toString());
|
||||
sb.append(_sfr.getRange());
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -124,10 +124,10 @@ public final class ColorGradientFormatting implements Cloneable {
|
||||
buffer.append(" .clamp = ").append(isClampToCurve()).append("\n");
|
||||
buffer.append(" .background= ").append(isAppliesToBackground()).append("\n");
|
||||
for (Threshold t : thresholds) {
|
||||
buffer.append(t.toString());
|
||||
buffer.append(t);
|
||||
}
|
||||
for (ExtendedColor c : colors) {
|
||||
buffer.append(c.toString());
|
||||
buffer.append(c);
|
||||
}
|
||||
buffer.append(" [/Color Gradient Formatting]\n");
|
||||
return buffer.toString();
|
||||
|
@ -103,7 +103,7 @@ public final class IconMultiStateFormatting implements Cloneable {
|
||||
buffer.append(" .icon_only= ").append(isIconOnly()).append("\n");
|
||||
buffer.append(" .reversed = ").append(isReversed()).append("\n");
|
||||
for (Threshold t : thresholds) {
|
||||
buffer.append(t.toString());
|
||||
buffer.append(t);
|
||||
}
|
||||
buffer.append(" [/Icon Formatting]\n");
|
||||
return buffer.toString();
|
||||
|
@ -78,7 +78,7 @@ public final class LinkedDataRecord extends StandardRecord implements Cloneable
|
||||
Ptg[] ptgs = field_5_formulaOfLink.getTokens();
|
||||
for (int i = 0; i < ptgs.length; i++) {
|
||||
Ptg ptg = ptgs[i];
|
||||
buffer.append(ptg.toString()).append(ptg.getRVAType()).append('\n');
|
||||
buffer.append(ptg).append(ptg.getRVAType()).append('\n');
|
||||
}
|
||||
|
||||
buffer.append("[/AI]\n");
|
||||
|
@ -706,12 +706,12 @@ public class UnicodeString implements Comparable<UnicodeString> {
|
||||
if (field_4_format_runs != null) {
|
||||
for (int i = 0; i < field_4_format_runs.size();i++) {
|
||||
FormatRun r = field_4_format_runs.get(i);
|
||||
buffer.append(" .format_run"+i+" = ").append(r.toString()).append("\n");
|
||||
buffer.append(" .format_run"+i+" = ").append(r).append("\n");
|
||||
}
|
||||
}
|
||||
if (field_5_ext_rst != null) {
|
||||
buffer.append(" .field_5_ext_rst = ").append("\n");
|
||||
buffer.append( field_5_ext_rst.toString() ).append("\n");
|
||||
buffer.append(field_5_ext_rst).append("\n");
|
||||
}
|
||||
buffer.append("[/UNICODESTRING]\n");
|
||||
return buffer.toString();
|
||||
|
@ -1980,7 +1980,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
|
||||
List<EscherRecord> escherRecords = r.getEscherRecords();
|
||||
for (EscherRecord escherRecord : escherRecords) {
|
||||
if (fat) {
|
||||
pw.println(escherRecord.toString());
|
||||
pw.println(escherRecord);
|
||||
} else {
|
||||
escherRecord.display(pw, 0);
|
||||
}
|
||||
|
@ -1892,7 +1892,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
|
||||
PrintWriter w = new PrintWriter(new OutputStreamWriter(System.out, Charset.defaultCharset()));
|
||||
for (EscherRecord escherRecord : escherRecords) {
|
||||
if (fat) {
|
||||
System.out.println(escherRecord.toString());
|
||||
System.out.println(escherRecord);
|
||||
} else {
|
||||
escherRecord.display(w, 0);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream {
|
||||
long skipN = (index - lastIndex) << chunkBits;
|
||||
if (super.skip(skipN) < skipN) {
|
||||
throw new EOFException("buffer underrun");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
lastIndex = index + 1;
|
||||
|
@ -82,7 +82,7 @@ public class StandardEncryptionInfoBuilder implements EncryptionInfoBuilder {
|
||||
found |= (ks == keyBits);
|
||||
}
|
||||
if (!found) {
|
||||
throw new EncryptedDocumentException("KeySize "+keyBits+" not allowed for Cipher "+cipherAlgorithm.toString());
|
||||
throw new EncryptedDocumentException("KeySize "+keyBits+" not allowed for Cipher "+ cipherAlgorithm);
|
||||
}
|
||||
info.setHeader(new StandardEncryptionHeader(cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode));
|
||||
info.setVerifier(new StandardEncryptionVerifier(cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode));
|
||||
|
@ -82,7 +82,7 @@ public class CellGeneralFormatter extends CellFormatter {
|
||||
} else if (value instanceof Boolean) {
|
||||
toAppendTo.append(value.toString().toUpperCase(Locale.ROOT));
|
||||
} else {
|
||||
toAppendTo.append(value.toString());
|
||||
toAppendTo.append(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ public class FormulaRenderer {
|
||||
stack.push(attrPtg.toFormulaString(operands));
|
||||
continue;
|
||||
}
|
||||
throw new RuntimeException("Unexpected tAttr: " + attrPtg.toString());
|
||||
throw new RuntimeException("Unexpected tAttr: " + attrPtg);
|
||||
}
|
||||
|
||||
if (ptg instanceof WorkbookDependentFormula) {
|
||||
|
@ -336,7 +336,7 @@ public final class WorkbookEvaluator {
|
||||
if (isDebugLogEnabled()) {
|
||||
String sheetName = getSheetName(sheetIndex);
|
||||
CellReference cr = new CellReference(rowIndex, columnIndex);
|
||||
logDebug("Evaluated " + sheetName + "!" + cr.formatAsString() + " to " + result.toString());
|
||||
logDebug("Evaluated " + sheetName + "!" + cr.formatAsString() + " to " + result);
|
||||
}
|
||||
// Usually (result === cce.getValue())
|
||||
// But sometimes: (result==ErrorEval.CIRCULAR_REF_ERROR, cce.getValue()==null)
|
||||
|
@ -42,5 +42,5 @@ public enum SheetVisibility {
|
||||
* <code>ThisWorkbook.Sheets("MySheetName").Visible = xlSheetVeryHidden </code>
|
||||
* </p>
|
||||
*/
|
||||
VERY_HIDDEN;
|
||||
VERY_HIDDEN
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class OOXMLLister implements Closeable {
|
||||
File f = new File(args[0]);
|
||||
if(! f.exists()) {
|
||||
System.err.println("Error, file not found!");
|
||||
System.err.println("\t" + f.toString());
|
||||
System.err.println("\t" + f);
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ public class OOXMLLister implements Closeable {
|
||||
);
|
||||
|
||||
try {
|
||||
lister.disp.println(f.toString() + "\n");
|
||||
lister.disp.println(f + "\n");
|
||||
lister.displayParts();
|
||||
lister.disp.println();
|
||||
lister.displayRelations();
|
||||
|
@ -74,7 +74,7 @@ public class OOXMLPrettyPrint {
|
||||
File f = new File(args[i]);
|
||||
if(! f.exists()) {
|
||||
System.err.println("Error, file not found!");
|
||||
System.err.println("\t" + f.toString());
|
||||
System.err.println("\t" + f);
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ public final class PackageRelationship {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(id == null ? "id=null" : "id=" + id);
|
||||
sb.append(container == null ? " - container=null" : " - container="
|
||||
+ container.toString());
|
||||
+ container);
|
||||
sb.append(relationshipType == null ? " - relationshipType=null"
|
||||
: " - relationshipType=" + relationshipType);
|
||||
sb.append(source == null ? " - source=null" : " - source="
|
||||
@ -221,7 +221,7 @@ public final class PackageRelationship {
|
||||
sb.append(targetUri == null ? " - target=null" : " - target="
|
||||
+ getTargetURI().toASCIIString());
|
||||
sb.append(targetMode == null ? ",targetMode=null" : ",targetMode="
|
||||
+ targetMode.toString());
|
||||
+ targetMode);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ public final class PackagePropertiesPart extends PackagePart implements
|
||||
sb.append(", ").append(fStr);
|
||||
}
|
||||
throw new InvalidFormatException("Date " + dateStr + " not well formatted, "
|
||||
+ "expected format in: "+sb.toString());
|
||||
+ "expected format in: "+ sb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ public class AgileEncryptionHeader extends EncryptionHeader implements Cloneable
|
||||
setChainingMode(ChainingMode.cfb);
|
||||
break;
|
||||
default:
|
||||
throw new EncryptedDocumentException("Unsupported chaining mode - "+keyData.getCipherChaining().toString());
|
||||
throw new EncryptedDocumentException("Unsupported chaining mode - "+ keyData.getCipherChaining());
|
||||
}
|
||||
|
||||
int hashSize = keyData.getHashSize();
|
||||
|
@ -79,7 +79,7 @@ public class AgileEncryptionInfoBuilder implements EncryptionInfoBuilder {
|
||||
found |= (ks == keyBits);
|
||||
}
|
||||
if (!found) {
|
||||
throw new EncryptedDocumentException("KeySize "+keyBits+" not allowed for Cipher "+cipherAlgorithm.toString());
|
||||
throw new EncryptedDocumentException("KeySize "+keyBits+" not allowed for Cipher "+ cipherAlgorithm);
|
||||
}
|
||||
info.setHeader(new AgileEncryptionHeader(cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode));
|
||||
info.setVerifier(new AgileEncryptionVerifier(cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode));
|
||||
|
@ -105,7 +105,7 @@ public class AgileEncryptionVerifier extends EncryptionVerifier implements Clone
|
||||
setChainingMode(ChainingMode.cfb);
|
||||
break;
|
||||
default:
|
||||
throw new EncryptedDocumentException("Unsupported chaining mode - "+keyData.getCipherChaining().toString());
|
||||
throw new EncryptedDocumentException("Unsupported chaining mode - "+ keyData.getCipherChaining());
|
||||
}
|
||||
|
||||
if (!encList.hasNext()) {
|
||||
|
@ -349,14 +349,14 @@ public class XAdESXLSignatureFacet extends SignatureFacet {
|
||||
|
||||
// create a XAdES time-stamp container
|
||||
XAdESTimeStampType xadesTimeStamp = XAdESTimeStampType.Factory.newInstance();
|
||||
xadesTimeStamp.setId("time-stamp-" + UUID.randomUUID().toString());
|
||||
xadesTimeStamp.setId("time-stamp-" + UUID.randomUUID());
|
||||
CanonicalizationMethodType c14nMethod = xadesTimeStamp.addNewCanonicalizationMethod();
|
||||
c14nMethod.setAlgorithm(signatureConfig.getXadesCanonicalizationMethod());
|
||||
|
||||
// embed the time-stamp
|
||||
EncapsulatedPKIDataType encapsulatedTimeStamp = xadesTimeStamp.addNewEncapsulatedTimeStamp();
|
||||
encapsulatedTimeStamp.setByteArrayValue(timeStampToken);
|
||||
encapsulatedTimeStamp.setId("time-stamp-token-" + UUID.randomUUID().toString());
|
||||
encapsulatedTimeStamp.setId("time-stamp-token-" + UUID.randomUUID());
|
||||
|
||||
return xadesTimeStamp;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class AesZipFileZipEntrySource implements ZipEntrySource {
|
||||
zipFile.close();
|
||||
if (!tmpFile.delete()) {
|
||||
LOG.log(POILogger.WARN, tmpFile.getAbsolutePath()+" can't be removed (or was already removed.");
|
||||
};
|
||||
}
|
||||
}
|
||||
closed = true;
|
||||
}
|
||||
|
@ -291,7 +291,6 @@ public final class OOXMLLite {
|
||||
if (!(destDirectory.exists() || destDirectory.mkdirs())) {
|
||||
throw new RuntimeException("Can't create destination directory: "+destDirectory);
|
||||
}
|
||||
;
|
||||
OutputStream destStream = new FileOutputStream(destFile);
|
||||
try {
|
||||
IOUtils.copy(srcStream, destStream);
|
||||
|
@ -26,11 +26,11 @@ public class XDGFException {
|
||||
* Creates an error message to be thrown
|
||||
*/
|
||||
public static POIXMLException error(String message, Object o) {
|
||||
return new POIXMLException(o.toString() + ": " + message);
|
||||
return new POIXMLException(o + ": " + message);
|
||||
}
|
||||
|
||||
public static POIXMLException error(String message, Object o, Throwable t) {
|
||||
return new POIXMLException(o.toString() + ": " + message, t);
|
||||
return new POIXMLException(o + ": " + message, t);
|
||||
}
|
||||
|
||||
//
|
||||
@ -41,7 +41,6 @@ public class XDGFException {
|
||||
public static POIXMLException wrap(POIXMLDocumentPart part,
|
||||
POIXMLException e) {
|
||||
return new POIXMLException(part.getPackagePart().getPartName()
|
||||
.toString()
|
||||
+ ": " + e.getMessage(), e.getCause() == null ? e
|
||||
: e.getCause());
|
||||
}
|
||||
|
@ -84,10 +84,10 @@ public class XDGFBaseContents extends XDGFXMLDocumentPart {
|
||||
XDGFShape to = _shapes.get(connect.getToSheet());
|
||||
|
||||
if (from == null)
|
||||
throw new POIXMLException(this.toString() + "; Connect; Invalid from id: " + connect.getFromSheet());
|
||||
throw new POIXMLException(this + "; Connect; Invalid from id: " + connect.getFromSheet());
|
||||
|
||||
if (to == null)
|
||||
throw new POIXMLException(this.toString() + "; Connect; Invalid to id: " + connect.getToSheet());
|
||||
throw new POIXMLException(this + "; Connect; Invalid to id: " + connect.getToSheet());
|
||||
|
||||
_connections.add(new XDGFConnection(connect, from, to));
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class HierarchyPrinter {
|
||||
os.append(" ");
|
||||
}
|
||||
// TODO: write text?
|
||||
os.println(shape.toString() + " [" + shape.getShapeType()
|
||||
os.println(shape + " [" + shape.getShapeType()
|
||||
+ ", " + shape.getSymbolName() + "] "
|
||||
+ shape.getMasterShape() + " "
|
||||
+ shape.getTextAsString().trim());
|
||||
|
@ -1848,7 +1848,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperti
|
||||
} else if (props instanceof CTTextCharacterProperties) {
|
||||
obj = new TextCharDelegate((CTTextCharacterProperties)props);
|
||||
} else {
|
||||
LOG.log(POILogger.ERROR, props.getClass().toString()+" is an unknown properties type");
|
||||
LOG.log(POILogger.ERROR, props.getClass() +" is an unknown properties type");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1856,7 +1856,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperti
|
||||
return (T)obj;
|
||||
}
|
||||
|
||||
LOG.log(POILogger.WARN, obj.getClass().toString()+" doesn't implement "+clazz.toString());
|
||||
LOG.log(POILogger.WARN, obj.getClass() +" doesn't implement "+ clazz);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ public abstract class XSLFSimpleShape extends XSLFShape
|
||||
return ((CTShapeProperties)xo).addNewXfrm();
|
||||
} else {
|
||||
// ... group shapes have their own getXfrm()
|
||||
LOG.log(POILogger.WARN, getClass().toString()+" doesn't have xfrm element.");
|
||||
LOG.log(POILogger.WARN, getClass() +" doesn't have xfrm element.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1132,7 +1132,7 @@ public abstract class XSLFSimpleShape extends XSLFShape
|
||||
private static CTLineProperties getLn(XSLFShape shape, boolean create) {
|
||||
XmlObject pr = shape.getShapeProperties();
|
||||
if (!(pr instanceof CTShapeProperties)) {
|
||||
LOG.log(POILogger.WARN, shape.getClass().toString()+" doesn't have line properties");
|
||||
LOG.log(POILogger.WARN, shape.getClass() +" doesn't have line properties");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ implements Slide<XSLFShape,XSLFTextParagraph> {
|
||||
}
|
||||
}
|
||||
if(_layout == null) {
|
||||
throw new IllegalArgumentException("SlideLayout was not found for " + this.toString());
|
||||
throw new IllegalArgumentException("SlideLayout was not found for " + this);
|
||||
}
|
||||
return _layout;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ implements MasterSheet<XSLFShape,XSLFTextParagraph> {
|
||||
}
|
||||
}
|
||||
if (_master == null) {
|
||||
throw new IllegalStateException("SlideMaster was not found for " + this.toString());
|
||||
throw new IllegalStateException("SlideMaster was not found for " + this);
|
||||
}
|
||||
return _master;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class XSLFTableStyle {
|
||||
private CTTableStyle _tblStyle;
|
||||
|
||||
public enum TablePartStyle {
|
||||
wholeTbl, band1H, band2H, band1V, band2V, firstCol, lastCol, firstRow, lastRow, seCell, swCell, neCell, nwCell;
|
||||
wholeTbl, band1H, band2H, band1V, band2V, firstCol, lastCol, firstRow, lastRow, seCell, swCell, neCell, nwCell
|
||||
}
|
||||
|
||||
/*package*/ XSLFTableStyle(CTTableStyle style){
|
||||
|
@ -316,7 +316,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
|
||||
break;
|
||||
|
||||
case ERROR:
|
||||
thisStr = "ERROR:" + value.toString();
|
||||
thisStr = "ERROR:" + value;
|
||||
break;
|
||||
|
||||
case FORMULA:
|
||||
|
@ -274,7 +274,7 @@ public class SheetDataWriter {
|
||||
XSSFRichTextString rt = new XSSFRichTextString(cell.getStringCellValue());
|
||||
int sRef = _sharedStringSource.addEntry(rt.getCTRst());
|
||||
|
||||
_out.write(" t=\"" + STCellType.S.toString() + "\">");
|
||||
_out.write(" t=\"" + STCellType.S + "\">");
|
||||
_out.write("<v>");
|
||||
_out.write(String.valueOf(sRef));
|
||||
_out.write("</v>");
|
||||
|
@ -184,7 +184,7 @@ public final class XSSFClientAnchor extends XSSFAnchor implements ClientAnchor {
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "from : " + cell1.toString() + "; to: " + cell2.toString();
|
||||
return "from : " + cell1 + "; to: " + cell2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,7 +130,7 @@ public class XWPFWordExtractor extends POIXMLTextExtractor {
|
||||
|
||||
|
||||
for (IRunElement run : paragraph.getRuns()) {
|
||||
text.append(run.toString());
|
||||
text.append(run);
|
||||
if (run instanceof XWPFHyperlinkRun && fetchHyperlinks) {
|
||||
XWPFHyperlink link = ((XWPFHyperlinkRun) run).getHyperlink(document);
|
||||
if (link != null)
|
||||
|
@ -190,12 +190,12 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||
XWPFRun xRun = (XWPFRun) run;
|
||||
// don't include the text if reviewing is enabled and this is a deleted run
|
||||
if (!xRun.getCTR().isSetRsidDel()) {
|
||||
out.append(xRun.toString());
|
||||
out.append(xRun);
|
||||
}
|
||||
} else if (run instanceof XWPFSDT) {
|
||||
out.append(((XWPFSDT) run).getContent().getText());
|
||||
} else {
|
||||
out.append(run.toString());
|
||||
out.append(run);
|
||||
}
|
||||
}
|
||||
out.append(footnoteText);
|
||||
@ -400,7 +400,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
|
||||
public String getParagraphText() {
|
||||
StringBuffer out = new StringBuffer();
|
||||
for (XWPFRun run : runs) {
|
||||
out.append(run.toString());
|
||||
out.append(run);
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class XWPFSDTContent implements ISDTContent {
|
||||
text.append(((XWPFSDT) o).getContent().getText());
|
||||
addNewLine = true;
|
||||
} else if (o instanceof XWPFRun) {
|
||||
text.append(((XWPFRun) o).toString());
|
||||
text.append(((XWPFRun) o));
|
||||
addNewLine = false;
|
||||
}
|
||||
if (addNewLine == true && i < bodyElements.size() - 1) {
|
||||
@ -126,7 +126,7 @@ public class XWPFSDTContent implements ISDTContent {
|
||||
|
||||
private void appendParagraph(XWPFParagraph paragraph, StringBuilder text) {
|
||||
for (IRunElement run : paragraph.getRuns()) {
|
||||
text.append(run.toString());
|
||||
text.append(run);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public final class TestProper {
|
||||
builder.append((char)(65 + (i % 26)));
|
||||
expected.append((char)(97 + (i % 26)));
|
||||
}
|
||||
confirm("PROPER(\"" + builder.toString() + "\")", expected.toString());
|
||||
confirm("PROPER(\"" + builder + "\")", expected.toString());
|
||||
}
|
||||
|
||||
private void confirm(String formulaText, String expectedResult) {
|
||||
|
@ -387,7 +387,7 @@ public final class TestUnfixedBugs {
|
||||
Iterator<XSSFShape> it = shapes.iterator();
|
||||
while(it.hasNext()) {
|
||||
XSSFShape shape = it.next();
|
||||
str.append(", " + shape.toString());
|
||||
str.append(", " + shape);
|
||||
str.append(", Col1:"+((XSSFClientAnchor)shape.getAnchor()).getCol1());
|
||||
str.append(", Col2:"+((XSSFClientAnchor)shape.getAnchor()).getCol2());
|
||||
str.append(", Row1:"+((XSSFClientAnchor)shape.getAnchor()).getRow1());
|
||||
|
@ -66,7 +66,7 @@ public class TestXSSFColGrouping {
|
||||
CTCols cols = sheet.getCTWorksheet().getColsArray(0);
|
||||
logger.log(POILogger.DEBUG, "test52186/cols:" + cols);
|
||||
for (CTCol col : cols.getColArray()) {
|
||||
assertTrue("Col width attribute is unset: " + col.toString(), col.isSetWidth());
|
||||
assertTrue("Col width attribute is unset: " + col, col.isSetWidth());
|
||||
}
|
||||
|
||||
wb2.close();
|
||||
@ -100,7 +100,7 @@ public class TestXSSFColGrouping {
|
||||
}
|
||||
cols = sheet.getCTWorksheet().getColsArray(0);
|
||||
for (CTCol col : cols.getColArray()) {
|
||||
assertTrue("Col width attribute is unset: " + col.toString(), col.isSetWidth());
|
||||
assertTrue("Col width attribute is unset: " + col, col.isSetWidth());
|
||||
}
|
||||
wb2.close();
|
||||
wb1.close();
|
||||
|
@ -491,7 +491,7 @@ public final class TestXSSFFormulaParser {
|
||||
evaluator.evaluateFormulaCellEnum(cell);
|
||||
} catch (Exception e) {
|
||||
CellReference cellRef = new CellReference(cell.getRowIndex(), cell.getColumnIndex());
|
||||
throw new RuntimeException("error at: " + cellRef.toString(), e);
|
||||
throw new RuntimeException("error at: " + cellRef, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class MAPIAttribute {
|
||||
hex = hex.substring(0, hex.length()-1) + ", ....]";
|
||||
}
|
||||
|
||||
return property.toString() + " " + hex;
|
||||
return property + " " + hex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ public final class MAPIDateAttribute extends MAPIAttribute {
|
||||
DateFormatSymbols dfs = DateFormatSymbols.getInstance(Locale.ROOT);
|
||||
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", dfs);
|
||||
df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
|
||||
return getProperty().toString() + " " + df.format(data);
|
||||
return getProperty() + " " + df.format(data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +80,7 @@ public final class MAPIDateAttribute extends MAPIAttribute {
|
||||
return ((MAPIDateAttribute)attr).getDate();
|
||||
}
|
||||
|
||||
logger.log(POILogger.WARN, "Warning, non date property found: " + attr.toString());
|
||||
logger.log(POILogger.WARN, "Warning, non date property found: " + attr);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +73,6 @@ public final class MAPIRtfAttribute extends MAPIAttribute {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getProperty().toString() + " " + data;
|
||||
return getProperty() + " " + data;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public final class MAPIStringAttribute extends MAPIAttribute {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getProperty().toString() + " " + data;
|
||||
return getProperty() + " " + data;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ public final class MAPIStringAttribute extends MAPIAttribute {
|
||||
return ((MAPIRtfAttribute)attr).getDataString();
|
||||
}
|
||||
|
||||
logger.log(POILogger.WARN, "Warning, non string property found: " + attr.toString());
|
||||
logger.log(POILogger.WARN, "Warning, non string property found: " + attr);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class TNEFAttribute {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Attribute " + property.toString() + ", type=" + type +
|
||||
return "Attribute " + property + ", type=" + type +
|
||||
", data length=" + data.length;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public final class TNEFDateAttribute extends TNEFAttribute {
|
||||
DateFormatSymbols dfs = DateFormatSymbols.getInstance(Locale.ROOT);
|
||||
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", dfs);
|
||||
df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
|
||||
return "Attribute " + getProperty().toString() + ", type=" + getType() +
|
||||
return "Attribute " + getProperty() + ", type=" + getType() +
|
||||
", date=" + df.format(data);
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public final class TNEFDateAttribute extends TNEFAttribute {
|
||||
return ((TNEFDateAttribute)attr).getDate();
|
||||
}
|
||||
|
||||
logger.log(POILogger.WARN, "Warning, non date property found: " + attr.toString());
|
||||
logger.log(POILogger.WARN, "Warning, non date property found: " + attr);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public final class TNEFMAPIAttribute extends TNEFAttribute {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Attribute " + getProperty().toString() + ", type=" + getType() +
|
||||
return "Attribute " + getProperty() + ", type=" + getType() +
|
||||
", " + attributes.size() + " MAPI Attributes";
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public final class TNEFStringAttribute extends TNEFAttribute {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Attribute " + getProperty().toString() + ", type=" + getType() +
|
||||
return "Attribute " + getProperty() + ", type=" + getType() +
|
||||
", data=" + getString();
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public final class TNEFStringAttribute extends TNEFAttribute {
|
||||
return ((TNEFStringAttribute)attr).getString();
|
||||
}
|
||||
|
||||
logger.log(POILogger.WARN, "Warning, non string property found: " + attr.toString());
|
||||
logger.log(POILogger.WARN, "Warning, non string property found: " + attr);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public final class HMEFDumper {
|
||||
// Print the attribute into
|
||||
System.out.println(
|
||||
"Level " + level + " : Type " + attr.getType() +
|
||||
" : ID " + attr.getProperty().toString()
|
||||
" : ID " + attr.getProperty()
|
||||
);
|
||||
|
||||
// Print the contents
|
||||
|
@ -119,7 +119,7 @@ public final class HPBFDumper {
|
||||
er.fillFields(data, 0, erf);
|
||||
left -= er.getRecordSize();
|
||||
|
||||
System.out.println(er.toString());
|
||||
System.out.println(er);
|
||||
}
|
||||
}
|
||||
protected void dumpEscherStm(DirectoryNode escherDir) throws IOException {
|
||||
|
@ -214,7 +214,7 @@ public final class PPTXMLDump {
|
||||
} else {
|
||||
StringWriter out = new StringWriter();
|
||||
dump.dump(out);
|
||||
System.out.println(out.toString());
|
||||
System.out.println(out);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ public final class SlideShowRecordDumper {
|
||||
printEscherTextBox( (EscherTextboxRecord)er, indent );
|
||||
} else {
|
||||
ps.print( tabs.substring(0, indent) );
|
||||
ps.println( er.toString() );
|
||||
ps.println(er);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ public final class SlideShowRecordDumper {
|
||||
StyleTextPropAtom tsp = (StyleTextPropAtom)child;
|
||||
tsp.setParentTextSize(text.length());
|
||||
}
|
||||
ps.println(ind+child.toString());
|
||||
ps.println(ind+ child);
|
||||
prevChild = child;
|
||||
}
|
||||
|
||||
|
@ -946,7 +946,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
|
||||
for (int i = 0; i < cr.length; i++) {
|
||||
Record r = cr[i];
|
||||
if (r == headerAtom) {
|
||||
; // headerIdx = i;
|
||||
// headerIdx = i;
|
||||
} else if (r == oldRecord || r == newRecord) {
|
||||
textIdx = i;
|
||||
} else if (r == styleAtom) {
|
||||
|
@ -1057,7 +1057,7 @@ public class MAPIProperty {
|
||||
throw new IllegalArgumentException(
|
||||
"Duplicate MAPI Property with ID " + id + " : "
|
||||
+ toString() + " vs "
|
||||
+ attributes.get(id).toString());
|
||||
+ attributes.get(id));
|
||||
}
|
||||
attributes.put(id, this);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class HSMFDump {
|
||||
);
|
||||
for (PropertyValue v : props.getValues(prop)) {
|
||||
out.println(
|
||||
" = " + v.toString()
|
||||
" = " + v
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class HSMFDump {
|
||||
" " + idName + " - " + chunk.getType().getName()
|
||||
);
|
||||
out.println(
|
||||
" " + chunk.toString()
|
||||
" " + chunk
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ public final class POIFSChunkParser {
|
||||
chunk.readValue(inp);
|
||||
grouping.record(chunk);
|
||||
} catch(IOException e) {
|
||||
logger.log(POILogger.ERROR, "Error reading from part " + entry.getName() + " - " + e.toString());
|
||||
logger.log(POILogger.ERROR, "Error reading from part " + entry.getName() + " - " + e);
|
||||
} finally {
|
||||
if (inp != null) inp.close();
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public abstract class AbstractWordConverter
|
||||
public String toString()
|
||||
{
|
||||
return "Structure [" + start + "; " + end + "): "
|
||||
+ structure.toString();
|
||||
+ structure;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ public final class HWPFLister
|
||||
while ( sprmIt.hasNext() )
|
||||
{
|
||||
SprmOperation sprm = sprmIt.next();
|
||||
System.out.println( "\t" + sprm.toString() );
|
||||
System.out.println( "\t" + sprm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ public final class HWPFLister
|
||||
while ( sprmIt.hasNext() )
|
||||
{
|
||||
SprmOperation sprm = sprmIt.next();
|
||||
System.out.println( linePrefix + sprm.toString() );
|
||||
System.out.println( linePrefix + sprm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,7 +634,7 @@ public final class HWPFLister
|
||||
for ( int p = 0; p < range.numParagraphs(); p++ )
|
||||
{
|
||||
Paragraph paragraph = range.getParagraph( p );
|
||||
System.out.println( p + ":\t" + paragraph.toString() );
|
||||
System.out.println( p + ":\t" + paragraph);
|
||||
|
||||
if ( withText )
|
||||
System.out.println( paragraph.text() );
|
||||
@ -653,7 +653,7 @@ public final class HWPFLister
|
||||
.getAllPictures();
|
||||
for ( Picture picture : allPictures )
|
||||
{
|
||||
System.out.println( picture.toString() );
|
||||
System.out.println(picture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public final class EscherRecordHolder {
|
||||
Iterator<EscherRecord> iterator = escherRecords.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
EscherRecord r = iterator.next();
|
||||
buffer.append(r.toString());
|
||||
buffer.append(r);
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
@ -97,12 +97,12 @@ public final class FSPATable
|
||||
.entrySet() )
|
||||
{
|
||||
Integer i = entry.getKey();
|
||||
buf.append( " " ).append( i.toString() ).append( " => \t" );
|
||||
buf.append( " " ).append(i).append( " => \t" );
|
||||
|
||||
try
|
||||
{
|
||||
FSPA fspa = getFspaFromCp( i.intValue() );
|
||||
buf.append( fspa.toString() );
|
||||
buf.append(fspa);
|
||||
}
|
||||
catch ( Exception exc )
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ public class OfficeDrawingsImpl implements OfficeDrawings
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "OfficeDrawingImpl: " + fspa.toString();
|
||||
return "OfficeDrawingImpl: " + fspa;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class TestFieldsTables extends HWPFTestCase {
|
||||
private String dumpPlexes(ArrayList<PlexOfField> fieldsPlexes) {
|
||||
StringBuilder dump = new StringBuilder();
|
||||
for (PlexOfField flds : fieldsPlexes) {
|
||||
dump.append(flds.toString() + "\n");
|
||||
dump.append(flds + "\n");
|
||||
}
|
||||
return dump.toString();
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user