aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2011-06-25 10:56:46 +0000
committerYegor Kozlov <yegor@apache.org>2011-06-25 10:56:46 +0000
commit60a656d6e2d380d4f810af6cf27176ce5d743084 (patch)
tree5f8e705b4da6d8a9b2d60086b1be166283d3b444 /src/java/org/apache
parent7827d9101ebb0248f5a4cdfc20b751b1214b4cde (diff)
downloadpoi-60a656d6e2d380d4f810af6cf27176ce5d743084.tar.gz
poi-60a656d6e2d380d4f810af6cf27176ce5d743084.zip
cleanup sxxsf temp files after tests, remove non-ascii characters from source code, polished test output
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1139518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/poi/hssf/record/common/UnicodeString.java13
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java2
-rw-r--r--src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java11
-rw-r--r--src/java/org/apache/poi/ss/usermodel/Sheet.java4
4 files changed, 14 insertions, 16 deletions
diff --git a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
index fe16f0a355..bd9ecbac7b 100644
--- a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
+++ b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
@@ -25,11 +25,8 @@ import java.util.List;
import org.apache.poi.hssf.record.cont.ContinuableRecordInput;
import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.cont.ContinuableRecordOutput;
-import org.apache.poi.util.BitField;
-import org.apache.poi.util.BitFieldFactory;
-import org.apache.poi.util.LittleEndianInput;
-import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.StringUtil;
+import org.apache.poi.poifs.dev.POIFSLister;
+import org.apache.poi.util.*;
/**
* Title: Unicode String<p/>
@@ -40,6 +37,8 @@ import org.apache.poi.util.StringUtil;
* REFERENCE: PG 951 Excel Binary File Format (.xls) Structure Specification v20091214
*/
public class UnicodeString implements Comparable<UnicodeString> { // TODO - make this final when the compatibility version is removed
+ private static POILogger _logger = POILogFactory.getLogger(UnicodeString.class);
+
private short field_1_charCount;
private byte field_2_optionflags;
private String field_3_string;
@@ -138,7 +137,7 @@ public class UnicodeString implements Comparable<UnicodeString> { // TODO - make
// Spot corrupt records
if(reserved != 1) {
- System.err.println("Warning - ExtRst was has wrong magic marker, expecting 1 but found " + reserved + " - ignoring");
+ _logger.log(POILogger.WARN, "Warning - ExtRst has wrong magic marker, expecting 1 but found " + reserved + " - ignoring");
// Grab all the remaining data, and ignore it
for(int i=0; i<expectedLength-2; i++) {
in.readByte();
@@ -438,7 +437,7 @@ public class UnicodeString implements Comparable<UnicodeString> { // TODO - make
if (isExtendedText() && (extensionLength > 0)) {
field_5_ext_rst = new ExtRst(new ContinuableRecordInput(in), extensionLength);
if(field_5_ext_rst.getDataSize()+4 != extensionLength) {
- System.err.println("ExtRst was supposed to be " + extensionLength + " bytes long, but seems to actually be " + (field_5_ext_rst.getDataSize()+4));
+ _logger.log(POILogger.WARN, "ExtRst was supposed to be " + extensionLength + " bytes long, but seems to actually be " + (field_5_ext_rst.getDataSize() + 4));
}
}
}
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
index 59ef00cfe4..ed8cc4e59f 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
@@ -438,7 +438,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
*
* <p>
* Character width is defined as the maximum digit width
- * of the numbers <code>0, 1, 2, … 9</code> as rendered
+ * of the numbers <code>0, 1, 2, ... 9</code> as rendered
* using the default font (first font in the workbook).
* <br/>
* Unless you are using a very special font, the default character is '0' (zero),
diff --git a/src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java b/src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java
index 0d1b86dd4f..5de6285575 100644
--- a/src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java
+++ b/src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java
@@ -23,9 +23,7 @@ import java.util.*;
import org.apache.poi.poifs.common.POIFSBigBlockSize;
import org.apache.poi.poifs.common.POIFSConstants;
-import org.apache.poi.util.IntList;
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.LittleEndianConsts;
+import org.apache.poi.util.*;
/**
* This class manages and creates the Block Allocation Table, which is
@@ -43,7 +41,8 @@ import org.apache.poi.util.LittleEndianConsts;
* @author Marc Johnson (mjohnson at apache dot org)
*/
public final class BlockAllocationTableReader {
-
+ private static final POILogger _logger = POILogFactory.getLogger(BlockAllocationTableReader.class);
+
/**
* Maximum number size (in blocks) of the allocation table as supported by
* POI.<br/>
@@ -227,12 +226,12 @@ public final class BlockAllocationTableReader {
} catch(IOException e) {
if(currentBlock == headerPropertiesStartBlock) {
// Special case where things are in the wrong order
- System.err.println("Warning, header block comes after data blocks in POIFS block listing");
+ _logger.log(POILogger.WARN, "Warning, header block comes after data blocks in POIFS block listing");
currentBlock = POIFSConstants.END_OF_CHAIN;
} else if(currentBlock == 0 && firstPass) {
// Special case where the termination isn't done right
// on an empty set
- System.err.println("Warning, incorrectly terminated empty data blocks in POIFS block listing (should end at -2, ended at 0)");
+ _logger.log(POILogger.WARN, "Warning, incorrectly terminated empty data blocks in POIFS block listing (should end at -2, ended at 0)");
currentBlock = POIFSConstants.END_OF_CHAIN;
} else {
// Ripple up
diff --git a/src/java/org/apache/poi/ss/usermodel/Sheet.java b/src/java/org/apache/poi/ss/usermodel/Sheet.java
index 4b82c08c8c..3532c20970 100644
--- a/src/java/org/apache/poi/ss/usermodel/Sheet.java
+++ b/src/java/org/apache/poi/ss/usermodel/Sheet.java
@@ -127,7 +127,7 @@ public interface Sheet extends Iterable<Row> {
*
* <p>
* Character width is defined as the maximum digit width
- * of the numbers <code>0, 1, 2, … 9</code> as rendered
+ * of the numbers <code>0, 1, 2, ... 9</code> as rendered
* using the default font (first font in the workbook).
* <br/>
* Unless you are using a very special font, the default character is '0' (zero),
@@ -167,7 +167,7 @@ public interface Sheet extends Iterable<Row> {
*
* <p>
* Character width is defined as the maximum digit width
- * of the numbers <code>0, 1, 2, … 9</code> as rendered
+ * of the numbers <code>0, 1, 2, ... 9</code> as rendered
* using the default font (first font in the workbook)
* </p>
*