Jason git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437998 13f79535-47bb-0310-9956-ffa450edef68tags/REL_3_0_ALPHA3
@@ -20,9 +20,6 @@ package org.apache.poi.ddf; | |||
import org.apache.poi.util.LittleEndian; | |||
import org.apache.poi.util.HexDump; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.IOException; | |||
/** | |||
* Escher array properties are the most wierd construction ever invented | |||
* with all sorts of special cases. I'm hopeful I've got them all. |
@@ -522,7 +522,7 @@ public class FontRecord | |||
data[ 14 + offset ] = getUnderline(); | |||
data[ 15 + offset ] = getFamily(); | |||
data[ 16 + offset ] = getCharset(); | |||
data[ 17 + offset ] = (( byte ) 0); | |||
data[ 17 + offset ] = field_9_zero; | |||
data[ 18 + offset ] = getFontNameLength(); | |||
data[ 19 + offset ] = ( byte ) 1; | |||
if (getFontName() != null) { |
@@ -50,13 +50,29 @@ public class SelectionRecord | |||
private short field_1_first_row; | |||
private short field_2_last_row; | |||
private byte field_3_first_column; | |||
private byte field_3_last_column; | |||
private byte field_4_last_column; | |||
public Reference(RecordInputStream in) { | |||
Reference(RecordInputStream in) { | |||
field_1_first_row = in.readShort(); | |||
field_2_last_row = in.readShort(); | |||
field_3_first_column = in.readByte(); | |||
field_3_last_column = in.readByte(); | |||
field_4_last_column = in.readByte(); | |||
} | |||
public short getFirstRow() { | |||
return field_1_first_row; | |||
} | |||
public short getLastRow() { | |||
return field_2_last_row; | |||
} | |||
public byte getFirstColumn() { | |||
return field_3_first_column; | |||
} | |||
public byte getLastColumn() { | |||
return field_4_last_column; | |||
} | |||
} | |||
@@ -165,7 +165,7 @@ public class WSBoolRecord | |||
public void setWSBool2(byte bool2) | |||
{ | |||
field_2_wsbool = field_2_wsbool = bool2; | |||
field_2_wsbool = bool2; | |||
} | |||
// bool2 bitfields |
@@ -40,9 +40,6 @@ public class IntPtg | |||
public final static int SIZE = 3; | |||
public final static byte sid = 0x1e; | |||
private short field_1_value; | |||
private String val; | |||
private int strlen = 0; | |||
private IntPtg() { | |||
//Required for clone methods |
@@ -29,8 +29,6 @@ public class MultiplyPtg | |||
{ | |||
public final static int SIZE = 1; | |||
public final static byte sid = 0x05; | |||
private final static String MULTIPLY="*"; | |||
/** Creates new AddPtg */ | |||
@@ -18,10 +18,6 @@ | |||
package org.apache.poi.poifs.filesystem; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.poi.poifs.property.Property; | |||
/** |
@@ -19,7 +19,6 @@ | |||
package org.apache.poi.poifs.storage; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.util.*; | |||
@@ -18,9 +18,6 @@ | |||
package org.apache.poi.util; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.*; | |||
/** |
@@ -24,12 +24,8 @@ import org.apache.poi.hdf.extractor.util.*; | |||
import org.apache.poi.hdf.extractor.data.*; | |||
import java.util.*; | |||
import java.io.*; | |||
import javax.swing.*; | |||
import java.awt.*; | |||
import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |||
import org.apache.poi.poifs.filesystem.POIFSDocument; | |||
import org.apache.poi.poifs.filesystem.DocumentEntry; | |||
import org.apache.poi.util.LittleEndian; |
@@ -20,11 +20,8 @@ | |||
package org.apache.poi.hslf.dev; | |||
import org.apache.poi.hslf.*; | |||
import org.apache.poi.hslf.model.*; | |||
import org.apache.poi.hslf.record.*; | |||
import org.apache.poi.hslf.usermodel.*; | |||
import java.io.*; | |||
/** | |||
* Uses record level code to locate PPDrawing entries. |
@@ -20,11 +20,7 @@ | |||
package org.apache.poi.hslf.dev; | |||
import org.apache.poi.hslf.*; | |||
import org.apache.poi.hslf.model.*; | |||
import org.apache.poi.hslf.record.*; | |||
import org.apache.poi.hslf.usermodel.*; | |||
import java.io.*; | |||
/** | |||
* Uses record level code to locate SlideListWithText entries. |
@@ -22,7 +22,6 @@ package org.apache.poi.hslf.dev; | |||
import org.apache.poi.hslf.*; | |||
import org.apache.poi.hslf.record.*; | |||
import java.io.*; | |||
/** | |||
* Uses record level code to locate Notes and Slide records. |
@@ -20,12 +20,9 @@ | |||
package org.apache.poi.hslf.dev; | |||
import org.apache.poi.hslf.*; | |||
import org.apache.poi.hslf.model.*; | |||
import org.apache.poi.hslf.record.*; | |||
import org.apache.poi.hslf.record.StyleTextPropAtom.*; | |||
import org.apache.poi.hslf.usermodel.*; | |||
import java.io.*; | |||
import java.util.LinkedList; | |||
/** |
@@ -18,8 +18,6 @@ package org.apache.poi.hslf.model; | |||
import org.apache.poi.ddf.*; | |||
import java.awt.*; | |||
/** | |||
* Represents a autoshape in a PowerPoint drawing | |||
* |
@@ -18,8 +18,6 @@ package org.apache.poi.hslf.model; | |||
import org.apache.poi.ddf.*; | |||
import java.awt.*; | |||
/** | |||
* Represents a line in a PowerPoint drawing | |||
* |
@@ -17,8 +17,6 @@ package org.apache.poi.hslf.model; | |||
import org.apache.poi.ddf.*; | |||
import org.apache.poi.hslf.model.ShapeTypes; | |||
import java.awt.*; | |||
import java.util.Iterator; | |||
/** |
@@ -21,7 +21,6 @@ package org.apache.poi.hslf.record; | |||
import org.apache.poi.util.LittleEndian; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
/** | |||
* If we come across a record we know has children of (potential) |
@@ -21,7 +21,6 @@ package org.apache.poi.hslf.record; | |||
import org.apache.poi.util.LittleEndian; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
/** | |||
* If we come across a record we know has children of (potential) |
@@ -18,10 +18,8 @@ | |||
package org.apache.poi.hslf.record; | |||
import org.apache.poi.util.LittleEndian; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
/** | |||
* Master container for Notes. There is one of these for every page of |
@@ -21,7 +21,6 @@ package org.apache.poi.hslf.record; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.util.Vector; | |||
import org.apache.poi.util.LittleEndian; | |||
import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException; |
@@ -22,7 +22,6 @@ import org.apache.poi.util.LittleEndian; | |||
import org.apache.poi.util.StringUtil; | |||
import java.io.IOException; | |||
import java.io.OutputStream; | |||
import java.io.UnsupportedEncodingException; | |||
/** | |||
* A TextCharsAtom (type 4000). Holds text in byte swapped unicode form. |
@@ -237,7 +237,7 @@ public class ValueEvalToNumericXlator { | |||
String s = sve.getStringValue(); | |||
try { | |||
boolean b = Boolean.getBoolean(s); | |||
retval = retval = b ? BoolEval.TRUE : BoolEval.FALSE;; | |||
retval = b ? BoolEval.TRUE : BoolEval.FALSE;; | |||
} | |||
catch (Exception e) { retval = ErrorEval.VALUE_INVALID; } | |||
} |
@@ -32,7 +32,7 @@ public class And extends BooleanFunction { | |||
AreaEval ae = (AreaEval) operands[i]; | |||
ValueEval[] values = ae.getValues(); | |||
for (int j=0, jSize=values.length; j<jSize; j++) { | |||
ValueEval tempVe = tempVe = singleOperandEvaluate(values[j], srcRow, srcCol, true); | |||
ValueEval tempVe = singleOperandEvaluate(values[j], srcRow, srcCol, true); | |||
if (tempVe instanceof BoolEval) { | |||
b = b && ((BoolEval) tempVe).getBooleanValue(); | |||
atleastOneNonBlank = true; |
@@ -31,7 +31,7 @@ public class Or extends BooleanFunction { | |||
AreaEval ae = (AreaEval) operands[i]; | |||
ValueEval[] values = ae.getValues(); | |||
for (int j=0, jSize=values.length; j<jSize; j++) { | |||
ValueEval tempVe = tempVe = singleOperandEvaluate(values[j], srcRow, srcCol, true); | |||
ValueEval tempVe = singleOperandEvaluate(values[j], srcRow, srcCol, true); | |||
if (tempVe instanceof BoolEval) { | |||
b = b || ((BoolEval) tempVe).getBooleanValue(); | |||
atleastOneNonBlank = true; |
@@ -18,13 +18,9 @@ | |||
package org.apache.poi.hwpf.model; | |||
import java.lang.reflect.AccessibleObject; | |||
import java.lang.reflect.Field; | |||
import java.util.HashSet; | |||
import java.io.IOException; | |||
import org.apache.poi.util.BitField; | |||
import org.apache.poi.util.LittleEndian; | |||
import org.apache.poi.hwpf.model.io.*; | |||
@@ -17,11 +17,8 @@ | |||
package org.apache.poi.hwpf.model; | |||
import java.io.ByteArrayOutputStream; | |||
import java.util.Arrays; | |||
import org.apache.poi.hwpf.sprm.SprmBuffer; | |||
/** | |||
* Represents a lightweight node in the Trees used to store content | |||
* properties. |
@@ -17,7 +17,6 @@ | |||
package org.apache.poi.hwpf.model; | |||
import java.util.ArrayList; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.IOException; | |||
import java.util.List; | |||
@@ -27,7 +27,6 @@ package org.apache.poi.hwpf.model.io; | |||
*/ | |||
import java.io.ByteArrayOutputStream; | |||
import java.util.HashMap; | |||
public class HWPFFileSystem |
@@ -30,30 +30,19 @@ import org.apache.poi.hwpf.usermodel.Section; | |||
import org.apache.poi.hwpf.model.PropertyNode; | |||
import org.apache.poi.hwpf.model.StyleSheet; | |||
import org.apache.poi.hwpf.model.StyleDescription; | |||
import org.apache.poi.hwpf.model.CHPBinTable; | |||
import org.apache.poi.hwpf.model.CHPX; | |||
import org.apache.poi.hwpf.model.PAPX; | |||
import org.apache.poi.hwpf.model.SEPX; | |||
import org.apache.poi.hwpf.model.PAPBinTable; | |||
import org.apache.poi.hwpf.model.SectionTable; | |||
import org.apache.poi.hwpf.model.TextPieceTable; | |||
import org.apache.poi.hwpf.model.TextPiece; | |||
import org.apache.poi.hwpf.model.ListTables; | |||
import org.apache.poi.hwpf.sprm.CharacterSprmUncompressor; | |||
import org.apache.poi.hwpf.sprm.CharacterSprmCompressor; | |||
import org.apache.poi.hwpf.sprm.SectionSprmUncompressor; | |||
import org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor; | |||
import org.apache.poi.hwpf.sprm.ParagraphSprmCompressor; | |||
import org.apache.poi.hwpf.sprm.SprmBuffer; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.Iterator; | |||
import java.util.NoSuchElementException; | |||
import java.io.UnsupportedEncodingException; | |||
import java.lang.ref.WeakReference; | |||
/** |
@@ -22,7 +22,6 @@ import org.apache.poi.hwpf.model.types.SEPAbstractType; | |||
import java.lang.reflect.Field; | |||
import java.lang.reflect.AccessibleObject; | |||
import java.lang.reflect.Array; | |||
public class SectionProperties | |||
extends SEPAbstractType |
@@ -20,12 +20,8 @@ import org.apache.poi.hslf.usermodel.SlideShow; | |||
import org.apache.poi.hslf.usermodel.RichTextRun; | |||
import org.apache.poi.hslf.HSLFSlideShow; | |||
import java.awt.*; | |||
import java.awt.Rectangle; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.ByteArrayInputStream; | |||
import java.io.FileOutputStream; | |||
import java.util.ArrayList; | |||
/** | |||
* Test setting text properties of newly added TextBoxes |
@@ -24,7 +24,6 @@ import java.awt.*; | |||
import java.awt.Rectangle; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.ByteArrayInputStream; | |||
import java.io.FileOutputStream; | |||
import java.util.ArrayList; | |||
/** |
@@ -22,9 +22,6 @@ import junit.framework.*; | |||
import org.apache.poi.hwpf.*; | |||
import org.apache.poi.hwpf.model.io.*; | |||
import java.io.*; | |||
import java.util.*; | |||
public class TestFontTable | |||
extends TestCase | |||
{ |
@@ -17,13 +17,9 @@ | |||
package org.apache.poi.hwpf.model; | |||
import junit.framework.*; | |||
import org.apache.poi.hwpf.*; | |||
import org.apache.poi.hwpf.model.io.*; | |||
import java.io.*; | |||
import java.util.*; | |||
public class TestListTables | |||
extends HWPFTestCase |
@@ -22,7 +22,6 @@ import junit.framework.*; | |||
import org.apache.poi.hwpf.*; | |||
import org.apache.poi.hwpf.model.io.*; | |||
import java.io.*; | |||
public class TestStyleSheet | |||
extends TestCase |
@@ -17,9 +17,7 @@ | |||
package org.apache.poi.hssf.eventmodel; | |||
import java.io.ByteArrayInputStream; | |||
import java.io.EOFException; | |||
import java.util.Iterator; | |||
import java.util.Arrays; | |||
import org.apache.poi.hssf.record.BOFRecord; | |||
import org.apache.poi.hssf.record.EOFRecord; |
@@ -18,7 +18,6 @@ package org.apache.poi.hssf.eventmodel; | |||
import java.io.ByteArrayInputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.OutputStream; | |||
import java.io.InputStream; | |||
import java.util.ArrayList; | |||
import java.util.Iterator; |
@@ -20,13 +20,7 @@ package org.apache.poi.hssf.record; | |||
import junit.framework.TestCase; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.io.*; | |||
import org.apache.poi.util.IntMapper; | |||
import org.apache.poi.util.LittleEndian; | |||
import org.apache.poi.util.LittleEndianConsts; | |||
/** | |||
* Tests that records size calculates correctly. |
@@ -20,10 +20,6 @@ package org.apache.poi.hssf.record; | |||
import junit.framework.TestCase; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.io.*; | |||
/** | |||
* Tests that records size calculates correctly. | |||
* |
@@ -18,14 +18,8 @@ | |||
package org.apache.poi.hssf.usermodel; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileOutputStream; | |||
import junit.framework.TestCase; | |||
import org.apache.poi.hssf.util.Region; | |||
import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |||
/** | |||
* Test the ability to clone a sheet. |