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