aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java18
-rw-r--r--src/java/org/apache/poi/hpsf/Util.java20
-rw-r--r--src/java/org/apache/poi/hssf/eventmodel/EventRecordFactory.java146
-rwxr-xr-xsrc/java/org/apache/poi/hssf/model/LinkTable.java48
-rw-r--r--src/java/org/apache/poi/hssf/record/EscherAggregate.java37
-rw-r--r--src/java/org/apache/poi/hssf/record/SSTRecord.java50
-rw-r--r--src/java/org/apache/poi/hssf/record/cf/FontFormatting.java28
-rwxr-xr-xsrc/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java5
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java10
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java77
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java91
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java30
-rw-r--r--src/java/org/apache/poi/hssf/util/RKUtil.java14
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java103
-rw-r--r--src/java/org/apache/poi/poifs/property/Property.java76
-rw-r--r--src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java3
-rw-r--r--src/java/org/apache/poi/ss/util/Region.java382
-rw-r--r--src/java/org/apache/poi/util/BinaryTree.java276
-rw-r--r--src/java/org/apache/poi/util/POILogger.java198
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java146
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java166
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java12
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java42
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/RelationshipSource.java31
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java2
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java16
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java36
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java26
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java5
-rwxr-xr-xsrc/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java21
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java187
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java14
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java40
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java46
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java40
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java129
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java585
-rw-r--r--src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java1196
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java73
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java8
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java6
-rwxr-xr-xsrc/scratchpad/src/org/apache/poi/hslf/model/Freeform.java31
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/CString.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java45
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java19
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java34
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java12
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java14
-rw-r--r--src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java218
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java22
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java129
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/types/DOPAbstractType.java434
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/types/FIBAbstractType.java95
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java45
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java23
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java1956
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java2
-rw-r--r--src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java4
73 files changed, 3107 insertions, 4470 deletions
diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java
index 6fcc3240ca..441938074f 100644
--- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java
+++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java
@@ -238,7 +238,6 @@ public class AddDimensionedImage {
String imageFile, double reqImageWidthMM, double reqImageHeightMM,
int resizeBehaviour) throws FileNotFoundException, IOException,
IllegalArgumentException {
- HSSFRow row = null;
HSSFClientAnchor anchor = null;
HSSFPatriarch patriarch = null;
ClientAnchorDetail rowClientAnchorDetail = null;
@@ -280,7 +279,7 @@ public class AddDimensionedImage {
// image as the size of the row/column is adjusted. This could easilly
// become another parameter passed to the method.
anchor.setAnchorType(HSSFClientAnchor.DONT_MOVE_AND_RESIZE);
-
+
// Now, add the picture to the workbook. Note that the type is assumed
// to be a JPEG/JPG, this could easily (and should) be parameterised
// however.
@@ -485,7 +484,6 @@ public class AddDimensionedImage {
double colWidthMM = 0.0D;
double overlapMM = 0.0D;
double coordinatePositionsPerMM = 0.0D;
- int fromNumber = startingColumn;
int toColumn = startingColumn;
int inset = 0;
@@ -522,7 +520,7 @@ public class AddDimensionedImage {
// total number of co-ordinate positions to the third paramater
// of the ClientAnchorDetail constructor. For no sepcific reason,
// the latter option is used below.
- anchorDetail = new ClientAnchorDetail(startingColumn,
+ anchorDetail = new ClientAnchorDetail(startingColumn,
toColumn, ConvertImageUnits.TOTAL_COLUMN_COORDINATE_POSITIONS);
}
// In this case, the image will overlap part of another column and it is
@@ -706,8 +704,6 @@ public class AddDimensionedImage {
* @param args the command line arguments
*/
public static void main(String[] args) {
- File file = null;
- FileInputStream fis = null;
FileOutputStream fos = null;
HSSFWorkbook workbook = null;
HSSFSheet sheet = null;
@@ -761,13 +757,13 @@ public class AddDimensionedImage {
* * Together, parameter seven and eight determine the column and row
* co-ordinates of the cell whose top left hand corner will be aligned
* with the images bottom right hand corner.
- *
+ *
* An instance of the ClientAnchorDetail class provides three of the eight
* parameters, one of the co-ordinates for the images top left hand corner,
- * one of the co-ordinates for the images bottom right hand corner and
+ * one of the co-ordinates for the images bottom right hand corner and
* either how far the image should be inset from the top or the left hand
* edge of the cell.
- *
+ *
* @author Mark Beardsley [msb at apache.org]
* @version 1.00 5th August 2009.
*/
@@ -892,7 +888,7 @@ public class AddDimensionedImage {
int pixels = (widthUnits / EXCEL_COLUMN_WIDTH_FACTOR)
* UNIT_OFFSET_LENGTH;
int offsetWidthUnits = widthUnits % EXCEL_COLUMN_WIDTH_FACTOR;
- pixels += Math.round((float) offsetWidthUnits /
+ pixels += Math.round(offsetWidthUnits /
((float) EXCEL_COLUMN_WIDTH_FACTOR / UNIT_OFFSET_LENGTH));
return pixels;
}
@@ -923,4 +919,4 @@ public class AddDimensionedImage {
ConvertImageUnits.PIXELS_PER_MILLIMETRES)));
}
}
-} \ No newline at end of file
+}
diff --git a/src/java/org/apache/poi/hpsf/Util.java b/src/java/org/apache/poi/hpsf/Util.java
index 93b394ad71..62a384a3dd 100644
--- a/src/java/org/apache/poi/hpsf/Util.java
+++ b/src/java/org/apache/poi/hpsf/Util.java
@@ -177,7 +177,7 @@ public class Util
*
* @param date The date to be converted
* @return The filetime
- *
+ *
* @see #filetimeToDate(long)
* @see #filetimeToDate(int, int)
*/
@@ -211,10 +211,10 @@ public class Util
* @return <code>true</code> if the collections are equal, else
* <code>false</code>.
*/
- public static boolean equals(final Collection c1, final Collection c2)
+ public static boolean equals(Collection<?> c1, Collection<?> c2)
{
- final Object[] o1 = c1.toArray();
- final Object[] o2 = c2.toArray();
+ Object[] o1 = c1.toArray();
+ Object[] o2 = c2.toArray();
return internalEquals(o1, o2);
}
@@ -229,14 +229,14 @@ public class Util
* @return <code>true</code> if the object arrays are equal,
* <code>false</code> if they are not.
*/
- public static boolean equals(final Object[] c1, final Object[] c2)
+ public static boolean equals(Object[] c1, Object[] c2)
{
- final Object[] o1 = (Object[]) c1.clone();
- final Object[] o2 = (Object[]) c2.clone();
+ final Object[] o1 = c1.clone();
+ final Object[] o2 = c2.clone();
return internalEquals(o1, o2);
}
- private static boolean internalEquals(final Object[] o1, final Object[] o2)
+ private static boolean internalEquals(Object[] o1, Object[] o2)
{
for (int i1 = 0; i1 < o1.length; i1++)
{
@@ -326,9 +326,9 @@ public class Util
/**
* <p>Returns a textual representation of a {@link Throwable}, including a
* stacktrace.</p>
- *
+ *
* @param t The {@link Throwable}
- *
+ *
* @return a string containing the output of a call to
* <code>t.printStacktrace()</code>.
*/
diff --git a/src/java/org/apache/poi/hssf/eventmodel/EventRecordFactory.java b/src/java/org/apache/poi/hssf/eventmodel/EventRecordFactory.java
index 5cdd813700..0151134e87 100644
--- a/src/java/org/apache/poi/hssf/eventmodel/EventRecordFactory.java
+++ b/src/java/org/apache/poi/hssf/eventmodel/EventRecordFactory.java
@@ -24,10 +24,10 @@ import org.apache.poi.hssf.record.*;
/**
* Event-based record factory. As opposed to RecordFactory
- * this version sends {@link ERFListener#processRecord(Record) } messages to
+ * this version sends {@link ERFListener#processRecord(Record) } messages to
* the supplied listener. Record notifications are sent one record behind
* to ensure that {@link ContinueRecord}s are processed first.
- *
+ *
* @author Andrew C. Oliver (acoliver@apache.org) - probably to blame for the bugs (so yank his chain on the list)
* @author Marc Johnson (mjohnson at apache dot org) - methods taken from RecordFactory
* @author Glen Stampoultzis (glens at apache.org) - methods taken from RecordFactory
@@ -35,87 +35,87 @@ import org.apache.poi.hssf.record.*;
*/
public final class EventRecordFactory {
- private final ERFListener _listener;
+ private final ERFListener _listener;
private final short[] _sids;
- /**
- *
- * @param sids an array of Record.sid values identifying the records
- * the listener will work with. Alternatively if this is "null" then
- * all records are passed. For all 'known' record types use {@link RecordFactory#getAllKnownRecordSIDs()}
- */
- public EventRecordFactory(ERFListener listener, short[] sids) {
- _listener = listener;
- if (sids == null) {
- _sids = null;
- } else {
- _sids = (short[]) sids.clone();
- Arrays.sort(_sids); // for faster binary search
- }
- }
+ /**
+ *
+ * @param sids an array of Record.sid values identifying the records
+ * the listener will work with. Alternatively if this is "null" then
+ * all records are passed. For all 'known' record types use {@link RecordFactory#getAllKnownRecordSIDs()}
+ */
+ public EventRecordFactory(ERFListener listener, short[] sids) {
+ _listener = listener;
+ if (sids == null) {
+ _sids = null;
+ } else {
+ _sids = sids.clone();
+ Arrays.sort(_sids); // for faster binary search
+ }
+ }
private boolean isSidIncluded(short sid) {
if (_sids == null) {
return true;
}
return Arrays.binarySearch(_sids, sid) >= 0;
- }
+ }
+
+ /**
+ * sends the record event to all registered listeners.
+ * @param record the record to be thrown.
+ * @return <code>false</code> to abort. This aborts
+ * out of the event loop should the listener return false
+ */
+ private boolean processRecord(Record record) {
+ if (!isSidIncluded(record.getSid())) {
+ return true;
+ }
+ return _listener.processRecord(record);
+ }
- /**
- * sends the record event to all registered listeners.
- * @param record the record to be thrown.
- * @return <code>false</code> to abort. This aborts
- * out of the event loop should the listener return false
- */
- private boolean processRecord(Record record) {
- if (!isSidIncluded(record.getSid())) {
- return true;
- }
- return _listener.processRecord(record);
- }
+ /**
+ * Create an array of records from an input stream
+ *
+ * @param in the InputStream from which the records will be
+ * obtained
+ *
+ * @exception RecordFormatException on error processing the
+ * InputStream
+ */
+ public void processRecords(InputStream in) throws RecordFormatException {
+ Record last_record = null;
- /**
- * Create an array of records from an input stream
- *
- * @param in the InputStream from which the records will be
- * obtained
- *
- * @exception RecordFormatException on error processing the
- * InputStream
- */
- public void processRecords(InputStream in) throws RecordFormatException {
- Record last_record = null;
+ RecordInputStream recStream = new RecordInputStream(in);
- RecordInputStream recStream = new RecordInputStream(in);
+ while (recStream.hasNextRecord()) {
+ recStream.nextRecord();
+ Record[] recs = RecordFactory.createRecord(recStream); // handle MulRK records
+ if (recs.length > 1) {
+ for (int k = 0; k < recs.length; k++) {
+ if ( last_record != null ) {
+ if (!processRecord(last_record)) {
+ return;
+ }
+ }
+ last_record = recs[ k ]; // do to keep the algorithm homogeneous...you can't
+ } // actually continue a number record anyhow.
+ } else {
+ Record record = recs[ 0 ];
- while (recStream.hasNextRecord()) {
- recStream.nextRecord();
- Record[] recs = RecordFactory.createRecord(recStream); // handle MulRK records
- if (recs.length > 1) {
- for (int k = 0; k < recs.length; k++) {
- if ( last_record != null ) {
- if (!processRecord(last_record)) {
- return;
- }
- }
- last_record = recs[ k ]; // do to keep the algorithm homogeneous...you can't
- } // actually continue a number record anyhow.
- } else {
- Record record = recs[ 0 ];
+ if (record != null) {
+ if (last_record != null) {
+ if (!processRecord(last_record)) {
+ return;
+ }
+ }
+ last_record = record;
+ }
+ }
+ }
- if (record != null) {
- if (last_record != null) {
- if (!processRecord(last_record)) {
- return;
- }
- }
- last_record = record;
- }
- }
- }
-
- if (last_record != null) {
- processRecord(last_record);
- }
- }
-} \ No newline at end of file
+ if (last_record != null) {
+ processRecord(last_record);
+ }
+ }
+}
diff --git a/src/java/org/apache/poi/hssf/model/LinkTable.java b/src/java/org/apache/poi/hssf/model/LinkTable.java
index f5c44ce5c9..73b7d02da0 100755
--- a/src/java/org/apache/poi/hssf/model/LinkTable.java
+++ b/src/java/org/apache/poi/hssf/model/LinkTable.java
@@ -65,8 +65,8 @@ import org.apache.poi.hssf.record.formula.Ref3DPtg;
* @author Josh Micich
*/
final class LinkTable {
-
-
+
+
// TODO make this class into a record aggregate
private static final class CRNBlock {
@@ -84,7 +84,7 @@ final class LinkTable {
_crns = crns;
}
public CRNRecord[] getCrns() {
- return (CRNRecord[]) _crns.clone();
+ return _crns.clone();
}
}
@@ -95,7 +95,7 @@ final class LinkTable {
public ExternalBookBlock(RecordStream rs) {
_externalBookRecord = (SupBookRecord) rs.getNext();
- List temp = new ArrayList();
+ List<Object> temp = new ArrayList<Object>();
while(rs.peekNextClass() == ExternalNameRecord.class) {
temp.add(rs.getNext());
}
@@ -141,7 +141,7 @@ final class LinkTable {
private final ExternalBookBlock[] _externalBookBlocks;
private final ExternSheetRecord _externSheetRecord;
- private final List _definedNames;
+ private final List<NameRecord> _definedNames;
private final int _recordCount;
private final WorkbookRecordList _workbookRecordList; // TODO - would be nice to remove this
@@ -150,15 +150,15 @@ final class LinkTable {
_workbookRecordList = workbookRecordList;
RecordStream rs = new RecordStream(inputList, startIndex);
- List temp = new ArrayList();
+ List<ExternalBookBlock> temp = new ArrayList<ExternalBookBlock>();
while(rs.peekNextClass() == SupBookRecord.class) {
temp.add(new ExternalBookBlock(rs));
}
-
+
_externalBookBlocks = new ExternalBookBlock[temp.size()];
temp.toArray(_externalBookBlocks);
temp.clear();
-
+
if (_externalBookBlocks.length > 0) {
// If any ExternalBookBlock present, there is always 1 of ExternSheetRecord
if (rs.peekNextClass() != ExternSheetRecord.class) {
@@ -170,8 +170,8 @@ final class LinkTable {
} else {
_externSheetRecord = null;
}
-
- _definedNames = new ArrayList();
+
+ _definedNames = new ArrayList<NameRecord>();
// collect zero or more DEFINEDNAMEs id=0x18
while(rs.peekNextClass() == NameRecord.class) {
NameRecord nr = (NameRecord)rs.getNext();
@@ -183,19 +183,19 @@ final class LinkTable {
}
private static ExternSheetRecord readExtSheetRecord(RecordStream rs) {
- List temp = new ArrayList(2);
+ List<ExternSheetRecord> temp = new ArrayList<ExternSheetRecord>(2);
while(rs.peekNextClass() == ExternSheetRecord.class) {
- temp.add(rs.getNext());
+ temp.add((ExternSheetRecord) rs.getNext());
}
-
+
int nItems = temp.size();
if (nItems < 1) {
- throw new RuntimeException("Expected an EXTERNSHEET record but got ("
+ throw new RuntimeException("Expected an EXTERNSHEET record but got ("
+ rs.peekNextClass().getName() + ")");
}
if (nItems == 1) {
// this is the normal case. There should be just one ExternSheetRecord
- return (ExternSheetRecord) temp.get(0);
+ return temp.get(0);
}
// Some apps generate multiple ExternSheetRecords (see bug 45698).
// It seems like the best thing to do might be to combine these into one
@@ -206,7 +206,7 @@ final class LinkTable {
public LinkTable(int numberOfSheets, WorkbookRecordList workbookRecordList) {
_workbookRecordList = workbookRecordList;
- _definedNames = new ArrayList();
+ _definedNames = new ArrayList<NameRecord>();
_externalBookBlocks = new ExternalBookBlock[] {
new ExternalBookBlock(numberOfSheets),
};
@@ -267,7 +267,7 @@ final class LinkTable {
}
public NameRecord getNameRecord(int index) {
- return (NameRecord) _definedNames.get(index);
+ return _definedNames.get(index);
}
public void addName(NameRecord name) {
@@ -301,9 +301,9 @@ final class LinkTable {
}
return false;
}
-
+
private static boolean isDuplicatedNames(NameRecord firstName, NameRecord lastName) {
- return lastName.getNameText().equalsIgnoreCase(firstName.getNameText())
+ return lastName.getNameText().equalsIgnoreCase(firstName.getNameText())
&& isSameSheetNames(firstName, lastName);
}
private static boolean isSameSheetNames(NameRecord firstName, NameRecord lastName) {
@@ -342,10 +342,10 @@ final class LinkTable {
throw new RuntimeException("No external workbook with name '" + workbookName + "'");
}
int sheetIndex = getSheetIndex(ebrTarget.getSheetNames(), sheetName);
-
+
int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, sheetIndex);
if (result < 0) {
- throw new RuntimeException("ExternSheetRecord does not contain combination ("
+ throw new RuntimeException("ExternSheetRecord does not contain combination ("
+ externalBookIndex + ", " + sheetIndex + ")");
}
return result;
@@ -356,7 +356,7 @@ final class LinkTable {
if (sheetNames[i].equals(sheetName)) {
return i;
}
-
+
}
throw new RuntimeException("External workbook does not contain sheet '" + sheetName + "'");
}
@@ -428,7 +428,7 @@ final class LinkTable {
continue;
}
// found it.
- int sheetRefIndex = findRefIndexFromExtBookIndex(i);
+ int sheetRefIndex = findRefIndexFromExtBookIndex(i);
if (sheetRefIndex >= 0) {
return new NameXPtg(sheetRefIndex, definedNameIndex);
}
@@ -437,6 +437,6 @@ final class LinkTable {
}
private int findRefIndexFromExtBookIndex(int extBookIndex) {
- return _externSheetRecord.findRefIndexFromExtBookIndex(extBookIndex);
+ return _externSheetRecord.findRefIndexFromExtBookIndex(extBookIndex);
}
}
diff --git a/src/java/org/apache/poi/hssf/record/EscherAggregate.java b/src/java/org/apache/poi/hssf/record/EscherAggregate.java
index a6267ef3b8..4b94f281af 100644
--- a/src/java/org/apache/poi/hssf/record/EscherAggregate.java
+++ b/src/java/org/apache/poi/hssf/record/EscherAggregate.java
@@ -465,7 +465,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
pos += temp;
// Write the matching OBJ record
- Record obj = (Record) shapeToObj.get( shapes.get( i ) );
+ Record obj = shapeToObj.get( shapes.get( i ) );
temp = obj.serialize( pos, data );
pos += temp;
@@ -535,7 +535,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
{
this.patriarch = patriarch;
}
-
+
/**
* Converts the Records into UserModel
* objects on the bound HSSFPatriarch
@@ -544,7 +544,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
if(patriarch == null) {
throw new IllegalStateException("Must call setPatriarch() first");
}
-
+
// The top level container ought to have
// the DgRecord and the container of one container
// per shape group (patriach overall first)
@@ -552,14 +552,13 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
if(topContainer == null) {
return;
}
- topContainer = (EscherContainerRecord)
- topContainer.getChildContainers().get(0);
-
+ topContainer = topContainer.getChildContainers().get(0);
+
List tcc = topContainer.getChildContainers();
if(tcc.size() == 0) {
throw new IllegalStateException("No child escher containers at the point that should hold the patriach data, and one container per top level shape!");
}
-
+
// First up, get the patriach position
// This is in the first EscherSpgrRecord, in
// the first container, with a EscherSRecord too
@@ -579,7 +578,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
spgr.getRectX2(), spgr.getRectY2()
);
}
-
+
// Now process the containers for each group
// and objects
for(int i=1; i<tcc.size(); i++) {
@@ -587,7 +586,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
(EscherContainerRecord)tcc.get(i);
//System.err.println("\n\n*****\n\n");
//System.err.println(shapeContainer);
-
+
// Could be a group, or a base object
if(shapeContainer.getChildRecords().size() == 1 &&
shapeContainer.getChildContainers().size() == 1) {
@@ -595,7 +594,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
HSSFShapeGroup group =
new HSSFShapeGroup(null, new HSSFClientAnchor());
patriarch.getChildren().add(group);
-
+
EscherContainerRecord groupContainer =
(EscherContainerRecord)shapeContainer.getChild(0);
convertRecordsToUserModel(groupContainer, group);
@@ -604,7 +603,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
HSSFTextbox box =
new HSSFTextbox(null, new HSSFClientAnchor());
patriarch.getChildren().add(box);
-
+
convertRecordsToUserModel(shapeContainer, box);
} else if(shapeContainer.hasChildOfType((short)0xF011)) {
// Not yet supporting EscherClientDataRecord stuff
@@ -613,7 +612,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
convertRecordsToUserModel(shapeContainer, patriarch);
}
}
-
+
// Now, clear any trace of what records make up
// the patriarch
// Otherwise, everything will go horribly wrong
@@ -625,14 +624,14 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
// back into shapes
log.log(POILogger.WARN, "Not processing objects into Patriarch!");
}
-
+
private void convertRecordsToUserModel(EscherContainerRecord shapeContainer, Object model) {
for(Iterator<EscherRecord> it = shapeContainer.getChildIterator(); it.hasNext();) {
EscherRecord r = it.next();
if(r instanceof EscherSpgrRecord) {
// This may be overriden by a later EscherClientAnchorRecord
EscherSpgrRecord spgr = (EscherSpgrRecord)r;
-
+
if(model instanceof HSSFShapeGroup) {
HSSFShapeGroup g = (HSSFShapeGroup)model;
g.setCoordinates(
@@ -642,10 +641,10 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
} else {
throw new IllegalStateException("Got top level anchor but not processing a group");
}
- }
+ }
else if(r instanceof EscherClientAnchorRecord) {
EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;
-
+
if(model instanceof HSSFShape) {
HSSFShape g = (HSSFShape)model;
g.getAnchor().setDx1(car.getDx1());
@@ -658,7 +657,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
}
else if(r instanceof EscherTextboxRecord) {
EscherTextboxRecord tbr = (EscherTextboxRecord)r;
-
+
// Also need to find the TextObjectRecord too
// TODO
}
@@ -673,7 +672,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
}
}
}
-
+
public void clear()
{
clearEscherRecords();
@@ -742,7 +741,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
// escherParent.addChildRecord(escherTextbox);
-
+
if ( shapeModel instanceof CommentShape ){
CommentShape comment = (CommentShape)shapeModel;
tailRec.add(comment.getNoteRecord());
diff --git a/src/java/org/apache/poi/hssf/record/SSTRecord.java b/src/java/org/apache/poi/hssf/record/SSTRecord.java
index d87b06320e..481fa84d3c 100644
--- a/src/java/org/apache/poi/hssf/record/SSTRecord.java
+++ b/src/java/org/apache/poi/hssf/record/SSTRecord.java
@@ -68,9 +68,6 @@ public final class SSTRecord extends ContinuableRecord {
/** Offsets relative the start of the current SST or continue record */
int[] bucketRelativeOffsets;
- /**
- * default constructor
- */
public SSTRecord()
{
field_1_num_strings = 0;
@@ -86,8 +83,7 @@ public final class SSTRecord extends ContinuableRecord {
*
* @return the index of that string in the table
*/
-
- public int addString( final UnicodeString string )
+ public int addString(UnicodeString string)
{
field_1_num_strings++;
UnicodeString ucs = ( string == null ) ? EMPTY_STRING
@@ -95,12 +91,9 @@ public final class SSTRecord extends ContinuableRecord {
int rval;
int index = field_3_strings.getIndex(ucs);
- if ( index != -1 )
- {
+ if ( index != -1 ) {
rval = index;
- }
- else
- {
+ } else {
// This is a new string -- we didn't see it among the
// strings we've already collected
rval = field_3_strings.size();
@@ -113,7 +106,6 @@ public final class SSTRecord extends ContinuableRecord {
/**
* @return number of strings
*/
-
public int getNumStrings()
{
return field_1_num_strings;
@@ -122,7 +114,6 @@ public final class SSTRecord extends ContinuableRecord {
/**
* @return number of unique strings
*/
-
public int getNumUniqueStrings()
{
return field_2_num_unique_strings;
@@ -136,8 +127,7 @@ public final class SSTRecord extends ContinuableRecord {
*
* @return the desired string
*/
-
- public UnicodeString getString( final int id )
+ public UnicodeString getString(int id )
{
return (UnicodeString) field_3_strings.get( id );
}
@@ -148,9 +138,7 @@ public final class SSTRecord extends ContinuableRecord {
*
* @return string representation
*/
-
- public String toString()
- {
+ public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append( "[SST]\n" );
@@ -168,11 +156,7 @@ public final class SSTRecord extends ContinuableRecord {
return buffer.toString();
}
- /**
- * @return sid
- */
- public short getSid()
- {
+ public short getSid() {
return sid;
}
@@ -254,9 +238,7 @@ public final class SSTRecord extends ContinuableRecord {
*
* @param in the RecordInputstream to read the record from
*/
-
- public SSTRecord( RecordInputStream in )
- {
+ public SSTRecord(RecordInputStream in) {
// this method is ALWAYS called after construction -- using
// the nontrivial constructor, of course -- so this is where
// we initialize our fields
@@ -272,7 +254,6 @@ public final class SSTRecord extends ContinuableRecord {
* @return an iterator of the strings we hold. All instances are
* UnicodeStrings
*/
-
Iterator getStrings()
{
return field_3_strings.iterator();
@@ -281,9 +262,7 @@ public final class SSTRecord extends ContinuableRecord {
/**
* @return count of the strings we hold.
*/
-
- int countStrings()
- {
+ int countStrings() {
return field_3_strings.size();
}
@@ -294,8 +273,7 @@ public final class SSTRecord extends ContinuableRecord {
bucketRelativeOffsets = serializer.getBucketRelativeOffsets();
}
- SSTDeserializer getDeserializer()
- {
+ SSTDeserializer getDeserializer() {
return deserializer;
}
@@ -312,15 +290,14 @@ public final class SSTRecord extends ContinuableRecord {
* SST record.
* @return The new SST record.
*/
- public ExtSSTRecord createExtSSTRecord(int sstOffset)
- {
+ public ExtSSTRecord createExtSSTRecord(int sstOffset) {
if (bucketAbsoluteOffsets == null || bucketAbsoluteOffsets == null)
throw new IllegalStateException("SST record has not yet been serialized.");
ExtSSTRecord extSST = new ExtSSTRecord();
extSST.setNumStringsPerBucket((short)8);
- int[] absoluteOffsets = (int[]) bucketAbsoluteOffsets.clone();
- int[] relativeOffsets = (int[]) bucketRelativeOffsets.clone();
+ int[] absoluteOffsets = bucketAbsoluteOffsets.clone();
+ int[] relativeOffsets = bucketRelativeOffsets.clone();
for ( int i = 0; i < absoluteOffsets.length; i++ )
absoluteOffsets[i] += sstOffset;
extSST.setBucketOffsets(absoluteOffsets, relativeOffsets);
@@ -333,8 +310,7 @@ public final class SSTRecord extends ContinuableRecord {
*
* @return The size of the ExtSST record in bytes.
*/
- public int calcExtSSTRecordSize()
- {
+ public int calcExtSSTRecordSize() {
return ExtSSTRecord.getRecordSizeForStrings(field_3_strings.size());
}
}
diff --git a/src/java/org/apache/poi/hssf/record/cf/FontFormatting.java b/src/java/org/apache/poi/hssf/record/cf/FontFormatting.java
index d8da21095d..be7aafac0e 100644
--- a/src/java/org/apache/poi/hssf/record/cf/FontFormatting.java
+++ b/src/java/org/apache/poi/hssf/record/cf/FontFormatting.java
@@ -25,10 +25,10 @@ import org.apache.poi.util.LittleEndian;
/**
* Font Formatting Block of the Conditional Formatting Rule Record.
- *
+ *
* @author Dmitriy Kumshayev
*/
-public final class FontFormatting
+public final class FontFormatting
{
private byte[] _rawData;
@@ -45,7 +45,7 @@ public final class FontFormatting
private static final int OFFSET_FONT_WEIGHT_MODIFIED = 100;
private static final int OFFSET_NOT_USED1 = 104;
private static final int OFFSET_NOT_USED2 = 108;
- private static final int OFFSET_NOT_USED3 = 112; // for some reason Excel always writes 0x7FFFFFFF at this offset
+ private static final int OFFSET_NOT_USED3 = 112; // for some reason Excel always writes 0x7FFFFFFF at this offset
private static final int OFFSET_FONT_FORMATING_END = 116;
private static final int RAW_DATA_SIZE = 118;
@@ -71,15 +71,15 @@ public final class FontFormatting
public static final short SS_SUPER = 1;
/** Escapement type - Subscript */
public static final short SS_SUB = 2;
- /** Underline type - None */
+ /** Underline type - None */
public static final byte U_NONE = 0;
- /** Underline type - Single */
+ /** Underline type - Single */
public static final byte U_SINGLE = 1;
- /** Underline type - Double */
+ /** Underline type - Double */
public static final byte U_DOUBLE = 2;
- /** Underline type - Single Accounting */
+ /** Underline type - Single Accounting */
public static final byte U_SINGLE_ACCOUNTING = 0x21;
- /** Underline type - Double Accounting */
+ /** Underline type - Double Accounting */
public static final byte U_DOUBLE_ACCOUNTING = 0x22;
/** Normal boldness (not bold) */
private static final short FONT_WEIGHT_NORMAL = 0x190;
@@ -92,7 +92,7 @@ public final class FontFormatting
private FontFormatting(byte[] rawData) {
_rawData = rawData;
}
-
+
public FontFormatting()
{
this(new byte[RAW_DATA_SIZE]);
@@ -144,7 +144,7 @@ public final class FontFormatting
private void setInt(int offset, int value) {
LittleEndian.putInt( _rawData, offset, value);
}
-
+
public byte[] getRawRecord()
{
return _rawData;
@@ -152,7 +152,7 @@ public final class FontFormatting
/**
* sets the height of the font in 1/20th point units
- *
+ *
*
* @param height fontheight (in points/20); or -1 to preserve the cell font height
*/
@@ -270,7 +270,7 @@ public final class FontFormatting
/**
* set the font weight to bold (weight=700) or to normal(weight=400) boldness.
*
- * @param bold - set font weight to bold if true; to normal otherwise
+ * @param bold - set font weight to bold if true; to normal otherwise
*/
public void setBold(boolean bold)
{
@@ -541,9 +541,9 @@ public final class FontFormatting
return buffer.toString();
}
- public Object clone()
+ public Object clone()
{
- byte[] rawData = (byte[]) _rawData.clone();
+ byte[] rawData = _rawData.clone();
return new FontFormatting(rawData);
}
}
diff --git a/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java b/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java
index 29f7a4dc2d..690a486f31 100755
--- a/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java
+++ b/src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java
@@ -53,10 +53,7 @@ public final class OperandResolver {
if (result instanceof ErrorEval) {
throw new EvaluationException((ErrorEval) result);
}
- if (result instanceof ValueEval) {
- return (ValueEval) result;
- }
- throw new RuntimeException("Unexpected eval type (" + result.getClass().getName() + ")");
+ return result;
}
/**
diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
index f13bd0ed1f..bcd9673a53 100644
--- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
+++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
@@ -283,7 +283,7 @@ public class EscherGraphics
excelFont = new Font( font.getName(), font.getStyle(), (int) ( font.getSize() / verticalPixelsPerPoint ));
}
FontDetails d = StaticFontMetrics.getFontDetails( excelFont );
- int width = (int) ( (d.getStringWidth( str ) * 8) + 12 );
+ int width = d.getStringWidth( str ) * 8 + 12;
int height = (int) ( ( font.getSize() / verticalPixelsPerPoint ) + 6 ) * 2;
y -= ( font.getSize() / verticalPixelsPerPoint ) + 2 * verticalPixelsPerPoint; // we want to draw the shape from the top-left
HSSFTextbox textbox = escherGroup.createTextbox( new HSSFChildAnchor( x, y, x + width, y + height ) );
@@ -357,13 +357,13 @@ public class EscherGraphics
* <p>
* This draws the polygon, with <code>nPoint</code> line segments.
* The first <code>nPoint&nbsp;-&nbsp;1</code> line segments are
- * drawn between sequential points
+ * drawn between sequential points
* (<code>xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]</code>).
- * The final line segment is a closing one, from the last point to
+ * The final line segment is a closing one, from the last point to
* the first (assuming they are different).
* <p>
* The area inside of the polygon is defined by using an
- * even-odd fill rule (also known as the alternating rule), and
+ * even-odd fill rule (also known as the alternating rule), and
* the area inside of it is filled.
* @param xPoints array of the <code>x</code> coordinates.
* @param yPoints array of the <code>y</code> coordinates.
@@ -454,7 +454,7 @@ public class EscherGraphics
public void setClip(int x, int y, int width, int height)
{
- setClip(((Shape) (new Rectangle(x,y,width,height))));
+ setClip(new Rectangle(x,y,width,height));
}
public void setClip(Shape shape)
diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
index 217f0eba5f..41b94ffd48 100644
--- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
+++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
@@ -70,14 +70,13 @@ import java.util.Map;
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class EscherGraphics2d extends Graphics2D
-{
- private EscherGraphics escherGraphics;
- private BufferedImage img;
- private AffineTransform trans;
- private Stroke stroke;
- private Paint paint;
- private Shape deviceclip;
+public final class EscherGraphics2d extends Graphics2D {
+ private EscherGraphics _escherGraphics;
+ private BufferedImage _img;
+ private AffineTransform _trans;
+ private Stroke _stroke;
+ private Paint _paint;
+ private Shape _deviceclip;
private POILogger logger = POILogFactory.getLogger(getClass());
/**
@@ -87,7 +86,7 @@ public class EscherGraphics2d extends Graphics2D
*/
public EscherGraphics2d(EscherGraphics escherGraphics)
{
- this.escherGraphics = escherGraphics;
+ this._escherGraphics = escherGraphics;
setImg( new BufferedImage(1, 1, 2) );
setColor(Color.black);
}
@@ -130,7 +129,7 @@ public class EscherGraphics2d extends Graphics2D
public Graphics create()
{
- EscherGraphics2d g2d = new EscherGraphics2d(escherGraphics);
+ EscherGraphics2d g2d = new EscherGraphics2d(_escherGraphics);
return g2d;
}
@@ -148,8 +147,8 @@ public class EscherGraphics2d extends Graphics2D
Line2D shape2d = (Line2D) shape;
int width = 0;
- if (stroke != null && stroke instanceof BasicStroke) {
- width = (int) ((BasicStroke)stroke).getLineWidth() * 12700;
+ if (_stroke != null && _stroke instanceof BasicStroke) {
+ width = (int) ((BasicStroke)_stroke).getLineWidth() * 12700;
}
drawLine((int)shape2d.getX1(), (int)shape2d.getY1(), (int)shape2d.getX2(), (int)shape2d.getY2(), width);
@@ -223,7 +222,7 @@ public class EscherGraphics2d extends Graphics2D
public void drawImage(BufferedImage bufferedimage, BufferedImageOp op, int x, int y)
{
BufferedImage img = op.filter(bufferedimage, null);
- drawImage(((Image) (img)), new AffineTransform(1.0F, 0.0F, 0.0F, 1.0F, x, y), null);
+ drawImage(img, new AffineTransform(1.0F, 0.0F, 0.0F, 1.0F, x, y), null);
}
public void drawLine(int x1, int y1, int x2, int y2, int width)
@@ -234,8 +233,8 @@ public class EscherGraphics2d extends Graphics2D
public void drawLine(int x1, int y1, int x2, int y2)
{
int width = 0;
- if (stroke != null && stroke instanceof BasicStroke) {
- width = (int) ((BasicStroke)stroke).getLineWidth() * 12700;
+ if (_stroke != null && _stroke instanceof BasicStroke) {
+ width = (int) ((BasicStroke)_stroke).getLineWidth() * 12700;
}
getEscherGraphics().drawLine(x1,y1,x2,y2, width);
// draw(new GeneralPath(new java.awt.geom.Line2D.Float(x1, y1, x2, y2)));
@@ -268,7 +267,7 @@ public class EscherGraphics2d extends Graphics2D
public void drawRect(int x, int y, int width, int height)
{
- escherGraphics.drawRect(x,y,width,height);
+ _escherGraphics.drawRect(x,y,width,height);
}
public void drawRenderableImage(RenderableImage renderableimage, AffineTransform affinetransform)
@@ -325,7 +324,7 @@ public class EscherGraphics2d extends Graphics2D
public void fillOval(int x, int y, int width, int height)
{
- escherGraphics.fillOval(x,y,width,height);
+ _escherGraphics.fillOval(x,y,width,height);
}
/**
@@ -334,13 +333,13 @@ public class EscherGraphics2d extends Graphics2D
* <p>
* This draws the polygon, with <code>nPoint</code> line segments.
* The first <code>nPoint&nbsp;-&nbsp;1</code> line segments are
- * drawn between sequential points
+ * drawn between sequential points
* (<code>xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]</code>).
- * The final line segment is a closing one, from the last point to
+ * The final line segment is a closing one, from the last point to
* the first (assuming they are different).
* <p>
* The area inside of the polygon is defined by using an
- * even-odd fill rule (also known as the alternating rule), and
+ * even-odd fill rule (also known as the alternating rule), and
* the area inside of it is filled.
* @param xPoints array of the <code>x</code> coordinates.
* @param yPoints array of the <code>y</code> coordinates.
@@ -349,7 +348,7 @@ public class EscherGraphics2d extends Graphics2D
*/
public void fillPolygon(int xPoints[], int yPoints[], int nPoints)
{
- escherGraphics.fillPolygon(xPoints, yPoints, nPoints);
+ _escherGraphics.fillPolygon(xPoints, yPoints, nPoints);
}
public void fillRect(int x, int y, int width, int height)
@@ -382,15 +381,15 @@ public class EscherGraphics2d extends Graphics2D
public Rectangle getClipBounds()
{
- if(getDeviceclip() != null)
+ if(getDeviceclip() != null) {
return getClip().getBounds();
- else
- return null;
+ }
+ return null;
}
public Color getColor()
{
- return escherGraphics.getColor();
+ return _escherGraphics.getColor();
}
public Composite getComposite()
@@ -421,7 +420,7 @@ public class EscherGraphics2d extends Graphics2D
public Paint getPaint()
{
- return paint;
+ return _paint;
}
public Object getRenderingHint(java.awt.RenderingHints.Key key)
@@ -436,7 +435,7 @@ public class EscherGraphics2d extends Graphics2D
public Stroke getStroke()
{
- return stroke;
+ return _stroke;
}
public AffineTransform getTransform()
@@ -474,7 +473,7 @@ public class EscherGraphics2d extends Graphics2D
public void setClip(int i, int j, int k, int l)
{
- setClip(((Shape) (new Rectangle(i, j, k, l))));
+ setClip(new Rectangle(i, j, k, l));
}
public void setClip(Shape shape)
@@ -484,7 +483,7 @@ public class EscherGraphics2d extends Graphics2D
public void setColor(Color c)
{
- escherGraphics.setColor(c);
+ _escherGraphics.setColor(c);
}
public void setComposite(Composite composite)
@@ -501,7 +500,7 @@ public class EscherGraphics2d extends Graphics2D
{
if(paint1 != null)
{
- paint = paint1;
+ _paint = paint1;
if(paint1 instanceof Color)
setColor( (Color)paint1 );
}
@@ -524,7 +523,7 @@ public class EscherGraphics2d extends Graphics2D
public void setStroke(Stroke s)
{
- stroke = s;
+ _stroke = s;
}
public void setTransform(AffineTransform affinetransform)
@@ -571,42 +570,42 @@ public class EscherGraphics2d extends Graphics2D
private EscherGraphics getEscherGraphics()
{
- return escherGraphics;
+ return _escherGraphics;
}
private BufferedImage getImg()
{
- return img;
+ return _img;
}
private void setImg( BufferedImage img )
{
- this.img = img;
+ this._img = img;
}
private Graphics2D getG2D()
{
- return (Graphics2D) img.getGraphics();
+ return (Graphics2D) _img.getGraphics();
}
private AffineTransform getTrans()
{
- return trans;
+ return _trans;
}
private void setTrans( AffineTransform trans )
{
- this.trans = trans;
+ this._trans = trans;
}
private Shape getDeviceclip()
{
- return deviceclip;
+ return _deviceclip;
}
private void setDeviceclip( Shape deviceclip )
{
- this.deviceclip = deviceclip;
+ this._deviceclip = deviceclip;
}
}
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java
index 4c9d63ebc4..8cf3a8b550 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java
@@ -28,15 +28,14 @@ import org.apache.poi.hssf.util.HSSFColor;
*
* @author Brian Sanders (bsanders at risklabs dot com)
*/
-public class HSSFPalette
-{
- private PaletteRecord palette;
-
+public final class HSSFPalette {
+ private PaletteRecord _palette;
+
protected HSSFPalette(PaletteRecord palette)
{
- this.palette = palette;
+ _palette = palette;
}
-
+
/**
* Retrieves the color at a given index
*
@@ -45,16 +44,15 @@ public class HSSFPalette
*/
public HSSFColor getColor(short index)
{
- //Handle the special AUTOMATIC case
- if (index == HSSFColor.AUTOMATIC.index)
- return HSSFColor.AUTOMATIC.getInstance();
- else {
- byte[] b = palette.getColor(index);
+ //Handle the special AUTOMATIC case
+ if (index == HSSFColor.AUTOMATIC.index) {
+ return HSSFColor.AUTOMATIC.getInstance();
+ }
+ byte[] b = _palette.getColor(index);
if (b != null)
{
return new CustomColor(index, b);
}
- }
return null;
}
/**
@@ -66,7 +64,7 @@ public class HSSFPalette
public HSSFColor getColor(int index) {
return getColor((short)index);
}
-
+
/**
* Finds the first occurance of a given color
*
@@ -77,9 +75,9 @@ public class HSSFPalette
*/
public HSSFColor findColor(byte red, byte green, byte blue)
{
- byte[] b = palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
- for (short i = (short) PaletteRecord.FIRST_COLOR_INDEX; b != null;
- b = palette.getColor(++i))
+ byte[] b = _palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
+ for (short i = PaletteRecord.FIRST_COLOR_INDEX; b != null;
+ b = _palette.getColor(++i))
{
if (b[0] == red && b[1] == green && b[2] == blue)
{
@@ -104,11 +102,11 @@ public class HSSFPalette
{
HSSFColor result = null;
int minColorDistance = Integer.MAX_VALUE;
- byte[] b = palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
- for (short i = (short) PaletteRecord.FIRST_COLOR_INDEX; b != null;
- b = palette.getColor(++i))
+ byte[] b = _palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
+ for (short i = PaletteRecord.FIRST_COLOR_INDEX; b != null;
+ b = _palette.getColor(++i))
{
- int colorDistance = Math.abs(red - b[0]) +
+ int colorDistance = Math.abs(red - b[0]) +
Math.abs(green - b[1]) + Math.abs(blue - b[2]);
if (colorDistance < minColorDistance)
{
@@ -129,7 +127,7 @@ public class HSSFPalette
*/
public void setColorAtIndex(short index, byte red, byte green, byte blue)
{
- palette.setColor(index, red, green, blue);
+ _palette.setColor(index, red, green, blue);
}
/**
@@ -144,9 +142,9 @@ public class HSSFPalette
*/
public HSSFColor addColor( byte red, byte green, byte blue )
{
- byte[] b = palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
+ byte[] b = _palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);
short i;
- for (i = (short) PaletteRecord.FIRST_COLOR_INDEX; i < PaletteRecord.STANDARD_PALETTE_SIZE + PaletteRecord.FIRST_COLOR_INDEX; b = palette.getColor(++i))
+ for (i = PaletteRecord.FIRST_COLOR_INDEX; i < PaletteRecord.STANDARD_PALETTE_SIZE + PaletteRecord.FIRST_COLOR_INDEX; b = _palette.getColor(++i))
{
if (b == null)
{
@@ -157,52 +155,51 @@ public class HSSFPalette
throw new RuntimeException("Could not find free color index");
}
- private static class CustomColor extends HSSFColor
- {
- private short byteOffset;
- private byte red;
- private byte green;
- private byte blue;
-
- private CustomColor(short byteOffset, byte[] colors)
+ private static final class CustomColor extends HSSFColor {
+ private short _byteOffset;
+ private byte _red;
+ private byte _green;
+ private byte _blue;
+
+ public CustomColor(short byteOffset, byte[] colors)
{
this(byteOffset, colors[0], colors[1], colors[2]);
}
-
+
private CustomColor(short byteOffset, byte red, byte green, byte blue)
{
- this.byteOffset = byteOffset;
- this.red = red;
- this.green = green;
- this.blue = blue;
+ _byteOffset = byteOffset;
+ _red = red;
+ _green = green;
+ _blue = blue;
}
-
+
public short getIndex()
{
- return byteOffset;
+ return _byteOffset;
}
-
+
public short[] getTriplet()
{
return new short[]
{
- (short) (red & 0xff),
- (short) (green & 0xff),
- (short) (blue & 0xff)
+ (short) (_red & 0xff),
+ (short) (_green & 0xff),
+ (short) (_blue & 0xff)
};
}
-
+
public String getHexString()
{
StringBuffer sb = new StringBuffer();
- sb.append(getGnumericPart(red));
+ sb.append(getGnumericPart(_red));
sb.append(':');
- sb.append(getGnumericPart(green));
+ sb.append(getGnumericPart(_green));
sb.append(':');
- sb.append(getGnumericPart(blue));
+ sb.append(getGnumericPart(_blue));
return sb.toString();
}
-
+
private String getGnumericPart(byte color)
{
String s;
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
index e0a08420e8..0f98298a17 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
@@ -524,9 +524,9 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
* Sets the sheet name.
* Will throw IllegalArgumentException if the name is duplicated or contains /\?*[]
* Note - Excel allows sheet names up to 31 chars in length but other applications allow more.
- * Excel does not crash with names longer than 31 chars, but silently truncates such names to
+ * Excel does not crash with names longer than 31 chars, but silently truncates such names to
* 31 chars. POI enforces uniqueness on the first 31 chars.
- *
+ *
* @param sheetIx number (0 based)
*/
public void setSheetName(int sheetIx, String name) {
@@ -552,7 +552,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
public void setHidden(boolean hiddenFlag) {
workbook.getWindowOne().setHidden(hiddenFlag);
}
-
+
public boolean isSheetHidden(int sheetIx) {
validateSheetIndex(sheetIx);
return workbook.isSheetHidden(sheetIx);
@@ -618,7 +618,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
/**
* @deprecated for POI internal use only (formula rendering). This method is likely to
* be removed in future versions of POI.
- *
+ *
* @param refIndex Index to REF entry in EXTERNSHEET record in the Link Table
* @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record
* @return the string representation of the defined or external name
@@ -665,10 +665,10 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
clonedSheet.setActive(false);
String name = getUniqueSheetName(srcName);
- int newSheetIndex = _sheets.size();
+ int newSheetIndex = _sheets.size();
_sheets.add(clonedSheet);
workbook.setSheetName(newSheetIndex, name);
-
+
// Check this sheet has an autofilter, (which has a built-in NameRecord at workbook level)
int filterDbNameIndex = findExistingBuiltinNameRecordIdx(sheetIndex, NameRecord.BUILTIN_FILTER_DB);
if (filterDbNameIndex >=0) {
@@ -679,7 +679,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
for (int i=0; i< ptgs.length; i++) {
Ptg ptg = ptgs[i];
ptg = ptg.copy();
-
+
if (ptg instanceof Area3DPtg) {
Area3DPtg a3p = (Area3DPtg) ptg;
a3p.setExternSheetIndex(newExtSheetIx);
@@ -698,7 +698,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
workbook.cloneDrawings(clonedSheet.getSheet());
}
// TODO - maybe same logic required for other/all built-in name records
-
+
return clonedSheet;
}
@@ -966,12 +966,12 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
temp.add(new MemFuncPtg(exprsSize));
}
if (startColumn >= 0) {
- Area3DPtg colArea = new Area3DPtg(0, MAX_ROW, startColumn, endColumn,
+ Area3DPtg colArea = new Area3DPtg(0, MAX_ROW, startColumn, endColumn,
false, false, false, false, externSheetIndex);
temp.add(colArea);
}
if (startRow >= 0) {
- Area3DPtg rowArea = new Area3DPtg(startRow, endRow, 0, MAX_COLUMN,
+ Area3DPtg rowArea = new Area3DPtg(startRow, endRow, 0, MAX_COLUMN,
false, false, false, false, externSheetIndex);
temp.add(rowArea);
}
@@ -1136,7 +1136,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
*/
public HSSFCellStyle getCellStyleAt(short idx)
{
- ExtendedFormatRecord xfr = workbook.getExFormatAt((int)idx);
+ ExtendedFormatRecord xfr = workbook.getExFormatAt(idx);
HSSFCellStyle style = new HSSFCellStyle(idx, xfr, this);
return style;
@@ -1296,7 +1296,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
int result = names.size();
return result;
}
-
+
public HSSFName getName(String name) {
int nameIndex = getNameIndex(name);
if (nameIndex < 0) {
@@ -1311,7 +1311,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
throw new IllegalStateException("There are no defined names in this workbook");
}
if (nameIndex < 0 || nameIndex > nNames) {
- throw new IllegalArgumentException("Specified name index " + nameIndex
+ throw new IllegalArgumentException("Specified name index " + nameIndex
+ " is outside the allowable range (0.." + (nNames-1) + ").");
}
return (HSSFName) names.get(nameIndex);
@@ -1394,7 +1394,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
if (name == null) {
return null;
}
-
+
return HSSFFormulaParser.toFormulaString(this, name.getNameDefinition());
}
@@ -1684,7 +1684,7 @@ public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.userm
}
}
}
-
+
public CreationHelper getCreationHelper() {
return new HSSFCreationHelper(this);
}
diff --git a/src/java/org/apache/poi/hssf/util/RKUtil.java b/src/java/org/apache/poi/hssf/util/RKUtil.java
index 27aecb06b3..b36166e29e 100644
--- a/src/java/org/apache/poi/hssf/util/RKUtil.java
+++ b/src/java/org/apache/poi/hssf/util/RKUtil.java
@@ -27,19 +27,16 @@ package org.apache.poi.hssf.util;
* @see org.apache.poi.hssf.record.MulRKRecord
* @see org.apache.poi.hssf.record.RKRecord
*/
-public class RKUtil
-{
- private RKUtil()
- {
+public final class RKUtil {
+ private RKUtil() {
+ // no instances of this class
}
/**
* Do the dirty work of decoding; made a private static method to
* facilitate testing the algorithm
*/
-
- public static double decodeNumber(int number)
- {
+ public static double decodeNumber(int number) {
long raw_number = number;
// mask off the two low-order bits, 'cause they're not part of
@@ -51,7 +48,7 @@ public class RKUtil
{
// ok, it's just a plain ol' int; we can handle this
// trivially by casting
- rvalue = ( double ) (raw_number);
+ rvalue = raw_number;
}
else
{
@@ -72,5 +69,4 @@ public class RKUtil
return rvalue;
}
-
}
diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
index b783035556..7e0df0013e 100644
--- a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
+++ b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
@@ -72,7 +72,7 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
private static DocumentBlock[] convertRawBlocksToBigBlocks(ListManagedBlock[] blocks) throws IOException {
DocumentBlock[] result = new DocumentBlock[blocks.length];
for (int i = 0; i < result.length; i++) {
- result[i] = new DocumentBlock((RawDataBlock)blocks[i]);
+ result[i] = new DocumentBlock((RawDataBlock)blocks[i]);
}
return result;
}
@@ -127,7 +127,7 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
* @param stream the InputStream we read data from
*/
public POIFSDocument(String name, InputStream stream) throws IOException {
- List blocks = new ArrayList();
+ List<DocumentBlock> blocks = new ArrayList<DocumentBlock>();
_size = 0;
while (true) {
@@ -142,7 +142,7 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
break;
}
}
- DocumentBlock[] bigBlocks = (DocumentBlock[]) blocks.toArray(new DocumentBlock[blocks.size()]);
+ DocumentBlock[] bigBlocks = blocks.toArray(new DocumentBlock[blocks.size()]);
_big_store = new BigBlockStore(bigBlocks);
_property = new DocumentProperty(name, _size);
@@ -201,7 +201,7 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
int len = buffer.length;
DataInputBlock currentBlock = getDataInputBlock(offset);
-
+
int blockAvailable = currentBlock.available();
if (blockAvailable > len) {
currentBlock.readFully(buffer, 0, len);
@@ -249,9 +249,8 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
}
if (_property.shouldUseSmallBlocks()) {
return SmallDocumentBlock.getDataInputBlock(_small_store.getBlocks(), offset);
- } else {
- return DocumentBlock.getDataInputBlock(_big_store.getBlocks(), offset);
}
+ return DocumentBlock.getDataInputBlock(_big_store.getBlocks(), offset);
}
/**
@@ -377,11 +376,11 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
/* ********** END begin implementation of POIFSViewable ********** */
private static final class SmallBlockStore {
- private SmallDocumentBlock[] smallBlocks;
- private final POIFSDocumentPath path;
- private final String name;
- private final int size;
- private final POIFSWriterListener writer;
+ private SmallDocumentBlock[] _smallBlocks;
+ private final POIFSDocumentPath _path;
+ private final String _name;
+ private final int _size;
+ private final POIFSWriterListener _writer;
/**
* Constructor
@@ -389,11 +388,11 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
* @param blocks blocks to construct the store from
*/
SmallBlockStore(SmallDocumentBlock[] blocks) {
- smallBlocks = (SmallDocumentBlock[]) blocks.clone();
- this.path = null;
- this.name = null;
- this.size = -1;
- this.writer = null;
+ _smallBlocks = blocks.clone();
+ this._path = null;
+ this._name = null;
+ this._size = -1;
+ this._writer = null;
}
/**
@@ -405,41 +404,41 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
* @param writer the object that will eventually write the document
*/
SmallBlockStore(POIFSDocumentPath path, String name, int size, POIFSWriterListener writer) {
- smallBlocks = new SmallDocumentBlock[0];
- this.path = path;
- this.name = name;
- this.size = size;
- this.writer = writer;
+ _smallBlocks = new SmallDocumentBlock[0];
+ this._path = path;
+ this._name = name;
+ this._size = size;
+ this._writer = writer;
}
/**
* @return <code>true</code> if this store is a valid source of data
*/
boolean isValid() {
- return smallBlocks.length > 0 || writer != null;
+ return _smallBlocks.length > 0 || _writer != null;
}
/**
* @return the SmallDocumentBlocks
*/
SmallDocumentBlock[] getBlocks() {
- if (isValid() && writer != null) {
- ByteArrayOutputStream stream = new ByteArrayOutputStream(size);
- DocumentOutputStream dstream = new DocumentOutputStream(stream, size);
+ if (isValid() && _writer != null) {
+ ByteArrayOutputStream stream = new ByteArrayOutputStream(_size);
+ DocumentOutputStream dstream = new DocumentOutputStream(stream, _size);
- writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, path, name, size));
- smallBlocks = SmallDocumentBlock.convert(stream.toByteArray(), size);
+ _writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, _path, _name, _size));
+ _smallBlocks = SmallDocumentBlock.convert(stream.toByteArray(), _size);
}
- return smallBlocks;
+ return _smallBlocks;
}
} // end private class SmallBlockStore
private static final class BigBlockStore {
private DocumentBlock[] bigBlocks;
- private final POIFSDocumentPath path;
- private final String name;
- private final int size;
- private final POIFSWriterListener writer;
+ private final POIFSDocumentPath _path;
+ private final String _name;
+ private final int _size;
+ private final POIFSWriterListener _writer;
/**
* Constructor
@@ -447,11 +446,11 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
* @param blocks the blocks making up the store
*/
BigBlockStore(DocumentBlock[] blocks) {
- bigBlocks = (DocumentBlock[]) blocks.clone();
- this.path = null;
- this.name = null;
- this.size = -1;
- this.writer = null;
+ bigBlocks = blocks.clone();
+ _path = null;
+ _name = null;
+ _size = -1;
+ _writer = null;
}
/**
@@ -464,29 +463,29 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
*/
BigBlockStore(POIFSDocumentPath path, String name, int size, POIFSWriterListener writer) {
bigBlocks = new DocumentBlock[0];
- this.path = path;
- this.name = name;
- this.size = size;
- this.writer = writer;
+ _path = path;
+ _name = name;
+ _size = size;
+ _writer = writer;
}
/**
* @return <code>true</code> if this store is a valid source of data
*/
boolean isValid() {
- return bigBlocks.length > 0 || writer != null;
+ return bigBlocks.length > 0 || _writer != null;
}
/**
* @return the DocumentBlocks
*/
DocumentBlock[] getBlocks() {
- if (isValid() && writer != null) {
- ByteArrayOutputStream stream = new ByteArrayOutputStream(size);
- DocumentOutputStream dstream = new DocumentOutputStream(stream, size);
+ if (isValid() && _writer != null) {
+ ByteArrayOutputStream stream = new ByteArrayOutputStream(_size);
+ DocumentOutputStream dstream = new DocumentOutputStream(stream, _size);
- writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, path, name, size));
- bigBlocks = DocumentBlock.convert(stream.toByteArray(), size);
+ _writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, _path, _name, _size));
+ bigBlocks = DocumentBlock.convert(stream.toByteArray(), _size);
}
return bigBlocks;
}
@@ -498,10 +497,10 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
*/
void writeBlocks(OutputStream stream) throws IOException {
if (isValid()) {
- if (writer != null) {
- DocumentOutputStream dstream = new DocumentOutputStream(stream, size);
+ if (_writer != null) {
+ DocumentOutputStream dstream = new DocumentOutputStream(stream, _size);
- writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, path, name, size));
+ _writer.processPOIFSWriterEvent(new POIFSWriterEvent(dstream, _path, _name, _size));
dstream.writeFiller(countBlocks() * POIFSConstants.BIG_BLOCK_SIZE,
DocumentBlock.getFillByte());
} else {
@@ -518,10 +517,10 @@ public final class POIFSDocument implements BATManaged, BlockWritable, POIFSView
int countBlocks() {
if (isValid()) {
- if (writer == null) {
+ if (_writer == null) {
return bigBlocks.length;
}
- return (size + POIFSConstants.BIG_BLOCK_SIZE - 1)
+ return (_size + POIFSConstants.BIG_BLOCK_SIZE - 1)
/ POIFSConstants.BIG_BLOCK_SIZE;
}
return 0;
diff --git a/src/java/org/apache/poi/poifs/property/Property.java b/src/java/org/apache/poi/poifs/property/Property.java
index fe0e8d9b48..c1e8c0e1c1 100644
--- a/src/java/org/apache/poi/poifs/property/Property.java
+++ b/src/java/org/apache/poi/poifs/property/Property.java
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
+
package org.apache.poi.poifs.property;
@@ -39,9 +39,7 @@ import org.apache.poi.util.ShortField;
* @author Marc Johnson (mjohnson at apache dot org)
*/
-public abstract class Property
- implements Child, POIFSViewable
-{
+public abstract class Property implements Child, POIFSViewable {
static final private byte _default_fill = ( byte ) 0x00;
static final private int _name_size_offset = 0x40;
static final private int _max_name_length =
@@ -88,10 +86,6 @@ public abstract class Property
private Child _next_child;
private Child _previous_child;
- /**
- * Default constructor
- */
-
protected Property()
{
_raw_data = new byte[ POIFSConstants.PROPERTY_SIZE ];
@@ -129,8 +123,7 @@ public abstract class Property
* @param array byte data
* @param offset offset into byte data
*/
-
- protected Property(final int index, final byte [] array, final int offset)
+ protected Property(int index, byte [] array, int offset)
{
_raw_data = new byte[ POIFSConstants.PROPERTY_SIZE ];
System.arraycopy(array, offset, _raw_data, 0,
@@ -187,8 +180,7 @@ public abstract class Property
* @exception IOException on problems writing to the specified
* stream.
*/
-
- public void writeData(final OutputStream stream)
+ public void writeData(OutputStream stream)
throws IOException
{
stream.write(_raw_data);
@@ -200,8 +192,7 @@ public abstract class Property
*
* @param startBlock the start block index
*/
-
- public void setStartBlock(final int startBlock)
+ public void setStartBlock(int startBlock)
{
_start_block.set(startBlock, _raw_data);
}
@@ -209,7 +200,6 @@ public abstract class Property
/**
* @return the start block
*/
-
public int getStartBlock()
{
return _start_block.get();
@@ -220,7 +210,6 @@ public abstract class Property
*
* @return size in bytes
*/
-
public int getSize()
{
return _size.get();
@@ -232,7 +221,6 @@ public abstract class Property
*
* @return true if the size is less than _big_block_minimum_bytes
*/
-
public boolean shouldUseSmallBlocks()
{
return Property.isSmall(_size.get());
@@ -246,8 +234,7 @@ public abstract class Property
* @return true if the length is less than
* _big_block_minimum_bytes
*/
-
- public static boolean isSmall(final int length)
+ public static boolean isSmall(int length)
{
return length < _big_block_minimum_bytes;
}
@@ -257,7 +244,6 @@ public abstract class Property
*
* @return property name as String
*/
-
public String getName()
{
return _name;
@@ -266,7 +252,6 @@ public abstract class Property
/**
* @return true if a directory type Property
*/
-
abstract public boolean isDirectory();
/**
@@ -284,7 +269,7 @@ public abstract class Property
*
* @param name the new name
*/
- protected final void setName(final String name)
+ protected void setName(String name)
{
char[] char_array = name.toCharArray();
int limit = Math.min(char_array.length, _max_name_length);
@@ -329,8 +314,7 @@ public abstract class Property
*
* @param propertyType the property type (root, file, directory)
*/
-
- protected void setPropertyType(final byte propertyType)
+ protected void setPropertyType(byte propertyType)
{
_property_type.set(propertyType, _raw_data);
}
@@ -340,8 +324,7 @@ public abstract class Property
*
* @param nodeColor the node color (red or black)
*/
-
- protected void setNodeColor(final byte nodeColor)
+ protected void setNodeColor(byte nodeColor)
{
_node_color.set(nodeColor, _raw_data);
}
@@ -351,8 +334,7 @@ public abstract class Property
*
* @param child the child property's index in the Property Table
*/
-
- protected void setChildProperty(final int child)
+ protected void setChildProperty(int child)
{
_child_property.set(child, _raw_data);
}
@@ -362,7 +344,6 @@ public abstract class Property
*
* @return child property index
*/
-
protected int getChildIndex()
{
return _child_property.get();
@@ -373,8 +354,7 @@ public abstract class Property
*
* @param size the size of the document, in bytes
*/
-
- protected void setSize(final int size)
+ protected void setSize(int size)
{
_size.set(size, _raw_data);
}
@@ -385,8 +365,7 @@ public abstract class Property
* @param index this Property's index within its containing
* Property Table
*/
-
- protected void setIndex(final int index)
+ protected void setIndex(int index)
{
_index = index;
}
@@ -396,7 +375,6 @@ public abstract class Property
*
* @return the index of this Property within its Property Table
*/
-
protected int getIndex()
{
return _index;
@@ -406,7 +384,6 @@ public abstract class Property
* Perform whatever activities need to be performed prior to
* writing
*/
-
abstract protected void preWrite();
/**
@@ -414,7 +391,6 @@ public abstract class Property
*
* @return index of next sibling
*/
-
int getNextChildIndex()
{
return _next_property.get();
@@ -425,7 +401,6 @@ public abstract class Property
*
* @return index of previous sibling
*/
-
int getPreviousChildIndex()
{
return _previous_property.get();
@@ -438,20 +413,16 @@ public abstract class Property
*
* @return true if the index is valid
*/
-
static boolean isValidIndex(int index)
{
return index != _NO_INDEX;
}
- /* ********** START implementation of Child ********** */
-
/**
* Get the next Child, if any
*
* @return the next Child; may return null
*/
-
public Child getNextChild()
{
return _next_child;
@@ -462,7 +433,6 @@ public abstract class Property
*
* @return the previous Child; may return null
*/
-
public Child getPreviousChild()
{
return _previous_child;
@@ -474,8 +444,7 @@ public abstract class Property
* @param child the new 'next' child; may be null, which has the
* effect of saying there is no 'next' child
*/
-
- public void setNextChild(final Child child)
+ public void setNextChild(Child child)
{
_next_child = child;
_next_property.set((child == null) ? _NO_INDEX
@@ -489,8 +458,7 @@ public abstract class Property
* @param child the new 'previous' child; may be null, which has
* the effect of saying there is no 'previous' child
*/
-
- public void setPreviousChild(final Child child)
+ public void setPreviousChild(Child child)
{
_previous_child = child;
_previous_property.set((child == null) ? _NO_INDEX
@@ -498,16 +466,12 @@ public abstract class Property
.getIndex(), _raw_data);
}
- /* ********** END implementation of Child ********** */
- /* ********** START begin implementation of POIFSViewable ********** */
-
/**
* Get an array of objects, some of which may implement
* POIFSViewable
*
* @return an array of Object; may not be null, but may be empty
*/
-
public Object [] getViewableArray()
{
Object[] results = new Object[ 5 ];
@@ -518,11 +482,11 @@ public abstract class Property
long time = _days_1.get();
time <<= 32;
- time += (( long ) _seconds_1.get()) & 0x0000FFFFL;
+ time += _seconds_1.get() & 0x0000FFFFL;
results[ 3 ] = "Time 1 = " + time;
time = _days_2.get();
time <<= 32;
- time += (( long ) _seconds_2.get()) & 0x0000FFFFL;
+ time += _seconds_2.get() & 0x0000FFFFL;
results[ 4 ] = "Time 2 = " + time;
return results;
}
@@ -534,7 +498,6 @@ public abstract class Property
* @return an Iterator; may not be null, but may have an empty
* back end store
*/
-
public Iterator getViewableIterator()
{
return Collections.EMPTY_LIST.iterator();
@@ -547,7 +510,6 @@ public abstract class Property
* @return true if a viewer should call getViewableArray, false if
* a viewer should call getViewableIterator
*/
-
public boolean preferArray()
{
return true;
@@ -559,7 +521,6 @@ public abstract class Property
*
* @return short description
*/
-
public String getShortDescription()
{
StringBuffer buffer = new StringBuffer();
@@ -567,7 +528,4 @@ public abstract class Property
buffer.append("Property: \"").append(getName()).append("\"");
return buffer.toString();
}
-
- /* ********** END begin implementation of POIFSViewable ********** */
-} // end public abstract class Property
-
+}
diff --git a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
index b0c7e2d464..abb925713e 100644
--- a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
+++ b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
@@ -393,8 +393,7 @@ public final class WorkbookEvaluator {
return fe.getFreeRefFunction().evaluate(ops, workbook, sheetIndex, srcRowNum, srcColNum);
}
}
- // TODO - fix return type of this evaluate method:
- return (ValueEval) operation.evaluate(ops, srcRowNum, (short)srcColNum);
+ return operation.evaluate(ops, srcRowNum, (short)srcColNum);
}
private SheetRefEvaluator createExternSheetRefEvaluator(EvaluationTracker tracker,
ExternSheetReferenceToken ptg) {
diff --git a/src/java/org/apache/poi/ss/util/Region.java b/src/java/org/apache/poi/ss/util/Region.java
index 27fc792c45..d0c373838c 100644
--- a/src/java/org/apache/poi/ss/util/Region.java
+++ b/src/java/org/apache/poi/ss/util/Region.java
@@ -26,197 +26,183 @@ package org.apache.poi.ss.util;
* @author Andrew C. Oliver acoliver at apache dot org
* @deprecated (Aug-2008) use {@link CellRangeAddress}
*/
-public class Region implements Comparable {
- private int rowFrom;
- private short colFrom;
- private int rowTo;
- private short colTo;
-
- /**
- * Creates a new instance of Region (0,0 - 0,0)
- */
-
- public Region()
- {
- }
-
- public Region(int rowFrom, short colFrom, int rowTo, short colTo)
- {
- this.rowFrom = rowFrom;
- this.rowTo = rowTo;
- this.colFrom = colFrom;
- this.colTo = colTo;
- }
-
- public Region(String ref) {
- CellReference cellReferenceFrom = new CellReference(ref.substring(0, ref.indexOf(":")));
- CellReference cellReferenceTo = new CellReference(ref.substring(ref.indexOf(":") + 1));
- this.rowFrom = cellReferenceFrom.getRow();
- this.colFrom = (short) cellReferenceFrom.getCol();
- this.rowTo = cellReferenceTo.getRow();
- this.colTo = (short) cellReferenceTo.getCol();
+public class Region implements Comparable<Region> {
+ private int _rowFrom;
+ private short _colFrom;
+ private int _rowTo;
+ private short _colTo;
+
+ /**
+ * Creates a new instance of Region (0,0 - 0,0)
+ */
+ public Region()
+ {
+ }
+
+ public Region(int rowFrom, short colFrom, int rowTo, short colTo)
+ {
+ this._rowFrom = rowFrom;
+ this._rowTo = rowTo;
+ this._colFrom = colFrom;
+ this._colTo = colTo;
+ }
+
+ public Region(String ref) {
+ CellReference cellReferenceFrom = new CellReference(ref.substring(0, ref.indexOf(":")));
+ CellReference cellReferenceTo = new CellReference(ref.substring(ref.indexOf(":") + 1));
+ this._rowFrom = cellReferenceFrom.getRow();
+ this._colFrom = cellReferenceFrom.getCol();
+ this._rowTo = cellReferenceTo.getRow();
+ this._colTo = cellReferenceTo.getCol();
+ }
+
+
+ /**
+ * get the upper left hand corner column number
+ *
+ * @return column number for the upper left hand corner
+ */
+ public short getColumnFrom()
+ {
+ return _colFrom;
+ }
+
+ /**
+ * get the upper left hand corner row number
+ *
+ * @return row number for the upper left hand corner
+ */
+ public int getRowFrom()
+ {
+ return _rowFrom;
+ }
+
+ /**
+ * get the lower right hand corner column number
+ *
+ * @return column number for the lower right hand corner
+ */
+
+ public short getColumnTo()
+ {
+ return _colTo;
+ }
+
+ /**
+ * get the lower right hand corner row number
+ *
+ * @return row number for the lower right hand corner
+ */
+ public int getRowTo()
+ {
+ return _rowTo;
+ }
+
+ /**
+ * set the upper left hand corner column number
+ *
+ * @param colFrom column number for the upper left hand corner
+ */
+ public void setColumnFrom(short colFrom)
+ {
+ this._colFrom = colFrom;
+ }
+
+ /**
+ * set the upper left hand corner row number
+ *
+ * @param rowFrom row number for the upper left hand corner
+ */
+ public void setRowFrom(int rowFrom)
+ {
+ this._rowFrom = rowFrom;
}
+ /**
+ * set the lower right hand corner column number
+ *
+ * @param colTo column number for the lower right hand corner
+ */
- /**
- * get the upper left hand corner column number
- *
- * @return column number for the upper left hand corner
- */
-
- public short getColumnFrom()
- {
- return colFrom;
- }
-
- /**
- * get the upper left hand corner row number
- *
- * @return row number for the upper left hand corner
- */
-
- public int getRowFrom()
- {
- return rowFrom;
- }
-
- /**
- * get the lower right hand corner column number
- *
- * @return column number for the lower right hand corner
- */
-
- public short getColumnTo()
- {
- return colTo;
- }
-
- /**
- * get the lower right hand corner row number
- *
- * @return row number for the lower right hand corner
- */
-
- public int getRowTo()
- {
- return rowTo;
- }
-
- /**
- * set the upper left hand corner column number
- *
- * @param colFrom column number for the upper left hand corner
- */
-
- public void setColumnFrom(short colFrom)
- {
- this.colFrom = colFrom;
- }
-
- /**
- * set the upper left hand corner row number
- *
- * @param rowFrom row number for the upper left hand corner
- */
-
- public void setRowFrom(int rowFrom)
- {
- this.rowFrom = rowFrom;
- }
-
- /**
- * set the lower right hand corner column number
- *
- * @param colTo column number for the lower right hand corner
- */
-
- public void setColumnTo(short colTo)
- {
- this.colTo = colTo;
- }
-
- /**
- * get the lower right hand corner row number
- *
- * @param rowTo row number for the lower right hand corner
- */
-
- public void setRowTo(int rowTo)
- {
- this.rowTo = rowTo;
- }
-
-
- /**
- * Answers: "is the row/column inside this range?"
- *
- * @return <code>true</code> if the cell is in the range and
- * <code>false</code> if it is not
- */
-
- public boolean contains(int row, short col)
- {
- if ((this.rowFrom <= row) && (this.rowTo >= row)
- && (this.colFrom <= col) && (this.colTo >= col))
- {
-
-// System.out.println("Region ("+rowFrom+","+colFrom+","+rowTo+","+
-// colTo+") does contain "+row+","+col);
- return true;
- }
- return false;
- }
-
- public boolean equals(Region r)
- {
- return (compareTo(r) == 0);
- }
-
- /**
- * Compares that the given region is the same less than or greater than this
- * region. If any regional coordiant passed in is less than this regions
- * coordinants then a positive integer is returned. Otherwise a negative
- * integer is returned.
- *
- * @param r region
- * @see #compareTo(Object)
- */
-
- public int compareTo(Region r)
- {
- if ((this.getRowFrom() == r.getRowFrom())
- && (this.getColumnFrom() == r.getColumnFrom())
- && (this.getRowTo() == r.getRowTo())
- && (this.getColumnTo() == r.getColumnTo()))
- {
- return 0;
- }
- if ((this.getRowFrom() < r.getRowFrom())
- || (this.getColumnFrom() < r.getColumnFrom())
- || (this.getRowTo() < r.getRowTo())
- || (this.getColumnTo() < r.getColumnTo()))
- {
- return 1;
- }
- return -1;
- }
-
- public int compareTo(Object o)
- {
- return compareTo(( Region ) o);
- }
-
- /**
- * @return the size of the region (number of cells in the area).
- */
- public int getArea() {
- return (rowTo - rowFrom + 1) * (colTo - colFrom + 1);
- }
-
+ public void setColumnTo(short colTo)
+ {
+ this._colTo = colTo;
+ }
/**
- * Convert a List of CellRange objects to an array of regions
- *
+ * get the lower right hand corner row number
+ *
+ * @param rowTo row number for the lower right hand corner
+ */
+ public void setRowTo(int rowTo)
+ {
+ this._rowTo = rowTo;
+ }
+
+
+ /**
+ * Answers: "is the row/column inside this range?"
+ *
+ * @return <code>true</code> if the cell is in the range and
+ * <code>false</code> if it is not
+ */
+ public boolean contains(int row, short col)
+ {
+ if ((this._rowFrom <= row) && (this._rowTo >= row)
+ && (this._colFrom <= col) && (this._colTo >= col))
+ {
+
+// System.out.println("Region ("+rowFrom+","+colFrom+","+rowTo+","+
+// colTo+") does contain "+row+","+col);
+ return true;
+ }
+ return false;
+ }
+
+ public boolean equals(Region r)
+ {
+ return (compareTo(r) == 0);
+ }
+
+ /**
+ * Compares that the given region is the same less than or greater than this
+ * region. If any regional coordiant passed in is less than this regions
+ * coordinants then a positive integer is returned. Otherwise a negative
+ * integer is returned.
+ *
+ * @param r region
+ * @see #compareTo(Object)
+ */
+ public int compareTo(Region r)
+ {
+ if ((this.getRowFrom() == r.getRowFrom())
+ && (this.getColumnFrom() == r.getColumnFrom())
+ && (this.getRowTo() == r.getRowTo())
+ && (this.getColumnTo() == r.getColumnTo()))
+ {
+ return 0;
+ }
+ if ((this.getRowFrom() < r.getRowFrom())
+ || (this.getColumnFrom() < r.getColumnFrom())
+ || (this.getRowTo() < r.getRowTo())
+ || (this.getColumnTo() < r.getColumnTo()))
+ {
+ return 1;
+ }
+ return -1;
+ }
+
+ /**
+ * @return the size of the region (number of cells in the area).
+ */
+ public int getArea() {
+ return (_rowTo - _rowFrom + 1) * (_colTo - _colFrom + 1);
+ }
+
+
+ /**
+ * Convert a List of CellRange objects to an array of regions
+ *
* @param cellRanges list of CellRange objects
* @return regions
*/
@@ -225,7 +211,7 @@ public class Region implements Comparable {
if(size < 1) {
return new Region[0];
}
-
+
Region[] result = new Region[size];
for (int i = 0; i != size; i++) {
@@ -235,9 +221,9 @@ public class Region implements Comparable {
}
-
+
private static Region convertToRegion(CellRangeAddress cr) {
-
+
return new Region(cr.getFirstRow(), (short)cr.getFirstColumn(), cr.getLastRow(), (short)cr.getLastColumn());
}
@@ -246,7 +232,7 @@ public class Region implements Comparable {
if(size < 1) {
return new CellRangeAddress[0];
}
-
+
CellRangeAddress[] result = new CellRangeAddress[size];
for (int i = 0; i != size; i++) {
@@ -259,13 +245,13 @@ public class Region implements Comparable {
return new CellRangeAddress(r.getRowFrom(), r.getRowTo(), r.getColumnFrom(), r.getColumnTo());
}
- /**
- * @return the string reference for this region
- */
- public String getRegionRef() {
- CellReference cellRefFrom = new CellReference(rowFrom, colFrom);
- CellReference cellRefTo = new CellReference(rowTo, colTo);
- String ref = cellRefFrom.formatAsString() + ":" + cellRefTo.formatAsString();
+ /**
+ * @return the string reference for this region
+ */
+ public String getRegionRef() {
+ CellReference cellRefFrom = new CellReference(_rowFrom, _colFrom);
+ CellReference cellRefTo = new CellReference(_rowTo, _colTo);
+ String ref = cellRefFrom.formatAsString() + ":" + cellRefTo.formatAsString();
return ref;
- }
+ }
}
diff --git a/src/java/org/apache/poi/util/BinaryTree.java b/src/java/org/apache/poi/util/BinaryTree.java
index 58d7820b4f..551d588789 100644
--- a/src/java/org/apache/poi/util/BinaryTree.java
+++ b/src/java/org/apache/poi/util/BinaryTree.java
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
package org.apache.poi.util;
@@ -89,34 +87,20 @@ import java.util.*;
*
* @author Marc Johnson (mjohnson at apache dot org)
*/
-public final class BinaryTree // final for performance
-
- extends AbstractMap
-{
- private Node[] _root = new Node[]
- {
- null, null
- };
- private int _size = 0;
- private int _modifications = 0;
- private Set[] _key_set = new Set[]
- {
- null, null
- };
- private Set[] _entry_set = new Set[]
- {
- null, null
- };
- private Collection[] _value_collection = new Collection[]
- {
- null, null
- };
- private static final int _KEY = 0;
- private static final int _VALUE = 1;
- private static final int _INDEX_SUM = _KEY + _VALUE;
- private static final int _MINIMUM_INDEX = 0;
- private static final int _INDEX_COUNT = 2;
- private static final String[] _data_name = new String[]
+//for performance
+public class BinaryTree extends AbstractMap {
+ final Node[] _root;
+ int _size = 0;
+ int _modifications = 0;
+ private final Set[] _key_set = new Set[] { null, null };
+ private final Set[] _entry_set = new Set[] { null, null };
+ private final Collection[] _value_collection = new Collection[] { null, null };
+ static int _KEY = 0;
+ static int _VALUE = 1;
+ private static int _INDEX_SUM = _KEY + _VALUE;
+ private static int _MINIMUM_INDEX = 0;
+ private static int _INDEX_COUNT = 2;
+ private static String[] _data_name = new String[]
{
"key", "value"
};
@@ -124,9 +108,8 @@ public final class BinaryTree // final for performance
/**
* Construct a new BinaryTree
*/
-
- public BinaryTree()
- {
+ public BinaryTree() {
+ _root = new Node[]{ null, null, };
}
/**
@@ -146,11 +129,11 @@ public final class BinaryTree // final for performance
* or duplicate values in the
* map
*/
-
- public BinaryTree(final Map map)
+ public BinaryTree(Map map)
throws ClassCastException, NullPointerException,
IllegalArgumentException
{
+ this();
putAll(map);
}
@@ -167,8 +150,7 @@ public final class BinaryTree // final for performance
* inappropriate type for this map.
* @exception NullPointerException if the value is null
*/
-
- public Object getKeyForValue(final Object value)
+ public Object getKeyForValue(Object value)
throws ClassCastException, NullPointerException
{
return doGet(( Comparable ) value, _VALUE);
@@ -182,8 +164,7 @@ public final class BinaryTree // final for performance
* @return previous key associated with specified value, or null
* if there was no mapping for value.
*/
-
- public Object removeValue(final Object value)
+ public Object removeValue(Object value)
{
return doRemove(( Comparable ) value, _VALUE);
}
@@ -207,7 +188,6 @@ public final class BinaryTree // final for performance
*
* @return a set view of the mappings contained in this map.
*/
-
public Set entrySetByValue()
{
if (_entry_set[ _VALUE ] == null)
@@ -423,8 +403,7 @@ public final class BinaryTree // final for performance
* key. null if the specified key or value could not be
* found
*/
-
- private Object doRemove(final Comparable o, final int index)
+ private Object doRemove(Comparable o, int index)
{
Node node = lookup(o, index);
Object rval = null;
@@ -447,8 +426,7 @@ public final class BinaryTree // final for performance
* key was mapped); null if we couldn't find the specified
* object
*/
-
- private Object doGet(final Comparable o, final int index)
+ private Object doGet(Comparable o, int index)
{
checkNonNullComparable(o, index);
Node node = lookup(o, index);
@@ -464,8 +442,7 @@ public final class BinaryTree // final for performance
*
* @return _VALUE (if _KEY was specified), else _KEY
*/
-
- private int oppositeIndex(final int index)
+ private int oppositeIndex(int index)
{
// old trick ... to find the opposite of a value, m or n,
@@ -483,8 +460,7 @@ public final class BinaryTree // final for performance
* @return the desired Node, or null if there is no mapping of the
* specified data
*/
-
- private Node lookup(final Comparable data, final int index)
+ public Node lookup(Comparable data, int index)
{
Node rval = null;
Node node = _root[ index ];
@@ -498,11 +474,8 @@ public final class BinaryTree // final for performance
rval = node;
break;
}
- else
- {
- node = (cmp < 0) ? node.getLeft(index)
- : node.getRight(index);
- }
+ node = (cmp < 0) ? node.getLeft(index)
+ : node.getRight(index);
}
return rval;
}
@@ -516,10 +489,9 @@ public final class BinaryTree // final for performance
* @return negative value if o1 < o2; 0 if o1 == o2; positive
* value if o1 > o2
*/
-
- private static int compare(final Comparable o1, final Comparable o2)
+ private static int compare(Comparable o1, Comparable o2)
{
- return (( Comparable ) o1).compareTo(o2);
+ return o1.compareTo(o2);
}
/**
@@ -532,8 +504,7 @@ public final class BinaryTree // final for performance
* @return the smallest node, from the specified node, in the
* specified mapping
*/
-
- private static Node leastNode(final Node node, final int index)
+ static Node leastNode(Node node, int index)
{
Node rval = node;
@@ -555,8 +526,7 @@ public final class BinaryTree // final for performance
*
* @return the specified node
*/
-
- private Node nextGreater(final Node node, final int index)
+ static Node nextGreater(Node node, int index)
{
Node rval = null;
@@ -601,9 +571,7 @@ public final class BinaryTree // final for performance
* @param to the node whose color we're changing; may be null
* @param index _KEY or _VALUE
*/
-
- private static void copyColor(final Node from, final Node to,
- final int index)
+ private static void copyColor(Node from, Node to, int index)
{
if (to != null)
{
@@ -627,11 +595,9 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static boolean isRed(final Node node, final int index)
+ private static boolean isRed(Node node, int index)
{
- return ((node == null) ? false
- : node.isRed(index));
+ return node == null ? false : node.isRed(index);
}
/**
@@ -641,11 +607,9 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static boolean isBlack(final Node node, final int index)
+ private static boolean isBlack(Node node, int index)
{
- return ((node == null) ? true
- : node.isBlack(index));
+ return node == null ? true : node.isBlack(index);
}
/**
@@ -654,8 +618,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static void makeRed(final Node node, final int index)
+ private static void makeRed(Node node, int index)
{
if (node != null)
{
@@ -669,8 +632,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static void makeBlack(final Node node, final int index)
+ private static void makeBlack(Node node, int index)
{
if (node != null)
{
@@ -685,8 +647,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static Node getGrandParent(final Node node, final int index)
+ private static Node getGrandParent(Node node, int index)
{
return getParent(getParent(node, index), index);
}
@@ -698,8 +659,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static Node getParent(final Node node, final int index)
+ private static Node getParent(Node node, int index)
{
return ((node == null) ? null
: node.getParent(index));
@@ -712,8 +672,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static Node getRightChild(final Node node, final int index)
+ private static Node getRightChild(Node node, int index)
{
return (node == null) ? null
: node.getRight(index);
@@ -726,8 +685,7 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static Node getLeftChild(final Node node, final int index)
+ private static Node getLeftChild(Node node, int index)
{
return (node == null) ? null
: node.getLeft(index);
@@ -744,15 +702,14 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static boolean isLeftChild(final Node node, final int index)
- {
- return (node == null) ? true
- : ((node.getParent(index) == null) ? false
- : (node
- == node.getParent(
- index).getLeft(
- index)));
+ private static boolean isLeftChild(Node node, int index) {
+ if (node == null) {
+ return true;
+ }
+ if (node.getParent(index) == null) {
+ return false;
+ }
+ return node == node.getParent(index).getLeft(index);
}
/**
@@ -766,15 +723,15 @@ public final class BinaryTree // final for performance
* @param node the node (may be null) in question
* @param index _KEY or _VALUE
*/
-
- private static boolean isRightChild(final Node node, final int index)
+ private static boolean isRightChild(Node node, int index)
{
- return (node == null) ? true
- : ((node.getParent(index) == null) ? false
- : (node
- == node.getParent(
- index).getRight(
- index)));
+ if (node == null) {
+ return true;
+ }
+ if (node.getParent(index) == null) {
+ return false;
+ }
+ return node == node.getParent(index).getRight(index);
}
/**
@@ -783,8 +740,7 @@ public final class BinaryTree // final for performance
* @param node the node to be rotated
* @param index _KEY or _VALUE
*/
-
- private void rotateLeft(final Node node, final int index)
+ private void rotateLeft(Node node, int index)
{
Node right_child = node.getRight(index);
@@ -818,8 +774,7 @@ public final class BinaryTree // final for performance
* @param node the node to be rotated
* @param index _KEY or _VALUE
*/
-
- private void rotateRight(final Node node, final int index)
+ private void rotateRight(Node node, int index)
{
Node left_child = node.getLeft(index);
@@ -854,8 +809,7 @@ public final class BinaryTree // final for performance
* @param inserted_node the node to be inserted
* @param index _KEY or _VALUE
*/
-
- private void doRedBlackInsert(final Node inserted_node, final int index)
+ private void doRedBlackInsert(Node inserted_node, int index)
{
Node current_node = inserted_node;
@@ -931,8 +885,7 @@ public final class BinaryTree // final for performance
*
* @param deleted_node the node to be deleted
*/
-
- private void doRedBlackDelete(final Node deleted_node)
+ void doRedBlackDelete(Node deleted_node)
{
for (int index = _MINIMUM_INDEX; index < _INDEX_COUNT; index++)
{
@@ -1023,9 +976,8 @@ public final class BinaryTree // final for performance
* @param replacement_node the node being replaced
* @param index _KEY or _VALUE
*/
-
- private void doRedBlackDeleteFixup(final Node replacement_node,
- final int index)
+ private void doRedBlackDeleteFixup(Node replacement_node,
+ int index)
{
Node current_node = replacement_node;
@@ -1121,8 +1073,7 @@ public final class BinaryTree // final for performance
* @param y another node
* @param index _KEY or _VALUE
*/
-
- private void swapPosition(final Node x, final Node y, final int index)
+ private void swapPosition(Node x, Node y, int index)
{
// Save initial values.
@@ -1244,9 +1195,8 @@ public final class BinaryTree // final for performance
* @exception NullPointerException if o is null
* @exception ClassCastException if o is not Comparable
*/
-
- private static void checkNonNullComparable(final Object o,
- final int index)
+ private static void checkNonNullComparable(Object o,
+ int index)
{
if (o == null)
{
@@ -1268,8 +1218,7 @@ public final class BinaryTree // final for performance
* @exception NullPointerException if key is null
* @exception ClassCastException if key is not Comparable
*/
-
- private static void checkKey(final Object key)
+ private static void checkKey(Object key)
{
checkNonNullComparable(key, _KEY);
}
@@ -1282,8 +1231,7 @@ public final class BinaryTree // final for performance
* @exception NullPointerException if value is null
* @exception ClassCastException if value is not Comparable
*/
-
- private static void checkValue(final Object value)
+ private static void checkValue(Object value)
{
checkNonNullComparable(value, _VALUE);
}
@@ -1298,8 +1246,7 @@ public final class BinaryTree // final for performance
* @exception NullPointerException if key or value is null
* @exception ClassCastException if key or value is not Comparable
*/
-
- private static void checkKeyAndValue(final Object key, final Object value)
+ private static void checkKeyAndValue(Object key, Object value)
{
checkKey(key);
checkValue(value);
@@ -1310,7 +1257,6 @@ public final class BinaryTree // final for performance
* concurrent modification of the map through the map and through
* an Iterator from one of its Set or Collection views
*/
-
private void modify()
{
_modifications++;
@@ -1319,7 +1265,6 @@ public final class BinaryTree // final for performance
/**
* bump up the size and note that the map has changed
*/
-
private void grow()
{
modify();
@@ -1329,7 +1274,6 @@ public final class BinaryTree // final for performance
/**
* decrement the size and note that the map has changed
*/
-
private void shrink()
{
modify();
@@ -1344,8 +1288,7 @@ public final class BinaryTree // final for performance
* @exception IllegalArgumentException if the node already exists
* in the value mapping
*/
-
- private void insertValue(final Node newNode)
+ private void insertValue(Node newNode)
throws IllegalArgumentException
{
Node node = _root[ _VALUE ];
@@ -1400,7 +1343,6 @@ public final class BinaryTree // final for performance
*
* @return the number of key-value mappings in this map.
*/
-
public int size()
{
return _size;
@@ -1419,8 +1361,7 @@ public final class BinaryTree // final for performance
* type for this map.
* @exception NullPointerException if the key is null
*/
-
- public boolean containsKey(final Object key)
+ public boolean containsKey(Object key)
throws ClassCastException, NullPointerException
{
checkKey(key);
@@ -1436,8 +1377,7 @@ public final class BinaryTree // final for performance
* @return true if this map maps one or more keys to the specified
* value.
*/
-
- public boolean containsValue(final Object value)
+ public boolean containsValue(Object value)
{
checkValue(value);
return lookup(( Comparable ) value, _VALUE) != null;
@@ -1456,8 +1396,7 @@ public final class BinaryTree // final for performance
* type for this map.
* @exception NullPointerException if the key is null
*/
-
- public Object get(final Object key)
+ public Object get(Object key)
throws ClassCastException, NullPointerException
{
return doGet(( Comparable ) key, _KEY);
@@ -1483,8 +1422,7 @@ public final class BinaryTree // final for performance
* value duplicates an
* existing value
*/
-
- public Object put(final Object key, final Object value)
+ public Object put(Object key, Object value)
throws ClassCastException, NullPointerException,
IllegalArgumentException
{
@@ -1562,8 +1500,7 @@ public final class BinaryTree // final for performance
* @return previous value associated with specified key, or null
* if there was no mapping for key.
*/
-
- public Object remove(final Object key)
+ public Object remove(Object key)
{
return doRemove(( Comparable ) key, _KEY);
}
@@ -1571,7 +1508,6 @@ public final class BinaryTree // final for performance
/**
* Removes all mappings from this map
*/
-
public void clear()
{
modify();
@@ -1592,7 +1528,6 @@ public final class BinaryTree // final for performance
*
* @return a set view of the keys contained in this map.
*/
-
public Set keySet()
{
if (_key_set[ _KEY ] == null)
@@ -1650,7 +1585,6 @@ public final class BinaryTree // final for performance
*
* @return a collection view of the values contained in this map.
*/
-
public Collection values()
{
if (_value_collection[ _KEY ] == null)
@@ -1723,7 +1657,6 @@ public final class BinaryTree // final for performance
*
* @return a set view of the mappings contained in this map.
*/
-
public Set entrySet()
{
if (_entry_set[ _KEY ] == null)
@@ -1803,8 +1736,7 @@ public final class BinaryTree // final for performance
*
* @param type
*/
-
- BinaryTreeIterator(final int type)
+ BinaryTreeIterator(int type)
{
_type = type;
_expected_modifications = BinaryTree.this._modifications;
@@ -1825,7 +1757,7 @@ public final class BinaryTree // final for performance
* @return true if the iterator has more elements.
*/
- public final boolean hasNext()
+ public boolean hasNext()
{
return _next_node != null;
}
@@ -1842,7 +1774,7 @@ public final class BinaryTree // final for performance
* back
*/
- public final Object next()
+ public Object next()
throws NoSuchElementException, ConcurrentModificationException
{
if (_next_node == null)
@@ -1878,7 +1810,7 @@ public final class BinaryTree // final for performance
* back
*/
- public final void remove()
+ public void remove()
throws IllegalStateException, ConcurrentModificationException
{
if (_last_returned_node == null)
@@ -1897,7 +1829,7 @@ public final class BinaryTree // final for performance
/* ********** END implementation of Iterator ********** */
} // end private abstract class BinaryTreeIterator
- // final for performance
+ // for performance
private static final class Node
implements Map.Entry
{
@@ -1917,7 +1849,7 @@ public final class BinaryTree // final for performance
* @param value
*/
- Node(final Comparable key, final Comparable value)
+ Node(Comparable key, Comparable value)
{
_data = new Comparable[]
{
@@ -1949,8 +1881,7 @@ public final class BinaryTree // final for performance
*
* @return the key or value
*/
-
- private Comparable getData(final int index)
+ public Comparable getData(int index)
{
return _data[ index ];
}
@@ -1961,8 +1892,7 @@ public final class BinaryTree // final for performance
* @param node the new left node
* @param index _KEY or _VALUE
*/
-
- private void setLeft(final Node node, final int index)
+ public void setLeft(Node node, int index)
{
_left[ index ] = node;
}
@@ -1975,7 +1905,7 @@ public final class BinaryTree // final for performance
* @return the left node -- may be null
*/
- private Node getLeft(final int index)
+ public Node getLeft(int index)
{
return _left[ index ];
}
@@ -1986,8 +1916,7 @@ public final class BinaryTree // final for performance
* @param node the new right node
* @param index _KEY or _VALUE
*/
-
- private void setRight(final Node node, final int index)
+ public void setRight(Node node, int index)
{
_right[ index ] = node;
}
@@ -2000,7 +1929,7 @@ public final class BinaryTree // final for performance
* @return the right node -- may be null
*/
- private Node getRight(final int index)
+ public Node getRight(int index)
{
return _right[ index ];
}
@@ -2011,8 +1940,7 @@ public final class BinaryTree // final for performance
* @param node the new parent node
* @param index _KEY or _VALUE
*/
-
- private void setParent(final Node node, final int index)
+ public void setParent(Node node, int index)
{
_parent[ index ] = node;
}
@@ -2024,8 +1952,7 @@ public final class BinaryTree // final for performance
*
* @return the parent node -- may be null
*/
-
- private Node getParent(final int index)
+ public Node getParent(int index)
{
return _parent[ index ];
}
@@ -2036,8 +1963,7 @@ public final class BinaryTree // final for performance
* @param node the node to swap with
* @param index _KEY or _VALUE
*/
-
- private void swapColors(final Node node, final int index)
+ public void swapColors(Node node, int index)
{
// Swap colors -- old hacker's trick
@@ -2053,8 +1979,7 @@ public final class BinaryTree // final for performance
*
* @return true if black (which is represented as a true boolean)
*/
-
- private boolean isBlack(final int index)
+ public boolean isBlack(int index)
{
return _black[ index ];
}
@@ -2066,8 +1991,7 @@ public final class BinaryTree // final for performance
*
* @return true if non-black
*/
-
- private boolean isRed(final int index)
+ public boolean isRed(int index)
{
return !_black[ index ];
}
@@ -2077,8 +2001,7 @@ public final class BinaryTree // final for performance
*
* @param index _KEY or _VALUE
*/
-
- private void setBlack(final int index)
+ public void setBlack(int index)
{
_black[ index ] = true;
}
@@ -2088,8 +2011,7 @@ public final class BinaryTree // final for performance
*
* @param index _KEY or _VALUE
*/
-
- private void setRed(final int index)
+ public void setRed(int index)
{
_black[ index ] = false;
}
@@ -2100,8 +2022,7 @@ public final class BinaryTree // final for performance
* @param node the node whose color we're adopting
* @param index _KEY or _VALUE
*/
-
- private void copyColor(final Node node, final int index)
+ public void copyColor(Node node, int index)
{
_black[ index ] = node._black[ index ];
}
@@ -2111,7 +2032,6 @@ public final class BinaryTree // final for performance
/**
* @return the key corresponding to this entry.
*/
-
public Object getKey()
{
return _data[ _KEY ];
@@ -2120,7 +2040,6 @@ public final class BinaryTree // final for performance
/**
* @return the value corresponding to this entry.
*/
-
public Object getValue()
{
return _data[ _VALUE ];
@@ -2133,10 +2052,7 @@ public final class BinaryTree // final for performance
* @param ignored
*
* @return does not return
- *
- * @exception UnsupportedOperationException
*/
-
public Object setValue(Object ignored)
throws UnsupportedOperationException
{
@@ -2154,7 +2070,6 @@ public final class BinaryTree // final for performance
* @return true if the specified object is equal to this map
* entry.
*/
-
public boolean equals(Object o)
{
if (this == o)
@@ -2188,5 +2103,4 @@ public final class BinaryTree // final for performance
/* ********** END implementation of Map.Entry ********** */
}
-} // end public class BinaryTree
-
+}
diff --git a/src/java/org/apache/poi/util/POILogger.java b/src/java/org/apache/poi/util/POILogger.java
index 514edf90ca..caf2035ac7 100644
--- a/src/java/org/apache/poi/util/POILogger.java
+++ b/src/java/org/apache/poi/util/POILogger.java
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
package org.apache.poi.util;
@@ -31,34 +29,32 @@ import java.util.*;
* @author Glen Stampoultzis (glens at apache.org)
* @author Nicola Ken Barozzi (nicolaken at apache.org)
*/
+public abstract class POILogger {
-public abstract class POILogger
-{
-
- public static final int DEBUG = 1;
- public static final int INFO = 3;
- public static final int WARN = 5;
- public static final int ERROR = 7;
- public static final int FATAL = 9;
+ public static int DEBUG = 1;
+ public static int INFO = 3;
+ public static int WARN = 5;
+ public static int ERROR = 7;
+ public static int FATAL = 9;
/**
* package scope so it cannot be instantiated outside of the util
* package. You need a POILogger? Go to the POILogFactory for one
- *
*/
- POILogger()
- {}
-
- abstract public void initialize(final String cat);
-
+ POILogger() {
+ // no fields to initialise
+ }
+
+ abstract public void initialize(String cat);
+
/**
* Log a message
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param obj1 The object to log. This is converted to a string.
*/
- abstract public void log(final int level, final Object obj1);
-
+ abstract public void log(int level, Object obj1);
+
/**
* Log a message
*
@@ -66,7 +62,7 @@ public abstract class POILogger
* @param obj1 The object to log. This is converted to a string.
* @param exception An exception to be logged
*/
- abstract public void log(final int level, final Object obj1,
+ abstract public void log(int level, Object obj1,
final Throwable exception);
@@ -75,15 +71,7 @@ public abstract class POILogger
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
*/
- abstract public boolean check(final int level);
-
- /**
- * Log a message. Lazily appends Object parameters together.
- *
- * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
- * @param obj1 first object to place in the message
- * @param obj2 second object to place in the message
- */
+ abstract public boolean check(int level);
/**
* Log a message. Lazily appends Object parameters together.
@@ -92,8 +80,7 @@ public abstract class POILogger
* @param obj1 first object to place in the message
* @param obj2 second object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2)
+ public void log(int level, Object obj1, Object obj2)
{
if (check(level))
{
@@ -109,11 +96,10 @@ public abstract class POILogger
* @param obj2 second Object to place in the message
* @param obj3 third Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3)
{
-
+
if (check(level))
{
@@ -132,11 +118,10 @@ public abstract class POILogger
* @param obj3 third Object to place in the message
* @param obj4 fourth Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4)
{
-
+
if (check(level))
{
@@ -156,11 +141,10 @@ public abstract class POILogger
* @param obj4 fourth Object to place in the message
* @param obj5 fifth Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5)
{
-
+
if (check(level))
{
@@ -181,12 +165,11 @@ public abstract class POILogger
* @param obj5 fifth Object to place in the message
* @param obj6 sixth Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6)
{
-
+
if (check(level))
{
@@ -208,12 +191,11 @@ public abstract class POILogger
* @param obj6 sixth Object to place in the message
* @param obj7 seventh Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6, final Object obj7)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6, Object obj7)
{
-
+
if (check(level))
{
@@ -237,12 +219,11 @@ public abstract class POILogger
* @param obj7 seventh Object to place in the message
* @param obj8 eighth Object to place in the message
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6, final Object obj7, final Object obj8)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6, Object obj7, Object obj8)
{
-
+
if (check(level))
{
@@ -259,8 +240,7 @@ public abstract class POILogger
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Throwable exception)
+ public void log(int level, final Throwable exception)
{
log(level, null, exception);
}
@@ -273,11 +253,10 @@ public abstract class POILogger
* @param obj2 second Object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
+ public void log(int level, Object obj1, Object obj2,
final Throwable exception)
{
-
+
if (check(level))
{
@@ -295,11 +274,10 @@ public abstract class POILogger
* @param obj3 third object to place in the message
* @param exception An error message to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Throwable exception)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, final Throwable exception)
{
-
+
if (check(level))
{
@@ -318,12 +296,11 @@ public abstract class POILogger
* @param obj4 fourth object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4,
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4,
final Throwable exception)
{
-
+
if (check(level))
{
@@ -343,12 +320,11 @@ public abstract class POILogger
* @param obj5 fifth object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
final Throwable exception)
{
-
+
if (check(level))
{
@@ -369,12 +345,11 @@ public abstract class POILogger
* @param obj6 sixth object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6, final Throwable exception)
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6, final Throwable exception)
{
-
+
if (check(level))
{
@@ -397,13 +372,12 @@ public abstract class POILogger
* @param obj7 seventh object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6, final Object obj7,
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6, Object obj7,
final Throwable exception)
{
-
+
if (check(level))
{
@@ -427,13 +401,12 @@ public abstract class POILogger
* @param obj8 eighth object to place in the message
* @param exception An exception to be logged
*/
-
- public void log(final int level, final Object obj1, final Object obj2,
- final Object obj3, final Object obj4, final Object obj5,
- final Object obj6, final Object obj7, final Object obj8,
+ public void log(int level, Object obj1, Object obj2,
+ Object obj3, Object obj4, Object obj5,
+ Object obj6, Object obj7, Object obj8,
final Throwable exception)
{
-
+
if (check(level))
{
@@ -467,9 +440,8 @@ public abstract class POILogger
* @param message The message to log.
* @param obj1 The first object to match against.
*/
-
- public void logFormatted(final int level, final String message,
- final Object obj1)
+ public void logFormatted(int level, String message,
+ Object obj1)
{
commonLogFormatted(level, message, new Object[]
{
@@ -502,9 +474,8 @@ public abstract class POILogger
* @param obj1 The first object to match against.
* @param obj2 The second object to match against.
*/
-
- public void logFormatted(final int level, final String message,
- final Object obj1, final Object obj2)
+ public void logFormatted(int level, String message,
+ Object obj1, Object obj2)
{
commonLogFormatted(level, message, new Object[]
{
@@ -538,10 +509,9 @@ public abstract class POILogger
* @param obj2 The second object to match against.
* @param obj3 The third object to match against.
*/
-
- public void logFormatted(final int level, final String message,
- final Object obj1, final Object obj2,
- final Object obj3)
+ public void logFormatted(int level, String message,
+ Object obj1, Object obj2,
+ Object obj3)
{
commonLogFormatted(level, message, new Object[]
{
@@ -576,21 +546,20 @@ public abstract class POILogger
* @param obj3 The third object to match against.
* @param obj4 The forth object to match against.
*/
-
- public void logFormatted(final int level, final String message,
- final Object obj1, final Object obj2,
- final Object obj3, final Object obj4)
+ public void logFormatted(int level, String message,
+ Object obj1, Object obj2,
+ Object obj3, Object obj4)
{
commonLogFormatted(level, message, new Object[]
{
obj1, obj2, obj3, obj4
});
- }
+ }
- private void commonLogFormatted(final int level, final String message,
- final Object [] unflatParams)
+ private void commonLogFormatted(int level, String message,
+ Object [] unflatParams)
{
-
+
if (check(level))
{
@@ -611,21 +580,20 @@ public abstract class POILogger
/**
* Flattens any contained objects. Only tranverses one level deep.
*/
-
- private Object [] flattenArrays(final Object [] objects)
+ private Object [] flattenArrays(Object [] objects)
{
- List results = new ArrayList();
+ List<Object> results = new ArrayList<Object>();
for (int i = 0; i < objects.length; i++)
{
results.addAll(objectToObjectArray(objects[ i ]));
}
- return ( Object [] ) results.toArray(new Object[ results.size() ]);
+ return results.toArray(new Object[ results.size() ]);
}
- private List objectToObjectArray(Object object)
+ private List<Object> objectToObjectArray(Object object)
{
- List results = new ArrayList();
+ List<Object> results = new ArrayList<Object>();
if (object instanceof byte [])
{
@@ -705,6 +673,4 @@ public abstract class POILogger
}
return results;
}
-
-} // end package scope abstract class POILogger
-
+}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
index 4efe6bdd89..5952d9122d 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
@@ -52,7 +52,7 @@ import org.apache.poi.util.POILogFactory;
/**
* Represents a container that can store multiple data objects.
- *
+ *
* @author Julien Chable, CDubet
* @version 0.1
*/
@@ -125,7 +125,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Constructor.
- *
+ *
* @param access
* Package access.
*/
@@ -166,7 +166,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Open a package with read/write permission.
- *
+ *
* @param path
* The document path.
* @return A Package object, else <b>null</b>.
@@ -180,7 +180,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Open a package.
- *
+ *
* @param path
* The document path.
* @param access
@@ -206,11 +206,11 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Open a package.
- *
+ *
* Note - uses quite a bit more memory than {@link #open(String)}, which
* doesn't need to hold the whole zip file in memory, and can take advantage
* of native methods
- *
+ *
* @param in
* The InputStream to read the package from
* @return A PackageBase object
@@ -226,7 +226,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Opens a package if it exists, else it creates one.
- *
+ *
* @param file
* The file to open or to create.
* @return A newly created package if the specified file does not exist,
@@ -246,7 +246,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Creates a new package.
- *
+ *
* @param path
* Path of the document.
* @return A newly created PackageBase ready to use.
@@ -257,7 +257,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Creates a new package.
- *
+ *
* @param file
* Path of the document.
* @return A newly created PackageBase ready to use.
@@ -292,7 +292,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Configure the package.
- *
+ *
* @param pkg
*/
private static void configurePackage(OPCPackage pkg) {
@@ -324,7 +324,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Flush the package : save all.
- *
+ *
* @see #close()
*/
public void flush() {
@@ -339,7 +339,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Close the package and save its content.
- *
+ *
* @throws IOException
* If an IO exception occur during the saving process.
*/
@@ -391,7 +391,7 @@ public abstract class OPCPackage implements RelationshipSource {
* Add a thumbnail to the package. This method is provided to make easier
* the addition of a thumbnail in a package. You can do the same work by
* using the traditionnal relationship and part mechanism.
- *
+ *
* @param path
* The full path to the image file.
*/
@@ -443,7 +443,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Throws an exception if the package access mode is in read only mode
* (PackageAccess.Read).
- *
+ *
* @throws InvalidOperationException
* Throws if a writing operation is done on a read only package.
* @see org.apache.poi.openxml4j.opc.PackageAccess
@@ -458,7 +458,7 @@ public abstract class OPCPackage implements RelationshipSource {
* Throws an exception if the package access mode is in write only mode
* (PackageAccess.Write). This method is call when other methods need write
* right.
- *
+ *
* @throws InvalidOperationException
* Throws if a read operation is done on a write only package.
* @see org.apache.poi.openxml4j.opc.PackageAccess
@@ -471,7 +471,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieves or creates if none exists, core package property part.
- *
+ *
* @return The PackageProperties part of this package.
*/
public PackageProperties getPackageProperties()
@@ -487,7 +487,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieve a part identified by its name.
- *
+ *
* @param partName
* Part name of the part to retrieve.
* @return The part with the specified name, else <code>null</code>.
@@ -511,7 +511,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieve parts by content type.
- *
+ *
* @param contentType
* The content type criteria.
* @return All part associated to the specified content type.
@@ -527,7 +527,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieve parts by relationship type.
- *
+ *
* @param relationshipType
* Relationship type.
* @return All parts which are the target of a relationship with the
@@ -547,7 +547,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Get the target part from the specified relationship.
- *
+ *
* @param partRel
* The part relationship uses to retrieve the part.
*/
@@ -571,7 +571,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Load the parts of the archive if it has not been done yet The
* relationships of each part are not loaded
- *
+ *
* @return All this package's parts.
*/
public ArrayList<PackagePart> getParts() throws InvalidFormatException {
@@ -588,10 +588,10 @@ public abstract class OPCPackage implements RelationshipSource {
PackagePart[] parts = this.getPartsImpl();
this.partList = new PackagePartCollection();
for (PackagePart part : parts) {
- if (partList.containsKey(part.partName))
+ if (partList.containsKey(part._partName))
throw new InvalidFormatException(
"A part with the name '"
- + part.partName
+ + part._partName
+ "' already exist : Packages shall not contain equivalent part names and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]");
// Check OPC compliance rule M4.1
@@ -605,29 +605,29 @@ public abstract class OPCPackage implements RelationshipSource {
}
PartUnmarshaller partUnmarshaller = partUnmarshallers
- .get(part.contentType);
+ .get(part._contentType);
if (partUnmarshaller != null) {
UnmarshallContext context = new UnmarshallContext(this,
- part.partName);
+ part._partName);
try {
PackagePart unmarshallPart = partUnmarshaller
.unmarshall(context, part.getInputStream());
- partList.put(unmarshallPart.partName, unmarshallPart);
+ partList.put(unmarshallPart._partName, unmarshallPart);
// Core properties case
if (unmarshallPart instanceof PackagePropertiesPart)
this.packageProperties = (PackagePropertiesPart) unmarshallPart;
} catch (IOException ioe) {
logger.log(POILogger.WARN, "Unmarshall operation : IOException for "
- + part.partName);
+ + part._partName);
continue;
} catch (InvalidOperationException invoe) {
throw new InvalidFormatException(invoe.getMessage());
}
} else {
try {
- partList.put(part.partName, part);
+ partList.put(part._partName, part);
} catch (InvalidOperationException e) {
throw new InvalidFormatException(e.getMessage());
}
@@ -640,7 +640,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Create and add a part, with the specified name and content type, to the
* package.
- *
+ *
* @param partName
* Part name.
* @param contentType
@@ -650,7 +650,7 @@ public abstract class OPCPackage implements RelationshipSource {
* If rule M1.12 is not verified : Packages shall not contain
* equivalent part names and package implementers shall neither
* create nor recognize packages with equivalent part names.
- * @see #createPartImpl(PackagePartName, String, boolean)
+ * @see #createPartImpl(PackagePartName, String, boolean)
*/
public PackagePart createPart(PackagePartName partName, String contentType) {
return this.createPart(partName, contentType, true);
@@ -660,7 +660,7 @@ public abstract class OPCPackage implements RelationshipSource {
* Create and add a part, with the specified name and content type, to the
* package. For general purpose, prefer the overload version of this method
* without the 'loadRelationships' parameter.
- *
+ *
* @param partName
* Part name.
* @param contentType
@@ -721,7 +721,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Add a part to the package.
- *
+ *
* @param partName
* Part name of the part to create.
* @param contentType
@@ -730,7 +730,7 @@ public abstract class OPCPackage implements RelationshipSource {
* the contents to add. In order to have faster operation in
* document merge, the data are stored in memory not on a hard
* disk
- *
+ *
* @return The new part.
* @see #createPart(PackagePartName, String)
*/
@@ -764,7 +764,7 @@ public abstract class OPCPackage implements RelationshipSource {
* Add the specified part to the package. If a part already exists in the
* package with the same name as the one specified, then we replace the old
* part by the specified part.
- *
+ *
* @param part
* The part to add (or replace).
* @return The part added to the package, the same as the one specified.
@@ -779,20 +779,20 @@ public abstract class OPCPackage implements RelationshipSource {
throw new IllegalArgumentException("part");
}
- if (partList.containsKey(part.partName)) {
- if (!partList.get(part.partName).isDeleted()) {
+ if (partList.containsKey(part._partName)) {
+ if (!partList.get(part._partName).isDeleted()) {
throw new InvalidOperationException(
"A part with the name '"
- + part.partName.getName()
+ + part._partName.getName()
+ "' already exists : Packages shall not contain equivalent part names and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]");
}
// If the specified partis flagged as deleted, we make it
// available
part.setDeleted(false);
// and delete the old part to replace it thereafeter
- this.partList.remove(part.partName);
+ this.partList.remove(part._partName);
}
- this.partList.put(part.partName, part);
+ this.partList.put(part._partName, part);
this.isDirty = true;
return part;
}
@@ -800,7 +800,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Remove the specified part in this package. If this part is relationship
* part, then delete all relationships in the source part.
- *
+ *
* @param part
* The part to remove. If <code>null</code>, skip the action.
* @see #removePart(PackagePartName)
@@ -814,7 +814,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Remove a part in this package. If this part is relationship part, then
* delete all relationships in the source part.
- *
+ *
* @param partName
* The part name of the part to remove.
*/
@@ -867,7 +867,7 @@ public abstract class OPCPackage implements RelationshipSource {
* Remove a part from this package as well as its relationship part, if one
* exists, and all parts listed in the relationship part. Be aware that this
* do not delete relationships which target the specified part.
- *
+ *
* @param partName
* The name of the part to delete.
* @throws InvalidFormatException
@@ -893,11 +893,11 @@ public abstract class OPCPackage implements RelationshipSource {
}
// Finally delete its relationship part if one exists
- this.removePart(relPart.partName);
+ this.removePart(relPart._partName);
}
// Delete the specified part
- this.removePart(partToRemove.partName);
+ this.removePart(partToRemove._partName);
}
/**
@@ -905,7 +905,7 @@ public abstract class OPCPackage implements RelationshipSource {
* part if one exists. Prefer the use of this method to delete a part in the
* package, compare to the remove() methods that don't remove associated
* relationships part.
- *
+ *
* @param partName
* Name of the part to delete
*/
@@ -925,7 +925,7 @@ public abstract class OPCPackage implements RelationshipSource {
* apply to all parts in the relationships part of the specified part.
* Prefer the use of this method to delete a part in the package, compare to
* the remove() methods that don't remove associated relationships part.
- *
+ *
* @param partName
* Name of the part to delete
*/
@@ -961,7 +961,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Check if a part already exists in this package from its name.
- *
+ *
* @param partName
* Part name to check.
* @return <i>true</i> if the part is logically added to this package, else
@@ -973,18 +973,18 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Add a relationship to the package (except relationships part).
- *
+ *
* Check rule M4.1 : The format designer shall specify and the format
* producer shall create at most one core properties relationship for a
* package. A format consumer shall consider more than one core properties
* relationship for a package to be an error. If present, the relationship
* shall target the Core Properties part.
- *
+ *
* Check rule M1.25: The Relationships part shall not have relationships to
* any other part. Package implementers shall enforce this requirement upon
* the attempt to create such a relationship and shall treat any such
* relationship as invalid.
- *
+ *
* @param targetPartName
* Target part name.
* @param targetMode
@@ -1032,7 +1032,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Add a package relationship.
- *
+ *
* @param targetPartName
* Target part name.
* @param targetMode
@@ -1049,11 +1049,11 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Adds an external relationship to a part (except relationships part).
- *
+ *
* The targets of external relationships are not subject to the same
* validity checks that internal ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target
* External target of the relationship
* @param relationshipType
@@ -1069,11 +1069,11 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Adds an external relationship to a part (except relationships part).
- *
+ *
* The targets of external relationships are not subject to the same
* validity checks that internal ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target
* External target of the relationship
* @param relationshipType
@@ -1109,7 +1109,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Delete a relationship from this package.
- *
+ *
* @param id
* Id of the relationship to delete.
*/
@@ -1122,7 +1122,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieves all package relationships.
- *
+ *
* @return All package relationships of this package.
* @throws OpenXML4JException
* @see #getRelationshipsHelper(String)
@@ -1133,7 +1133,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieves all relationships with the specified type.
- *
+ *
* @param relationshipType
* The filter specifying the relationship type.
* @return All relationships with the specified relationship type.
@@ -1150,7 +1150,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Retrieves all relationships with specified id (normally just ine because
* a relationship id is supposed to be unique).
- *
+ *
* @param id
* Id of the wanted relationship.
*/
@@ -1214,7 +1214,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Add a marshaller.
- *
+ *
* @param contentType
* The content type to bind to the specified marshaller.
* @param marshaller
@@ -1231,7 +1231,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Add an unmarshaller.
- *
+ *
* @param contentType
* The content type to bind to the specified unmarshaller.
* @param unmarshaller
@@ -1250,7 +1250,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Remove a marshaller by its content type.
- *
+ *
* @param contentType
* The content type associated with the marshaller to remove.
*/
@@ -1260,7 +1260,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Remove an unmarshaller by its content type.
- *
+ *
* @param contentType
* The content type associated with the unmarshaller to remove.
*/
@@ -1272,7 +1272,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Get the package access mode.
- *
+ *
* @return the packageAccess The current package access.
*/
public PackageAccess getPackageAccess() {
@@ -1281,7 +1281,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Validates the package compliance with the OPC specifications.
- *
+ *
* @return <b>true</b> if the package is valid else <b>false</b>
*/
public boolean validatePackage(OPCPackage pkg) throws InvalidFormatException {
@@ -1290,7 +1290,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Save the document in the specified file.
- *
+ *
* @param targetFile
* Destination file.
* @throws IOException
@@ -1313,7 +1313,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Save the document in the specified output stream.
- *
+ *
* @param outputStream
* The stream to save the package.
* @see #saveImpl(OutputStream)
@@ -1326,7 +1326,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Core method to create a package part. This method must be implemented by
* the subclass.
- *
+ *
* @param partName
* URI of the part to create.
* @param contentType
@@ -1339,7 +1339,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Core method to delete a package part. This method must be implemented by
* the subclass.
- *
+ *
* @param partName
* The URI of the part to delete.
*/
@@ -1352,7 +1352,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Close the package and cause a save of the package.
- *
+ *
*/
protected abstract void closeImpl() throws IOException;
@@ -1364,7 +1364,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Save the package into the specified output stream.
- *
+ *
* @param outputStream
* The output stream use to save this package.
*/
@@ -1373,7 +1373,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Get the package part mapped to the specified URI.
- *
+ *
* @param partName
* The URI of the part to retrieve.
* @return The package part located by the specified URI, else <b>null</b>.
@@ -1382,7 +1382,7 @@ public abstract class OPCPackage implements RelationshipSource {
/**
* Get all parts link to the package.
- *
+ *
* @return A list of the part owned by the package.
*/
protected abstract PackagePart[] getPartsImpl()
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java
index 928e0a783f..2b49cb21ec 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java
@@ -30,7 +30,7 @@ import org.apache.poi.openxml4j.opc.internal.ContentType;
/**
* Provides a base class for parts stored in a Package.
- *
+ *
* @author Julien Chable
* @version 0.9
*/
@@ -39,36 +39,36 @@ public abstract class PackagePart implements RelationshipSource {
/**
* This part's container.
*/
- protected OPCPackage container;
+ protected OPCPackage _container;
/**
* The part name. (required by the specification [M1.1])
*/
- protected PackagePartName partName;
+ protected PackagePartName _partName;
/**
* The type of content of this part. (required by the specification [M1.2])
*/
- protected ContentType contentType;
+ protected ContentType _contentType;
/**
* Flag to know if this part is a relationship.
*/
- private boolean isRelationshipPart;
+ private boolean _isRelationshipPart;
/**
* Flag to know if this part has been logically deleted.
*/
- private boolean isDeleted;
+ private boolean _isDeleted;
/**
* This part's relationships.
*/
- private PackageRelationshipCollection relationships;
+ private PackageRelationshipCollection _relationships;
/**
* Constructor.
- *
+ *
* @param pack
* Parent package.
* @param partName
@@ -85,7 +85,7 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Constructor.
- *
+ *
* @param pack
* Parent package.
* @param partName
@@ -100,12 +100,12 @@ public abstract class PackagePart implements RelationshipSource {
protected PackagePart(OPCPackage pack, PackagePartName partName,
ContentType contentType, boolean loadRelationships)
throws InvalidFormatException {
- this.partName = partName;
- this.contentType = contentType;
- this.container = (ZipPackage) pack; // TODO - enforcing ZipPackage here - perhaps should change constructor signature
+ _partName = partName;
+ _contentType = contentType;
+ _container = pack;
// Check if this part is a relationship part
- isRelationshipPart = this.partName.isRelationshipPartURI();
+ _isRelationshipPart = this._partName.isRelationshipPartURI();
// Load relationships if any
if (loadRelationships)
@@ -114,7 +114,7 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Constructor.
- *
+ *
* @param pack
* Parent package.
* @param partName
@@ -130,11 +130,11 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Adds an external relationship to a part (except relationships part).
- *
+ *
* The targets of external relationships are not subject to the same
* validity checks that internal ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target
* External target of the relationship
* @param relationshipType
@@ -150,11 +150,11 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Adds an external relationship to a part (except relationships part).
- *
+ *
* The targets of external relationships are not subject to the same
* validity checks that internal ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target
* External target of the relationship
* @param relationshipType
@@ -174,8 +174,8 @@ public abstract class PackagePart implements RelationshipSource {
throw new IllegalArgumentException("relationshipType");
}
- if (relationships == null) {
- relationships = new PackageRelationshipCollection();
+ if (_relationships == null) {
+ _relationships = new PackageRelationshipCollection();
}
URI targetURI;
@@ -185,13 +185,13 @@ public abstract class PackagePart implements RelationshipSource {
throw new IllegalArgumentException("Invalid target - " + e);
}
- return relationships.addRelationship(targetURI, TargetMode.EXTERNAL,
+ return _relationships.addRelationship(targetURI, TargetMode.EXTERNAL,
relationshipType, id);
}
/**
* Add a relationship to a part (except relationships part).
- *
+ *
* @param targetPartName
* Name of the target part. This one must be relative to the
* source root directory of the part.
@@ -227,7 +227,7 @@ public abstract class PackagePart implements RelationshipSource {
* @param id
* Relationship unique id.
* @return The newly created and added relationship
- *
+ *
* @throws InvalidFormatException
* If the URI point to a relationship part URI.
* @see org.apache.poi.openxml4j.opc.RelationshipSource#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName,
@@ -235,7 +235,7 @@ public abstract class PackagePart implements RelationshipSource {
*/
public PackageRelationship addRelationship(PackagePartName targetPartName,
TargetMode targetMode, String relationshipType, String id) {
- container.throwExceptionIfReadOnly();
+ _container.throwExceptionIfReadOnly();
if (targetPartName == null) {
throw new IllegalArgumentException("targetPartName");
@@ -247,22 +247,22 @@ public abstract class PackagePart implements RelationshipSource {
throw new IllegalArgumentException("relationshipType");
}
- if (this.isRelationshipPart || targetPartName.isRelationshipPartURI()) {
+ if (this._isRelationshipPart || targetPartName.isRelationshipPartURI()) {
throw new InvalidOperationException(
"Rule M1.25: The Relationships part shall not have relationships to any other part.");
}
- if (relationships == null) {
- relationships = new PackageRelationshipCollection();
+ if (_relationships == null) {
+ _relationships = new PackageRelationshipCollection();
}
- return relationships.addRelationship(targetPartName.getURI(),
+ return _relationships.addRelationship(targetPartName.getURI(),
targetMode, relationshipType, id);
}
/**
* Add a relationship to a part (except relationships part).
- *
+ *
* @param targetURI
* URI the target part. Must be relative to the source root
* directory of the part.
@@ -297,7 +297,7 @@ public abstract class PackagePart implements RelationshipSource {
* @param id
* Relationship unique id.
* @return The newly created and added relationship
- *
+ *
* @throws InvalidFormatException
* If the URI point to a relationship part URI.
* @see org.apache.poi.openxml4j.opc.RelationshipSource#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName,
@@ -305,7 +305,7 @@ public abstract class PackagePart implements RelationshipSource {
*/
public PackageRelationship addRelationship(URI targetURI,
TargetMode targetMode, String relationshipType, String id) {
- container.throwExceptionIfReadOnly();
+ _container.throwExceptionIfReadOnly();
if (targetURI == null) {
throw new IllegalArgumentException("targetPartName");
@@ -319,17 +319,17 @@ public abstract class PackagePart implements RelationshipSource {
// Try to retrieve the target part
- if (this.isRelationshipPart
+ if (this._isRelationshipPart
|| PackagingURIHelper.isRelationshipPartURI(targetURI)) {
throw new InvalidOperationException(
"Rule M1.25: The Relationships part shall not have relationships to any other part.");
}
- if (relationships == null) {
- relationships = new PackageRelationshipCollection();
+ if (_relationships == null) {
+ _relationships = new PackageRelationshipCollection();
}
- return relationships.addRelationship(targetURI,
+ return _relationships.addRelationship(targetURI,
targetMode, relationshipType, id);
}
@@ -337,27 +337,27 @@ public abstract class PackagePart implements RelationshipSource {
* @see org.apache.poi.openxml4j.opc.RelationshipSource#clearRelationships()
*/
public void clearRelationships() {
- if (relationships != null) {
- relationships.clear();
+ if (_relationships != null) {
+ _relationships.clear();
}
}
/**
* Delete the relationship specified by its id.
- *
+ *
* @param id
* The ID identified the part to delete.
* @see org.apache.poi.openxml4j.opc.RelationshipSource#removeRelationship(java.lang.String)
*/
public void removeRelationship(String id) {
- this.container.throwExceptionIfReadOnly();
- if (this.relationships != null)
- this.relationships.removeRelationship(id);
+ this._container.throwExceptionIfReadOnly();
+ if (this._relationships != null)
+ this._relationships.removeRelationship(id);
}
/**
* Retrieve all the relationships attached to this part.
- *
+ *
* @return This part's relationships.
* @throws OpenXML4JException
* @see org.apache.poi.openxml4j.opc.RelationshipSource#getRelationships()
@@ -369,20 +369,20 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Retrieves a package relationship from its id.
- *
+ *
* @param id
* ID of the package relationship to retrieve.
* @return The package relationship
* @see org.apache.poi.openxml4j.opc.RelationshipSource#getRelationship(java.lang.String)
*/
public PackageRelationship getRelationship(String id) {
- return this.relationships.getRelationshipByID(id);
+ return this._relationships.getRelationshipByID(id);
}
/**
* Retrieve all relationships attached to this part which have the specified
* type.
- *
+ *
* @param relationshipType
* Relationship type filter.
* @return All relationships from this part that have the specified type.
@@ -394,14 +394,14 @@ public abstract class PackagePart implements RelationshipSource {
*/
public PackageRelationshipCollection getRelationshipsByType(
String relationshipType) throws InvalidFormatException {
- container.throwExceptionIfWriteOnly();
+ _container.throwExceptionIfWriteOnly();
return getRelationshipsCore(relationshipType);
}
/**
* Implementation of the getRelationships method().
- *
+ *
* @param filter
* Relationship type filter. If <i>null</i> then the filter is
* disabled and return all the relationships.
@@ -415,29 +415,29 @@ public abstract class PackagePart implements RelationshipSource {
*/
private PackageRelationshipCollection getRelationshipsCore(String filter)
throws InvalidFormatException {
- this.container.throwExceptionIfWriteOnly();
- if (relationships == null) {
+ this._container.throwExceptionIfWriteOnly();
+ if (_relationships == null) {
this.throwExceptionIfRelationship();
- relationships = new PackageRelationshipCollection(this);
+ _relationships = new PackageRelationshipCollection(this);
}
- return new PackageRelationshipCollection(relationships, filter);
+ return new PackageRelationshipCollection(_relationships, filter);
}
/**
* Knows if the part have any relationships.
- *
+ *
* @return <b>true</b> if the part have at least one relationship else
* <b>false</b>.
* @see org.apache.poi.openxml4j.opc.RelationshipSource#hasRelationships()
*/
public boolean hasRelationships() {
- return (!this.isRelationshipPart && (relationships != null && relationships
+ return (!this._isRelationshipPart && (_relationships != null && _relationships
.size() > 0));
}
/**
* Checks if the specified relationship is part of this package part.
- *
+ *
* @param rel
* The relationship to check.
* @return <b>true</b> if the specified relationship exists in this part,
@@ -458,7 +458,7 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Get the input stream of this part to read its content.
- *
+ *
* @return The input stream of the content of this part, else
* <code>null</code>.
*/
@@ -466,9 +466,9 @@ public abstract class PackagePart implements RelationshipSource {
InputStream inStream = this.getInputStreamImpl();
if (inStream == null) {
throw new IOException("Can't obtain the input stream from "
- + partName.getName());
- } else
- return inStream;
+ + _partName.getName());
+ }
+ return inStream;
}
/**
@@ -476,7 +476,7 @@ public abstract class PackagePart implements RelationshipSource {
* Zip package, it'll be transform intot a <i>MemoryPackagePart</i> in
* order to write inside (the standard Java API doesn't allow to write in
* the file)
- *
+ *
* @see org.apache.poi.openxml4j.opc.internal.MemoryPackagePart
*/
public OutputStream getOutputStream() {
@@ -485,12 +485,12 @@ public abstract class PackagePart implements RelationshipSource {
// this part into a MemoryPackagePart instance for write purpose.
if (this instanceof ZipPackagePart) {
// Delete logically this part
- this.container.removePart(this.partName);
+ _container.removePart(this._partName);
// Create a memory part
- PackagePart part = container.createPart(this.partName,
- this.contentType.toString(), false);
- part.relationships = this.relationships;
+ PackagePart part = _container.createPart(this._partName,
+ this._contentType.toString(), false);
+ part._relationships = this._relationships;
if (part == null) {
throw new InvalidOperationException(
"Can't create a temporary part !");
@@ -504,27 +504,27 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Throws an exception if this package part is a relationship part.
- *
+ *
* @throws InvalidOperationException
* If this part is a relationship part.
*/
private void throwExceptionIfRelationship()
throws InvalidOperationException {
- if (this.isRelationshipPart)
+ if (this._isRelationshipPart)
throw new InvalidOperationException(
"Can do this operation on a relationship part !");
}
/**
* Ensure the package relationships collection instance is built.
- *
+ *
* @throws InvalidFormatException
* Throws if
*/
private void loadRelationships() throws InvalidFormatException {
- if (this.relationships == null && !this.isRelationshipPart) {
+ if (this._relationships == null && !this._isRelationshipPart) {
this.throwExceptionIfRelationship();
- relationships = new PackageRelationshipCollection(this);
+ _relationships = new PackageRelationshipCollection(this);
}
}
@@ -536,22 +536,22 @@ public abstract class PackagePart implements RelationshipSource {
* @return the uri
*/
public PackagePartName getPartName() {
- return partName;
+ return _partName;
}
/**
* @return the contentType
*/
public String getContentType() {
- return contentType.toString();
+ return _contentType.toString();
}
/**
* Set the content type.
- *
+ *
* @param contentType
* the contentType to set
- *
+ *
* @throws InvalidFormatException
* Throws if the content type is not valid.
* @throws InvalidOperationException
@@ -560,29 +560,29 @@ public abstract class PackagePart implements RelationshipSource {
*/
public void setContentType(String contentType)
throws InvalidFormatException {
- if (container == null)
- this.contentType = new ContentType(contentType);
+ if (_container == null)
+ this._contentType = new ContentType(contentType);
else
throw new InvalidOperationException(
"You can't change the content type of a part.");
}
public OPCPackage getPackage() {
- return container;
+ return _container;
}
/**
* @return true if this part is a relationship
*/
public boolean isRelationshipPart() {
- return this.isRelationshipPart;
+ return this._isRelationshipPart;
}
/**
* @return true if this part has been logically deleted
*/
public boolean isDeleted() {
- return isDeleted;
+ return _isDeleted;
}
/**
@@ -590,20 +590,20 @@ public abstract class PackagePart implements RelationshipSource {
* the isDeleted to set
*/
public void setDeleted(boolean isDeleted) {
- this.isDeleted = isDeleted;
+ this._isDeleted = isDeleted;
}
@Override
public String toString() {
- return "Name: " + this.partName + " - Content Type: "
- + this.contentType.toString();
+ return "Name: " + this._partName + " - Content Type: "
+ + this._contentType.toString();
}
/*-------------- Abstract methods ------------- */
/**
* Abtract method that get the input stream of this part.
- *
+ *
* @exception IOException
* Throws if an IO Exception occur in the implementation
* method.
@@ -619,7 +619,7 @@ public abstract class PackagePart implements RelationshipSource {
* Save the content of this part and the associated relationships part (if
* this part own at least one relationship) into the specified output
* stream.
- *
+ *
* @param zos
* Output stream to save this part.
* @throws OpenXML4JException
@@ -629,7 +629,7 @@ public abstract class PackagePart implements RelationshipSource {
/**
* Load the content of this part.
- *
+ *
* @param ios
* The input stream of the content to load.
* @return <b>true</b> if the content has been successfully loaded, else
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
index 03bd296294..f43fa1b62f 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
@@ -22,7 +22,7 @@ import java.net.URISyntaxException;
/**
* A part relationship.
- *
+ *
* @author Julien Chable
* @version 1.0
*/
@@ -86,7 +86,7 @@ public final class PackageRelationship {
/**
* Constructor.
- *
+ *
* @param pkg
* @param sourcePart
* @param targetUri
@@ -171,19 +171,19 @@ public final class PackageRelationship {
}
/**
- *
+ *
* @return URL of the source part of this relationship
*/
public URI getSourceURI() {
if (source == null) {
return PackagingURIHelper.PACKAGE_ROOT_URI;
}
- return source.partName.getURI();
+ return source._partName.getURI();
}
/**
* public URI getSourceUri(){ }
- *
+ *
* @return the targetMode
*/
public TargetMode getTargetMode() {
@@ -199,7 +199,7 @@ public final class PackageRelationship {
if(targetMode == TargetMode.EXTERNAL) {
return targetUri;
}
-
+
// Internal target
// If it isn't absolute, resolve it relative
// to ourselves
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
index 8a11738711..990a3bf4cb 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
@@ -34,7 +34,7 @@ import org.apache.poi.util.POILogFactory;
/**
* Represents a collection of PackageRelationship elements that are owned by a
* given PackagePart or the Package.
- *
+ *
* @author Julien Chable, CDubettier
* @version 0.1
*/
@@ -83,11 +83,11 @@ public final class PackageRelationshipCollection implements
/**
* Copy constructor.
- *
+ *
* This collection will contain only elements from the specified collection
* for which the type is compatible with the specified relationship type
* filter.
- *
+ *
* @param coll
* Collection to import.
* @param filter
@@ -112,21 +112,21 @@ public final class PackageRelationshipCollection implements
/**
* Constructor.
- *
+ *
* @throws InvalidFormatException
* Throws if the format of the content part is invalid.
- *
+ *
* @throws InvalidOperationException
* Throws if the specified part is a relationship part.
*/
public PackageRelationshipCollection(PackagePart part)
throws InvalidFormatException {
- this(part.container, part);
+ this(part._container, part);
}
/**
* Constructor. Parse the existing package relationship part if one exists.
- *
+ *
* @param container
* The parent package.
* @param part
@@ -159,7 +159,7 @@ public final class PackageRelationshipCollection implements
/**
* Get the relationship part name of the specified part.
- *
+ *
* @param part
* The part .
* @return The relationship part name of the specified part. Be careful,
@@ -181,7 +181,7 @@ public final class PackageRelationshipCollection implements
/**
* Add the specified relationship to the collection.
- *
+ *
* @param relPart
* The relationship to add.
*/
@@ -192,7 +192,7 @@ public final class PackageRelationshipCollection implements
/**
* Add a relationship to the collection.
- *
+ *
* @param targetUri
* Target URI.
* @param targetMode
@@ -224,7 +224,7 @@ public final class PackageRelationshipCollection implements
/**
* Remove a relationship by its ID.
- *
+ *
* @param id
* The relationship ID to remove.
*/
@@ -240,7 +240,7 @@ public final class PackageRelationshipCollection implements
/**
* Remove a relationship by its reference.
- *
+ *
* @param rel
* The relationship to delete.
*/
@@ -254,7 +254,7 @@ public final class PackageRelationshipCollection implements
/**
* Retrieves a relationship by its index in the collection.
- *
+ *
* @param index
* Must be a value between [0-relationships_count-1]
*/
@@ -273,7 +273,7 @@ public final class PackageRelationshipCollection implements
/**
* Retrieves a package relationship based on its id.
- *
+ *
* @param id
* ID of the package relationship to retrieve.
* @return The package relationship identified by the specified id.
@@ -291,7 +291,7 @@ public final class PackageRelationshipCollection implements
/**
* Parse the relationship part and add all relationship in this collection.
- *
+ *
* @param relPart
* The package part to parse.
* @throws InvalidFormatException
@@ -376,7 +376,7 @@ public final class PackageRelationshipCollection implements
/**
* Retrieves all relations with the specified type.
- *
+ *
* @param typeFilter
* Relationship type filter. If <b>null</b> then all
* relationships are returned.
@@ -398,7 +398,7 @@ public final class PackageRelationshipCollection implements
/**
* Get an iterator of a collection with all relationship with the specified
* type.
- *
+ *
* @param typeFilter
* Type filter.
* @return An iterator to a collection containing all relationships with the
@@ -429,15 +429,15 @@ public final class PackageRelationshipCollection implements
} else {
str = relationshipsByID.size() + " relationship(s) = [";
}
- if ((relationshipPart != null) && (relationshipPart.partName != null)) {
- str = str + "," + relationshipPart.partName;
+ if ((relationshipPart != null) && (relationshipPart._partName != null)) {
+ str = str + "," + relationshipPart._partName;
} else {
str = str + ",relationshipPart=null";
}
// Source of this relationship
- if ((sourcePart != null) && (sourcePart.partName != null)) {
- str = str + "," + sourcePart.partName;
+ if ((sourcePart != null) && (sourcePart._partName != null)) {
+ str = str + "," + sourcePart._partName;
} else {
str = str + ",sourcePart=null";
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/RelationshipSource.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/RelationshipSource.java
index 018f76c667..87c424df54 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/RelationshipSource.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/RelationshipSource.java
@@ -24,7 +24,7 @@ public interface RelationshipSource {
/**
* Add a relationship to a part (except relationships part).
- *
+ *
* @param targetPartName
* Name of the target part. This one must be relative to the
* source root directory of the part.
@@ -56,7 +56,7 @@ public interface RelationshipSource {
* @param id
* Relationship unique id.
* @return The newly created and added relationship
- *
+ *
* @throws InvalidFormatException
* If the URI point to a relationship part URI.
*/
@@ -67,28 +67,28 @@ public interface RelationshipSource {
/**
* Adds an external relationship to a part
* (except relationships part).
- *
+ *
* The targets of external relationships are not
* subject to the same validity checks that internal
* ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target External target of the relationship
* @param relationshipType Type of relationship.
* @return The newly created and added relationship
* @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String)
*/
public PackageRelationship addExternalRelationship(String target, String relationshipType);
-
+
/**
* Adds an external relationship to a part
* (except relationships part).
- *
+ *
* The targets of external relationships are not
* subject to the same validity checks that internal
* ones are, as the contents is potentially
* any file, URL or similar.
- *
+ *
* @param target External target of the relationship
* @param relationshipType Type of relationship.
* @param id Relationship unique id.
@@ -96,7 +96,7 @@ public interface RelationshipSource {
* @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String)
*/
public PackageRelationship addExternalRelationship(String target, String relationshipType, String id);
-
+
/**
* Delete all the relationships attached to this.
*/
@@ -104,7 +104,7 @@ public interface RelationshipSource {
/**
* Delete the relationship specified by its id.
- *
+ *
* @param id
* The ID identified the part to delete.
*/
@@ -112,7 +112,7 @@ public interface RelationshipSource {
/**
* Retrieve all the relationships attached to this.
- *
+ *
* @return This part's relationships.
* @throws OpenXML4JException
*/
@@ -121,7 +121,7 @@ public interface RelationshipSource {
/**
* Retrieves a package relationship from its id.
- *
+ *
* @param id
* ID of the package relationship to retrieve.
* @return The package relationship
@@ -131,7 +131,7 @@ public interface RelationshipSource {
/**
* Retrieve all relationships attached to this part which have the specified
* type.
- *
+ *
* @param relationshipType
* Relationship type filter.
* @return All relationships from this part that have the specified type.
@@ -141,12 +141,12 @@ public interface RelationshipSource {
* If the package is open in write only mode.
*/
public abstract PackageRelationshipCollection getRelationshipsByType(
- String relationshipType) throws InvalidFormatException,
+ String relationshipType) throws InvalidFormatException,
IllegalArgumentException, OpenXML4JException;
/**
* Knows if the part have any relationships.
- *
+ *
* @return <b>true</b> if the part have at least one relationship else
* <b>false</b>.
*/
@@ -154,13 +154,12 @@ public interface RelationshipSource {
/**
* Checks if the specified relationship is part of this package part.
- *
+ *
* @param rel
* The relationship to check.
* @return <b>true</b> if the specified relationship exists in this part,
* else returns <b>false</b>
*/
- @SuppressWarnings("finally")
public abstract boolean isRelationshipExists(PackageRelationship rel);
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
index 6e676cc9b2..a394f59583 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
@@ -423,7 +423,7 @@ public final class ZipPackage extends Package {
+ ZipHelper.getZipItemNameFromOPCName(part
.getPartName().getName()) + "'");
PartMarshaller marshaller = partMarshallers
- .get(part.contentType);
+ .get(part._contentType);
if (marshaller != null) {
if (!marshaller.marshall(part, zos)) {
throw new OpenXML4JException(
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java
index a4e50ba0a8..e20311787b 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java
@@ -29,7 +29,7 @@ import org.apache.poi.openxml4j.opc.internal.marshallers.ZipPartMarshaller;
/**
* Zip implementation of a PackagePart.
- *
+ *
* @author Julien Chable
* @version 1.0
* @see PackagePart
@@ -43,7 +43,7 @@ public class ZipPackagePart extends PackagePart {
/**
* Constructor.
- *
+ *
* @param container
* The container package.
* @param partName
@@ -60,7 +60,7 @@ public class ZipPackagePart extends PackagePart {
/**
* Constructor.
- *
+ *
* @param container
* The container package.
* @param zipEntry
@@ -81,7 +81,7 @@ public class ZipPackagePart extends PackagePart {
/**
* Get the zip entry of this part.
- *
+ *
* @return The zip entry in the zip structure coresponding to this part.
*/
public ZipEntry getZipArchive() {
@@ -91,21 +91,21 @@ public class ZipPackagePart extends PackagePart {
/**
* Implementation of the getInputStream() which return the inputStream of
* this part zip entry.
- *
+ *
* @return Input stream of this part zip entry.
*/
@Override
protected InputStream getInputStreamImpl() throws IOException {
// We use the getInputStream() method from java.util.zip.ZipFile
// class which return an InputStream to this part zip entry.
- return ((ZipPackage) container).getZipArchive()
+ return ((ZipPackage) _container).getZipArchive()
.getInputStream(zipEntry);
}
/**
* Implementation of the getOutputStream(). Return <b>null</b>. Normally
* will never be called since the MemoryPackage is use instead.
- *
+ *
* @return <b>null</b>
*/
@Override
@@ -119,7 +119,7 @@ public class ZipPackagePart extends PackagePart {
}
@Override
- public boolean load(InputStream ios) throws InvalidFormatException {
+ public boolean load(InputStream ios) {
throw new InvalidOperationException("Method not implemented !");
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
index f36bf068ff..b8c30df930 100755
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
@@ -43,9 +43,8 @@ import org.dom4j.io.SAXReader;
/**
* Manage package content types ([Content_Types].xml part).
- *
+ *
* @author Julien Chable
- * @version 1.0
*/
public abstract class ContentTypeManager {
@@ -90,7 +89,7 @@ public abstract class ContentTypeManager {
/**
* Constructor. Parses the content of the specified input stream.
- *
+ *
* @param in
* If different of <i>null</i> then the content types part is
* retrieve and parse.
@@ -161,7 +160,7 @@ public abstract class ContentTypeManager {
/**
* Add an override content type for a specific part.
- *
+ *
* @param partName
* Name of the part.
* @param contentType
@@ -176,7 +175,7 @@ public abstract class ContentTypeManager {
/**
* Add a content type associated with the specified extension.
- *
+ *
* @param extension
* The part name extension to bind to a content type.
* @param contentType
@@ -267,7 +266,7 @@ public abstract class ContentTypeManager {
/**
* Check if the specified content type is already register.
- *
+ *
* @param contentType
* The content type to check.
* @return <code>true</code> if the specified content type is already
@@ -315,7 +314,7 @@ public abstract class ContentTypeManager {
* @return The content type associated with the URI (in case of an override
* content type) or the extension (in case of default content type),
* else <code>null</code>.
- *
+ *
* @exception OpenXML4JRuntimeException
* Throws if the content type manager is not able to find the
* content from an existing part.
@@ -342,9 +341,8 @@ public abstract class ContentTypeManager {
if (this.container != null && this.container.getPart(partName) != null) {
throw new OpenXML4JRuntimeException(
"Rule M2.4 exception : this error should NEVER happen, if so please send a mail to the developers team, thanks !");
- } else {
- return null;
}
+ return null;
}
/**
@@ -358,7 +356,7 @@ public abstract class ContentTypeManager {
/**
* Clear all override content types.
- *
+ *
*/
public void clearOverrideContentTypes() {
if (this.overrideContentType != null)
@@ -367,7 +365,7 @@ public abstract class ContentTypeManager {
/**
* Parse the content types part.
- *
+ *
* @throws InvalidFormatException
* Throws if the content type doesn't exist or the XML format is
* invalid.
@@ -414,7 +412,7 @@ public abstract class ContentTypeManager {
/**
* Save the contents type part.
- *
+ *
* @param outStream
* The output stream use to save the XML content of the content
* types part.
@@ -448,7 +446,7 @@ public abstract class ContentTypeManager {
/**
* Use to append specific type XML elements, use by the save() method.
- *
+ *
* @param root
* XML parent element use to append this override type element.
* @param entry
@@ -459,13 +457,13 @@ public abstract class ContentTypeManager {
Entry<PackagePartName, String> entry) {
root.addElement(OVERRIDE_TAG_NAME).addAttribute(
PART_NAME_ATTRIBUTE_NAME,
- ((PackagePartName) entry.getKey()).getName()).addAttribute(
- CONTENT_TYPE_ATTRIBUTE_NAME, (String) entry.getValue());
+ entry.getKey().getName()).addAttribute(
+ CONTENT_TYPE_ATTRIBUTE_NAME, entry.getValue());
}
/**
* Use to append default types XML elements, use by the save() metid.
- *
+ *
* @param root
* XML parent element use to append this default type element.
* @param entry
@@ -474,16 +472,16 @@ public abstract class ContentTypeManager {
*/
private void appendDefaultType(Element root, Entry<String, String> entry) {
root.addElement(DEFAULT_TAG_NAME).addAttribute(
- EXTENSION_ATTRIBUTE_NAME, (String) entry.getKey())
+ EXTENSION_ATTRIBUTE_NAME, entry.getKey())
.addAttribute(CONTENT_TYPE_ATTRIBUTE_NAME,
- (String) entry.getValue());
+ entry.getValue());
}
/**
* Specific implementation of the save method. Call by the save() method,
* call before exiting.
- *
+ *
* @param out
* The output stream use to write the content type XML.
*/
diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
index 8a17cf5d8b..382f5c1547 100644
--- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
@@ -41,7 +41,7 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
private boolean formulasNotResults = false;
private boolean includeCellComments = false;
private boolean includeHeadersFooters = true;
-
+
public XSSFExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
this(new XSSFWorkbook(path));
}
@@ -52,14 +52,14 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
super(workbook);
this.workbook = workbook;
}
-
+
public static void main(String[] args) throws Exception {
if(args.length < 1) {
System.err.println("Use:");
System.err.println(" HXFExcelExtractor <filename.xlsx>");
System.exit(1);
}
- POIXMLTextExtractor extractor =
+ POIXMLTextExtractor extractor =
new XSSFExcelExtractor(args[0]);
System.out.println(extractor.getText());
}
@@ -89,19 +89,19 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
public void setIncludeHeadersFooters(boolean includeHeadersFooters) {
this.includeHeadersFooters = includeHeadersFooters;
}
-
+
/**
* Retreives the text contents of the file
*/
public String getText() {
StringBuffer text = new StringBuffer();
-
+
for(int i=0; i<workbook.getNumberOfSheets(); i++) {
- XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(i);
+ XSSFSheet sheet = workbook.getSheetAt(i);
if(includeSheetNames) {
text.append(workbook.getSheetName(i) + "\n");
}
-
+
// Header(s), if present
if(includeHeadersFooters) {
text.append(
@@ -120,7 +120,7 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
Row row = (Row)rawR;
for(Iterator<Cell> ri = row.cellIterator(); ri.hasNext();) {
Cell cell = ri.next();
-
+
// Is it a formula one?
if(cell.getCellType() == Cell.CELL_TYPE_FORMULA && formulasNotResults) {
text.append(cell.getCellFormula());
@@ -130,7 +130,7 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
XSSFCell xc = (XSSFCell)cell;
text.append(xc.getRawValue());
}
-
+
// Output the comment, if requested and exists
Comment comment = cell.getCellComment();
if(includeCellComments && comment != null) {
@@ -139,13 +139,13 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
String commentText = comment.getString().getString().replace('\n', ' ');
text.append(" Comment by "+comment.getAuthor()+": "+commentText);
}
-
+
if(ri.hasNext())
text.append("\t");
}
text.append("\n");
}
-
+
// Finally footer(s), if present
if(includeHeadersFooters) {
text.append(
@@ -159,10 +159,10 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach
);
}
}
-
+
return text.toString();
}
-
+
private String extractHeaderFooter(HeaderFooter hf) {
return ExcelExtractor._extractHeaderFooter(hf);
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
index f6615b73e8..f9c2bdf2bd 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
@@ -585,9 +585,11 @@ public final class XSSFCell implements Cell {
*/
public byte getErrorCellValue() {
String code = getErrorCellString();
- if(code == null) return 0;
+ if (code == null) {
+ return 0;
+ }
- return (byte)FormulaError.forString(code).getCode();
+ return FormulaError.forString(code).getCode();
}
/**
@@ -778,7 +780,7 @@ public final class XSSFCell implements Cell {
SpreadsheetVersion v = SpreadsheetVersion.EXCEL2007;
int maxcol = SpreadsheetVersion.EXCEL2007.getLastColumnIndex();
if (cellIndex < 0 || cellIndex > maxcol) {
- throw new IllegalArgumentException("Invalid column index (" + cellIndex
+ throw new IllegalArgumentException("Invalid column index (" + cellIndex
+ "). Allowable column range for " + v.name() + " is (0.."
+ maxcol + ") or ('A'..'" + v.getLastColumnName() + "')");
}
@@ -848,7 +850,7 @@ public final class XSSFCell implements Cell {
*/
private boolean convertCellValueToBoolean() {
int cellType = getCellType();
-
+
if (cellType == CELL_TYPE_FORMULA) {
cellType = getBaseCellType(false);
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
index 17f267b7cb..5ce05a176d 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
@@ -145,9 +145,8 @@ public class XSSFCellStyle implements CellStyle {
CTCellAlignment align = cellXf.getAlignment();
if(align != null && align.isSetHorizontal()) {
return HorizontalAlignment.values()[align.getHorizontal().intValue()-1];
- } else {
- return HorizontalAlignment.GENERAL;
}
+ return HorizontalAlignment.GENERAL;
}
/**
@@ -865,7 +864,7 @@ public class XSSFCellStyle implements CellStyle {
*/
public void setDataFormat(short fmt) {
cellXf.setApplyNumberFormat(true);
- cellXf.setNumFmtId((long)fmt);
+ cellXf.setNumFmtId(fmt);
}
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java
index 2905228204..47a27b6a63 100755
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java
@@ -285,7 +285,7 @@ public class XSSFPrintSetup implements PrintSetup {
* @see PaperSize
*/
public PaperSize getPaperSizeEnum() {
- return PaperSize.values()[((int) getPaperSize() - 1)];
+ return PaperSize.values()[getPaperSize() - 1];
}
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 81d8c3ebc8..77d4b5c34e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -255,7 +255,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/**
* Returns the name of this sheet
- *
+ *
* @return the name of this sheet
*/
public String getSheetName() {
@@ -358,7 +358,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
public void createFreezePane(int colSplit, int rowSplit) {
createFreezePane( colSplit, rowSplit, colSplit, rowSplit );
}
-
+
/**
* Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
* @param colSplit Horizonatal position of split.
@@ -533,7 +533,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
worksheet.getSheetFormatPr() :
worksheet.addNewSheetFormatPr();
}
-
+
/**
* Returns the CellStyle that applies to the given
* (0 based) column, or null if no style has been
@@ -571,7 +571,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/**
* Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
* When false, cells with zero value appear blank instead of showing the number zero.
- *
+ *
* @return whether all zero values on the worksheet are displayed
*/
public boolean isDisplayZeros(){
@@ -1333,7 +1333,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
.getOutlineLevel(), true);
// write collapse field
- setColumn((int) (lastColMax + 1), null, 0, null, null, Boolean.TRUE);
+ setColumn(lastColMax + 1, null, 0, null, null, Boolean.TRUE);
}
@@ -1433,7 +1433,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/**
* Sets all adjacent columns of the same outline level to the specified
* hidden status.
- *
+ *
* @param pIdx
* the col info index of the start of the outline group
* @return the column index of the last column in the outline group
@@ -1626,7 +1626,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/**
* 'Collapsed' state is stored in a single column col info record
* immediately after the outline group
- *
+ *
* @param idx
* @return a boolean represented if the column is collapsed
*/
@@ -1764,7 +1764,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* outline level collapsed, thus hiding all the child rows. Note that in
* this case, if the lowest level were expanded, the middle level would
* remain collapsed.
- *
+ *
* @param rowIndex -
* the row involved, 0 based
* @param collapse -
@@ -1895,8 +1895,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
endLevel = 0;
endHidden = false;
} else {
- endLevel = (int) (getRow(endOfOutlineGroupIdx).getCTRow()
- .getOutlineLevel());
+ endLevel = getRow(endOfOutlineGroupIdx).getCTRow().getOutlineLevel();
endHidden = getRow(endOfOutlineGroupIdx).getCTRow().getHidden();
}
@@ -1931,7 +1930,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
else
return getRow(collapseRow).getCTRow().getCollapsed();
}
-
+
/**
* Sets the zoom magnication for the sheet. The zoom is expressed as a
* fraction. For example to express a zoom of 75% use 3 for the numerator
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java b/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java
index 05a85fc548..07eaa4b8fc 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java
@@ -35,22 +35,23 @@ import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
+import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
public class TestCommentsTable extends TestCase {
-
+
private static final String TEST_A2_TEXT = "test A2 text";
private static final String TEST_A1_TEXT = "test A1 text";
private static final String TEST_AUTHOR = "test author";
public void testfindAuthor() throws Exception {
- CommentsDocument doc = CommentsDocument.Factory.newInstance();
+ CommentsDocument doc = CommentsDocument.Factory.newInstance();
doc.setComments(CTComments.Factory.newInstance());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
- CommentsTable sheetComments = new CommentsTable();
- sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+ CommentsTable sheetComments = new CommentsTable();
+ sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
assertEquals(0, sheetComments.findAuthor(TEST_AUTHOR));
assertEquals(1, sheetComments.findAuthor("another author"));
@@ -58,19 +59,19 @@ public class TestCommentsTable extends TestCase {
assertEquals(2, sheetComments.findAuthor("YAA"));
assertEquals(1, sheetComments.findAuthor("another author"));
}
-
+
public void testGetCellComment() throws Exception {
- CommentsDocument doc = CommentsDocument.Factory.newInstance();
+ CommentsDocument doc = CommentsDocument.Factory.newInstance();
doc.setComments(CTComments.Factory.newInstance());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
- CommentsTable sheetComments = new CommentsTable();
- sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+ CommentsTable sheetComments = new CommentsTable();
+ sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
CTComments comments = sheetComments.getCTComments();
CTCommentList commentList = comments.addNewCommentList();
-
+
// Create 2 comments for A1 and A" cells
CTComment comment0 = commentList.insertNewComment(0);
comment0.setRef("A1");
@@ -82,7 +83,7 @@ public class TestCommentsTable extends TestCase {
CTRst ctrst1 = CTRst.Factory.newInstance();
ctrst1.setT(TEST_A2_TEXT);
comment1.setText(ctrst1);
-
+
// test finding the right comment for a cell
assertEquals(TEST_A1_TEXT, sheetComments.findCellComment("A1").getString().getString());
assertEquals(TEST_A1_TEXT, sheetComments.findCellComment(0, 0).getString().getString());
@@ -91,77 +92,81 @@ public class TestCommentsTable extends TestCase {
assertNull(sheetComments.findCellComment("A3"));
assertNull(sheetComments.findCellComment(2, 0));
}
-
+
public void testAddCellComment() throws Exception {
- CommentsDocument doc = CommentsDocument.Factory.newInstance();
+ CommentsDocument doc = CommentsDocument.Factory.newInstance();
doc.setComments(CTComments.Factory.newInstance());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
- CommentsTable sheetComments = new CommentsTable();
- sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+ CommentsTable sheetComments = new CommentsTable();
+ sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
CTCommentList commentList = sheetComments.getCTComments().addNewCommentList();
assertEquals(0, commentList.sizeOfCommentArray());
-
+
XSSFComment comment = sheetComments.addComment();
comment.setAuthor("test A1 author");
comment.setRow(0);
comment.setColumn((short)0);
-
+
assertEquals(1, commentList.sizeOfCommentArray());
assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
assertEquals("test A1 author", comment.getAuthor());
-
+
// Change the author, check it updates
comment.setAuthor("Another Author");
assertEquals(1, commentList.sizeOfCommentArray());
assertEquals("Another Author", comment.getAuthor());
}
-
+
public void testDontLoostNewLines() throws Exception {
File xml = new File(
System.getProperty("HSSF.testdata.path") +
File.separator + "WithVariousData.xlsx"
);
assertTrue(xml.exists());
-
+
OPCPackage pkg = OPCPackage.open(xml.toString());
XSSFWorkbook wb = new XSSFWorkbook(pkg);
- List<POIXMLDocumentPart> rels = wb.getSheetAt(0).getRelations();
- CommentsTable ct = null;
- for(POIXMLDocumentPart p : rels) {
- if(p instanceof CommentsTable){
- ct = (CommentsTable)p;
- break;
- }
- }
- assertNotNull(ct);
+ List<POIXMLDocumentPart> rels = wb.getSheetAt(0).getRelations();
+ CommentsTable ct = null;
+ for(POIXMLDocumentPart p : rels) {
+ if(p instanceof CommentsTable){
+ ct = (CommentsTable)p;
+ break;
+ }
+ }
+ if (ct == null) {
+ throw new AssertionFailedError("didn't find comments table");
+ }
assertEquals(2, ct.getNumberOfComments());
assertEquals(1, ct.getNumberOfAuthors());
XSSFComment comment = ct.findCellComment("C5");
-
+
assertEquals("Nick Burch", comment.getAuthor());
assertEquals("Nick Burch:\nThis is a comment", comment.getString().getString());
- wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
- rels = wb.getSheetAt(0).getRelations();
- ct = null;
- for(POIXMLDocumentPart p : rels) {
- if(p instanceof CommentsTable){
- ct = (CommentsTable)p;
- break;
- }
- }
- assertNotNull(ct);
+ wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
+ rels = wb.getSheetAt(0).getRelations();
+ ct = null;
+ for(POIXMLDocumentPart p : rels) {
+ if(p instanceof CommentsTable){
+ ct = (CommentsTable)p;
+ break;
+ }
+ }
+ if (ct == null) {
+ throw new AssertionFailedError("didn't find comments table");
+ }
assertEquals(2, ct.getNumberOfComments());
assertEquals(1, ct.getNumberOfAuthors());
-
+
comment = ct.findCellComment("C5");
-
+
assertEquals("Nick Burch", comment.getAuthor());
-
+
assertEquals("Nick Burch:\nThis is a comment", comment.getString().getString());
}
@@ -171,127 +176,127 @@ public class TestCommentsTable extends TestCase {
File.separator + "WithVariousData.xlsx"
);
assertTrue(xml.exists());
-
+
XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
Sheet sheet1 = workbook.getSheetAt(0);
Sheet sheet2 = workbook.getSheetAt(1);
-
+
assertTrue( ((XSSFSheet)sheet1).hasComments() );
assertFalse( ((XSSFSheet)sheet2).hasComments() );
-
+
// Comments should be in C5 and C7
Row r5 = sheet1.getRow(4);
Row r7 = sheet1.getRow(6);
assertNotNull( r5.getCell(2).getCellComment() );
assertNotNull( r7.getCell(2).getCellComment() );
-
+
// Check they have what we expect
// TODO: Rich text formatting
Comment cc5 = r5.getCell(2).getCellComment();
Comment cc7 = r7.getCell(2).getCellComment();
-
+
assertEquals("Nick Burch", cc5.getAuthor());
assertEquals("Nick Burch:\nThis is a comment", cc5.getString().getString());
assertEquals(4, cc5.getRow());
assertEquals(2, cc5.getColumn());
-
+
assertEquals("Nick Burch", cc7.getAuthor());
assertEquals("Nick Burch:\nComment #1\n", cc7.getString().getString());
assertEquals(6, cc7.getRow());
assertEquals(2, cc7.getColumn());
}
-
+
public void testWriteRead() throws Exception {
File xml = new File(
System.getProperty("HSSF.testdata.path") +
File.separator + "WithVariousData.xlsx"
);
assertTrue(xml.exists());
-
+
XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
- Sheet sheet1 = workbook.getSheetAt(0);
- XSSFSheet sheet2 = (XSSFSheet)workbook.getSheetAt(1);
-
- assertTrue( ((XSSFSheet)sheet1).hasComments() );
- assertFalse( ((XSSFSheet)sheet2).hasComments() );
-
+ XSSFSheet sheet1 = workbook.getSheetAt(0);
+ XSSFSheet sheet2 = workbook.getSheetAt(1);
+
+ assertTrue( sheet1.hasComments() );
+ assertFalse( sheet2.hasComments() );
+
// Change on comment on sheet 1, and add another into
// sheet 2
Row r5 = sheet1.getRow(4);
Comment cc5 = r5.getCell(2).getCellComment();
cc5.setAuthor("Apache POI");
cc5.setString(new XSSFRichTextString("Hello!"));
-
+
Row r2s2 = sheet2.createRow(2);
Cell c1r2s2 = r2s2.createCell(1);
assertNull(c1r2s2.getCellComment());
-
+
Comment cc2 = sheet2.createComment();
cc2.setAuthor("Also POI");
cc2.setString(new XSSFRichTextString("A new comment"));
c1r2s2.setCellComment(cc2);
-
-
+
+
// Save, and re-load the file
- workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
+ workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
// Check we still have comments where we should do
sheet1 = workbook.getSheetAt(0);
- sheet2 = (XSSFSheet)workbook.getSheetAt(1);
+ sheet2 = workbook.getSheetAt(1);
assertNotNull(sheet1.getRow(4).getCell(2).getCellComment());
assertNotNull(sheet1.getRow(6).getCell(2).getCellComment());
assertNotNull(sheet2.getRow(2).getCell(1).getCellComment());
-
+
// And check they still have the contents they should do
- assertEquals("Apache POI",
+ assertEquals("Apache POI",
sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
- assertEquals("Nick Burch",
+ assertEquals("Nick Burch",
sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
- assertEquals("Also POI",
+ assertEquals("Also POI",
sheet2.getRow(2).getCell(1).getCellComment().getAuthor());
-
+
assertEquals("Nick Burch:\nThis is a comment",
sheet1.getRow(4).getCell(2).getCellComment().getString().getString());
}
-
+
public void testReadWriteMultipleAuthors() throws Exception {
File xml = new File(
System.getProperty("HSSF.testdata.path") +
File.separator + "WithMoreVariousData.xlsx"
);
assertTrue(xml.exists());
-
+
XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
- Sheet sheet1 = workbook.getSheetAt(0);
- XSSFSheet sheet2 = (XSSFSheet)workbook.getSheetAt(1);
-
- assertTrue( ((XSSFSheet)sheet1).hasComments() );
- assertFalse( ((XSSFSheet)sheet2).hasComments() );
-
- assertEquals("Nick Burch",
+ XSSFSheet sheet1 = workbook.getSheetAt(0);
+ XSSFSheet sheet2 = workbook.getSheetAt(1);
+
+ assertTrue( sheet1.hasComments() );
+ assertFalse( sheet2.hasComments() );
+
+ assertEquals("Nick Burch",
sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
- assertEquals("Nick Burch",
+ assertEquals("Nick Burch",
sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
- assertEquals("Torchbox",
+ assertEquals("Torchbox",
sheet1.getRow(12).getCell(2).getCellComment().getAuthor());
-
+
// Save, and re-load the file
- workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
+ workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
// Check we still have comments where we should do
sheet1 = workbook.getSheetAt(0);
assertNotNull(sheet1.getRow(4).getCell(2).getCellComment());
assertNotNull(sheet1.getRow(6).getCell(2).getCellComment());
assertNotNull(sheet1.getRow(12).getCell(2).getCellComment());
-
+
// And check they still have the contents they should do
- assertEquals("Nick Burch",
+ assertEquals("Nick Burch",
sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
- assertEquals("Nick Burch",
+ assertEquals("Nick Burch",
sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
- assertEquals("Torchbox",
+ assertEquals("Torchbox",
sheet1.getRow(12).getCell(2).getCellComment().getAuthor());
-
+
// Todo - check text too, once bug fixed
}
}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
index 4e08e7274d..0a7b08347e 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
@@ -24,10 +24,10 @@ import org.apache.poi.xssf.XSSFTestDataSamples;
import org.apache.poi.xssf.XSSFITestDataProvider;
public final class TestXSSFHyperlink extends BaseTestHyperlink {
- @Override
- protected XSSFITestDataProvider getTestDataProvider() {
- return XSSFITestDataProvider.getInstance();
- }
+ @Override
+ protected XSSFITestDataProvider getTestDataProvider() {
+ return XSSFITestDataProvider.getInstance();
+ }
@Override
protected void setUp() {
@@ -48,7 +48,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink {
XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
assertEquals(3, workbook.getNumberOfSheets());
- XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(0);
+ XSSFSheet sheet = workbook.getSheetAt(0);
// Check the hyperlinks
assertEquals(4, sheet.getNumHyperlinks());
@@ -65,7 +65,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink {
XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
CreationHelper createHelper = workbook.getCreationHelper();
assertEquals(3, workbook.getNumberOfSheets());
- XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(0);
+ XSSFSheet sheet = workbook.getSheetAt(0);
// Check hyperlinks
assertEquals(4, sheet.getNumHyperlinks());
@@ -81,7 +81,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink {
assertNotNull(wb2.getSheetAt(1));
assertNotNull(wb2.getSheetAt(2));
- sheet = (XSSFSheet)wb2.getSheetAt(0);
+ sheet = wb2.getSheetAt(0);
// Check hyperlinks again
diff --git a/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java b/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java
index 9dc5925e9a..310b0e2235 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java
@@ -167,8 +167,8 @@ public final class StyleSheet {
break;
case 0x9:
newCHP._fSpec = true;
- newCHP._ftcSym = (short)Utils.convertBytesToShort(varParam, 0);
- newCHP._xchSym = (short)Utils.convertBytesToShort(varParam, 2);
+ newCHP._ftcSym = Utils.convertBytesToShort(varParam, 0);
+ newCHP._xchSym = Utils.convertBytesToShort(varParam, 2);
break;
case 0xa:
newCHP._fOle2 = getFlag(param);
@@ -453,8 +453,8 @@ public final class StyleSheet {
doCHPOperation(oldCHP, newCHP, 0x47, param, varParam, grpprl, offset, styleSheet);
break;
case 0x4d:
- float percentage = (float)param/100.0f;
- int add = (int)((float)percentage * (float)newCHP._hps);
+ float percentage = param/100.0f;
+ int add = (int)(percentage * newCHP._hps);
newCHP._hps += add;
break;
case 0x4e:
@@ -485,7 +485,7 @@ public final class StyleSheet {
break;
case 0x57:
newCHP._fPropMark = getFlag(varParam[0]);
- newCHP._ibstPropRMark = (short)Utils.convertBytesToShort(varParam, 1);
+ newCHP._ibstPropRMark = Utils.convertBytesToShort(varParam, 1);
newCHP._dttmPropRMark = Utils.convertBytesToInt(varParam, 3);
break;
case 0x58:
@@ -512,7 +512,7 @@ public final class StyleSheet {
break;
case 0x62:
newCHP._fDispFldRMark = getFlag(varParam[0]);
- newCHP._ibstDispFldRMark = (short)Utils.convertBytesToShort(varParam, 1);
+ newCHP._ibstDispFldRMark = Utils.convertBytesToShort(varParam, 1);
newCHP._dttmDispFldRMark = Utils.convertBytesToInt(varParam, 3);
System.arraycopy(varParam, 7, newCHP._xstDispFldRMark, 0, 32);
break;
@@ -524,8 +524,8 @@ public final class StyleSheet {
newCHP._dttmRMarkDel[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x65:
- newCHP._brc[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newCHP._brc[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newCHP._brc[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newCHP._brc[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x66:
newCHP._shd = (short)param;
@@ -834,28 +834,28 @@ public final class StyleSheet {
newPAP._wr = (byte)param;
break;
case 0x24:
- newPAP._brcTop[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcTop[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcTop[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcTop[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x25:
- newPAP._brcLeft[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcLeft[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcLeft[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcLeft[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x26:
- newPAP._brcBottom[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcBottom[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcBottom[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcBottom[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x27:
- newPAP._brcRight[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcRight[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcRight[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcRight[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x28:
- newPAP._brcBetween[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcBetween[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcBetween[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcBetween[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x29:
- newPAP._brcBar[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
- newPAP._brcBar[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+ newPAP._brcBar[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+ newPAP._brcBar[1] = Utils.convertBytesToShort(grpprl, offset - 2);
break;
case 0x2a:
newPAP._fNoAutoHyph = (byte)param;
diff --git a/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java b/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
index a525d97141..fb237ffc52 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
@@ -35,10 +35,10 @@ import org.apache.poi.util.LittleEndian;
*
* @author Ryan Ackley
*/
-
-public final class WordDocument
-{
- /** byte buffer containing the main Document stream*/
+public final class WordDocument {
+ // TODO - name this constant properly
+ private static final float K_1440_0F = 1440.0f;
+/** byte buffer containing the main Document stream*/
byte[] _header;
/** contains all style information for this document see Word 97 Doc spec*/
StyleSheet _styleSheet;
@@ -1160,19 +1160,19 @@ public final class WordDocument
}
if(pap._dxaLeft > 0)
{
- buf.append("start-indent=\"" + ((float)pap._dxaLeft)/1440.0f + "in\"\r\n");
+ buf.append("start-indent=\"" + pap._dxaLeft/K_1440_0F + "in\"\r\n");
}
if(pap._dxaRight > 0)
{
- buf.append("end-indent=\"" + ((float)pap._dxaRight)/1440.0f + "in\"\r\n");
+ buf.append("end-indent=\"" + pap._dxaRight/K_1440_0F + "in\"\r\n");
}
if(pap._dxaLeft1 != 0)
{
- buf.append("text-indent=\"" + ((float)pap._dxaLeft1)/1440.0f + "in\"\r\n");
+ buf.append("text-indent=\"" + pap._dxaLeft1/K_1440_0F + "in\"\r\n");
}
if(pap._lspd[1] == 0)
{
- //buf.append("line-height=\"" + ((float)pap._lspd[0])/1440.0f + "in\"\r\n");
+ //buf.append("line-height=\"" + pap._lspd[0]/K_1440_0F + "in\"\r\n");
}
addBorder(buf, pap._brcTop, "top");
addBorder(buf, pap._brcBottom, "bottom");
@@ -1190,7 +1190,7 @@ public final class WordDocument
buf.append("font-size=\"" + (chp._hps / 2) + "pt\" ");
buf.append("color=\"" + getColor(chp._ico) + "\" ");
//not supported by fop
- //buf.append("letter-spacing=\"" + ((double)chp._dxaSpace)/1440.0f + "in\" ");
+ //buf.append("letter-spacing=\"" + ((double)chp._dxaSpace)/K_1440_0F + "in\" ");
addBorder(buf, chp._brc, "top");
addBorder(buf, chp._brc, "bottom");
@@ -1236,11 +1236,11 @@ public final class WordDocument
}
if(chp._paddingStart != 0)
{
- buf.append("padding-start=\"" + (float)chp._paddingStart/1440.0f + "in\" ");
+ buf.append("padding-start=\"" + chp._paddingStart/K_1440_0F + "in\" ");
}
if(chp._paddingEnd != 0)
{
- buf.append("padding-end=\"" + (float)chp._paddingEnd/1440.0f + "in\" ");
+ buf.append("padding-end=\"" + chp._paddingEnd/K_1440_0F + "in\" ");
}
buf.append(">");
}
@@ -1416,12 +1416,12 @@ public final class WordDocument
private String createPageMaster(SEP sep, String type, int section,
String regionBefore, String regionAfter)
{
- float height = ((float)sep._yaPage)/1440.0f;
- float width = ((float)sep._xaPage)/1440.0f;
- float leftMargin = ((float)sep._dxaLeft)/1440.0f;
- float rightMargin = ((float)sep._dxaRight)/1440.0f;
- float topMargin = ((float)sep._dyaTop)/1440.0f;
- float bottomMargin = ((float)sep._dyaBottom)/1440.0f;
+ float height = sep._yaPage/K_1440_0F;
+ float width = sep._xaPage/K_1440_0F;
+ float leftMargin = sep._dxaLeft/K_1440_0F;
+ float rightMargin = sep._dxaRight/K_1440_0F;
+ float topMargin = sep._dyaTop/K_1440_0F;
+ float bottomMargin = sep._dyaBottom/K_1440_0F;
//add these to the header
String thisPage = type + "-page" + section;
@@ -1452,7 +1452,7 @@ public final class WordDocument
_headerBuffer.append("column-count=\"" + (sep._ccolM1 + 1) + "\" ");
if(sep._fEvenlySpaced)
{
- _headerBuffer.append("column-gap=\"" + ((float)(sep._dxaColumns))/1440.0f + "in\"");
+ _headerBuffer.append("column-gap=\"" + sep._dxaColumns/K_1440_0F + "in\"");
}
else
{
@@ -1478,7 +1478,7 @@ public final class WordDocument
if((brc[0] & 0xff00) != 0 && brc[0] != -1)
{
int type = (brc[0] & 0xff00) >> 8;
- float width = ((float)(brc[0] & 0x00ff))/8.0f;
+ float width = (brc[0] & 0x00ff)/8.0f;
String style = getBorderStyle(brc[0]);
String color = getColor(brc[1] & 0x00ff);
String thickness = getBorderThickness(brc[0]);
@@ -1764,7 +1764,7 @@ public final class WordDocument
rowBuffer.append("<fo:table-row ");
if(tap._dyaRowHeight > 0)
{
- rowBuffer.append("height=\"" + ((float)tap._dyaRowHeight)/1440.0f + "in\" ");
+ rowBuffer.append("height=\"" + tap._dyaRowHeight/K_1440_0F + "in\" ");
}
if(tap._fCantSplit)
{
@@ -1777,9 +1777,9 @@ public final class WordDocument
TC tc = tap._rgtc[y];
overrideCellBorder(x, y, size, tap._itcMac, tc, tap);
rowBuffer.append("<fo:table-cell ");
- rowBuffer.append("width=\"" + ((float)(tap._rgdxaCenter[y+1] - tap._rgdxaCenter[y]))/1440.0f + "in\" ");
- rowBuffer.append("padding-start=\"" + ((float)tap._dxaGapHalf)/1440.0f + "in\" ");
- rowBuffer.append("padding-end=\"" + ((float)tap._dxaGapHalf)/1440.0f + "in\" ");
+ rowBuffer.append("width=\"" + (tap._rgdxaCenter[y+1] - tap._rgdxaCenter[y])/K_1440_0F + "in\" ");
+ rowBuffer.append("padding-start=\"" + tap._dxaGapHalf/K_1440_0F + "in\" ");
+ rowBuffer.append("padding-end=\"" + tap._dxaGapHalf/K_1440_0F + "in\" ");
addBorder(rowBuffer, tc._brcTop, "top");
addBorder(rowBuffer, tc._brcLeft, "left");
addBorder(rowBuffer, tc._brcBottom, "bottom");
diff --git a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
index 1bee95245a..9db6016cd5 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
@@ -224,8 +224,8 @@ public final class StyleSheet implements HDFType {
break;
case 0x9:
newCHP.setFSpec(true);
- newCHP.setFtcSym((short)LittleEndian.getShort(varParam, 0));
- newCHP.setXchSym((short)LittleEndian.getShort(varParam, 2));
+ newCHP.setFtcSym(LittleEndian.getShort(varParam, 0));
+ newCHP.setXchSym(LittleEndian.getShort(varParam, 2));
break;
case 0xa:
newCHP.setFOle2(getFlag(param));
@@ -517,8 +517,8 @@ public final class StyleSheet implements HDFType {
doCHPOperation(oldCHP, newCHP, 0x47, param, varParam, grpprl, offset, styleSheet);
break;
case 0x4d:
- float percentage = (float)param/100.0f;
- int add = (int)((float)percentage * (float)newCHP.getHps());
+ float percentage = param/100.0f;
+ int add = (int)(percentage * newCHP.getHps());
newCHP.setHps(newCHP.getHps() + add);
break;
case 0x4e:
@@ -549,7 +549,7 @@ public final class StyleSheet implements HDFType {
break;
case 0x57:
newCHP.setFPropMark(varParam[0]);
- newCHP.setIbstPropRMark((short)LittleEndian.getShort(varParam, 1));
+ newCHP.setIbstPropRMark(LittleEndian.getShort(varParam, 1));
newCHP.setDttmPropRMark(LittleEndian.getInt(varParam, 3));
break;
case 0x58:
@@ -577,7 +577,7 @@ public final class StyleSheet implements HDFType {
case 0x62:
byte[] xstDispFldRMark = new byte[32];
newCHP.setFDispFldRMark(varParam[0]);
- newCHP.setIbstDispFldRMark((short)LittleEndian.getShort(varParam, 1));
+ newCHP.setIbstDispFldRMark(LittleEndian.getShort(varParam, 1));
newCHP.setDttmDispFldRMark(LittleEndian.getInt(varParam, 3));
System.arraycopy(varParam, 7, xstDispFldRMark, 0, 32);
newCHP.setXstDispFldRMark(xstDispFldRMark);
@@ -593,8 +593,8 @@ public final class StyleSheet implements HDFType {
break;
case 0x65:
short[] brc = new short[2];
- brc[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brc[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brc[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brc[1] = LittleEndian.getShort(grpprl, offset - 2);
newCHP.setBrc(brc);
break;
case 0x66:
@@ -947,33 +947,33 @@ public final class StyleSheet implements HDFType {
break;
case 0x24:
short[] brcTop = newPAP.getBrcTop();
- brcTop[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcTop[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcTop[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcTop[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x25:
short[] brcLeft = newPAP.getBrcLeft();
- brcLeft[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcLeft[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcLeft[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcLeft[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x26:
short[] brcBottom = newPAP.getBrcBottom();
- brcBottom[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcBottom[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcBottom[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcBottom[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x27:
short[] brcRight = newPAP.getBrcRight();
- brcRight[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcRight[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcRight[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcRight[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x28:
short[] brcBetween = newPAP.getBrcBetween();
- brcBetween[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcBetween[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcBetween[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcBetween[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x29:
short[] brcBar = newPAP.getBrcBar();
- brcBar[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
- brcBar[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+ brcBar[0] = LittleEndian.getShort(grpprl, offset - 4);
+ brcBar[1] = LittleEndian.getShort(grpprl, offset - 2);
break;
case 0x2a:
newPAP.setFNoAutoHyph((byte)param);
diff --git a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java
index 12d5fd2ce3..1c123e8510 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java
@@ -814,9 +814,7 @@ public abstract class CHPAbstractType
*/
public void setFBold(boolean value)
{
- field_2_format_flags = (int)fBold.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fBold.setBoolean(field_2_format_flags, value);
}
/**
@@ -826,7 +824,6 @@ public abstract class CHPAbstractType
public boolean isFBold()
{
return fBold.isSet(field_2_format_flags);
-
}
/**
@@ -835,9 +832,7 @@ public abstract class CHPAbstractType
*/
public void setFItalic(boolean value)
{
- field_2_format_flags = (int)fItalic.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fItalic.setBoolean(field_2_format_flags, value);
}
/**
@@ -847,7 +842,6 @@ public abstract class CHPAbstractType
public boolean isFItalic()
{
return fItalic.isSet(field_2_format_flags);
-
}
/**
@@ -856,9 +850,7 @@ public abstract class CHPAbstractType
*/
public void setFRMarkDel(boolean value)
{
- field_2_format_flags = (int)fRMarkDel.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fRMarkDel.setBoolean(field_2_format_flags, value);
}
/**
@@ -868,7 +860,6 @@ public abstract class CHPAbstractType
public boolean isFRMarkDel()
{
return fRMarkDel.isSet(field_2_format_flags);
-
}
/**
@@ -877,9 +868,7 @@ public abstract class CHPAbstractType
*/
public void setFOutline(boolean value)
{
- field_2_format_flags = (int)fOutline.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fOutline.setBoolean(field_2_format_flags, value);
}
/**
@@ -889,7 +878,6 @@ public abstract class CHPAbstractType
public boolean isFOutline()
{
return fOutline.isSet(field_2_format_flags);
-
}
/**
@@ -898,9 +886,7 @@ public abstract class CHPAbstractType
*/
public void setFFldVanish(boolean value)
{
- field_2_format_flags = (int)fFldVanish.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fFldVanish.setBoolean(field_2_format_flags, value);
}
/**
@@ -910,7 +896,6 @@ public abstract class CHPAbstractType
public boolean isFFldVanish()
{
return fFldVanish.isSet(field_2_format_flags);
-
}
/**
@@ -919,9 +904,7 @@ public abstract class CHPAbstractType
*/
public void setFSmallCaps(boolean value)
{
- field_2_format_flags = (int)fSmallCaps.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fSmallCaps.setBoolean(field_2_format_flags, value);
}
/**
@@ -931,7 +914,6 @@ public abstract class CHPAbstractType
public boolean isFSmallCaps()
{
return fSmallCaps.isSet(field_2_format_flags);
-
}
/**
@@ -940,9 +922,7 @@ public abstract class CHPAbstractType
*/
public void setFCaps(boolean value)
{
- field_2_format_flags = (int)fCaps.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fCaps.setBoolean(field_2_format_flags, value);
}
/**
@@ -952,7 +932,6 @@ public abstract class CHPAbstractType
public boolean isFCaps()
{
return fCaps.isSet(field_2_format_flags);
-
}
/**
@@ -961,9 +940,7 @@ public abstract class CHPAbstractType
*/
public void setFVanish(boolean value)
{
- field_2_format_flags = (int)fVanish.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fVanish.setBoolean(field_2_format_flags, value);
}
/**
@@ -973,7 +950,6 @@ public abstract class CHPAbstractType
public boolean isFVanish()
{
return fVanish.isSet(field_2_format_flags);
-
}
/**
@@ -982,9 +958,7 @@ public abstract class CHPAbstractType
*/
public void setFRMark(boolean value)
{
- field_2_format_flags = (int)fRMark.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fRMark.setBoolean(field_2_format_flags, value);
}
/**
@@ -994,7 +968,6 @@ public abstract class CHPAbstractType
public boolean isFRMark()
{
return fRMark.isSet(field_2_format_flags);
-
}
/**
@@ -1003,9 +976,7 @@ public abstract class CHPAbstractType
*/
public void setFSpec(boolean value)
{
- field_2_format_flags = (int)fSpec.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fSpec.setBoolean(field_2_format_flags, value);
}
/**
@@ -1015,7 +986,6 @@ public abstract class CHPAbstractType
public boolean isFSpec()
{
return fSpec.isSet(field_2_format_flags);
-
}
/**
@@ -1024,9 +994,7 @@ public abstract class CHPAbstractType
*/
public void setFStrike(boolean value)
{
- field_2_format_flags = (int)fStrike.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fStrike.setBoolean(field_2_format_flags, value);
}
/**
@@ -1036,7 +1004,6 @@ public abstract class CHPAbstractType
public boolean isFStrike()
{
return fStrike.isSet(field_2_format_flags);
-
}
/**
@@ -1045,9 +1012,7 @@ public abstract class CHPAbstractType
*/
public void setFObj(boolean value)
{
- field_2_format_flags = (int)fObj.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fObj.setBoolean(field_2_format_flags, value);
}
/**
@@ -1057,7 +1022,6 @@ public abstract class CHPAbstractType
public boolean isFObj()
{
return fObj.isSet(field_2_format_flags);
-
}
/**
@@ -1066,9 +1030,7 @@ public abstract class CHPAbstractType
*/
public void setFShadow(boolean value)
{
- field_2_format_flags = (int)fShadow.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fShadow.setBoolean(field_2_format_flags, value);
}
/**
@@ -1078,7 +1040,6 @@ public abstract class CHPAbstractType
public boolean isFShadow()
{
return fShadow.isSet(field_2_format_flags);
-
}
/**
@@ -1087,9 +1048,7 @@ public abstract class CHPAbstractType
*/
public void setFLowerCase(boolean value)
{
- field_2_format_flags = (int)fLowerCase.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fLowerCase.setBoolean(field_2_format_flags, value);
}
/**
@@ -1099,7 +1058,6 @@ public abstract class CHPAbstractType
public boolean isFLowerCase()
{
return fLowerCase.isSet(field_2_format_flags);
-
}
/**
@@ -1108,9 +1066,7 @@ public abstract class CHPAbstractType
*/
public void setFData(boolean value)
{
- field_2_format_flags = (int)fData.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fData.setBoolean(field_2_format_flags, value);
}
/**
@@ -1120,7 +1076,6 @@ public abstract class CHPAbstractType
public boolean isFData()
{
return fData.isSet(field_2_format_flags);
-
}
/**
@@ -1129,9 +1084,7 @@ public abstract class CHPAbstractType
*/
public void setFOle2(boolean value)
{
- field_2_format_flags = (int)fOle2.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fOle2.setBoolean(field_2_format_flags, value);
}
/**
@@ -1141,7 +1094,6 @@ public abstract class CHPAbstractType
public boolean isFOle2()
{
return fOle2.isSet(field_2_format_flags);
-
}
/**
@@ -1150,9 +1102,7 @@ public abstract class CHPAbstractType
*/
public void setFEmboss(boolean value)
{
- field_3_format_flags1 = (int)fEmboss.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fEmboss.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1162,7 +1112,6 @@ public abstract class CHPAbstractType
public boolean isFEmboss()
{
return fEmboss.isSet(field_3_format_flags1);
-
}
/**
@@ -1171,9 +1120,7 @@ public abstract class CHPAbstractType
*/
public void setFImprint(boolean value)
{
- field_3_format_flags1 = (int)fImprint.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fImprint.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1183,7 +1130,6 @@ public abstract class CHPAbstractType
public boolean isFImprint()
{
return fImprint.isSet(field_3_format_flags1);
-
}
/**
@@ -1192,9 +1138,7 @@ public abstract class CHPAbstractType
*/
public void setFDStrike(boolean value)
{
- field_3_format_flags1 = (int)fDStrike.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fDStrike.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1204,7 +1148,6 @@ public abstract class CHPAbstractType
public boolean isFDStrike()
{
return fDStrike.isSet(field_3_format_flags1);
-
}
/**
@@ -1213,9 +1156,7 @@ public abstract class CHPAbstractType
*/
public void setFUsePgsuSettings(boolean value)
{
- field_3_format_flags1 = (int)fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1225,7 +1166,6 @@ public abstract class CHPAbstractType
public boolean isFUsePgsuSettings()
{
return fUsePgsuSettings.isSet(field_3_format_flags1);
-
}
/**
@@ -1235,8 +1175,6 @@ public abstract class CHPAbstractType
public void setIcoHighlight(byte value)
{
field_33_Highlight = (short)icoHighlight.setValue(field_33_Highlight, value);
-
-
}
/**
@@ -1246,7 +1184,6 @@ public abstract class CHPAbstractType
public byte getIcoHighlight()
{
return ( byte )icoHighlight.getValue(field_33_Highlight);
-
}
/**
@@ -1256,8 +1193,6 @@ public abstract class CHPAbstractType
public void setFHighlight(boolean value)
{
field_33_Highlight = (short)fHighlight.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1267,7 +1202,6 @@ public abstract class CHPAbstractType
public boolean isFHighlight()
{
return fHighlight.isSet(field_33_Highlight);
-
}
/**
@@ -1277,8 +1211,6 @@ public abstract class CHPAbstractType
public void setKcd(byte value)
{
field_33_Highlight = (short)kcd.setValue(field_33_Highlight, value);
-
-
}
/**
@@ -1288,7 +1220,6 @@ public abstract class CHPAbstractType
public byte getKcd()
{
return ( byte )kcd.getValue(field_33_Highlight);
-
}
/**
@@ -1298,8 +1229,6 @@ public abstract class CHPAbstractType
public void setFNavHighlight(boolean value)
{
field_33_Highlight = (short)fNavHighlight.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1309,7 +1238,6 @@ public abstract class CHPAbstractType
public boolean isFNavHighlight()
{
return fNavHighlight.isSet(field_33_Highlight);
-
}
/**
@@ -1319,8 +1247,6 @@ public abstract class CHPAbstractType
public void setFChsDiff(boolean value)
{
field_33_Highlight = (short)fChsDiff.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1330,7 +1256,6 @@ public abstract class CHPAbstractType
public boolean isFChsDiff()
{
return fChsDiff.isSet(field_33_Highlight);
-
}
/**
@@ -1340,8 +1265,6 @@ public abstract class CHPAbstractType
public void setFMacChs(boolean value)
{
field_33_Highlight = (short)fMacChs.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1351,7 +1274,6 @@ public abstract class CHPAbstractType
public boolean isFMacChs()
{
return fMacChs.isSet(field_33_Highlight);
-
}
/**
@@ -1361,8 +1283,6 @@ public abstract class CHPAbstractType
public void setFFtcAsciSym(boolean value)
{
field_33_Highlight = (short)fFtcAsciSym.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1372,12 +1292,5 @@ public abstract class CHPAbstractType
public boolean isFFtcAsciSym()
{
return fFtcAsciSym.isSet(field_33_Highlight);
-
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java
index 289300029d..43fe561bbd 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java
@@ -243,65 +243,63 @@ public abstract class DOPAbstractType
field_51_nfcEdnRef = LittleEndian.getShort(data, 0x1ee + offset);
field_52_hpsZoonFontPag = LittleEndian.getShort(data, 0x1f0 + offset);
field_53_dywDispPag = LittleEndian.getShort(data, 0x1f2 + offset);
-
}
public void serialize(byte[] data, int offset)
{
- data[ 0x0 + offset] = field_1_formatFlags;;
- data[ 0x1 + offset] = field_2_unused2;;
- LittleEndian.putShort(data, 0x2 + offset, (short)field_3_footnoteInfo);;
- data[ 0x4 + offset] = field_4_fOutlineDirtySave;;
- data[ 0x5 + offset] = field_5_docinfo;;
- data[ 0x6 + offset] = field_6_docinfo1;;
- data[ 0x7 + offset] = field_7_docinfo2;;
- LittleEndian.putShort(data, 0x8 + offset, (short)field_8_docinfo3);;
- LittleEndian.putShort(data, 0xa + offset, (short)field_9_dxaTab);;
- LittleEndian.putShort(data, 0xc + offset, (short)field_10_wSpare);;
- LittleEndian.putShort(data, 0xe + offset, (short)field_11_dxaHotz);;
- LittleEndian.putShort(data, 0x10 + offset, (short)field_12_cConsexHypLim);;
- LittleEndian.putShort(data, 0x12 + offset, (short)field_13_wSpare2);;
- LittleEndian.putInt(data, 0x14 + offset, field_14_dttmCreated);;
- LittleEndian.putInt(data, 0x18 + offset, field_15_dttmRevised);;
- LittleEndian.putInt(data, 0x1c + offset, field_16_dttmLastPrint);;
- LittleEndian.putShort(data, 0x20 + offset, (short)field_17_nRevision);;
- LittleEndian.putInt(data, 0x22 + offset, field_18_tmEdited);;
- LittleEndian.putInt(data, 0x26 + offset, field_19_cWords);;
- LittleEndian.putInt(data, 0x2a + offset, field_20_cCh);;
- LittleEndian.putShort(data, 0x2e + offset, (short)field_21_cPg);;
- LittleEndian.putInt(data, 0x30 + offset, field_22_cParas);;
- LittleEndian.putShort(data, 0x34 + offset, (short)field_23_Edn);;
- LittleEndian.putShort(data, 0x36 + offset, (short)field_24_Edn1);;
- LittleEndian.putInt(data, 0x38 + offset, field_25_cLines);;
- LittleEndian.putInt(data, 0x3c + offset, field_26_cWordsFtnEnd);;
- LittleEndian.putInt(data, 0x40 + offset, field_27_cChFtnEdn);;
- LittleEndian.putShort(data, 0x44 + offset, (short)field_28_cPgFtnEdn);;
- LittleEndian.putInt(data, 0x46 + offset, field_29_cParasFtnEdn);;
- LittleEndian.putInt(data, 0x4a + offset, field_30_cLinesFtnEdn);;
- LittleEndian.putInt(data, 0x4e + offset, field_31_lKeyProtDoc);;
- LittleEndian.putShort(data, 0x52 + offset, (short)field_32_view);;
- LittleEndian.putInt(data, 0x54 + offset, field_33_docinfo4);;
- LittleEndian.putShort(data, 0x58 + offset, (short)field_34_adt);;
+ data[ 0x0 + offset] = field_1_formatFlags;
+ data[ 0x1 + offset] = field_2_unused2;
+ LittleEndian.putShort(data, 0x2 + offset, field_3_footnoteInfo);
+ data[ 0x4 + offset] = field_4_fOutlineDirtySave;
+ data[ 0x5 + offset] = field_5_docinfo;
+ data[ 0x6 + offset] = field_6_docinfo1;
+ data[ 0x7 + offset] = field_7_docinfo2;
+ LittleEndian.putShort(data, 0x8 + offset, field_8_docinfo3);
+ LittleEndian.putShort(data, 0xa + offset, (short)field_9_dxaTab);
+ LittleEndian.putShort(data, 0xc + offset, (short)field_10_wSpare);
+ LittleEndian.putShort(data, 0xe + offset, (short)field_11_dxaHotz);
+ LittleEndian.putShort(data, 0x10 + offset, (short)field_12_cConsexHypLim);
+ LittleEndian.putShort(data, 0x12 + offset, (short)field_13_wSpare2);
+ LittleEndian.putInt(data, 0x14 + offset, field_14_dttmCreated);
+ LittleEndian.putInt(data, 0x18 + offset, field_15_dttmRevised);
+ LittleEndian.putInt(data, 0x1c + offset, field_16_dttmLastPrint);
+ LittleEndian.putShort(data, 0x20 + offset, (short)field_17_nRevision);
+ LittleEndian.putInt(data, 0x22 + offset, field_18_tmEdited);
+ LittleEndian.putInt(data, 0x26 + offset, field_19_cWords);
+ LittleEndian.putInt(data, 0x2a + offset, field_20_cCh);
+ LittleEndian.putShort(data, 0x2e + offset, (short)field_21_cPg);
+ LittleEndian.putInt(data, 0x30 + offset, field_22_cParas);
+ LittleEndian.putShort(data, 0x34 + offset, field_23_Edn);
+ LittleEndian.putShort(data, 0x36 + offset, field_24_Edn1);
+ LittleEndian.putInt(data, 0x38 + offset, field_25_cLines);
+ LittleEndian.putInt(data, 0x3c + offset, field_26_cWordsFtnEnd);
+ LittleEndian.putInt(data, 0x40 + offset, field_27_cChFtnEdn);
+ LittleEndian.putShort(data, 0x44 + offset, field_28_cPgFtnEdn);
+ LittleEndian.putInt(data, 0x46 + offset, field_29_cParasFtnEdn);
+ LittleEndian.putInt(data, 0x4a + offset, field_30_cLinesFtnEdn);
+ LittleEndian.putInt(data, 0x4e + offset, field_31_lKeyProtDoc);
+ LittleEndian.putShort(data, 0x52 + offset, field_32_view);
+ LittleEndian.putInt(data, 0x54 + offset, field_33_docinfo4);
+ LittleEndian.putShort(data, 0x58 + offset, field_34_adt);
;
;
- LittleEndian.putShort(data, 0x19a + offset, (short)field_37_docinfo5);;
- LittleEndian.putShort(data, 0x19c + offset, (short)field_38_docinfo6);;
+ LittleEndian.putShort(data, 0x19a + offset, field_37_docinfo5);
+ LittleEndian.putShort(data, 0x19c + offset, field_38_docinfo6);
;
- LittleEndian.putInt(data, 0x1aa + offset, field_40_cChWS);;
- LittleEndian.putInt(data, 0x1ae + offset, field_41_cChWSFtnEdn);;
- LittleEndian.putInt(data, 0x1b2 + offset, field_42_grfDocEvents);;
- LittleEndian.putInt(data, 0x1b6 + offset, field_43_virusinfo);;
+ LittleEndian.putInt(data, 0x1aa + offset, field_40_cChWS);
+ LittleEndian.putInt(data, 0x1ae + offset, field_41_cChWSFtnEdn);
+ LittleEndian.putInt(data, 0x1b2 + offset, field_42_grfDocEvents);
+ LittleEndian.putInt(data, 0x1b6 + offset, field_43_virusinfo);
;
- LittleEndian.putInt(data, 0x1d8 + offset, field_45_reserved1);;
- LittleEndian.putInt(data, 0x1dc + offset, field_46_reserved2);;
- LittleEndian.putInt(data, 0x1e0 + offset, field_47_cDBC);;
- LittleEndian.putInt(data, 0x1e4 + offset, field_48_cDBCFtnEdn);;
- LittleEndian.putInt(data, 0x1e8 + offset, field_49_reserved);;
- LittleEndian.putShort(data, 0x1ec + offset, (short)field_50_nfcFtnRef);;
- LittleEndian.putShort(data, 0x1ee + offset, (short)field_51_nfcEdnRef);;
- LittleEndian.putShort(data, 0x1f0 + offset, (short)field_52_hpsZoonFontPag);;
- LittleEndian.putShort(data, 0x1f2 + offset, (short)field_53_dywDispPag);;
-
+ LittleEndian.putInt(data, 0x1d8 + offset, field_45_reserved1);
+ LittleEndian.putInt(data, 0x1dc + offset, field_46_reserved2);
+ LittleEndian.putInt(data, 0x1e0 + offset, field_47_cDBC);
+ LittleEndian.putInt(data, 0x1e4 + offset, field_48_cDBCFtnEdn);
+ LittleEndian.putInt(data, 0x1e8 + offset, field_49_reserved);
+ LittleEndian.putShort(data, 0x1ec + offset, field_50_nfcFtnRef);
+ LittleEndian.putShort(data, 0x1ee + offset, field_51_nfcEdnRef);
+ LittleEndian.putShort(data, 0x1f0 + offset, field_52_hpsZoonFontPag);
+ LittleEndian.putShort(data, 0x1f2 + offset, field_53_dywDispPag);
}
public String toString()
@@ -311,8 +309,7 @@ public abstract class DOPAbstractType
buffer.append("[DOP]\n");
buffer.append(" .formatFlags = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getFormatFlags()));
+ buffer.append(HexDump.byteToHex(getFormatFlags()));
buffer.append(" (").append(getFormatFlags()).append(" )\n");
buffer.append(" .fFacingPages = ").append(isFFacingPages()).append('\n');
buffer.append(" .fWidowControl = ").append(isFWidowControl()).append('\n');
@@ -322,25 +319,21 @@ public abstract class DOPAbstractType
buffer.append(" .unused1 = ").append(isUnused1()).append('\n');
buffer.append(" .unused2 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getUnused2()));
+ buffer.append(HexDump.byteToHex(getUnused2()));
buffer.append(" (").append(getUnused2()).append(" )\n");
buffer.append(" .footnoteInfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getFootnoteInfo()));
+ buffer.append(HexDump.shortToHex(getFootnoteInfo()));
buffer.append(" (").append(getFootnoteInfo()).append(" )\n");
buffer.append(" .rncFtn = ").append(getRncFtn()).append('\n');
buffer.append(" .nFtn = ").append(getNFtn()).append('\n');
buffer.append(" .fOutlineDirtySave = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getFOutlineDirtySave()));
+ buffer.append(HexDump.byteToHex(getFOutlineDirtySave()));
buffer.append(" (").append(getFOutlineDirtySave()).append(" )\n");
buffer.append(" .docinfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getDocinfo()));
+ buffer.append(HexDump.byteToHex(getDocinfo()));
buffer.append(" (").append(getDocinfo()).append(" )\n");
buffer.append(" .fOnlyMacPics = ").append(isFOnlyMacPics()).append('\n');
buffer.append(" .fOnlyWinPics = ").append(isFOnlyWinPics()).append('\n');
@@ -352,8 +345,7 @@ public abstract class DOPAbstractType
buffer.append(" .fRevMarking = ").append(isFRevMarking()).append('\n');
buffer.append(" .docinfo1 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getDocinfo1()));
+ buffer.append(HexDump.byteToHex(getDocinfo1()));
buffer.append(" (").append(getDocinfo1()).append(" )\n");
buffer.append(" .fBackup = ").append(isFBackup()).append('\n');
buffer.append(" .fExactCWords = ").append(isFExactCWords()).append('\n');
@@ -365,8 +357,7 @@ public abstract class DOPAbstractType
buffer.append(" .fDfltTrueType = ").append(isFDfltTrueType()).append('\n');
buffer.append(" .docinfo2 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte)getDocinfo2()));
+ buffer.append(HexDump.byteToHex(getDocinfo2()));
buffer.append(" (").append(getDocinfo2()).append(" )\n");
buffer.append(" .fPagSupressTopSpacing = ").append(isFPagSupressTopSpacing()).append('\n');
buffer.append(" .fProtEnabled = ").append(isFProtEnabled()).append('\n');
@@ -378,8 +369,7 @@ public abstract class DOPAbstractType
buffer.append(" .fEmbedFonts = ").append(isFEmbedFonts()).append('\n');
buffer.append(" .docinfo3 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getDocinfo3()));
+ buffer.append(HexDump.shortToHex(getDocinfo3()));
buffer.append(" (").append(getDocinfo3()).append(" )\n");
buffer.append(" .oldfNoTabForInd = ").append(isOldfNoTabForInd()).append('\n');
buffer.append(" .oldfNoSpaceRaiseLower = ").append(isOldfNoSpaceRaiseLower()).append('\n');
@@ -396,85 +386,69 @@ public abstract class DOPAbstractType
buffer.append(" .unused5 = ").append(getUnused5()).append('\n');
buffer.append(" .dxaTab = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDxaTab()));
+ buffer.append(HexDump.intToHex(getDxaTab()));
buffer.append(" (").append(getDxaTab()).append(" )\n");
buffer.append(" .wSpare = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWSpare()));
+ buffer.append(HexDump.intToHex(getWSpare()));
buffer.append(" (").append(getWSpare()).append(" )\n");
buffer.append(" .dxaHotz = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDxaHotz()));
+ buffer.append(HexDump.intToHex(getDxaHotz()));
buffer.append(" (").append(getDxaHotz()).append(" )\n");
buffer.append(" .cConsexHypLim = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCConsexHypLim()));
+ buffer.append(HexDump.intToHex(getCConsexHypLim()));
buffer.append(" (").append(getCConsexHypLim()).append(" )\n");
buffer.append(" .wSpare2 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWSpare2()));
+ buffer.append(HexDump.intToHex(getWSpare2()));
buffer.append(" (").append(getWSpare2()).append(" )\n");
buffer.append(" .dttmCreated = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDttmCreated()));
+ buffer.append(HexDump.intToHex(getDttmCreated()));
buffer.append(" (").append(getDttmCreated()).append(" )\n");
buffer.append(" .dttmRevised = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDttmRevised()));
+ buffer.append(HexDump.intToHex(getDttmRevised()));
buffer.append(" (").append(getDttmRevised()).append(" )\n");
buffer.append(" .dttmLastPrint = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDttmLastPrint()));
+ buffer.append(HexDump.intToHex(getDttmLastPrint()));
buffer.append(" (").append(getDttmLastPrint()).append(" )\n");
buffer.append(" .nRevision = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getNRevision()));
+ buffer.append(HexDump.intToHex(getNRevision()));
buffer.append(" (").append(getNRevision()).append(" )\n");
buffer.append(" .tmEdited = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getTmEdited()));
+ buffer.append(HexDump.intToHex(getTmEdited()));
buffer.append(" (").append(getTmEdited()).append(" )\n");
buffer.append(" .cWords = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCWords()));
+ buffer.append(HexDump.intToHex(getCWords()));
buffer.append(" (").append(getCWords()).append(" )\n");
buffer.append(" .cCh = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCCh()));
+ buffer.append(HexDump.intToHex(getCCh()));
buffer.append(" (").append(getCCh()).append(" )\n");
buffer.append(" .cPg = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCPg()));
+ buffer.append(HexDump.intToHex(getCPg()));
buffer.append(" (").append(getCPg()).append(" )\n");
buffer.append(" .cParas = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCParas()));
+ buffer.append(HexDump.intToHex(getCParas()));
buffer.append(" (").append(getCParas()).append(" )\n");
buffer.append(" .Edn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getEdn()));
+ buffer.append(HexDump.shortToHex(getEdn()));
buffer.append(" (").append(getEdn()).append(" )\n");
buffer.append(" .rncEdn = ").append(getRncEdn()).append('\n');
buffer.append(" .nEdn = ").append(getNEdn()).append('\n');
buffer.append(" .Edn1 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getEdn1()));
+ buffer.append(HexDump.shortToHex(getEdn1()));
buffer.append(" (").append(getEdn1()).append(" )\n");
buffer.append(" .epc = ").append(getEpc()).append('\n');
buffer.append(" .nfcFtnRef1 = ").append(getNfcFtnRef1()).append('\n');
@@ -485,43 +459,35 @@ public abstract class DOPAbstractType
buffer.append(" .fWCFtnEdn = ").append(isFWCFtnEdn()).append('\n');
buffer.append(" .cLines = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCLines()));
+ buffer.append(HexDump.intToHex(getCLines()));
buffer.append(" (").append(getCLines()).append(" )\n");
buffer.append(" .cWordsFtnEnd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCWordsFtnEnd()));
+ buffer.append(HexDump.intToHex(getCWordsFtnEnd()));
buffer.append(" (").append(getCWordsFtnEnd()).append(" )\n");
buffer.append(" .cChFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCChFtnEdn()));
+ buffer.append(HexDump.intToHex(getCChFtnEdn()));
buffer.append(" (").append(getCChFtnEdn()).append(" )\n");
buffer.append(" .cPgFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getCPgFtnEdn()));
+ buffer.append(HexDump.shortToHex(getCPgFtnEdn()));
buffer.append(" (").append(getCPgFtnEdn()).append(" )\n");
buffer.append(" .cParasFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCParasFtnEdn()));
+ buffer.append(HexDump.intToHex(getCParasFtnEdn()));
buffer.append(" (").append(getCParasFtnEdn()).append(" )\n");
buffer.append(" .cLinesFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCLinesFtnEdn()));
+ buffer.append(HexDump.intToHex(getCLinesFtnEdn()));
buffer.append(" (").append(getCLinesFtnEdn()).append(" )\n");
buffer.append(" .lKeyProtDoc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLKeyProtDoc()));
+ buffer.append(HexDump.intToHex(getLKeyProtDoc()));
buffer.append(" (").append(getLKeyProtDoc()).append(" )\n");
buffer.append(" .view = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getView()));
+ buffer.append(HexDump.shortToHex(getView()));
buffer.append(" (").append(getView()).append(" )\n");
buffer.append(" .wvkSaved = ").append(getWvkSaved()).append('\n');
buffer.append(" .wScaleSaved = ").append(getWScaleSaved()).append('\n');
@@ -530,8 +496,7 @@ public abstract class DOPAbstractType
buffer.append(" .iGutterPos = ").append(isIGutterPos()).append('\n');
buffer.append(" .docinfo4 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDocinfo4()));
+ buffer.append(HexDump.intToHex(getDocinfo4()));
buffer.append(" (").append(getDocinfo4()).append(" )\n");
buffer.append(" .fNoTabForInd = ").append(isFNoTabForInd()).append('\n');
buffer.append(" .fNoSpaceRaiseLower = ").append(isFNoSpaceRaiseLower()).append('\n');
@@ -552,23 +517,19 @@ public abstract class DOPAbstractType
buffer.append(" .fMWSmallCaps = ").append(isFMWSmallCaps()).append('\n');
buffer.append(" .adt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getAdt()));
+ buffer.append(HexDump.shortToHex(getAdt()));
buffer.append(" (").append(getAdt()).append(" )\n");
buffer.append(" .doptypography = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte[])getDoptypography()));
+ buffer.append(HexDump.toHex(getDoptypography()));
buffer.append(" (").append(getDoptypography()).append(" )\n");
buffer.append(" .dogrid = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte[])getDogrid()));
+ buffer.append(HexDump.toHex(getDogrid()));
buffer.append(" (").append(getDogrid()).append(" )\n");
buffer.append(" .docinfo5 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getDocinfo5()));
+ buffer.append(HexDump.shortToHex(getDocinfo5()));
buffer.append(" (").append(getDocinfo5()).append(" )\n");
buffer.append(" .lvl = ").append(getLvl()).append('\n');
buffer.append(" .fGramAllDone = ").append(isFGramAllDone()).append('\n');
@@ -583,88 +544,72 @@ public abstract class DOPAbstractType
buffer.append(" .fMinFontSizePag = ").append(isFMinFontSizePag()).append('\n');
buffer.append(" .docinfo6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getDocinfo6()));
+ buffer.append(HexDump.shortToHex(getDocinfo6()));
buffer.append(" (").append(getDocinfo6()).append(" )\n");
buffer.append(" .fHaveVersions = ").append(isFHaveVersions()).append('\n');
buffer.append(" .fAutoVersions = ").append(isFAutoVersions()).append('\n');
buffer.append(" .asumyi = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte[])getAsumyi()));
+ buffer.append(HexDump.toHex(getAsumyi()));
buffer.append(" (").append(getAsumyi()).append(" )\n");
buffer.append(" .cChWS = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCChWS()));
+ buffer.append(HexDump.intToHex(getCChWS()));
buffer.append(" (").append(getCChWS()).append(" )\n");
buffer.append(" .cChWSFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCChWSFtnEdn()));
+ buffer.append(HexDump.intToHex(getCChWSFtnEdn()));
buffer.append(" (").append(getCChWSFtnEdn()).append(" )\n");
buffer.append(" .grfDocEvents = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getGrfDocEvents()));
+ buffer.append(HexDump.intToHex(getGrfDocEvents()));
buffer.append(" (").append(getGrfDocEvents()).append(" )\n");
buffer.append(" .virusinfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getVirusinfo()));
+ buffer.append(HexDump.intToHex(getVirusinfo()));
buffer.append(" (").append(getVirusinfo()).append(" )\n");
buffer.append(" .fVirusPrompted = ").append(isFVirusPrompted()).append('\n');
buffer.append(" .fVirusLoadSafe = ").append(isFVirusLoadSafe()).append('\n');
buffer.append(" .KeyVirusSession30 = ").append(getKeyVirusSession30()).append('\n');
buffer.append(" .Spare = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((byte[])getSpare()));
+ buffer.append(HexDump.toHex(getSpare()));
buffer.append(" (").append(getSpare()).append(" )\n");
buffer.append(" .reserved1 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getReserved1()));
+ buffer.append(HexDump.intToHex(getReserved1()));
buffer.append(" (").append(getReserved1()).append(" )\n");
buffer.append(" .reserved2 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getReserved2()));
+ buffer.append(HexDump.intToHex(getReserved2()));
buffer.append(" (").append(getReserved2()).append(" )\n");
buffer.append(" .cDBC = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCDBC()));
+ buffer.append(HexDump.intToHex(getCDBC()));
buffer.append(" (").append(getCDBC()).append(" )\n");
buffer.append(" .cDBCFtnEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCDBCFtnEdn()));
+ buffer.append(HexDump.intToHex(getCDBCFtnEdn()));
buffer.append(" (").append(getCDBCFtnEdn()).append(" )\n");
buffer.append(" .reserved = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getReserved()));
+ buffer.append(HexDump.intToHex(getReserved()));
buffer.append(" (").append(getReserved()).append(" )\n");
buffer.append(" .nfcFtnRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getNfcFtnRef()));
+ buffer.append(HexDump.shortToHex(getNfcFtnRef()));
buffer.append(" (").append(getNfcFtnRef()).append(" )\n");
buffer.append(" .nfcEdnRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getNfcEdnRef()));
+ buffer.append(HexDump.shortToHex(getNfcEdnRef()));
buffer.append(" (").append(getNfcEdnRef()).append(" )\n");
buffer.append(" .hpsZoonFontPag = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getHpsZoonFontPag()));
+ buffer.append(HexDump.shortToHex(getHpsZoonFontPag()));
buffer.append(" (").append(getHpsZoonFontPag()).append(" )\n");
buffer.append(" .dywDispPag = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getDywDispPag()));
+ buffer.append(HexDump.shortToHex(getDywDispPag()));
buffer.append(" (").append(getDywDispPag()).append(" )\n");
buffer.append("[/DOP]\n");
@@ -1536,8 +1481,6 @@ public abstract class DOPAbstractType
public void setFFacingPages(boolean value)
{
field_1_formatFlags = (byte)fFacingPages.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1547,7 +1490,6 @@ public abstract class DOPAbstractType
public boolean isFFacingPages()
{
return fFacingPages.isSet(field_1_formatFlags);
-
}
/**
@@ -1557,8 +1499,6 @@ public abstract class DOPAbstractType
public void setFWidowControl(boolean value)
{
field_1_formatFlags = (byte)fWidowControl.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1568,7 +1508,6 @@ public abstract class DOPAbstractType
public boolean isFWidowControl()
{
return fWidowControl.isSet(field_1_formatFlags);
-
}
/**
@@ -1578,8 +1517,6 @@ public abstract class DOPAbstractType
public void setFPMHMainDoc(boolean value)
{
field_1_formatFlags = (byte)fPMHMainDoc.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1589,7 +1526,6 @@ public abstract class DOPAbstractType
public boolean isFPMHMainDoc()
{
return fPMHMainDoc.isSet(field_1_formatFlags);
-
}
/**
@@ -1599,8 +1535,6 @@ public abstract class DOPAbstractType
public void setGrfSupression(byte value)
{
field_1_formatFlags = (byte)grfSupression.setValue(field_1_formatFlags, value);
-
-
}
/**
@@ -1610,7 +1544,6 @@ public abstract class DOPAbstractType
public byte getGrfSupression()
{
return ( byte )grfSupression.getValue(field_1_formatFlags);
-
}
/**
@@ -1620,8 +1553,6 @@ public abstract class DOPAbstractType
public void setFpc(byte value)
{
field_1_formatFlags = (byte)fpc.setValue(field_1_formatFlags, value);
-
-
}
/**
@@ -1631,7 +1562,6 @@ public abstract class DOPAbstractType
public byte getFpc()
{
return ( byte )fpc.getValue(field_1_formatFlags);
-
}
/**
@@ -1641,8 +1571,6 @@ public abstract class DOPAbstractType
public void setUnused1(boolean value)
{
field_1_formatFlags = (byte)unused1.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1652,7 +1580,6 @@ public abstract class DOPAbstractType
public boolean isUnused1()
{
return unused1.isSet(field_1_formatFlags);
-
}
/**
@@ -1662,8 +1589,6 @@ public abstract class DOPAbstractType
public void setRncFtn(byte value)
{
field_3_footnoteInfo = (short)rncFtn.setValue(field_3_footnoteInfo, value);
-
-
}
/**
@@ -1673,7 +1598,6 @@ public abstract class DOPAbstractType
public byte getRncFtn()
{
return ( byte )rncFtn.getValue(field_3_footnoteInfo);
-
}
/**
@@ -1683,8 +1607,6 @@ public abstract class DOPAbstractType
public void setNFtn(short value)
{
field_3_footnoteInfo = (short)nFtn.setValue(field_3_footnoteInfo, value);
-
-
}
/**
@@ -1694,7 +1616,6 @@ public abstract class DOPAbstractType
public short getNFtn()
{
return ( short )nFtn.getValue(field_3_footnoteInfo);
-
}
/**
@@ -1704,8 +1625,6 @@ public abstract class DOPAbstractType
public void setFOnlyMacPics(boolean value)
{
field_5_docinfo = (byte)fOnlyMacPics.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1715,7 +1634,6 @@ public abstract class DOPAbstractType
public boolean isFOnlyMacPics()
{
return fOnlyMacPics.isSet(field_5_docinfo);
-
}
/**
@@ -1725,8 +1643,6 @@ public abstract class DOPAbstractType
public void setFOnlyWinPics(boolean value)
{
field_5_docinfo = (byte)fOnlyWinPics.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1736,7 +1652,6 @@ public abstract class DOPAbstractType
public boolean isFOnlyWinPics()
{
return fOnlyWinPics.isSet(field_5_docinfo);
-
}
/**
@@ -1746,8 +1661,6 @@ public abstract class DOPAbstractType
public void setFLabelDoc(boolean value)
{
field_5_docinfo = (byte)fLabelDoc.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1757,7 +1670,6 @@ public abstract class DOPAbstractType
public boolean isFLabelDoc()
{
return fLabelDoc.isSet(field_5_docinfo);
-
}
/**
@@ -1767,8 +1679,6 @@ public abstract class DOPAbstractType
public void setFHyphCapitals(boolean value)
{
field_5_docinfo = (byte)fHyphCapitals.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1778,7 +1688,6 @@ public abstract class DOPAbstractType
public boolean isFHyphCapitals()
{
return fHyphCapitals.isSet(field_5_docinfo);
-
}
/**
@@ -1788,8 +1697,6 @@ public abstract class DOPAbstractType
public void setFAutoHyphen(boolean value)
{
field_5_docinfo = (byte)fAutoHyphen.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1799,7 +1706,6 @@ public abstract class DOPAbstractType
public boolean isFAutoHyphen()
{
return fAutoHyphen.isSet(field_5_docinfo);
-
}
/**
@@ -1809,8 +1715,6 @@ public abstract class DOPAbstractType
public void setFFormNoFields(boolean value)
{
field_5_docinfo = (byte)fFormNoFields.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1820,7 +1724,6 @@ public abstract class DOPAbstractType
public boolean isFFormNoFields()
{
return fFormNoFields.isSet(field_5_docinfo);
-
}
/**
@@ -1830,8 +1733,6 @@ public abstract class DOPAbstractType
public void setFLinkStyles(boolean value)
{
field_5_docinfo = (byte)fLinkStyles.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1841,7 +1742,6 @@ public abstract class DOPAbstractType
public boolean isFLinkStyles()
{
return fLinkStyles.isSet(field_5_docinfo);
-
}
/**
@@ -1851,8 +1751,6 @@ public abstract class DOPAbstractType
public void setFRevMarking(boolean value)
{
field_5_docinfo = (byte)fRevMarking.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1862,7 +1760,6 @@ public abstract class DOPAbstractType
public boolean isFRevMarking()
{
return fRevMarking.isSet(field_5_docinfo);
-
}
/**
@@ -1872,8 +1769,6 @@ public abstract class DOPAbstractType
public void setFBackup(boolean value)
{
field_6_docinfo1 = (byte)fBackup.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1883,7 +1778,6 @@ public abstract class DOPAbstractType
public boolean isFBackup()
{
return fBackup.isSet(field_6_docinfo1);
-
}
/**
@@ -1893,8 +1787,6 @@ public abstract class DOPAbstractType
public void setFExactCWords(boolean value)
{
field_6_docinfo1 = (byte)fExactCWords.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1904,7 +1796,6 @@ public abstract class DOPAbstractType
public boolean isFExactCWords()
{
return fExactCWords.isSet(field_6_docinfo1);
-
}
/**
@@ -1914,8 +1805,6 @@ public abstract class DOPAbstractType
public void setFPagHidden(boolean value)
{
field_6_docinfo1 = (byte)fPagHidden.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1925,7 +1814,6 @@ public abstract class DOPAbstractType
public boolean isFPagHidden()
{
return fPagHidden.isSet(field_6_docinfo1);
-
}
/**
@@ -1935,8 +1823,6 @@ public abstract class DOPAbstractType
public void setFPagResults(boolean value)
{
field_6_docinfo1 = (byte)fPagResults.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1946,7 +1832,6 @@ public abstract class DOPAbstractType
public boolean isFPagResults()
{
return fPagResults.isSet(field_6_docinfo1);
-
}
/**
@@ -1956,8 +1841,6 @@ public abstract class DOPAbstractType
public void setFLockAtn(boolean value)
{
field_6_docinfo1 = (byte)fLockAtn.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1967,7 +1850,6 @@ public abstract class DOPAbstractType
public boolean isFLockAtn()
{
return fLockAtn.isSet(field_6_docinfo1);
-
}
/**
@@ -1977,8 +1859,6 @@ public abstract class DOPAbstractType
public void setFMirrorMargins(boolean value)
{
field_6_docinfo1 = (byte)fMirrorMargins.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1988,7 +1868,6 @@ public abstract class DOPAbstractType
public boolean isFMirrorMargins()
{
return fMirrorMargins.isSet(field_6_docinfo1);
-
}
/**
@@ -1998,8 +1877,6 @@ public abstract class DOPAbstractType
public void setUnused3(boolean value)
{
field_6_docinfo1 = (byte)unused3.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -2009,7 +1886,6 @@ public abstract class DOPAbstractType
public boolean isUnused3()
{
return unused3.isSet(field_6_docinfo1);
-
}
/**
@@ -2019,8 +1895,6 @@ public abstract class DOPAbstractType
public void setFDfltTrueType(boolean value)
{
field_6_docinfo1 = (byte)fDfltTrueType.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -2030,7 +1904,6 @@ public abstract class DOPAbstractType
public boolean isFDfltTrueType()
{
return fDfltTrueType.isSet(field_6_docinfo1);
-
}
/**
@@ -2040,8 +1913,6 @@ public abstract class DOPAbstractType
public void setFPagSupressTopSpacing(boolean value)
{
field_7_docinfo2 = (byte)fPagSupressTopSpacing.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2051,7 +1922,6 @@ public abstract class DOPAbstractType
public boolean isFPagSupressTopSpacing()
{
return fPagSupressTopSpacing.isSet(field_7_docinfo2);
-
}
/**
@@ -2061,8 +1931,6 @@ public abstract class DOPAbstractType
public void setFProtEnabled(boolean value)
{
field_7_docinfo2 = (byte)fProtEnabled.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2072,7 +1940,6 @@ public abstract class DOPAbstractType
public boolean isFProtEnabled()
{
return fProtEnabled.isSet(field_7_docinfo2);
-
}
/**
@@ -2082,8 +1949,6 @@ public abstract class DOPAbstractType
public void setFDispFormFldSel(boolean value)
{
field_7_docinfo2 = (byte)fDispFormFldSel.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2093,7 +1958,6 @@ public abstract class DOPAbstractType
public boolean isFDispFormFldSel()
{
return fDispFormFldSel.isSet(field_7_docinfo2);
-
}
/**
@@ -2103,8 +1967,6 @@ public abstract class DOPAbstractType
public void setFRMView(boolean value)
{
field_7_docinfo2 = (byte)fRMView.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2114,7 +1976,6 @@ public abstract class DOPAbstractType
public boolean isFRMView()
{
return fRMView.isSet(field_7_docinfo2);
-
}
/**
@@ -2124,8 +1985,6 @@ public abstract class DOPAbstractType
public void setFRMPrint(boolean value)
{
field_7_docinfo2 = (byte)fRMPrint.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2135,7 +1994,6 @@ public abstract class DOPAbstractType
public boolean isFRMPrint()
{
return fRMPrint.isSet(field_7_docinfo2);
-
}
/**
@@ -2145,8 +2003,6 @@ public abstract class DOPAbstractType
public void setUnused4(boolean value)
{
field_7_docinfo2 = (byte)unused4.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2156,7 +2012,6 @@ public abstract class DOPAbstractType
public boolean isUnused4()
{
return unused4.isSet(field_7_docinfo2);
-
}
/**
@@ -2166,8 +2021,6 @@ public abstract class DOPAbstractType
public void setFLockRev(boolean value)
{
field_7_docinfo2 = (byte)fLockRev.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2177,7 +2030,6 @@ public abstract class DOPAbstractType
public boolean isFLockRev()
{
return fLockRev.isSet(field_7_docinfo2);
-
}
/**
@@ -2187,8 +2039,6 @@ public abstract class DOPAbstractType
public void setFEmbedFonts(boolean value)
{
field_7_docinfo2 = (byte)fEmbedFonts.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2198,7 +2048,6 @@ public abstract class DOPAbstractType
public boolean isFEmbedFonts()
{
return fEmbedFonts.isSet(field_7_docinfo2);
-
}
/**
@@ -2208,8 +2057,6 @@ public abstract class DOPAbstractType
public void setOldfNoTabForInd(boolean value)
{
field_8_docinfo3 = (short)oldfNoTabForInd.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2219,7 +2066,6 @@ public abstract class DOPAbstractType
public boolean isOldfNoTabForInd()
{
return oldfNoTabForInd.isSet(field_8_docinfo3);
-
}
/**
@@ -2229,8 +2075,6 @@ public abstract class DOPAbstractType
public void setOldfNoSpaceRaiseLower(boolean value)
{
field_8_docinfo3 = (short)oldfNoSpaceRaiseLower.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2240,7 +2084,6 @@ public abstract class DOPAbstractType
public boolean isOldfNoSpaceRaiseLower()
{
return oldfNoSpaceRaiseLower.isSet(field_8_docinfo3);
-
}
/**
@@ -2250,8 +2093,6 @@ public abstract class DOPAbstractType
public void setOldfSuppressSpbfAfterPageBreak(boolean value)
{
field_8_docinfo3 = (short)oldfSuppressSpbfAfterPageBreak.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2261,7 +2102,6 @@ public abstract class DOPAbstractType
public boolean isOldfSuppressSpbfAfterPageBreak()
{
return oldfSuppressSpbfAfterPageBreak.isSet(field_8_docinfo3);
-
}
/**
@@ -2271,8 +2111,6 @@ public abstract class DOPAbstractType
public void setOldfWrapTrailSpaces(boolean value)
{
field_8_docinfo3 = (short)oldfWrapTrailSpaces.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2282,7 +2120,6 @@ public abstract class DOPAbstractType
public boolean isOldfWrapTrailSpaces()
{
return oldfWrapTrailSpaces.isSet(field_8_docinfo3);
-
}
/**
@@ -2292,8 +2129,6 @@ public abstract class DOPAbstractType
public void setOldfMapPrintTextColor(boolean value)
{
field_8_docinfo3 = (short)oldfMapPrintTextColor.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2303,7 +2138,6 @@ public abstract class DOPAbstractType
public boolean isOldfMapPrintTextColor()
{
return oldfMapPrintTextColor.isSet(field_8_docinfo3);
-
}
/**
@@ -2313,8 +2147,6 @@ public abstract class DOPAbstractType
public void setOldfNoColumnBalance(boolean value)
{
field_8_docinfo3 = (short)oldfNoColumnBalance.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2324,7 +2156,6 @@ public abstract class DOPAbstractType
public boolean isOldfNoColumnBalance()
{
return oldfNoColumnBalance.isSet(field_8_docinfo3);
-
}
/**
@@ -2334,8 +2165,6 @@ public abstract class DOPAbstractType
public void setOldfConvMailMergeEsc(boolean value)
{
field_8_docinfo3 = (short)oldfConvMailMergeEsc.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2345,7 +2174,6 @@ public abstract class DOPAbstractType
public boolean isOldfConvMailMergeEsc()
{
return oldfConvMailMergeEsc.isSet(field_8_docinfo3);
-
}
/**
@@ -2355,8 +2183,6 @@ public abstract class DOPAbstractType
public void setOldfSupressTopSpacing(boolean value)
{
field_8_docinfo3 = (short)oldfSupressTopSpacing.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2366,7 +2192,6 @@ public abstract class DOPAbstractType
public boolean isOldfSupressTopSpacing()
{
return oldfSupressTopSpacing.isSet(field_8_docinfo3);
-
}
/**
@@ -2376,8 +2201,6 @@ public abstract class DOPAbstractType
public void setOldfOrigWordTableRules(boolean value)
{
field_8_docinfo3 = (short)oldfOrigWordTableRules.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2387,7 +2210,6 @@ public abstract class DOPAbstractType
public boolean isOldfOrigWordTableRules()
{
return oldfOrigWordTableRules.isSet(field_8_docinfo3);
-
}
/**
@@ -2397,8 +2219,6 @@ public abstract class DOPAbstractType
public void setOldfTransparentMetafiles(boolean value)
{
field_8_docinfo3 = (short)oldfTransparentMetafiles.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2408,7 +2228,6 @@ public abstract class DOPAbstractType
public boolean isOldfTransparentMetafiles()
{
return oldfTransparentMetafiles.isSet(field_8_docinfo3);
-
}
/**
@@ -2418,8 +2237,6 @@ public abstract class DOPAbstractType
public void setOldfShowBreaksInFrames(boolean value)
{
field_8_docinfo3 = (short)oldfShowBreaksInFrames.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2429,7 +2246,6 @@ public abstract class DOPAbstractType
public boolean isOldfShowBreaksInFrames()
{
return oldfShowBreaksInFrames.isSet(field_8_docinfo3);
-
}
/**
@@ -2439,8 +2255,6 @@ public abstract class DOPAbstractType
public void setOldfSwapBordersFacingPgs(boolean value)
{
field_8_docinfo3 = (short)oldfSwapBordersFacingPgs.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2450,7 +2264,6 @@ public abstract class DOPAbstractType
public boolean isOldfSwapBordersFacingPgs()
{
return oldfSwapBordersFacingPgs.isSet(field_8_docinfo3);
-
}
/**
@@ -2460,8 +2273,6 @@ public abstract class DOPAbstractType
public void setUnused5(byte value)
{
field_8_docinfo3 = (short)unused5.setValue(field_8_docinfo3, value);
-
-
}
/**
@@ -2471,7 +2282,6 @@ public abstract class DOPAbstractType
public byte getUnused5()
{
return ( byte )unused5.getValue(field_8_docinfo3);
-
}
/**
@@ -2481,8 +2291,6 @@ public abstract class DOPAbstractType
public void setRncEdn(byte value)
{
field_23_Edn = (short)rncEdn.setValue(field_23_Edn, value);
-
-
}
/**
@@ -2492,7 +2300,6 @@ public abstract class DOPAbstractType
public byte getRncEdn()
{
return ( byte )rncEdn.getValue(field_23_Edn);
-
}
/**
@@ -2502,8 +2309,6 @@ public abstract class DOPAbstractType
public void setNEdn(short value)
{
field_23_Edn = (short)nEdn.setValue(field_23_Edn, value);
-
-
}
/**
@@ -2513,7 +2318,6 @@ public abstract class DOPAbstractType
public short getNEdn()
{
return ( short )nEdn.getValue(field_23_Edn);
-
}
/**
@@ -2523,8 +2327,6 @@ public abstract class DOPAbstractType
public void setEpc(byte value)
{
field_24_Edn1 = (short)epc.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2534,7 +2336,6 @@ public abstract class DOPAbstractType
public byte getEpc()
{
return ( byte )epc.getValue(field_24_Edn1);
-
}
/**
@@ -2544,8 +2345,6 @@ public abstract class DOPAbstractType
public void setNfcFtnRef1(byte value)
{
field_24_Edn1 = (short)nfcFtnRef1.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2555,7 +2354,6 @@ public abstract class DOPAbstractType
public byte getNfcFtnRef1()
{
return ( byte )nfcFtnRef1.getValue(field_24_Edn1);
-
}
/**
@@ -2565,8 +2363,6 @@ public abstract class DOPAbstractType
public void setNfcEdnRef1(byte value)
{
field_24_Edn1 = (short)nfcEdnRef1.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2576,7 +2372,6 @@ public abstract class DOPAbstractType
public byte getNfcEdnRef1()
{
return ( byte )nfcEdnRef1.getValue(field_24_Edn1);
-
}
/**
@@ -2586,8 +2381,6 @@ public abstract class DOPAbstractType
public void setFPrintFormData(boolean value)
{
field_24_Edn1 = (short)fPrintFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2597,7 +2390,6 @@ public abstract class DOPAbstractType
public boolean isFPrintFormData()
{
return fPrintFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2607,8 +2399,6 @@ public abstract class DOPAbstractType
public void setFSaveFormData(boolean value)
{
field_24_Edn1 = (short)fSaveFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2618,7 +2408,6 @@ public abstract class DOPAbstractType
public boolean isFSaveFormData()
{
return fSaveFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2628,8 +2417,6 @@ public abstract class DOPAbstractType
public void setFShadeFormData(boolean value)
{
field_24_Edn1 = (short)fShadeFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2639,7 +2426,6 @@ public abstract class DOPAbstractType
public boolean isFShadeFormData()
{
return fShadeFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2649,8 +2435,6 @@ public abstract class DOPAbstractType
public void setFWCFtnEdn(boolean value)
{
field_24_Edn1 = (short)fWCFtnEdn.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2660,7 +2444,6 @@ public abstract class DOPAbstractType
public boolean isFWCFtnEdn()
{
return fWCFtnEdn.isSet(field_24_Edn1);
-
}
/**
@@ -2670,8 +2453,6 @@ public abstract class DOPAbstractType
public void setWvkSaved(byte value)
{
field_32_view = (short)wvkSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2681,7 +2462,6 @@ public abstract class DOPAbstractType
public byte getWvkSaved()
{
return ( byte )wvkSaved.getValue(field_32_view);
-
}
/**
@@ -2691,8 +2471,6 @@ public abstract class DOPAbstractType
public void setWScaleSaved(short value)
{
field_32_view = (short)wScaleSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2702,7 +2480,6 @@ public abstract class DOPAbstractType
public short getWScaleSaved()
{
return ( short )wScaleSaved.getValue(field_32_view);
-
}
/**
@@ -2712,8 +2489,6 @@ public abstract class DOPAbstractType
public void setZkSaved(byte value)
{
field_32_view = (short)zkSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2723,7 +2498,6 @@ public abstract class DOPAbstractType
public byte getZkSaved()
{
return ( byte )zkSaved.getValue(field_32_view);
-
}
/**
@@ -2733,8 +2507,6 @@ public abstract class DOPAbstractType
public void setFRotateFontW6(boolean value)
{
field_32_view = (short)fRotateFontW6.setBoolean(field_32_view, value);
-
-
}
/**
@@ -2744,7 +2516,6 @@ public abstract class DOPAbstractType
public boolean isFRotateFontW6()
{
return fRotateFontW6.isSet(field_32_view);
-
}
/**
@@ -2754,8 +2525,6 @@ public abstract class DOPAbstractType
public void setIGutterPos(boolean value)
{
field_32_view = (short)iGutterPos.setBoolean(field_32_view, value);
-
-
}
/**
@@ -2765,7 +2534,6 @@ public abstract class DOPAbstractType
public boolean isIGutterPos()
{
return iGutterPos.isSet(field_32_view);
-
}
/**
@@ -2774,9 +2542,7 @@ public abstract class DOPAbstractType
*/
public void setFNoTabForInd(boolean value)
{
- field_33_docinfo4 = (int)fNoTabForInd.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoTabForInd.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2786,7 +2552,6 @@ public abstract class DOPAbstractType
public boolean isFNoTabForInd()
{
return fNoTabForInd.isSet(field_33_docinfo4);
-
}
/**
@@ -2795,9 +2560,7 @@ public abstract class DOPAbstractType
*/
public void setFNoSpaceRaiseLower(boolean value)
{
- field_33_docinfo4 = (int)fNoSpaceRaiseLower.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoSpaceRaiseLower.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2807,7 +2570,6 @@ public abstract class DOPAbstractType
public boolean isFNoSpaceRaiseLower()
{
return fNoSpaceRaiseLower.isSet(field_33_docinfo4);
-
}
/**
@@ -2816,9 +2578,7 @@ public abstract class DOPAbstractType
*/
public void setFSupressSpdfAfterPageBreak(boolean value)
{
- field_33_docinfo4 = (int)fSupressSpdfAfterPageBreak.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSupressSpdfAfterPageBreak.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2828,7 +2588,6 @@ public abstract class DOPAbstractType
public boolean isFSupressSpdfAfterPageBreak()
{
return fSupressSpdfAfterPageBreak.isSet(field_33_docinfo4);
-
}
/**
@@ -2837,9 +2596,7 @@ public abstract class DOPAbstractType
*/
public void setFWrapTrailSpaces(boolean value)
{
- field_33_docinfo4 = (int)fWrapTrailSpaces.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fWrapTrailSpaces.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2849,7 +2606,6 @@ public abstract class DOPAbstractType
public boolean isFWrapTrailSpaces()
{
return fWrapTrailSpaces.isSet(field_33_docinfo4);
-
}
/**
@@ -2858,9 +2614,7 @@ public abstract class DOPAbstractType
*/
public void setFMapPrintTextColor(boolean value)
{
- field_33_docinfo4 = (int)fMapPrintTextColor.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fMapPrintTextColor.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2870,7 +2624,6 @@ public abstract class DOPAbstractType
public boolean isFMapPrintTextColor()
{
return fMapPrintTextColor.isSet(field_33_docinfo4);
-
}
/**
@@ -2879,9 +2632,7 @@ public abstract class DOPAbstractType
*/
public void setFNoColumnBalance(boolean value)
{
- field_33_docinfo4 = (int)fNoColumnBalance.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoColumnBalance.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2891,7 +2642,6 @@ public abstract class DOPAbstractType
public boolean isFNoColumnBalance()
{
return fNoColumnBalance.isSet(field_33_docinfo4);
-
}
/**
@@ -2900,9 +2650,7 @@ public abstract class DOPAbstractType
*/
public void setFConvMailMergeEsc(boolean value)
{
- field_33_docinfo4 = (int)fConvMailMergeEsc.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fConvMailMergeEsc.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2912,7 +2660,6 @@ public abstract class DOPAbstractType
public boolean isFConvMailMergeEsc()
{
return fConvMailMergeEsc.isSet(field_33_docinfo4);
-
}
/**
@@ -2921,9 +2668,7 @@ public abstract class DOPAbstractType
*/
public void setFSupressTopSpacing(boolean value)
{
- field_33_docinfo4 = (int)fSupressTopSpacing.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSupressTopSpacing.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2933,7 +2678,6 @@ public abstract class DOPAbstractType
public boolean isFSupressTopSpacing()
{
return fSupressTopSpacing.isSet(field_33_docinfo4);
-
}
/**
@@ -2942,9 +2686,7 @@ public abstract class DOPAbstractType
*/
public void setFOrigWordTableRules(boolean value)
{
- field_33_docinfo4 = (int)fOrigWordTableRules.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fOrigWordTableRules.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2954,7 +2696,6 @@ public abstract class DOPAbstractType
public boolean isFOrigWordTableRules()
{
return fOrigWordTableRules.isSet(field_33_docinfo4);
-
}
/**
@@ -2963,9 +2704,7 @@ public abstract class DOPAbstractType
*/
public void setFTransparentMetafiles(boolean value)
{
- field_33_docinfo4 = (int)fTransparentMetafiles.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fTransparentMetafiles.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2975,7 +2714,6 @@ public abstract class DOPAbstractType
public boolean isFTransparentMetafiles()
{
return fTransparentMetafiles.isSet(field_33_docinfo4);
-
}
/**
@@ -2984,9 +2722,7 @@ public abstract class DOPAbstractType
*/
public void setFShowBreaksInFrames(boolean value)
{
- field_33_docinfo4 = (int)fShowBreaksInFrames.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fShowBreaksInFrames.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2996,7 +2732,6 @@ public abstract class DOPAbstractType
public boolean isFShowBreaksInFrames()
{
return fShowBreaksInFrames.isSet(field_33_docinfo4);
-
}
/**
@@ -3005,9 +2740,7 @@ public abstract class DOPAbstractType
*/
public void setFSwapBordersFacingPgs(boolean value)
{
- field_33_docinfo4 = (int)fSwapBordersFacingPgs.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSwapBordersFacingPgs.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3017,7 +2750,6 @@ public abstract class DOPAbstractType
public boolean isFSwapBordersFacingPgs()
{
return fSwapBordersFacingPgs.isSet(field_33_docinfo4);
-
}
/**
@@ -3026,9 +2758,7 @@ public abstract class DOPAbstractType
*/
public void setFSuppressTopSPacingMac5(boolean value)
{
- field_33_docinfo4 = (int)fSuppressTopSPacingMac5.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSuppressTopSPacingMac5.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3038,7 +2768,6 @@ public abstract class DOPAbstractType
public boolean isFSuppressTopSPacingMac5()
{
return fSuppressTopSPacingMac5.isSet(field_33_docinfo4);
-
}
/**
@@ -3047,9 +2776,7 @@ public abstract class DOPAbstractType
*/
public void setFTruncDxaExpand(boolean value)
{
- field_33_docinfo4 = (int)fTruncDxaExpand.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fTruncDxaExpand.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3059,7 +2786,6 @@ public abstract class DOPAbstractType
public boolean isFTruncDxaExpand()
{
return fTruncDxaExpand.isSet(field_33_docinfo4);
-
}
/**
@@ -3068,9 +2794,7 @@ public abstract class DOPAbstractType
*/
public void setFPrintBodyBeforeHdr(boolean value)
{
- field_33_docinfo4 = (int)fPrintBodyBeforeHdr.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fPrintBodyBeforeHdr.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3080,7 +2804,6 @@ public abstract class DOPAbstractType
public boolean isFPrintBodyBeforeHdr()
{
return fPrintBodyBeforeHdr.isSet(field_33_docinfo4);
-
}
/**
@@ -3089,9 +2812,7 @@ public abstract class DOPAbstractType
*/
public void setFNoLeading(boolean value)
{
- field_33_docinfo4 = (int)fNoLeading.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoLeading.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3101,7 +2822,6 @@ public abstract class DOPAbstractType
public boolean isFNoLeading()
{
return fNoLeading.isSet(field_33_docinfo4);
-
}
/**
@@ -3110,9 +2830,7 @@ public abstract class DOPAbstractType
*/
public void setFMWSmallCaps(boolean value)
{
- field_33_docinfo4 = (int)fMWSmallCaps.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fMWSmallCaps.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3122,7 +2840,6 @@ public abstract class DOPAbstractType
public boolean isFMWSmallCaps()
{
return fMWSmallCaps.isSet(field_33_docinfo4);
-
}
/**
@@ -3132,8 +2849,6 @@ public abstract class DOPAbstractType
public void setLvl(byte value)
{
field_37_docinfo5 = (short)lvl.setValue(field_37_docinfo5, value);
-
-
}
/**
@@ -3143,7 +2858,6 @@ public abstract class DOPAbstractType
public byte getLvl()
{
return ( byte )lvl.getValue(field_37_docinfo5);
-
}
/**
@@ -3153,8 +2867,6 @@ public abstract class DOPAbstractType
public void setFGramAllDone(boolean value)
{
field_37_docinfo5 = (short)fGramAllDone.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3164,7 +2876,6 @@ public abstract class DOPAbstractType
public boolean isFGramAllDone()
{
return fGramAllDone.isSet(field_37_docinfo5);
-
}
/**
@@ -3174,8 +2885,6 @@ public abstract class DOPAbstractType
public void setFGramAllClean(boolean value)
{
field_37_docinfo5 = (short)fGramAllClean.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3185,7 +2894,6 @@ public abstract class DOPAbstractType
public boolean isFGramAllClean()
{
return fGramAllClean.isSet(field_37_docinfo5);
-
}
/**
@@ -3195,8 +2903,6 @@ public abstract class DOPAbstractType
public void setFSubsetFonts(boolean value)
{
field_37_docinfo5 = (short)fSubsetFonts.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3206,7 +2912,6 @@ public abstract class DOPAbstractType
public boolean isFSubsetFonts()
{
return fSubsetFonts.isSet(field_37_docinfo5);
-
}
/**
@@ -3216,8 +2921,6 @@ public abstract class DOPAbstractType
public void setFHideLastVersion(boolean value)
{
field_37_docinfo5 = (short)fHideLastVersion.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3227,7 +2930,6 @@ public abstract class DOPAbstractType
public boolean isFHideLastVersion()
{
return fHideLastVersion.isSet(field_37_docinfo5);
-
}
/**
@@ -3237,8 +2939,6 @@ public abstract class DOPAbstractType
public void setFHtmlDoc(boolean value)
{
field_37_docinfo5 = (short)fHtmlDoc.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3248,7 +2948,6 @@ public abstract class DOPAbstractType
public boolean isFHtmlDoc()
{
return fHtmlDoc.isSet(field_37_docinfo5);
-
}
/**
@@ -3258,8 +2957,6 @@ public abstract class DOPAbstractType
public void setFSnapBorder(boolean value)
{
field_37_docinfo5 = (short)fSnapBorder.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3269,7 +2966,6 @@ public abstract class DOPAbstractType
public boolean isFSnapBorder()
{
return fSnapBorder.isSet(field_37_docinfo5);
-
}
/**
@@ -3279,8 +2975,6 @@ public abstract class DOPAbstractType
public void setFIncludeHeader(boolean value)
{
field_37_docinfo5 = (short)fIncludeHeader.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3290,7 +2984,6 @@ public abstract class DOPAbstractType
public boolean isFIncludeHeader()
{
return fIncludeHeader.isSet(field_37_docinfo5);
-
}
/**
@@ -3300,8 +2993,6 @@ public abstract class DOPAbstractType
public void setFIncludeFooter(boolean value)
{
field_37_docinfo5 = (short)fIncludeFooter.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3311,7 +3002,6 @@ public abstract class DOPAbstractType
public boolean isFIncludeFooter()
{
return fIncludeFooter.isSet(field_37_docinfo5);
-
}
/**
@@ -3321,8 +3011,6 @@ public abstract class DOPAbstractType
public void setFForcePageSizePag(boolean value)
{
field_37_docinfo5 = (short)fForcePageSizePag.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3332,7 +3020,6 @@ public abstract class DOPAbstractType
public boolean isFForcePageSizePag()
{
return fForcePageSizePag.isSet(field_37_docinfo5);
-
}
/**
@@ -3342,8 +3029,6 @@ public abstract class DOPAbstractType
public void setFMinFontSizePag(boolean value)
{
field_37_docinfo5 = (short)fMinFontSizePag.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3353,7 +3038,6 @@ public abstract class DOPAbstractType
public boolean isFMinFontSizePag()
{
return fMinFontSizePag.isSet(field_37_docinfo5);
-
}
/**
@@ -3363,8 +3047,6 @@ public abstract class DOPAbstractType
public void setFHaveVersions(boolean value)
{
field_38_docinfo6 = (short)fHaveVersions.setBoolean(field_38_docinfo6, value);
-
-
}
/**
@@ -3374,7 +3056,6 @@ public abstract class DOPAbstractType
public boolean isFHaveVersions()
{
return fHaveVersions.isSet(field_38_docinfo6);
-
}
/**
@@ -3384,8 +3065,6 @@ public abstract class DOPAbstractType
public void setFAutoVersions(boolean value)
{
field_38_docinfo6 = (short)fAutoVersions.setBoolean(field_38_docinfo6, value);
-
-
}
/**
@@ -3395,7 +3074,6 @@ public abstract class DOPAbstractType
public boolean isFAutoVersions()
{
return fAutoVersions.isSet(field_38_docinfo6);
-
}
/**
@@ -3404,9 +3082,7 @@ public abstract class DOPAbstractType
*/
public void setFVirusPrompted(boolean value)
{
- field_43_virusinfo = (int)fVirusPrompted.setBoolean(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = fVirusPrompted.setBoolean(field_43_virusinfo, value);
}
/**
@@ -3416,7 +3092,6 @@ public abstract class DOPAbstractType
public boolean isFVirusPrompted()
{
return fVirusPrompted.isSet(field_43_virusinfo);
-
}
/**
@@ -3425,9 +3100,7 @@ public abstract class DOPAbstractType
*/
public void setFVirusLoadSafe(boolean value)
{
- field_43_virusinfo = (int)fVirusLoadSafe.setBoolean(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = fVirusLoadSafe.setBoolean(field_43_virusinfo, value);
}
/**
@@ -3437,7 +3110,6 @@ public abstract class DOPAbstractType
public boolean isFVirusLoadSafe()
{
return fVirusLoadSafe.isSet(field_43_virusinfo);
-
}
/**
@@ -3446,9 +3118,7 @@ public abstract class DOPAbstractType
*/
public void setKeyVirusSession30(int value)
{
- field_43_virusinfo = (int)KeyVirusSession30.setValue(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = KeyVirusSession30.setValue(field_43_virusinfo, value);
}
/**
@@ -3457,13 +3127,6 @@ public abstract class DOPAbstractType
*/
public int getKeyVirusSession30()
{
- return ( int )KeyVirusSession30.getValue(field_43_virusinfo);
-
+ return KeyVirusSession30.getValue(field_43_virusinfo);
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java
index f60221eeea..1eb3f0b5ac 100644
--- a/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java
@@ -546,246 +546,245 @@ public abstract class FIBAbstractType
public void serialize(byte[] data, int offset)
{
- LittleEndian.putShort(data, 0x0 + offset, (short)field_1_wIdent);;
- LittleEndian.putShort(data, 0x2 + offset, (short)field_2_nFib);;
- LittleEndian.putShort(data, 0x4 + offset, (short)field_3_nProduct);;
- LittleEndian.putShort(data, 0x6 + offset, (short)field_4_lid);;
- LittleEndian.putShort(data, 0x8 + offset, (short)field_5_pnNext);;
- LittleEndian.putShort(data, 0xa + offset, (short)field_6_options);;
- LittleEndian.putShort(data, 0xc + offset, (short)field_7_nFibBack);;
- LittleEndian.putShort(data, 0xe + offset, (short)field_8_lKey);;
- LittleEndian.putShort(data, 0x10 + offset, (short)field_9_envr);;
- LittleEndian.putShort(data, 0x12 + offset, (short)field_10_history);;
- LittleEndian.putShort(data, 0x14 + offset, (short)field_11_chs);;
- LittleEndian.putShort(data, 0x16 + offset, (short)field_12_chsTables);;
- LittleEndian.putInt(data, 0x18 + offset, field_13_fcMin);;
- LittleEndian.putInt(data, 0x1c + offset, field_14_fcMac);;
- LittleEndian.putShort(data, 0x20 + offset, (short)field_15_csw);;
- LittleEndian.putShort(data, 0x22 + offset, (short)field_16_wMagicCreated);;
- LittleEndian.putShort(data, 0x24 + offset, (short)field_17_wMagicRevised);;
- LittleEndian.putShort(data, 0x26 + offset, (short)field_18_wMagicCreatedPrivate);;
- LittleEndian.putShort(data, 0x28 + offset, (short)field_19_wMagicRevisedPrivate);;
- LittleEndian.putShort(data, 0x2a + offset, (short)field_20_pnFbpChpFirst_W6);;
- LittleEndian.putShort(data, 0x2c + offset, (short)field_21_pnChpFirst_W6);;
- LittleEndian.putShort(data, 0x2e + offset, (short)field_22_cpnBteChp_W6);;
- LittleEndian.putShort(data, 0x30 + offset, (short)field_23_pnFbpPapFirst_W6);;
- LittleEndian.putShort(data, 0x32 + offset, (short)field_24_pnPapFirst_W6);;
- LittleEndian.putShort(data, 0x34 + offset, (short)field_25_cpnBtePap_W6);;
- LittleEndian.putShort(data, 0x36 + offset, (short)field_26_pnFbpLvcFirst_W6);;
- LittleEndian.putShort(data, 0x38 + offset, (short)field_27_pnLvcFirst_W6);;
- LittleEndian.putShort(data, 0x3a + offset, (short)field_28_cpnBteLvc_W6);;
- LittleEndian.putShort(data, 0x3c + offset, (short)field_29_lidFE);;
- LittleEndian.putShort(data, 0x3e + offset, (short)field_30_clw);;
- LittleEndian.putInt(data, 0x40 + offset, field_31_cbMac);;
- LittleEndian.putInt(data, 0x44 + offset, field_32_lProductCreated);;
- LittleEndian.putInt(data, 0x48 + offset, field_33_lProductRevised);;
- LittleEndian.putInt(data, 0x4c + offset, field_34_ccpText);;
- LittleEndian.putInt(data, 0x50 + offset, field_35_ccpFtn);;
- LittleEndian.putInt(data, 0x54 + offset, field_36_ccpHdd);;
- LittleEndian.putInt(data, 0x58 + offset, field_37_ccpMcr);;
- LittleEndian.putInt(data, 0x5c + offset, field_38_ccpAtn);;
- LittleEndian.putInt(data, 0x60 + offset, field_39_ccpEdn);;
- LittleEndian.putInt(data, 0x64 + offset, field_40_ccpTxbx);;
- LittleEndian.putInt(data, 0x68 + offset, field_41_ccpHdrTxbx);;
- LittleEndian.putInt(data, 0x6c + offset, field_42_pnFbpChpFirst);;
- LittleEndian.putInt(data, 0x70 + offset, field_43_pnChpFirst);;
- LittleEndian.putInt(data, 0x74 + offset, field_44_cpnBteChp);;
- LittleEndian.putInt(data, 0x78 + offset, field_45_pnFbpPapFirst);;
- LittleEndian.putInt(data, 0x7c + offset, field_46_pnPapFirst);;
- LittleEndian.putInt(data, 0x80 + offset, field_47_cpnBtePap);;
- LittleEndian.putInt(data, 0x84 + offset, field_48_pnFbpLvcFirst);;
- LittleEndian.putInt(data, 0x88 + offset, field_49_pnLvcFirst);;
- LittleEndian.putInt(data, 0x8c + offset, field_50_cpnBteLvc);;
- LittleEndian.putInt(data, 0x90 + offset, field_51_fcIslandFirst);;
- LittleEndian.putInt(data, 0x94 + offset, field_52_fcIslandLim);;
- LittleEndian.putShort(data, 0x98 + offset, (short)field_53_cfclcb);;
- LittleEndian.putInt(data, 0x9a + offset, field_54_fcStshfOrig);;
- LittleEndian.putInt(data, 0x9e + offset, field_55_lcbStshfOrig);;
- LittleEndian.putInt(data, 0xa2 + offset, field_56_fcStshf);;
- LittleEndian.putInt(data, 0xa6 + offset, field_57_lcbStshf);;
- LittleEndian.putInt(data, 0xaa + offset, field_58_fcPlcffndRef);;
- LittleEndian.putInt(data, 0xae + offset, field_59_lcbPlcffndRef);;
- LittleEndian.putInt(data, 0xb2 + offset, field_60_fcPlcffndTxt);;
- LittleEndian.putInt(data, 0xb6 + offset, field_61_lcbPlcffndTxt);;
- LittleEndian.putInt(data, 0xba + offset, field_62_fcPlcfandRef);;
- LittleEndian.putInt(data, 0xbe + offset, field_63_lcbPlcfandRef);;
- LittleEndian.putInt(data, 0xc2 + offset, field_64_fcPlcfandTxt);;
- LittleEndian.putInt(data, 0xc6 + offset, field_65_lcbPlcfandTxt);;
- LittleEndian.putInt(data, 0xca + offset, field_66_fcPlcfsed);;
- LittleEndian.putInt(data, 0xce + offset, field_67_lcbPlcfsed);;
- LittleEndian.putInt(data, 0xd2 + offset, field_68_fcPlcpad);;
- LittleEndian.putInt(data, 0xd6 + offset, field_69_lcbPlcpad);;
- LittleEndian.putInt(data, 0xda + offset, field_70_fcPlcfphe);;
- LittleEndian.putInt(data, 0xde + offset, field_71_lcbPlcfphe);;
- LittleEndian.putInt(data, 0xe2 + offset, field_72_fcSttbfglsy);;
- LittleEndian.putInt(data, 0xe6 + offset, field_73_lcbSttbfglsy);;
- LittleEndian.putInt(data, 0xea + offset, field_74_fcPlcfglsy);;
- LittleEndian.putInt(data, 0xee + offset, field_75_lcbPlcfglsy);;
- LittleEndian.putInt(data, 0xf2 + offset, field_76_fcPlcfhdd);;
- LittleEndian.putInt(data, 0xf6 + offset, field_77_lcbPlcfhdd);;
- LittleEndian.putInt(data, 0xfa + offset, field_78_fcPlcfbteChpx);;
- LittleEndian.putInt(data, 0xfe + offset, field_79_lcbPlcfbteChpx);;
- LittleEndian.putInt(data, 0x102 + offset, field_80_fcPlcfbtePapx);;
- LittleEndian.putInt(data, 0x106 + offset, field_81_lcbPlcfbtePapx);;
- LittleEndian.putInt(data, 0x10a + offset, field_82_fcPlcfsea);;
- LittleEndian.putInt(data, 0x10e + offset, field_83_lcbPlcfsea);;
- LittleEndian.putInt(data, 0x112 + offset, field_84_fcSttbfffn);;
- LittleEndian.putInt(data, 0x116 + offset, field_85_lcbSttbfffn);;
- LittleEndian.putInt(data, 0x11a + offset, field_86_fcPlcffldMom);;
- LittleEndian.putInt(data, 0x11e + offset, field_87_lcbPlcffldMom);;
- LittleEndian.putInt(data, 0x122 + offset, field_88_fcPlcffldHdr);;
- LittleEndian.putInt(data, 0x126 + offset, field_89_lcbPlcffldHdr);;
- LittleEndian.putInt(data, 0x12a + offset, field_90_fcPlcffldFtn);;
- LittleEndian.putInt(data, 0x12e + offset, field_91_lcbPlcffldFtn);;
- LittleEndian.putInt(data, 0x132 + offset, field_92_fcPlcffldAtn);;
- LittleEndian.putInt(data, 0x136 + offset, field_93_lcbPlcffldAtn);;
- LittleEndian.putInt(data, 0x13a + offset, field_94_fcPlcffldMcr);;
- LittleEndian.putInt(data, 0x13e + offset, field_95_lcbPlcffldMcr);;
- LittleEndian.putInt(data, 0x142 + offset, field_96_fcSttbfbkmk);;
- LittleEndian.putInt(data, 0x146 + offset, field_97_lcbSttbfbkmk);;
- LittleEndian.putInt(data, 0x14a + offset, field_98_fcPlcfbkf);;
- LittleEndian.putInt(data, 0x14e + offset, field_99_lcbPlcfbkf);;
- LittleEndian.putInt(data, 0x152 + offset, field_100_fcPlcfbkl);;
- LittleEndian.putInt(data, 0x156 + offset, field_101_lcbPlcfbkl);;
- LittleEndian.putInt(data, 0x15a + offset, field_102_fcCmds);;
- LittleEndian.putInt(data, 0x15e + offset, field_103_lcbCmds);;
- LittleEndian.putInt(data, 0x162 + offset, field_104_fcPlcmcr);;
- LittleEndian.putInt(data, 0x166 + offset, field_105_lcbPlcmcr);;
- LittleEndian.putInt(data, 0x16a + offset, field_106_fcSttbfmcr);;
- LittleEndian.putInt(data, 0x16e + offset, field_107_lcbSttbfmcr);;
- LittleEndian.putInt(data, 0x172 + offset, field_108_fcPrDrvr);;
- LittleEndian.putInt(data, 0x176 + offset, field_109_lcbPrDrvr);;
- LittleEndian.putInt(data, 0x17a + offset, field_110_fcPrEnvPort);;
- LittleEndian.putInt(data, 0x17e + offset, field_111_lcbPrEnvPort);;
- LittleEndian.putInt(data, 0x182 + offset, field_112_fcPrEnvLand);;
- LittleEndian.putInt(data, 0x186 + offset, field_113_lcbPrEnvLand);;
- LittleEndian.putInt(data, 0x18a + offset, field_114_fcWss);;
- LittleEndian.putInt(data, 0x18e + offset, field_115_lcbWss);;
- LittleEndian.putInt(data, 0x192 + offset, field_116_fcDop);;
- LittleEndian.putInt(data, 0x196 + offset, field_117_lcbDop);;
- LittleEndian.putInt(data, 0x19a + offset, field_118_fcSttbfAssoc);;
- LittleEndian.putInt(data, 0x19e + offset, field_119_lcbSttbfAssoc);;
- LittleEndian.putInt(data, 0x1a2 + offset, field_120_fcClx);;
- LittleEndian.putInt(data, 0x1a6 + offset, field_121_lcbClx);;
- LittleEndian.putInt(data, 0x1aa + offset, field_122_fcPlcfpgdFtn);;
- LittleEndian.putInt(data, 0x1ae + offset, field_123_lcbPlcfpgdFtn);;
- LittleEndian.putInt(data, 0x1b2 + offset, field_124_fcAutosaveSource);;
- LittleEndian.putInt(data, 0x1b6 + offset, field_125_lcbAutosaveSource);;
- LittleEndian.putInt(data, 0x1ba + offset, field_126_fcGrpXstAtnOwners);;
- LittleEndian.putInt(data, 0x1be + offset, field_127_lcbGrpXstAtnOwners);;
- LittleEndian.putInt(data, 0x1c2 + offset, field_128_fcSttbfAtnbkmk);;
- LittleEndian.putInt(data, 0x1c6 + offset, field_129_lcbSttbfAtnbkmk);;
- LittleEndian.putInt(data, 0x1ca + offset, field_130_fcPlcdoaMom);;
- LittleEndian.putInt(data, 0x1ce + offset, field_131_lcbPlcdoaMom);;
- LittleEndian.putInt(data, 0x1d2 + offset, field_132_fcPlcdoaHdr);;
- LittleEndian.putInt(data, 0x1d6 + offset, field_133_lcbPlcdoaHdr);;
- LittleEndian.putInt(data, 0x1da + offset, field_134_fcPlcspaMom);;
- LittleEndian.putInt(data, 0x1de + offset, field_135_lcbPlcspaMom);;
- LittleEndian.putInt(data, 0x1e2 + offset, field_136_fcPlcspaHdr);;
- LittleEndian.putInt(data, 0x1e6 + offset, field_137_lcbPlcspaHdr);;
- LittleEndian.putInt(data, 0x1ea + offset, field_138_fcPlcfAtnbkf);;
- LittleEndian.putInt(data, 0x1ee + offset, field_139_lcbPlcfAtnbkf);;
- LittleEndian.putInt(data, 0x1f2 + offset, field_140_fcPlcfAtnbkl);;
- LittleEndian.putInt(data, 0x1f6 + offset, field_141_lcbPlcfAtnbkl);;
- LittleEndian.putInt(data, 0x1fa + offset, field_142_fcPms);;
- LittleEndian.putInt(data, 0x1fe + offset, field_143_lcbPms);;
- LittleEndian.putInt(data, 0x202 + offset, field_144_fcFormFldSttbs);;
- LittleEndian.putInt(data, 0x206 + offset, field_145_lcbFormFldSttbs);;
- LittleEndian.putInt(data, 0x20a + offset, field_146_fcPlcfendRef);;
- LittleEndian.putInt(data, 0x20e + offset, field_147_lcbPlcfendRef);;
- LittleEndian.putInt(data, 0x212 + offset, field_148_fcPlcfendTxt);;
- LittleEndian.putInt(data, 0x216 + offset, field_149_lcbPlcfendTxt);;
- LittleEndian.putInt(data, 0x21a + offset, field_150_fcPlcffldEdn);;
- LittleEndian.putInt(data, 0x21e + offset, field_151_lcbPlcffldEdn);;
- LittleEndian.putInt(data, 0x222 + offset, field_152_fcPlcfpgdEdn);;
- LittleEndian.putInt(data, 0x226 + offset, field_153_lcbPlcfpgdEdn);;
- LittleEndian.putInt(data, 0x22a + offset, field_154_fcDggInfo);;
- LittleEndian.putInt(data, 0x22e + offset, field_155_lcbDggInfo);;
- LittleEndian.putInt(data, 0x232 + offset, field_156_fcSttbfRMark);;
- LittleEndian.putInt(data, 0x236 + offset, field_157_lcbSttbfRMark);;
- LittleEndian.putInt(data, 0x23a + offset, field_158_fcSttbCaption);;
- LittleEndian.putInt(data, 0x23e + offset, field_159_lcbSttbCaption);;
- LittleEndian.putInt(data, 0x242 + offset, field_160_fcSttbAutoCaption);;
- LittleEndian.putInt(data, 0x246 + offset, field_161_lcbSttbAutoCaption);;
- LittleEndian.putInt(data, 0x24a + offset, field_162_fcPlcfwkb);;
- LittleEndian.putInt(data, 0x24e + offset, field_163_lcbPlcfwkb);;
- LittleEndian.putInt(data, 0x252 + offset, field_164_fcPlcfspl);;
- LittleEndian.putInt(data, 0x256 + offset, field_165_lcbPlcfspl);;
- LittleEndian.putInt(data, 0x25a + offset, field_166_fcPlcftxbxTxt);;
- LittleEndian.putInt(data, 0x25e + offset, field_167_lcbPlcftxbxTxt);;
- LittleEndian.putInt(data, 0x262 + offset, field_168_fcPlcffldTxbx);;
- LittleEndian.putInt(data, 0x266 + offset, field_169_lcbPlcffldTxbx);;
- LittleEndian.putInt(data, 0x26a + offset, field_170_fcPlcfhdrtxbxTxt);;
- LittleEndian.putInt(data, 0x26e + offset, field_171_lcbPlcfhdrtxbxTxt);;
- LittleEndian.putInt(data, 0x272 + offset, field_172_fcPlcffldHdrTxbx);;
- LittleEndian.putInt(data, 0x276 + offset, field_173_lcbPlcffldHdrTxbx);;
- LittleEndian.putInt(data, 0x27a + offset, field_174_fcStwUser);;
- LittleEndian.putInt(data, 0x27e + offset, field_175_lcbStwUser);;
- LittleEndian.putInt(data, 0x282 + offset, field_176_fcSttbttmbd);;
- LittleEndian.putInt(data, 0x286 + offset, field_177_cbSttbttmbd);;
- LittleEndian.putInt(data, 0x28a + offset, field_178_fcUnused);;
- LittleEndian.putInt(data, 0x28e + offset, field_179_lcbUnused);;
- LittleEndian.putInt(data, 0x292 + offset, field_180_fcPgdMother);;
- LittleEndian.putInt(data, 0x296 + offset, field_181_lcbPgdMother);;
- LittleEndian.putInt(data, 0x29a + offset, field_182_fcBkdMother);;
- LittleEndian.putInt(data, 0x29e + offset, field_183_lcbBkdMother);;
- LittleEndian.putInt(data, 0x2a2 + offset, field_184_fcPgdFtn);;
- LittleEndian.putInt(data, 0x2a6 + offset, field_185_lcbPgdFtn);;
- LittleEndian.putInt(data, 0x2aa + offset, field_186_fcBkdFtn);;
- LittleEndian.putInt(data, 0x2ae + offset, field_187_lcbBkdFtn);;
- LittleEndian.putInt(data, 0x2b2 + offset, field_188_fcPgdEdn);;
- LittleEndian.putInt(data, 0x2b6 + offset, field_189_lcbPgdEdn);;
- LittleEndian.putInt(data, 0x2ba + offset, field_190_fcBkdEdn);;
- LittleEndian.putInt(data, 0x2be + offset, field_191_lcbBkdEdn);;
- LittleEndian.putInt(data, 0x2c2 + offset, field_192_fcSttbfIntlFld);;
- LittleEndian.putInt(data, 0x2c6 + offset, field_193_lcbSttbfIntlFld);;
- LittleEndian.putInt(data, 0x2ca + offset, field_194_fcRouteSlip);;
- LittleEndian.putInt(data, 0x2ce + offset, field_195_lcbRouteSlip);;
- LittleEndian.putInt(data, 0x2d2 + offset, field_196_fcSttbSavedBy);;
- LittleEndian.putInt(data, 0x2d6 + offset, field_197_lcbSttbSavedBy);;
- LittleEndian.putInt(data, 0x2da + offset, field_198_fcSttbFnm);;
- LittleEndian.putInt(data, 0x2de + offset, field_199_lcbSttbFnm);;
- LittleEndian.putInt(data, 0x2e2 + offset, field_200_fcPlcfLst);;
- LittleEndian.putInt(data, 0x2e6 + offset, field_201_lcbPlcfLst);;
- LittleEndian.putInt(data, 0x2ea + offset, field_202_fcPlfLfo);;
- LittleEndian.putInt(data, 0x2ee + offset, field_203_lcbPlfLfo);;
- LittleEndian.putInt(data, 0x2f2 + offset, field_204_fcPlcftxbxBkd);;
- LittleEndian.putInt(data, 0x2f6 + offset, field_205_lcbPlcftxbxBkd);;
- LittleEndian.putInt(data, 0x2fa + offset, field_206_fcPlcftxbxHdrBkd);;
- LittleEndian.putInt(data, 0x2fe + offset, field_207_lcbPlcftxbxHdrBkd);;
- LittleEndian.putInt(data, 0x302 + offset, field_208_fcDocUndo);;
- LittleEndian.putInt(data, 0x306 + offset, field_209_lcbDocUndo);;
- LittleEndian.putInt(data, 0x30a + offset, field_210_fcRgbuse);;
- LittleEndian.putInt(data, 0x30e + offset, field_211_lcbRgbuse);;
- LittleEndian.putInt(data, 0x312 + offset, field_212_fcUsp);;
- LittleEndian.putInt(data, 0x316 + offset, field_213_lcbUsp);;
- LittleEndian.putInt(data, 0x31a + offset, field_214_fcUskf);;
- LittleEndian.putInt(data, 0x31e + offset, field_215_lcbUskf);;
- LittleEndian.putInt(data, 0x322 + offset, field_216_fcPlcupcRgbuse);;
- LittleEndian.putInt(data, 0x326 + offset, field_217_lcbPlcupcRgbuse);;
- LittleEndian.putInt(data, 0x32a + offset, field_218_fcPlcupcUsp);;
- LittleEndian.putInt(data, 0x32e + offset, field_219_lcbPlcupcUsp);;
- LittleEndian.putInt(data, 0x332 + offset, field_220_fcSttbGlsyStyle);;
- LittleEndian.putInt(data, 0x336 + offset, field_221_lcbSttbGlsyStyle);;
- LittleEndian.putInt(data, 0x33a + offset, field_222_fcPlgosl);;
- LittleEndian.putInt(data, 0x33e + offset, field_223_lcbPlgosl);;
- LittleEndian.putInt(data, 0x342 + offset, field_224_fcPlcocx);;
- LittleEndian.putInt(data, 0x346 + offset, field_225_lcbPlcocx);;
- LittleEndian.putInt(data, 0x34a + offset, field_226_fcPlcfbteLvc);;
- LittleEndian.putInt(data, 0x34e + offset, field_227_lcbPlcfbteLvc);;
- LittleEndian.putInt(data, 0x352 + offset, field_228_dwLowDateTime);;
- LittleEndian.putInt(data, 0x356 + offset, field_229_dwHighDateTime);;
- LittleEndian.putInt(data, 0x35a + offset, field_230_fcPlcflvc);;
- LittleEndian.putInt(data, 0x35e + offset, field_231_lcbPlcflvc);;
- LittleEndian.putInt(data, 0x362 + offset, field_232_fcPlcasumy);;
- LittleEndian.putInt(data, 0x366 + offset, field_233_lcbPlcasumy);;
- LittleEndian.putInt(data, 0x36a + offset, field_234_fcPlcfgram);;
- LittleEndian.putInt(data, 0x36e + offset, field_235_lcbPlcfgram);;
- LittleEndian.putInt(data, 0x372 + offset, field_236_fcSttbListNames);;
- LittleEndian.putInt(data, 0x376 + offset, field_237_lcbSttbListNames);;
- LittleEndian.putInt(data, 0x37a + offset, field_238_fcSttbfUssr);;
- LittleEndian.putInt(data, 0x37e + offset, field_239_lcbSttbfUssr);;
-
+ LittleEndian.putShort(data, 0x0 + offset, (short)field_1_wIdent);
+ LittleEndian.putShort(data, 0x2 + offset, (short)field_2_nFib);
+ LittleEndian.putShort(data, 0x4 + offset, (short)field_3_nProduct);
+ LittleEndian.putShort(data, 0x6 + offset, (short)field_4_lid);
+ LittleEndian.putShort(data, 0x8 + offset, (short)field_5_pnNext);
+ LittleEndian.putShort(data, 0xa + offset, field_6_options);
+ LittleEndian.putShort(data, 0xc + offset, (short)field_7_nFibBack);
+ LittleEndian.putShort(data, 0xe + offset, (short)field_8_lKey);
+ LittleEndian.putShort(data, 0x10 + offset, (short)field_9_envr);
+ LittleEndian.putShort(data, 0x12 + offset, field_10_history);
+ LittleEndian.putShort(data, 0x14 + offset, (short)field_11_chs);
+ LittleEndian.putShort(data, 0x16 + offset, (short)field_12_chsTables);
+ LittleEndian.putInt(data, 0x18 + offset, field_13_fcMin);
+ LittleEndian.putInt(data, 0x1c + offset, field_14_fcMac);
+ LittleEndian.putShort(data, 0x20 + offset, (short)field_15_csw);
+ LittleEndian.putShort(data, 0x22 + offset, (short)field_16_wMagicCreated);
+ LittleEndian.putShort(data, 0x24 + offset, (short)field_17_wMagicRevised);
+ LittleEndian.putShort(data, 0x26 + offset, (short)field_18_wMagicCreatedPrivate);
+ LittleEndian.putShort(data, 0x28 + offset, (short)field_19_wMagicRevisedPrivate);
+ LittleEndian.putShort(data, 0x2a + offset, (short)field_20_pnFbpChpFirst_W6);
+ LittleEndian.putShort(data, 0x2c + offset, (short)field_21_pnChpFirst_W6);
+ LittleEndian.putShort(data, 0x2e + offset, (short)field_22_cpnBteChp_W6);
+ LittleEndian.putShort(data, 0x30 + offset, (short)field_23_pnFbpPapFirst_W6);
+ LittleEndian.putShort(data, 0x32 + offset, (short)field_24_pnPapFirst_W6);
+ LittleEndian.putShort(data, 0x34 + offset, (short)field_25_cpnBtePap_W6);
+ LittleEndian.putShort(data, 0x36 + offset, (short)field_26_pnFbpLvcFirst_W6);
+ LittleEndian.putShort(data, 0x38 + offset, (short)field_27_pnLvcFirst_W6);
+ LittleEndian.putShort(data, 0x3a + offset, (short)field_28_cpnBteLvc_W6);
+ LittleEndian.putShort(data, 0x3c + offset, (short)field_29_lidFE);
+ LittleEndian.putShort(data, 0x3e + offset, (short)field_30_clw);
+ LittleEndian.putInt(data, 0x40 + offset, field_31_cbMac);
+ LittleEndian.putInt(data, 0x44 + offset, field_32_lProductCreated);
+ LittleEndian.putInt(data, 0x48 + offset, field_33_lProductRevised);
+ LittleEndian.putInt(data, 0x4c + offset, field_34_ccpText);
+ LittleEndian.putInt(data, 0x50 + offset, field_35_ccpFtn);
+ LittleEndian.putInt(data, 0x54 + offset, field_36_ccpHdd);
+ LittleEndian.putInt(data, 0x58 + offset, field_37_ccpMcr);
+ LittleEndian.putInt(data, 0x5c + offset, field_38_ccpAtn);
+ LittleEndian.putInt(data, 0x60 + offset, field_39_ccpEdn);
+ LittleEndian.putInt(data, 0x64 + offset, field_40_ccpTxbx);
+ LittleEndian.putInt(data, 0x68 + offset, field_41_ccpHdrTxbx);
+ LittleEndian.putInt(data, 0x6c + offset, field_42_pnFbpChpFirst);
+ LittleEndian.putInt(data, 0x70 + offset, field_43_pnChpFirst);
+ LittleEndian.putInt(data, 0x74 + offset, field_44_cpnBteChp);
+ LittleEndian.putInt(data, 0x78 + offset, field_45_pnFbpPapFirst);
+ LittleEndian.putInt(data, 0x7c + offset, field_46_pnPapFirst);
+ LittleEndian.putInt(data, 0x80 + offset, field_47_cpnBtePap);
+ LittleEndian.putInt(data, 0x84 + offset, field_48_pnFbpLvcFirst);
+ LittleEndian.putInt(data, 0x88 + offset, field_49_pnLvcFirst);
+ LittleEndian.putInt(data, 0x8c + offset, field_50_cpnBteLvc);
+ LittleEndian.putInt(data, 0x90 + offset, field_51_fcIslandFirst);
+ LittleEndian.putInt(data, 0x94 + offset, field_52_fcIslandLim);
+ LittleEndian.putShort(data, 0x98 + offset, (short)field_53_cfclcb);
+ LittleEndian.putInt(data, 0x9a + offset, field_54_fcStshfOrig);
+ LittleEndian.putInt(data, 0x9e + offset, field_55_lcbStshfOrig);
+ LittleEndian.putInt(data, 0xa2 + offset, field_56_fcStshf);
+ LittleEndian.putInt(data, 0xa6 + offset, field_57_lcbStshf);
+ LittleEndian.putInt(data, 0xaa + offset, field_58_fcPlcffndRef);
+ LittleEndian.putInt(data, 0xae + offset, field_59_lcbPlcffndRef);
+ LittleEndian.putInt(data, 0xb2 + offset, field_60_fcPlcffndTxt);
+ LittleEndian.putInt(data, 0xb6 + offset, field_61_lcbPlcffndTxt);
+ LittleEndian.putInt(data, 0xba + offset, field_62_fcPlcfandRef);
+ LittleEndian.putInt(data, 0xbe + offset, field_63_lcbPlcfandRef);
+ LittleEndian.putInt(data, 0xc2 + offset, field_64_fcPlcfandTxt);
+ LittleEndian.putInt(data, 0xc6 + offset, field_65_lcbPlcfandTxt);
+ LittleEndian.putInt(data, 0xca + offset, field_66_fcPlcfsed);
+ LittleEndian.putInt(data, 0xce + offset, field_67_lcbPlcfsed);
+ LittleEndian.putInt(data, 0xd2 + offset, field_68_fcPlcpad);
+ LittleEndian.putInt(data, 0xd6 + offset, field_69_lcbPlcpad);
+ LittleEndian.putInt(data, 0xda + offset, field_70_fcPlcfphe);
+ LittleEndian.putInt(data, 0xde + offset, field_71_lcbPlcfphe);
+ LittleEndian.putInt(data, 0xe2 + offset, field_72_fcSttbfglsy);
+ LittleEndian.putInt(data, 0xe6 + offset, field_73_lcbSttbfglsy);
+ LittleEndian.putInt(data, 0xea + offset, field_74_fcPlcfglsy);
+ LittleEndian.putInt(data, 0xee + offset, field_75_lcbPlcfglsy);
+ LittleEndian.putInt(data, 0xf2 + offset, field_76_fcPlcfhdd);
+ LittleEndian.putInt(data, 0xf6 + offset, field_77_lcbPlcfhdd);
+ LittleEndian.putInt(data, 0xfa + offset, field_78_fcPlcfbteChpx);
+ LittleEndian.putInt(data, 0xfe + offset, field_79_lcbPlcfbteChpx);
+ LittleEndian.putInt(data, 0x102 + offset, field_80_fcPlcfbtePapx);
+ LittleEndian.putInt(data, 0x106 + offset, field_81_lcbPlcfbtePapx);
+ LittleEndian.putInt(data, 0x10a + offset, field_82_fcPlcfsea);
+ LittleEndian.putInt(data, 0x10e + offset, field_83_lcbPlcfsea);
+ LittleEndian.putInt(data, 0x112 + offset, field_84_fcSttbfffn);
+ LittleEndian.putInt(data, 0x116 + offset, field_85_lcbSttbfffn);
+ LittleEndian.putInt(data, 0x11a + offset, field_86_fcPlcffldMom);
+ LittleEndian.putInt(data, 0x11e + offset, field_87_lcbPlcffldMom);
+ LittleEndian.putInt(data, 0x122 + offset, field_88_fcPlcffldHdr);
+ LittleEndian.putInt(data, 0x126 + offset, field_89_lcbPlcffldHdr);
+ LittleEndian.putInt(data, 0x12a + offset, field_90_fcPlcffldFtn);
+ LittleEndian.putInt(data, 0x12e + offset, field_91_lcbPlcffldFtn);
+ LittleEndian.putInt(data, 0x132 + offset, field_92_fcPlcffldAtn);
+ LittleEndian.putInt(data, 0x136 + offset, field_93_lcbPlcffldAtn);
+ LittleEndian.putInt(data, 0x13a + offset, field_94_fcPlcffldMcr);
+ LittleEndian.putInt(data, 0x13e + offset, field_95_lcbPlcffldMcr);
+ LittleEndian.putInt(data, 0x142 + offset, field_96_fcSttbfbkmk);
+ LittleEndian.putInt(data, 0x146 + offset, field_97_lcbSttbfbkmk);
+ LittleEndian.putInt(data, 0x14a + offset, field_98_fcPlcfbkf);
+ LittleEndian.putInt(data, 0x14e + offset, field_99_lcbPlcfbkf);
+ LittleEndian.putInt(data, 0x152 + offset, field_100_fcPlcfbkl);
+ LittleEndian.putInt(data, 0x156 + offset, field_101_lcbPlcfbkl);
+ LittleEndian.putInt(data, 0x15a + offset, field_102_fcCmds);
+ LittleEndian.putInt(data, 0x15e + offset, field_103_lcbCmds);
+ LittleEndian.putInt(data, 0x162 + offset, field_104_fcPlcmcr);
+ LittleEndian.putInt(data, 0x166 + offset, field_105_lcbPlcmcr);
+ LittleEndian.putInt(data, 0x16a + offset, field_106_fcSttbfmcr);
+ LittleEndian.putInt(data, 0x16e + offset, field_107_lcbSttbfmcr);
+ LittleEndian.putInt(data, 0x172 + offset, field_108_fcPrDrvr);
+ LittleEndian.putInt(data, 0x176 + offset, field_109_lcbPrDrvr);
+ LittleEndian.putInt(data, 0x17a + offset, field_110_fcPrEnvPort);
+ LittleEndian.putInt(data, 0x17e + offset, field_111_lcbPrEnvPort);
+ LittleEndian.putInt(data, 0x182 + offset, field_112_fcPrEnvLand);
+ LittleEndian.putInt(data, 0x186 + offset, field_113_lcbPrEnvLand);
+ LittleEndian.putInt(data, 0x18a + offset, field_114_fcWss);
+ LittleEndian.putInt(data, 0x18e + offset, field_115_lcbWss);
+ LittleEndian.putInt(data, 0x192 + offset, field_116_fcDop);
+ LittleEndian.putInt(data, 0x196 + offset, field_117_lcbDop);
+ LittleEndian.putInt(data, 0x19a + offset, field_118_fcSttbfAssoc);
+ LittleEndian.putInt(data, 0x19e + offset, field_119_lcbSttbfAssoc);
+ LittleEndian.putInt(data, 0x1a2 + offset, field_120_fcClx);
+ LittleEndian.putInt(data, 0x1a6 + offset, field_121_lcbClx);
+ LittleEndian.putInt(data, 0x1aa + offset, field_122_fcPlcfpgdFtn);
+ LittleEndian.putInt(data, 0x1ae + offset, field_123_lcbPlcfpgdFtn);
+ LittleEndian.putInt(data, 0x1b2 + offset, field_124_fcAutosaveSource);
+ LittleEndian.putInt(data, 0x1b6 + offset, field_125_lcbAutosaveSource);
+ LittleEndian.putInt(data, 0x1ba + offset, field_126_fcGrpXstAtnOwners);
+ LittleEndian.putInt(data, 0x1be + offset, field_127_lcbGrpXstAtnOwners);
+ LittleEndian.putInt(data, 0x1c2 + offset, field_128_fcSttbfAtnbkmk);
+ LittleEndian.putInt(data, 0x1c6 + offset, field_129_lcbSttbfAtnbkmk);
+ LittleEndian.putInt(data, 0x1ca + offset, field_130_fcPlcdoaMom);
+ LittleEndian.putInt(data, 0x1ce + offset, field_131_lcbPlcdoaMom);
+ LittleEndian.putInt(data, 0x1d2 + offset, field_132_fcPlcdoaHdr);
+ LittleEndian.putInt(data, 0x1d6 + offset, field_133_lcbPlcdoaHdr);
+ LittleEndian.putInt(data, 0x1da + offset, field_134_fcPlcspaMom);
+ LittleEndian.putInt(data, 0x1de + offset, field_135_lcbPlcspaMom);
+ LittleEndian.putInt(data, 0x1e2 + offset, field_136_fcPlcspaHdr);
+ LittleEndian.putInt(data, 0x1e6 + offset, field_137_lcbPlcspaHdr);
+ LittleEndian.putInt(data, 0x1ea + offset, field_138_fcPlcfAtnbkf);
+ LittleEndian.putInt(data, 0x1ee + offset, field_139_lcbPlcfAtnbkf);
+ LittleEndian.putInt(data, 0x1f2 + offset, field_140_fcPlcfAtnbkl);
+ LittleEndian.putInt(data, 0x1f6 + offset, field_141_lcbPlcfAtnbkl);
+ LittleEndian.putInt(data, 0x1fa + offset, field_142_fcPms);
+ LittleEndian.putInt(data, 0x1fe + offset, field_143_lcbPms);
+ LittleEndian.putInt(data, 0x202 + offset, field_144_fcFormFldSttbs);
+ LittleEndian.putInt(data, 0x206 + offset, field_145_lcbFormFldSttbs);
+ LittleEndian.putInt(data, 0x20a + offset, field_146_fcPlcfendRef);
+ LittleEndian.putInt(data, 0x20e + offset, field_147_lcbPlcfendRef);
+ LittleEndian.putInt(data, 0x212 + offset, field_148_fcPlcfendTxt);
+ LittleEndian.putInt(data, 0x216 + offset, field_149_lcbPlcfendTxt);
+ LittleEndian.putInt(data, 0x21a + offset, field_150_fcPlcffldEdn);
+ LittleEndian.putInt(data, 0x21e + offset, field_151_lcbPlcffldEdn);
+ LittleEndian.putInt(data, 0x222 + offset, field_152_fcPlcfpgdEdn);
+ LittleEndian.putInt(data, 0x226 + offset, field_153_lcbPlcfpgdEdn);
+ LittleEndian.putInt(data, 0x22a + offset, field_154_fcDggInfo);
+ LittleEndian.putInt(data, 0x22e + offset, field_155_lcbDggInfo);
+ LittleEndian.putInt(data, 0x232 + offset, field_156_fcSttbfRMark);
+ LittleEndian.putInt(data, 0x236 + offset, field_157_lcbSttbfRMark);
+ LittleEndian.putInt(data, 0x23a + offset, field_158_fcSttbCaption);
+ LittleEndian.putInt(data, 0x23e + offset, field_159_lcbSttbCaption);
+ LittleEndian.putInt(data, 0x242 + offset, field_160_fcSttbAutoCaption);
+ LittleEndian.putInt(data, 0x246 + offset, field_161_lcbSttbAutoCaption);
+ LittleEndian.putInt(data, 0x24a + offset, field_162_fcPlcfwkb);
+ LittleEndian.putInt(data, 0x24e + offset, field_163_lcbPlcfwkb);
+ LittleEndian.putInt(data, 0x252 + offset, field_164_fcPlcfspl);
+ LittleEndian.putInt(data, 0x256 + offset, field_165_lcbPlcfspl);
+ LittleEndian.putInt(data, 0x25a + offset, field_166_fcPlcftxbxTxt);
+ LittleEndian.putInt(data, 0x25e + offset, field_167_lcbPlcftxbxTxt);
+ LittleEndian.putInt(data, 0x262 + offset, field_168_fcPlcffldTxbx);
+ LittleEndian.putInt(data, 0x266 + offset, field_169_lcbPlcffldTxbx);
+ LittleEndian.putInt(data, 0x26a + offset, field_170_fcPlcfhdrtxbxTxt);
+ LittleEndian.putInt(data, 0x26e + offset, field_171_lcbPlcfhdrtxbxTxt);
+ LittleEndian.putInt(data, 0x272 + offset, field_172_fcPlcffldHdrTxbx);
+ LittleEndian.putInt(data, 0x276 + offset, field_173_lcbPlcffldHdrTxbx);
+ LittleEndian.putInt(data, 0x27a + offset, field_174_fcStwUser);
+ LittleEndian.putInt(data, 0x27e + offset, field_175_lcbStwUser);
+ LittleEndian.putInt(data, 0x282 + offset, field_176_fcSttbttmbd);
+ LittleEndian.putInt(data, 0x286 + offset, field_177_cbSttbttmbd);
+ LittleEndian.putInt(data, 0x28a + offset, field_178_fcUnused);
+ LittleEndian.putInt(data, 0x28e + offset, field_179_lcbUnused);
+ LittleEndian.putInt(data, 0x292 + offset, field_180_fcPgdMother);
+ LittleEndian.putInt(data, 0x296 + offset, field_181_lcbPgdMother);
+ LittleEndian.putInt(data, 0x29a + offset, field_182_fcBkdMother);
+ LittleEndian.putInt(data, 0x29e + offset, field_183_lcbBkdMother);
+ LittleEndian.putInt(data, 0x2a2 + offset, field_184_fcPgdFtn);
+ LittleEndian.putInt(data, 0x2a6 + offset, field_185_lcbPgdFtn);
+ LittleEndian.putInt(data, 0x2aa + offset, field_186_fcBkdFtn);
+ LittleEndian.putInt(data, 0x2ae + offset, field_187_lcbBkdFtn);
+ LittleEndian.putInt(data, 0x2b2 + offset, field_188_fcPgdEdn);
+ LittleEndian.putInt(data, 0x2b6 + offset, field_189_lcbPgdEdn);
+ LittleEndian.putInt(data, 0x2ba + offset, field_190_fcBkdEdn);
+ LittleEndian.putInt(data, 0x2be + offset, field_191_lcbBkdEdn);
+ LittleEndian.putInt(data, 0x2c2 + offset, field_192_fcSttbfIntlFld);
+ LittleEndian.putInt(data, 0x2c6 + offset, field_193_lcbSttbfIntlFld);
+ LittleEndian.putInt(data, 0x2ca + offset, field_194_fcRouteSlip);
+ LittleEndian.putInt(data, 0x2ce + offset, field_195_lcbRouteSlip);
+ LittleEndian.putInt(data, 0x2d2 + offset, field_196_fcSttbSavedBy);
+ LittleEndian.putInt(data, 0x2d6 + offset, field_197_lcbSttbSavedBy);
+ LittleEndian.putInt(data, 0x2da + offset, field_198_fcSttbFnm);
+ LittleEndian.putInt(data, 0x2de + offset, field_199_lcbSttbFnm);
+ LittleEndian.putInt(data, 0x2e2 + offset, field_200_fcPlcfLst);
+ LittleEndian.putInt(data, 0x2e6 + offset, field_201_lcbPlcfLst);
+ LittleEndian.putInt(data, 0x2ea + offset, field_202_fcPlfLfo);
+ LittleEndian.putInt(data, 0x2ee + offset, field_203_lcbPlfLfo);
+ LittleEndian.putInt(data, 0x2f2 + offset, field_204_fcPlcftxbxBkd);
+ LittleEndian.putInt(data, 0x2f6 + offset, field_205_lcbPlcftxbxBkd);
+ LittleEndian.putInt(data, 0x2fa + offset, field_206_fcPlcftxbxHdrBkd);
+ LittleEndian.putInt(data, 0x2fe + offset, field_207_lcbPlcftxbxHdrBkd);
+ LittleEndian.putInt(data, 0x302 + offset, field_208_fcDocUndo);
+ LittleEndian.putInt(data, 0x306 + offset, field_209_lcbDocUndo);
+ LittleEndian.putInt(data, 0x30a + offset, field_210_fcRgbuse);
+ LittleEndian.putInt(data, 0x30e + offset, field_211_lcbRgbuse);
+ LittleEndian.putInt(data, 0x312 + offset, field_212_fcUsp);
+ LittleEndian.putInt(data, 0x316 + offset, field_213_lcbUsp);
+ LittleEndian.putInt(data, 0x31a + offset, field_214_fcUskf);
+ LittleEndian.putInt(data, 0x31e + offset, field_215_lcbUskf);
+ LittleEndian.putInt(data, 0x322 + offset, field_216_fcPlcupcRgbuse);
+ LittleEndian.putInt(data, 0x326 + offset, field_217_lcbPlcupcRgbuse);
+ LittleEndian.putInt(data, 0x32a + offset, field_218_fcPlcupcUsp);
+ LittleEndian.putInt(data, 0x32e + offset, field_219_lcbPlcupcUsp);
+ LittleEndian.putInt(data, 0x332 + offset, field_220_fcSttbGlsyStyle);
+ LittleEndian.putInt(data, 0x336 + offset, field_221_lcbSttbGlsyStyle);
+ LittleEndian.putInt(data, 0x33a + offset, field_222_fcPlgosl);
+ LittleEndian.putInt(data, 0x33e + offset, field_223_lcbPlgosl);
+ LittleEndian.putInt(data, 0x342 + offset, field_224_fcPlcocx);
+ LittleEndian.putInt(data, 0x346 + offset, field_225_lcbPlcocx);
+ LittleEndian.putInt(data, 0x34a + offset, field_226_fcPlcfbteLvc);
+ LittleEndian.putInt(data, 0x34e + offset, field_227_lcbPlcfbteLvc);
+ LittleEndian.putInt(data, 0x352 + offset, field_228_dwLowDateTime);
+ LittleEndian.putInt(data, 0x356 + offset, field_229_dwHighDateTime);
+ LittleEndian.putInt(data, 0x35a + offset, field_230_fcPlcflvc);
+ LittleEndian.putInt(data, 0x35e + offset, field_231_lcbPlcflvc);
+ LittleEndian.putInt(data, 0x362 + offset, field_232_fcPlcasumy);
+ LittleEndian.putInt(data, 0x366 + offset, field_233_lcbPlcasumy);
+ LittleEndian.putInt(data, 0x36a + offset, field_234_fcPlcfgram);
+ LittleEndian.putInt(data, 0x36e + offset, field_235_lcbPlcfgram);
+ LittleEndian.putInt(data, 0x372 + offset, field_236_fcSttbListNames);
+ LittleEndian.putInt(data, 0x376 + offset, field_237_lcbSttbListNames);
+ LittleEndian.putInt(data, 0x37a + offset, field_238_fcSttbfUssr);
+ LittleEndian.putInt(data, 0x37e + offset, field_239_lcbSttbfUssr);
}
public String toString()
@@ -795,33 +794,27 @@ public abstract class FIBAbstractType
buffer.append("[FIB]\n");
buffer.append(" .wIdent = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWIdent()));
+ buffer.append(HexDump.intToHex(getWIdent()));
buffer.append(" (").append(getWIdent()).append(" )\n");
buffer.append(" .nFib = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getNFib()));
+ buffer.append(HexDump.intToHex(getNFib()));
buffer.append(" (").append(getNFib()).append(" )\n");
buffer.append(" .nProduct = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getNProduct()));
+ buffer.append(HexDump.intToHex(getNProduct()));
buffer.append(" (").append(getNProduct()).append(" )\n");
buffer.append(" .lid = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLid()));
+ buffer.append(HexDump.intToHex(getLid()));
buffer.append(" (").append(getLid()).append(" )\n");
buffer.append(" .pnNext = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnNext()));
+ buffer.append(HexDump.intToHex(getPnNext()));
buffer.append(" (").append(getPnNext()).append(" )\n");
buffer.append(" .options = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getOptions()));
+ buffer.append(HexDump.shortToHex(getOptions()));
buffer.append(" (").append(getOptions()).append(" )\n");
buffer.append(" .fDot = ").append(isFDot()).append('\n');
buffer.append(" .fGlsy = ").append(isFGlsy()).append('\n');
@@ -838,23 +831,19 @@ public abstract class FIBAbstractType
buffer.append(" .fCrypto = ").append(isFCrypto()).append('\n');
buffer.append(" .nFibBack = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getNFibBack()));
+ buffer.append(HexDump.intToHex(getNFibBack()));
buffer.append(" (").append(getNFibBack()).append(" )\n");
buffer.append(" .lKey = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLKey()));
+ buffer.append(HexDump.intToHex(getLKey()));
buffer.append(" (").append(getLKey()).append(" )\n");
buffer.append(" .envr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getEnvr()));
+ buffer.append(HexDump.intToHex(getEnvr()));
buffer.append(" (").append(getEnvr()).append(" )\n");
buffer.append(" .history = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((short)getHistory()));
+ buffer.append(HexDump.shortToHex(getHistory()));
buffer.append(" (").append(getHistory()).append(" )\n");
buffer.append(" .fMac = ").append(isFMac()).append('\n');
buffer.append(" .fEmptySpecial = ").append(isFEmptySpecial()).append('\n');
@@ -864,1148 +853,919 @@ public abstract class FIBAbstractType
buffer.append(" .fSpare0 = ").append(getFSpare0()).append('\n');
buffer.append(" .chs = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getChs()));
+ buffer.append(HexDump.intToHex(getChs()));
buffer.append(" (").append(getChs()).append(" )\n");
buffer.append(" .chsTables = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getChsTables()));
+ buffer.append(HexDump.intToHex(getChsTables()));
buffer.append(" (").append(getChsTables()).append(" )\n");
buffer.append(" .fcMin = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcMin()));
+ buffer.append(HexDump.intToHex(getFcMin()));
buffer.append(" (").append(getFcMin()).append(" )\n");
buffer.append(" .fcMac = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcMac()));
+ buffer.append(HexDump.intToHex(getFcMac()));
buffer.append(" (").append(getFcMac()).append(" )\n");
buffer.append(" .csw = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCsw()));
+ buffer.append(HexDump.intToHex(getCsw()));
buffer.append(" (").append(getCsw()).append(" )\n");
buffer.append(" .wMagicCreated = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWMagicCreated()));
+ buffer.append(HexDump.intToHex(getWMagicCreated()));
buffer.append(" (").append(getWMagicCreated()).append(" )\n");
buffer.append(" .wMagicRevised = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWMagicRevised()));
+ buffer.append(HexDump.intToHex(getWMagicRevised()));
buffer.append(" (").append(getWMagicRevised()).append(" )\n");
buffer.append(" .wMagicCreatedPrivate = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWMagicCreatedPrivate()));
+ buffer.append(HexDump.intToHex(getWMagicCreatedPrivate()));
buffer.append(" (").append(getWMagicCreatedPrivate()).append(" )\n");
buffer.append(" .wMagicRevisedPrivate = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getWMagicRevisedPrivate()));
+ buffer.append(HexDump.intToHex(getWMagicRevisedPrivate()));
buffer.append(" (").append(getWMagicRevisedPrivate()).append(" )\n");
buffer.append(" .pnFbpChpFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpChpFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnFbpChpFirst_W6()));
buffer.append(" (").append(getPnFbpChpFirst_W6()).append(" )\n");
buffer.append(" .pnChpFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnChpFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnChpFirst_W6()));
buffer.append(" (").append(getPnChpFirst_W6()).append(" )\n");
buffer.append(" .cpnBteChp_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBteChp_W6()));
+ buffer.append(HexDump.intToHex(getCpnBteChp_W6()));
buffer.append(" (").append(getCpnBteChp_W6()).append(" )\n");
buffer.append(" .pnFbpPapFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpPapFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnFbpPapFirst_W6()));
buffer.append(" (").append(getPnFbpPapFirst_W6()).append(" )\n");
buffer.append(" .pnPapFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnPapFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnPapFirst_W6()));
buffer.append(" (").append(getPnPapFirst_W6()).append(" )\n");
buffer.append(" .cpnBtePap_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBtePap_W6()));
+ buffer.append(HexDump.intToHex(getCpnBtePap_W6()));
buffer.append(" (").append(getCpnBtePap_W6()).append(" )\n");
buffer.append(" .pnFbpLvcFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpLvcFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnFbpLvcFirst_W6()));
buffer.append(" (").append(getPnFbpLvcFirst_W6()).append(" )\n");
buffer.append(" .pnLvcFirst_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnLvcFirst_W6()));
+ buffer.append(HexDump.intToHex(getPnLvcFirst_W6()));
buffer.append(" (").append(getPnLvcFirst_W6()).append(" )\n");
buffer.append(" .cpnBteLvc_W6 = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBteLvc_W6()));
+ buffer.append(HexDump.intToHex(getCpnBteLvc_W6()));
buffer.append(" (").append(getCpnBteLvc_W6()).append(" )\n");
buffer.append(" .lidFE = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLidFE()));
+ buffer.append(HexDump.intToHex(getLidFE()));
buffer.append(" (").append(getLidFE()).append(" )\n");
buffer.append(" .clw = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getClw()));
+ buffer.append(HexDump.intToHex(getClw()));
buffer.append(" (").append(getClw()).append(" )\n");
buffer.append(" .cbMac = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCbMac()));
+ buffer.append(HexDump.intToHex(getCbMac()));
buffer.append(" (").append(getCbMac()).append(" )\n");
buffer.append(" .lProductCreated = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLProductCreated()));
+ buffer.append(HexDump.intToHex(getLProductCreated()));
buffer.append(" (").append(getLProductCreated()).append(" )\n");
buffer.append(" .lProductRevised = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLProductRevised()));
+ buffer.append(HexDump.intToHex(getLProductRevised()));
buffer.append(" (").append(getLProductRevised()).append(" )\n");
buffer.append(" .ccpText = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpText()));
+ buffer.append(HexDump.intToHex(getCcpText()));
buffer.append(" (").append(getCcpText()).append(" )\n");
buffer.append(" .ccpFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpFtn()));
+ buffer.append(HexDump.intToHex(getCcpFtn()));
buffer.append(" (").append(getCcpFtn()).append(" )\n");
buffer.append(" .ccpHdd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpHdd()));
+ buffer.append(HexDump.intToHex(getCcpHdd()));
buffer.append(" (").append(getCcpHdd()).append(" )\n");
buffer.append(" .ccpMcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpMcr()));
+ buffer.append(HexDump.intToHex(getCcpMcr()));
buffer.append(" (").append(getCcpMcr()).append(" )\n");
buffer.append(" .ccpAtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpAtn()));
+ buffer.append(HexDump.intToHex(getCcpAtn()));
buffer.append(" (").append(getCcpAtn()).append(" )\n");
buffer.append(" .ccpEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpEdn()));
+ buffer.append(HexDump.intToHex(getCcpEdn()));
buffer.append(" (").append(getCcpEdn()).append(" )\n");
buffer.append(" .ccpTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpTxbx()));
+ buffer.append(HexDump.intToHex(getCcpTxbx()));
buffer.append(" (").append(getCcpTxbx()).append(" )\n");
buffer.append(" .ccpHdrTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCcpHdrTxbx()));
+ buffer.append(HexDump.intToHex(getCcpHdrTxbx()));
buffer.append(" (").append(getCcpHdrTxbx()).append(" )\n");
buffer.append(" .pnFbpChpFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpChpFirst()));
+ buffer.append(HexDump.intToHex(getPnFbpChpFirst()));
buffer.append(" (").append(getPnFbpChpFirst()).append(" )\n");
buffer.append(" .pnChpFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnChpFirst()));
+ buffer.append(HexDump.intToHex(getPnChpFirst()));
buffer.append(" (").append(getPnChpFirst()).append(" )\n");
buffer.append(" .cpnBteChp = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBteChp()));
+ buffer.append(HexDump.intToHex(getCpnBteChp()));
buffer.append(" (").append(getCpnBteChp()).append(" )\n");
buffer.append(" .pnFbpPapFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpPapFirst()));
+ buffer.append(HexDump.intToHex(getPnFbpPapFirst()));
buffer.append(" (").append(getPnFbpPapFirst()).append(" )\n");
buffer.append(" .pnPapFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnPapFirst()));
+ buffer.append(HexDump.intToHex(getPnPapFirst()));
buffer.append(" (").append(getPnPapFirst()).append(" )\n");
buffer.append(" .cpnBtePap = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBtePap()));
+ buffer.append(HexDump.intToHex(getCpnBtePap()));
buffer.append(" (").append(getCpnBtePap()).append(" )\n");
buffer.append(" .pnFbpLvcFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnFbpLvcFirst()));
+ buffer.append(HexDump.intToHex(getPnFbpLvcFirst()));
buffer.append(" (").append(getPnFbpLvcFirst()).append(" )\n");
buffer.append(" .pnLvcFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getPnLvcFirst()));
+ buffer.append(HexDump.intToHex(getPnLvcFirst()));
buffer.append(" (").append(getPnLvcFirst()).append(" )\n");
buffer.append(" .cpnBteLvc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCpnBteLvc()));
+ buffer.append(HexDump.intToHex(getCpnBteLvc()));
buffer.append(" (").append(getCpnBteLvc()).append(" )\n");
buffer.append(" .fcIslandFirst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcIslandFirst()));
+ buffer.append(HexDump.intToHex(getFcIslandFirst()));
buffer.append(" (").append(getFcIslandFirst()).append(" )\n");
buffer.append(" .fcIslandLim = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcIslandLim()));
+ buffer.append(HexDump.intToHex(getFcIslandLim()));
buffer.append(" (").append(getFcIslandLim()).append(" )\n");
buffer.append(" .cfclcb = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCfclcb()));
+ buffer.append(HexDump.intToHex(getCfclcb()));
buffer.append(" (").append(getCfclcb()).append(" )\n");
buffer.append(" .fcStshfOrig = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcStshfOrig()));
+ buffer.append(HexDump.intToHex(getFcStshfOrig()));
buffer.append(" (").append(getFcStshfOrig()).append(" )\n");
buffer.append(" .lcbStshfOrig = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbStshfOrig()));
+ buffer.append(HexDump.intToHex(getLcbStshfOrig()));
buffer.append(" (").append(getLcbStshfOrig()).append(" )\n");
buffer.append(" .fcStshf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcStshf()));
+ buffer.append(HexDump.intToHex(getFcStshf()));
buffer.append(" (").append(getFcStshf()).append(" )\n");
buffer.append(" .lcbStshf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbStshf()));
+ buffer.append(HexDump.intToHex(getLcbStshf()));
buffer.append(" (").append(getLcbStshf()).append(" )\n");
buffer.append(" .fcPlcffndRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffndRef()));
+ buffer.append(HexDump.intToHex(getFcPlcffndRef()));
buffer.append(" (").append(getFcPlcffndRef()).append(" )\n");
buffer.append(" .lcbPlcffndRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffndRef()));
+ buffer.append(HexDump.intToHex(getLcbPlcffndRef()));
buffer.append(" (").append(getLcbPlcffndRef()).append(" )\n");
buffer.append(" .fcPlcffndTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffndTxt()));
+ buffer.append(HexDump.intToHex(getFcPlcffndTxt()));
buffer.append(" (").append(getFcPlcffndTxt()).append(" )\n");
buffer.append(" .lcbPlcffndTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffndTxt()));
+ buffer.append(HexDump.intToHex(getLcbPlcffndTxt()));
buffer.append(" (").append(getLcbPlcffndTxt()).append(" )\n");
buffer.append(" .fcPlcfandRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfandRef()));
+ buffer.append(HexDump.intToHex(getFcPlcfandRef()));
buffer.append(" (").append(getFcPlcfandRef()).append(" )\n");
buffer.append(" .lcbPlcfandRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfandRef()));
+ buffer.append(HexDump.intToHex(getLcbPlcfandRef()));
buffer.append(" (").append(getLcbPlcfandRef()).append(" )\n");
buffer.append(" .fcPlcfandTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfandTxt()));
+ buffer.append(HexDump.intToHex(getFcPlcfandTxt()));
buffer.append(" (").append(getFcPlcfandTxt()).append(" )\n");
buffer.append(" .lcbPlcfandTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfandTxt()));
+ buffer.append(HexDump.intToHex(getLcbPlcfandTxt()));
buffer.append(" (").append(getLcbPlcfandTxt()).append(" )\n");
buffer.append(" .fcPlcfsed = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfsed()));
+ buffer.append(HexDump.intToHex(getFcPlcfsed()));
buffer.append(" (").append(getFcPlcfsed()).append(" )\n");
buffer.append(" .lcbPlcfsed = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfsed()));
+ buffer.append(HexDump.intToHex(getLcbPlcfsed()));
buffer.append(" (").append(getLcbPlcfsed()).append(" )\n");
buffer.append(" .fcPlcpad = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcpad()));
+ buffer.append(HexDump.intToHex(getFcPlcpad()));
buffer.append(" (").append(getFcPlcpad()).append(" )\n");
buffer.append(" .lcbPlcpad = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcpad()));
+ buffer.append(HexDump.intToHex(getLcbPlcpad()));
buffer.append(" (").append(getLcbPlcpad()).append(" )\n");
buffer.append(" .fcPlcfphe = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfphe()));
+ buffer.append(HexDump.intToHex(getFcPlcfphe()));
buffer.append(" (").append(getFcPlcfphe()).append(" )\n");
buffer.append(" .lcbPlcfphe = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfphe()));
+ buffer.append(HexDump.intToHex(getLcbPlcfphe()));
buffer.append(" (").append(getLcbPlcfphe()).append(" )\n");
buffer.append(" .fcSttbfglsy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfglsy()));
+ buffer.append(HexDump.intToHex(getFcSttbfglsy()));
buffer.append(" (").append(getFcSttbfglsy()).append(" )\n");
buffer.append(" .lcbSttbfglsy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfglsy()));
+ buffer.append(HexDump.intToHex(getLcbSttbfglsy()));
buffer.append(" (").append(getLcbSttbfglsy()).append(" )\n");
buffer.append(" .fcPlcfglsy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfglsy()));
+ buffer.append(HexDump.intToHex(getFcPlcfglsy()));
buffer.append(" (").append(getFcPlcfglsy()).append(" )\n");
buffer.append(" .lcbPlcfglsy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfglsy()));
+ buffer.append(HexDump.intToHex(getLcbPlcfglsy()));
buffer.append(" (").append(getLcbPlcfglsy()).append(" )\n");
buffer.append(" .fcPlcfhdd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfhdd()));
+ buffer.append(HexDump.intToHex(getFcPlcfhdd()));
buffer.append(" (").append(getFcPlcfhdd()).append(" )\n");
buffer.append(" .lcbPlcfhdd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfhdd()));
+ buffer.append(HexDump.intToHex(getLcbPlcfhdd()));
buffer.append(" (").append(getLcbPlcfhdd()).append(" )\n");
buffer.append(" .fcPlcfbteChpx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfbteChpx()));
+ buffer.append(HexDump.intToHex(getFcPlcfbteChpx()));
buffer.append(" (").append(getFcPlcfbteChpx()).append(" )\n");
buffer.append(" .lcbPlcfbteChpx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfbteChpx()));
+ buffer.append(HexDump.intToHex(getLcbPlcfbteChpx()));
buffer.append(" (").append(getLcbPlcfbteChpx()).append(" )\n");
buffer.append(" .fcPlcfbtePapx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfbtePapx()));
+ buffer.append(HexDump.intToHex(getFcPlcfbtePapx()));
buffer.append(" (").append(getFcPlcfbtePapx()).append(" )\n");
buffer.append(" .lcbPlcfbtePapx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfbtePapx()));
+ buffer.append(HexDump.intToHex(getLcbPlcfbtePapx()));
buffer.append(" (").append(getLcbPlcfbtePapx()).append(" )\n");
buffer.append(" .fcPlcfsea = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfsea()));
+ buffer.append(HexDump.intToHex(getFcPlcfsea()));
buffer.append(" (").append(getFcPlcfsea()).append(" )\n");
buffer.append(" .lcbPlcfsea = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfsea()));
+ buffer.append(HexDump.intToHex(getLcbPlcfsea()));
buffer.append(" (").append(getLcbPlcfsea()).append(" )\n");
buffer.append(" .fcSttbfffn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfffn()));
+ buffer.append(HexDump.intToHex(getFcSttbfffn()));
buffer.append(" (").append(getFcSttbfffn()).append(" )\n");
buffer.append(" .lcbSttbfffn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfffn()));
+ buffer.append(HexDump.intToHex(getLcbSttbfffn()));
buffer.append(" (").append(getLcbSttbfffn()).append(" )\n");
buffer.append(" .fcPlcffldMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldMom()));
+ buffer.append(HexDump.intToHex(getFcPlcffldMom()));
buffer.append(" (").append(getFcPlcffldMom()).append(" )\n");
buffer.append(" .lcbPlcffldMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldMom()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldMom()));
buffer.append(" (").append(getLcbPlcffldMom()).append(" )\n");
buffer.append(" .fcPlcffldHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldHdr()));
+ buffer.append(HexDump.intToHex(getFcPlcffldHdr()));
buffer.append(" (").append(getFcPlcffldHdr()).append(" )\n");
buffer.append(" .lcbPlcffldHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldHdr()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldHdr()));
buffer.append(" (").append(getLcbPlcffldHdr()).append(" )\n");
buffer.append(" .fcPlcffldFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldFtn()));
+ buffer.append(HexDump.intToHex(getFcPlcffldFtn()));
buffer.append(" (").append(getFcPlcffldFtn()).append(" )\n");
buffer.append(" .lcbPlcffldFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldFtn()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldFtn()));
buffer.append(" (").append(getLcbPlcffldFtn()).append(" )\n");
buffer.append(" .fcPlcffldAtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldAtn()));
+ buffer.append(HexDump.intToHex(getFcPlcffldAtn()));
buffer.append(" (").append(getFcPlcffldAtn()).append(" )\n");
buffer.append(" .lcbPlcffldAtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldAtn()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldAtn()));
buffer.append(" (").append(getLcbPlcffldAtn()).append(" )\n");
buffer.append(" .fcPlcffldMcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldMcr()));
+ buffer.append(HexDump.intToHex(getFcPlcffldMcr()));
buffer.append(" (").append(getFcPlcffldMcr()).append(" )\n");
buffer.append(" .lcbPlcffldMcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldMcr()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldMcr()));
buffer.append(" (").append(getLcbPlcffldMcr()).append(" )\n");
buffer.append(" .fcSttbfbkmk = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfbkmk()));
+ buffer.append(HexDump.intToHex(getFcSttbfbkmk()));
buffer.append(" (").append(getFcSttbfbkmk()).append(" )\n");
buffer.append(" .lcbSttbfbkmk = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfbkmk()));
+ buffer.append(HexDump.intToHex(getLcbSttbfbkmk()));
buffer.append(" (").append(getLcbSttbfbkmk()).append(" )\n");
buffer.append(" .fcPlcfbkf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfbkf()));
+ buffer.append(HexDump.intToHex(getFcPlcfbkf()));
buffer.append(" (").append(getFcPlcfbkf()).append(" )\n");
buffer.append(" .lcbPlcfbkf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfbkf()));
+ buffer.append(HexDump.intToHex(getLcbPlcfbkf()));
buffer.append(" (").append(getLcbPlcfbkf()).append(" )\n");
buffer.append(" .fcPlcfbkl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfbkl()));
+ buffer.append(HexDump.intToHex(getFcPlcfbkl()));
buffer.append(" (").append(getFcPlcfbkl()).append(" )\n");
buffer.append(" .lcbPlcfbkl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfbkl()));
+ buffer.append(HexDump.intToHex(getLcbPlcfbkl()));
buffer.append(" (").append(getLcbPlcfbkl()).append(" )\n");
buffer.append(" .fcCmds = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcCmds()));
+ buffer.append(HexDump.intToHex(getFcCmds()));
buffer.append(" (").append(getFcCmds()).append(" )\n");
buffer.append(" .lcbCmds = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbCmds()));
+ buffer.append(HexDump.intToHex(getLcbCmds()));
buffer.append(" (").append(getLcbCmds()).append(" )\n");
buffer.append(" .fcPlcmcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcmcr()));
+ buffer.append(HexDump.intToHex(getFcPlcmcr()));
buffer.append(" (").append(getFcPlcmcr()).append(" )\n");
buffer.append(" .lcbPlcmcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcmcr()));
+ buffer.append(HexDump.intToHex(getLcbPlcmcr()));
buffer.append(" (").append(getLcbPlcmcr()).append(" )\n");
buffer.append(" .fcSttbfmcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfmcr()));
+ buffer.append(HexDump.intToHex(getFcSttbfmcr()));
buffer.append(" (").append(getFcSttbfmcr()).append(" )\n");
buffer.append(" .lcbSttbfmcr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfmcr()));
+ buffer.append(HexDump.intToHex(getLcbSttbfmcr()));
buffer.append(" (").append(getLcbSttbfmcr()).append(" )\n");
buffer.append(" .fcPrDrvr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPrDrvr()));
+ buffer.append(HexDump.intToHex(getFcPrDrvr()));
buffer.append(" (").append(getFcPrDrvr()).append(" )\n");
buffer.append(" .lcbPrDrvr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPrDrvr()));
+ buffer.append(HexDump.intToHex(getLcbPrDrvr()));
buffer.append(" (").append(getLcbPrDrvr()).append(" )\n");
buffer.append(" .fcPrEnvPort = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPrEnvPort()));
+ buffer.append(HexDump.intToHex(getFcPrEnvPort()));
buffer.append(" (").append(getFcPrEnvPort()).append(" )\n");
buffer.append(" .lcbPrEnvPort = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPrEnvPort()));
+ buffer.append(HexDump.intToHex(getLcbPrEnvPort()));
buffer.append(" (").append(getLcbPrEnvPort()).append(" )\n");
buffer.append(" .fcPrEnvLand = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPrEnvLand()));
+ buffer.append(HexDump.intToHex(getFcPrEnvLand()));
buffer.append(" (").append(getFcPrEnvLand()).append(" )\n");
buffer.append(" .lcbPrEnvLand = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPrEnvLand()));
+ buffer.append(HexDump.intToHex(getLcbPrEnvLand()));
buffer.append(" (").append(getLcbPrEnvLand()).append(" )\n");
buffer.append(" .fcWss = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcWss()));
+ buffer.append(HexDump.intToHex(getFcWss()));
buffer.append(" (").append(getFcWss()).append(" )\n");
buffer.append(" .lcbWss = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbWss()));
+ buffer.append(HexDump.intToHex(getLcbWss()));
buffer.append(" (").append(getLcbWss()).append(" )\n");
buffer.append(" .fcDop = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcDop()));
+ buffer.append(HexDump.intToHex(getFcDop()));
buffer.append(" (").append(getFcDop()).append(" )\n");
buffer.append(" .lcbDop = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbDop()));
+ buffer.append(HexDump.intToHex(getLcbDop()));
buffer.append(" (").append(getLcbDop()).append(" )\n");
buffer.append(" .fcSttbfAssoc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfAssoc()));
+ buffer.append(HexDump.intToHex(getFcSttbfAssoc()));
buffer.append(" (").append(getFcSttbfAssoc()).append(" )\n");
buffer.append(" .lcbSttbfAssoc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfAssoc()));
+ buffer.append(HexDump.intToHex(getLcbSttbfAssoc()));
buffer.append(" (").append(getLcbSttbfAssoc()).append(" )\n");
buffer.append(" .fcClx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcClx()));
+ buffer.append(HexDump.intToHex(getFcClx()));
buffer.append(" (").append(getFcClx()).append(" )\n");
buffer.append(" .lcbClx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbClx()));
+ buffer.append(HexDump.intToHex(getLcbClx()));
buffer.append(" (").append(getLcbClx()).append(" )\n");
buffer.append(" .fcPlcfpgdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfpgdFtn()));
+ buffer.append(HexDump.intToHex(getFcPlcfpgdFtn()));
buffer.append(" (").append(getFcPlcfpgdFtn()).append(" )\n");
buffer.append(" .lcbPlcfpgdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfpgdFtn()));
+ buffer.append(HexDump.intToHex(getLcbPlcfpgdFtn()));
buffer.append(" (").append(getLcbPlcfpgdFtn()).append(" )\n");
buffer.append(" .fcAutosaveSource = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcAutosaveSource()));
+ buffer.append(HexDump.intToHex(getFcAutosaveSource()));
buffer.append(" (").append(getFcAutosaveSource()).append(" )\n");
buffer.append(" .lcbAutosaveSource = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbAutosaveSource()));
+ buffer.append(HexDump.intToHex(getLcbAutosaveSource()));
buffer.append(" (").append(getLcbAutosaveSource()).append(" )\n");
buffer.append(" .fcGrpXstAtnOwners = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcGrpXstAtnOwners()));
+ buffer.append(HexDump.intToHex(getFcGrpXstAtnOwners()));
buffer.append(" (").append(getFcGrpXstAtnOwners()).append(" )\n");
buffer.append(" .lcbGrpXstAtnOwners = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbGrpXstAtnOwners()));
+ buffer.append(HexDump.intToHex(getLcbGrpXstAtnOwners()));
buffer.append(" (").append(getLcbGrpXstAtnOwners()).append(" )\n");
buffer.append(" .fcSttbfAtnbkmk = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfAtnbkmk()));
+ buffer.append(HexDump.intToHex(getFcSttbfAtnbkmk()));
buffer.append(" (").append(getFcSttbfAtnbkmk()).append(" )\n");
buffer.append(" .lcbSttbfAtnbkmk = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfAtnbkmk()));
+ buffer.append(HexDump.intToHex(getLcbSttbfAtnbkmk()));
buffer.append(" (").append(getLcbSttbfAtnbkmk()).append(" )\n");
buffer.append(" .fcPlcdoaMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcdoaMom()));
+ buffer.append(HexDump.intToHex(getFcPlcdoaMom()));
buffer.append(" (").append(getFcPlcdoaMom()).append(" )\n");
buffer.append(" .lcbPlcdoaMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcdoaMom()));
+ buffer.append(HexDump.intToHex(getLcbPlcdoaMom()));
buffer.append(" (").append(getLcbPlcdoaMom()).append(" )\n");
buffer.append(" .fcPlcdoaHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcdoaHdr()));
+ buffer.append(HexDump.intToHex(getFcPlcdoaHdr()));
buffer.append(" (").append(getFcPlcdoaHdr()).append(" )\n");
buffer.append(" .lcbPlcdoaHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcdoaHdr()));
+ buffer.append(HexDump.intToHex(getLcbPlcdoaHdr()));
buffer.append(" (").append(getLcbPlcdoaHdr()).append(" )\n");
buffer.append(" .fcPlcspaMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcspaMom()));
+ buffer.append(HexDump.intToHex(getFcPlcspaMom()));
buffer.append(" (").append(getFcPlcspaMom()).append(" )\n");
buffer.append(" .lcbPlcspaMom = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcspaMom()));
+ buffer.append(HexDump.intToHex(getLcbPlcspaMom()));
buffer.append(" (").append(getLcbPlcspaMom()).append(" )\n");
buffer.append(" .fcPlcspaHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcspaHdr()));
+ buffer.append(HexDump.intToHex(getFcPlcspaHdr()));
buffer.append(" (").append(getFcPlcspaHdr()).append(" )\n");
buffer.append(" .lcbPlcspaHdr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcspaHdr()));
+ buffer.append(HexDump.intToHex(getLcbPlcspaHdr()));
buffer.append(" (").append(getLcbPlcspaHdr()).append(" )\n");
buffer.append(" .fcPlcfAtnbkf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfAtnbkf()));
+ buffer.append(HexDump.intToHex(getFcPlcfAtnbkf()));
buffer.append(" (").append(getFcPlcfAtnbkf()).append(" )\n");
buffer.append(" .lcbPlcfAtnbkf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfAtnbkf()));
+ buffer.append(HexDump.intToHex(getLcbPlcfAtnbkf()));
buffer.append(" (").append(getLcbPlcfAtnbkf()).append(" )\n");
buffer.append(" .fcPlcfAtnbkl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfAtnbkl()));
+ buffer.append(HexDump.intToHex(getFcPlcfAtnbkl()));
buffer.append(" (").append(getFcPlcfAtnbkl()).append(" )\n");
buffer.append(" .lcbPlcfAtnbkl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfAtnbkl()));
+ buffer.append(HexDump.intToHex(getLcbPlcfAtnbkl()));
buffer.append(" (").append(getLcbPlcfAtnbkl()).append(" )\n");
buffer.append(" .fcPms = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPms()));
+ buffer.append(HexDump.intToHex(getFcPms()));
buffer.append(" (").append(getFcPms()).append(" )\n");
buffer.append(" .lcbPms = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPms()));
+ buffer.append(HexDump.intToHex(getLcbPms()));
buffer.append(" (").append(getLcbPms()).append(" )\n");
buffer.append(" .fcFormFldSttbs = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcFormFldSttbs()));
+ buffer.append(HexDump.intToHex(getFcFormFldSttbs()));
buffer.append(" (").append(getFcFormFldSttbs()).append(" )\n");
buffer.append(" .lcbFormFldSttbs = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbFormFldSttbs()));
+ buffer.append(HexDump.intToHex(getLcbFormFldSttbs()));
buffer.append(" (").append(getLcbFormFldSttbs()).append(" )\n");
buffer.append(" .fcPlcfendRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfendRef()));
+ buffer.append(HexDump.intToHex(getFcPlcfendRef()));
buffer.append(" (").append(getFcPlcfendRef()).append(" )\n");
buffer.append(" .lcbPlcfendRef = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfendRef()));
+ buffer.append(HexDump.intToHex(getLcbPlcfendRef()));
buffer.append(" (").append(getLcbPlcfendRef()).append(" )\n");
buffer.append(" .fcPlcfendTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfendTxt()));
+ buffer.append(HexDump.intToHex(getFcPlcfendTxt()));
buffer.append(" (").append(getFcPlcfendTxt()).append(" )\n");
buffer.append(" .lcbPlcfendTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfendTxt()));
+ buffer.append(HexDump.intToHex(getLcbPlcfendTxt()));
buffer.append(" (").append(getLcbPlcfendTxt()).append(" )\n");
buffer.append(" .fcPlcffldEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldEdn()));
+ buffer.append(HexDump.intToHex(getFcPlcffldEdn()));
buffer.append(" (").append(getFcPlcffldEdn()).append(" )\n");
buffer.append(" .lcbPlcffldEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldEdn()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldEdn()));
buffer.append(" (").append(getLcbPlcffldEdn()).append(" )\n");
buffer.append(" .fcPlcfpgdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfpgdEdn()));
+ buffer.append(HexDump.intToHex(getFcPlcfpgdEdn()));
buffer.append(" (").append(getFcPlcfpgdEdn()).append(" )\n");
buffer.append(" .lcbPlcfpgdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfpgdEdn()));
+ buffer.append(HexDump.intToHex(getLcbPlcfpgdEdn()));
buffer.append(" (").append(getLcbPlcfpgdEdn()).append(" )\n");
buffer.append(" .fcDggInfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcDggInfo()));
+ buffer.append(HexDump.intToHex(getFcDggInfo()));
buffer.append(" (").append(getFcDggInfo()).append(" )\n");
buffer.append(" .lcbDggInfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbDggInfo()));
+ buffer.append(HexDump.intToHex(getLcbDggInfo()));
buffer.append(" (").append(getLcbDggInfo()).append(" )\n");
buffer.append(" .fcSttbfRMark = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfRMark()));
+ buffer.append(HexDump.intToHex(getFcSttbfRMark()));
buffer.append(" (").append(getFcSttbfRMark()).append(" )\n");
buffer.append(" .lcbSttbfRMark = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfRMark()));
+ buffer.append(HexDump.intToHex(getLcbSttbfRMark()));
buffer.append(" (").append(getLcbSttbfRMark()).append(" )\n");
buffer.append(" .fcSttbCaption = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbCaption()));
+ buffer.append(HexDump.intToHex(getFcSttbCaption()));
buffer.append(" (").append(getFcSttbCaption()).append(" )\n");
buffer.append(" .lcbSttbCaption = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbCaption()));
+ buffer.append(HexDump.intToHex(getLcbSttbCaption()));
buffer.append(" (").append(getLcbSttbCaption()).append(" )\n");
buffer.append(" .fcSttbAutoCaption = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbAutoCaption()));
+ buffer.append(HexDump.intToHex(getFcSttbAutoCaption()));
buffer.append(" (").append(getFcSttbAutoCaption()).append(" )\n");
buffer.append(" .lcbSttbAutoCaption = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbAutoCaption()));
+ buffer.append(HexDump.intToHex(getLcbSttbAutoCaption()));
buffer.append(" (").append(getLcbSttbAutoCaption()).append(" )\n");
buffer.append(" .fcPlcfwkb = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfwkb()));
+ buffer.append(HexDump.intToHex(getFcPlcfwkb()));
buffer.append(" (").append(getFcPlcfwkb()).append(" )\n");
buffer.append(" .lcbPlcfwkb = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfwkb()));
+ buffer.append(HexDump.intToHex(getLcbPlcfwkb()));
buffer.append(" (").append(getLcbPlcfwkb()).append(" )\n");
buffer.append(" .fcPlcfspl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfspl()));
+ buffer.append(HexDump.intToHex(getFcPlcfspl()));
buffer.append(" (").append(getFcPlcfspl()).append(" )\n");
buffer.append(" .lcbPlcfspl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfspl()));
+ buffer.append(HexDump.intToHex(getLcbPlcfspl()));
buffer.append(" (").append(getLcbPlcfspl()).append(" )\n");
buffer.append(" .fcPlcftxbxTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcftxbxTxt()));
+ buffer.append(HexDump.intToHex(getFcPlcftxbxTxt()));
buffer.append(" (").append(getFcPlcftxbxTxt()).append(" )\n");
buffer.append(" .lcbPlcftxbxTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcftxbxTxt()));
+ buffer.append(HexDump.intToHex(getLcbPlcftxbxTxt()));
buffer.append(" (").append(getLcbPlcftxbxTxt()).append(" )\n");
buffer.append(" .fcPlcffldTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldTxbx()));
+ buffer.append(HexDump.intToHex(getFcPlcffldTxbx()));
buffer.append(" (").append(getFcPlcffldTxbx()).append(" )\n");
buffer.append(" .lcbPlcffldTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldTxbx()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldTxbx()));
buffer.append(" (").append(getLcbPlcffldTxbx()).append(" )\n");
buffer.append(" .fcPlcfhdrtxbxTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfhdrtxbxTxt()));
+ buffer.append(HexDump.intToHex(getFcPlcfhdrtxbxTxt()));
buffer.append(" (").append(getFcPlcfhdrtxbxTxt()).append(" )\n");
buffer.append(" .lcbPlcfhdrtxbxTxt = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfhdrtxbxTxt()));
+ buffer.append(HexDump.intToHex(getLcbPlcfhdrtxbxTxt()));
buffer.append(" (").append(getLcbPlcfhdrtxbxTxt()).append(" )\n");
buffer.append(" .fcPlcffldHdrTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcffldHdrTxbx()));
+ buffer.append(HexDump.intToHex(getFcPlcffldHdrTxbx()));
buffer.append(" (").append(getFcPlcffldHdrTxbx()).append(" )\n");
buffer.append(" .lcbPlcffldHdrTxbx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcffldHdrTxbx()));
+ buffer.append(HexDump.intToHex(getLcbPlcffldHdrTxbx()));
buffer.append(" (").append(getLcbPlcffldHdrTxbx()).append(" )\n");
buffer.append(" .fcStwUser = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcStwUser()));
+ buffer.append(HexDump.intToHex(getFcStwUser()));
buffer.append(" (").append(getFcStwUser()).append(" )\n");
buffer.append(" .lcbStwUser = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbStwUser()));
+ buffer.append(HexDump.intToHex(getLcbStwUser()));
buffer.append(" (").append(getLcbStwUser()).append(" )\n");
buffer.append(" .fcSttbttmbd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbttmbd()));
+ buffer.append(HexDump.intToHex(getFcSttbttmbd()));
buffer.append(" (").append(getFcSttbttmbd()).append(" )\n");
buffer.append(" .cbSttbttmbd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getCbSttbttmbd()));
+ buffer.append(HexDump.intToHex(getCbSttbttmbd()));
buffer.append(" (").append(getCbSttbttmbd()).append(" )\n");
buffer.append(" .fcUnused = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcUnused()));
+ buffer.append(HexDump.intToHex(getFcUnused()));
buffer.append(" (").append(getFcUnused()).append(" )\n");
buffer.append(" .lcbUnused = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbUnused()));
+ buffer.append(HexDump.intToHex(getLcbUnused()));
buffer.append(" (").append(getLcbUnused()).append(" )\n");
buffer.append(" .fcPgdMother = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPgdMother()));
+ buffer.append(HexDump.intToHex(getFcPgdMother()));
buffer.append(" (").append(getFcPgdMother()).append(" )\n");
buffer.append(" .lcbPgdMother = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPgdMother()));
+ buffer.append(HexDump.intToHex(getLcbPgdMother()));
buffer.append(" (").append(getLcbPgdMother()).append(" )\n");
buffer.append(" .fcBkdMother = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcBkdMother()));
+ buffer.append(HexDump.intToHex(getFcBkdMother()));
buffer.append(" (").append(getFcBkdMother()).append(" )\n");
buffer.append(" .lcbBkdMother = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbBkdMother()));
+ buffer.append(HexDump.intToHex(getLcbBkdMother()));
buffer.append(" (").append(getLcbBkdMother()).append(" )\n");
buffer.append(" .fcPgdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPgdFtn()));
+ buffer.append(HexDump.intToHex(getFcPgdFtn()));
buffer.append(" (").append(getFcPgdFtn()).append(" )\n");
buffer.append(" .lcbPgdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPgdFtn()));
+ buffer.append(HexDump.intToHex(getLcbPgdFtn()));
buffer.append(" (").append(getLcbPgdFtn()).append(" )\n");
buffer.append(" .fcBkdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcBkdFtn()));
+ buffer.append(HexDump.intToHex(getFcBkdFtn()));
buffer.append(" (").append(getFcBkdFtn()).append(" )\n");
buffer.append(" .lcbBkdFtn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbBkdFtn()));
+ buffer.append(HexDump.intToHex(getLcbBkdFtn()));
buffer.append(" (").append(getLcbBkdFtn()).append(" )\n");
buffer.append(" .fcPgdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPgdEdn()));
+ buffer.append(HexDump.intToHex(getFcPgdEdn()));
buffer.append(" (").append(getFcPgdEdn()).append(" )\n");
buffer.append(" .lcbPgdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPgdEdn()));
+ buffer.append(HexDump.intToHex(getLcbPgdEdn()));
buffer.append(" (").append(getLcbPgdEdn()).append(" )\n");
buffer.append(" .fcBkdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcBkdEdn()));
+ buffer.append(HexDump.intToHex(getFcBkdEdn()));
buffer.append(" (").append(getFcBkdEdn()).append(" )\n");
buffer.append(" .lcbBkdEdn = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbBkdEdn()));
+ buffer.append(HexDump.intToHex(getLcbBkdEdn()));
buffer.append(" (").append(getLcbBkdEdn()).append(" )\n");
buffer.append(" .fcSttbfIntlFld = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfIntlFld()));
+ buffer.append(HexDump.intToHex(getFcSttbfIntlFld()));
buffer.append(" (").append(getFcSttbfIntlFld()).append(" )\n");
buffer.append(" .lcbSttbfIntlFld = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfIntlFld()));
+ buffer.append(HexDump.intToHex(getLcbSttbfIntlFld()));
buffer.append(" (").append(getLcbSttbfIntlFld()).append(" )\n");
buffer.append(" .fcRouteSlip = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcRouteSlip()));
+ buffer.append(HexDump.intToHex(getFcRouteSlip()));
buffer.append(" (").append(getFcRouteSlip()).append(" )\n");
buffer.append(" .lcbRouteSlip = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbRouteSlip()));
+ buffer.append(HexDump.intToHex(getLcbRouteSlip()));
buffer.append(" (").append(getLcbRouteSlip()).append(" )\n");
buffer.append(" .fcSttbSavedBy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbSavedBy()));
+ buffer.append(HexDump.intToHex(getFcSttbSavedBy()));
buffer.append(" (").append(getFcSttbSavedBy()).append(" )\n");
buffer.append(" .lcbSttbSavedBy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbSavedBy()));
+ buffer.append(HexDump.intToHex(getLcbSttbSavedBy()));
buffer.append(" (").append(getLcbSttbSavedBy()).append(" )\n");
buffer.append(" .fcSttbFnm = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbFnm()));
+ buffer.append(HexDump.intToHex(getFcSttbFnm()));
buffer.append(" (").append(getFcSttbFnm()).append(" )\n");
buffer.append(" .lcbSttbFnm = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbFnm()));
+ buffer.append(HexDump.intToHex(getLcbSttbFnm()));
buffer.append(" (").append(getLcbSttbFnm()).append(" )\n");
buffer.append(" .fcPlcfLst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfLst()));
+ buffer.append(HexDump.intToHex(getFcPlcfLst()));
buffer.append(" (").append(getFcPlcfLst()).append(" )\n");
buffer.append(" .lcbPlcfLst = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfLst()));
+ buffer.append(HexDump.intToHex(getLcbPlcfLst()));
buffer.append(" (").append(getLcbPlcfLst()).append(" )\n");
buffer.append(" .fcPlfLfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlfLfo()));
+ buffer.append(HexDump.intToHex(getFcPlfLfo()));
buffer.append(" (").append(getFcPlfLfo()).append(" )\n");
buffer.append(" .lcbPlfLfo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlfLfo()));
+ buffer.append(HexDump.intToHex(getLcbPlfLfo()));
buffer.append(" (").append(getLcbPlfLfo()).append(" )\n");
buffer.append(" .fcPlcftxbxBkd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcftxbxBkd()));
+ buffer.append(HexDump.intToHex(getFcPlcftxbxBkd()));
buffer.append(" (").append(getFcPlcftxbxBkd()).append(" )\n");
buffer.append(" .lcbPlcftxbxBkd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcftxbxBkd()));
+ buffer.append(HexDump.intToHex(getLcbPlcftxbxBkd()));
buffer.append(" (").append(getLcbPlcftxbxBkd()).append(" )\n");
buffer.append(" .fcPlcftxbxHdrBkd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcftxbxHdrBkd()));
+ buffer.append(HexDump.intToHex(getFcPlcftxbxHdrBkd()));
buffer.append(" (").append(getFcPlcftxbxHdrBkd()).append(" )\n");
buffer.append(" .lcbPlcftxbxHdrBkd = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcftxbxHdrBkd()));
+ buffer.append(HexDump.intToHex(getLcbPlcftxbxHdrBkd()));
buffer.append(" (").append(getLcbPlcftxbxHdrBkd()).append(" )\n");
buffer.append(" .fcDocUndo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcDocUndo()));
+ buffer.append(HexDump.intToHex(getFcDocUndo()));
buffer.append(" (").append(getFcDocUndo()).append(" )\n");
buffer.append(" .lcbDocUndo = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbDocUndo()));
+ buffer.append(HexDump.intToHex(getLcbDocUndo()));
buffer.append(" (").append(getLcbDocUndo()).append(" )\n");
buffer.append(" .fcRgbuse = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcRgbuse()));
+ buffer.append(HexDump.intToHex(getFcRgbuse()));
buffer.append(" (").append(getFcRgbuse()).append(" )\n");
buffer.append(" .lcbRgbuse = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbRgbuse()));
+ buffer.append(HexDump.intToHex(getLcbRgbuse()));
buffer.append(" (").append(getLcbRgbuse()).append(" )\n");
buffer.append(" .fcUsp = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcUsp()));
+ buffer.append(HexDump.intToHex(getFcUsp()));
buffer.append(" (").append(getFcUsp()).append(" )\n");
buffer.append(" .lcbUsp = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbUsp()));
+ buffer.append(HexDump.intToHex(getLcbUsp()));
buffer.append(" (").append(getLcbUsp()).append(" )\n");
buffer.append(" .fcUskf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcUskf()));
+ buffer.append(HexDump.intToHex(getFcUskf()));
buffer.append(" (").append(getFcUskf()).append(" )\n");
buffer.append(" .lcbUskf = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbUskf()));
+ buffer.append(HexDump.intToHex(getLcbUskf()));
buffer.append(" (").append(getLcbUskf()).append(" )\n");
buffer.append(" .fcPlcupcRgbuse = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcupcRgbuse()));
+ buffer.append(HexDump.intToHex(getFcPlcupcRgbuse()));
buffer.append(" (").append(getFcPlcupcRgbuse()).append(" )\n");
buffer.append(" .lcbPlcupcRgbuse = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcupcRgbuse()));
+ buffer.append(HexDump.intToHex(getLcbPlcupcRgbuse()));
buffer.append(" (").append(getLcbPlcupcRgbuse()).append(" )\n");
buffer.append(" .fcPlcupcUsp = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcupcUsp()));
+ buffer.append(HexDump.intToHex(getFcPlcupcUsp()));
buffer.append(" (").append(getFcPlcupcUsp()).append(" )\n");
buffer.append(" .lcbPlcupcUsp = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcupcUsp()));
+ buffer.append(HexDump.intToHex(getLcbPlcupcUsp()));
buffer.append(" (").append(getLcbPlcupcUsp()).append(" )\n");
buffer.append(" .fcSttbGlsyStyle = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbGlsyStyle()));
+ buffer.append(HexDump.intToHex(getFcSttbGlsyStyle()));
buffer.append(" (").append(getFcSttbGlsyStyle()).append(" )\n");
buffer.append(" .lcbSttbGlsyStyle = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbGlsyStyle()));
+ buffer.append(HexDump.intToHex(getLcbSttbGlsyStyle()));
buffer.append(" (").append(getLcbSttbGlsyStyle()).append(" )\n");
buffer.append(" .fcPlgosl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlgosl()));
+ buffer.append(HexDump.intToHex(getFcPlgosl()));
buffer.append(" (").append(getFcPlgosl()).append(" )\n");
buffer.append(" .lcbPlgosl = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlgosl()));
+ buffer.append(HexDump.intToHex(getLcbPlgosl()));
buffer.append(" (").append(getLcbPlgosl()).append(" )\n");
buffer.append(" .fcPlcocx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcocx()));
+ buffer.append(HexDump.intToHex(getFcPlcocx()));
buffer.append(" (").append(getFcPlcocx()).append(" )\n");
buffer.append(" .lcbPlcocx = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcocx()));
+ buffer.append(HexDump.intToHex(getLcbPlcocx()));
buffer.append(" (").append(getLcbPlcocx()).append(" )\n");
buffer.append(" .fcPlcfbteLvc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfbteLvc()));
+ buffer.append(HexDump.intToHex(getFcPlcfbteLvc()));
buffer.append(" (").append(getFcPlcfbteLvc()).append(" )\n");
buffer.append(" .lcbPlcfbteLvc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfbteLvc()));
+ buffer.append(HexDump.intToHex(getLcbPlcfbteLvc()));
buffer.append(" (").append(getLcbPlcfbteLvc()).append(" )\n");
buffer.append(" .dwLowDateTime = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDwLowDateTime()));
+ buffer.append(HexDump.intToHex(getDwLowDateTime()));
buffer.append(" (").append(getDwLowDateTime()).append(" )\n");
buffer.append(" .dwHighDateTime = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getDwHighDateTime()));
+ buffer.append(HexDump.intToHex(getDwHighDateTime()));
buffer.append(" (").append(getDwHighDateTime()).append(" )\n");
buffer.append(" .fcPlcflvc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcflvc()));
+ buffer.append(HexDump.intToHex(getFcPlcflvc()));
buffer.append(" (").append(getFcPlcflvc()).append(" )\n");
buffer.append(" .lcbPlcflvc = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcflvc()));
+ buffer.append(HexDump.intToHex(getLcbPlcflvc()));
buffer.append(" (").append(getLcbPlcflvc()).append(" )\n");
buffer.append(" .fcPlcasumy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcasumy()));
+ buffer.append(HexDump.intToHex(getFcPlcasumy()));
buffer.append(" (").append(getFcPlcasumy()).append(" )\n");
buffer.append(" .lcbPlcasumy = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcasumy()));
+ buffer.append(HexDump.intToHex(getLcbPlcasumy()));
buffer.append(" (").append(getLcbPlcasumy()).append(" )\n");
buffer.append(" .fcPlcfgram = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcPlcfgram()));
+ buffer.append(HexDump.intToHex(getFcPlcfgram()));
buffer.append(" (").append(getFcPlcfgram()).append(" )\n");
buffer.append(" .lcbPlcfgram = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbPlcfgram()));
+ buffer.append(HexDump.intToHex(getLcbPlcfgram()));
buffer.append(" (").append(getLcbPlcfgram()).append(" )\n");
buffer.append(" .fcSttbListNames = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbListNames()));
+ buffer.append(HexDump.intToHex(getFcSttbListNames()));
buffer.append(" (").append(getFcSttbListNames()).append(" )\n");
buffer.append(" .lcbSttbListNames = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbListNames()));
+ buffer.append(HexDump.intToHex(getLcbSttbListNames()));
buffer.append(" (").append(getLcbSttbListNames()).append(" )\n");
buffer.append(" .fcSttbfUssr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getFcSttbfUssr()));
+ buffer.append(HexDump.intToHex(getFcSttbfUssr()));
buffer.append(" (").append(getFcSttbfUssr()).append(" )\n");
buffer.append(" .lcbSttbfUssr = ");
- buffer.append("0x");
- buffer.append(HexDump.toHex((int)getLcbSttbfUssr()));
+ buffer.append(HexDump.intToHex(getLcbSttbfUssr()));
buffer.append(" (").append(getLcbSttbfUssr()).append(" )\n");
buffer.append("[/FIB]\n");
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java b/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
index 935cbed153..7f31f26252 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
@@ -24,8 +24,8 @@ import java.io.OutputStream;
/**
* A decoder for the crazy LZW implementation used
* in Visio.
- * According to VSDump, "it's a slightly perverted version of LZW
- * compression, with inverted meaning of flag byte and 0xFEE as an
+ * According to VSDump, "it's a slightly perverted version of LZW
+ * compression, with inverted meaning of flag byte and 0xFEE as an
* 'initial shift'". It uses 12 bit codes
* (http://www.gnome.ru/projects/vsdump_en.html)
*
@@ -36,7 +36,7 @@ import java.io.OutputStream;
public class HDGFLZW {
/**
- * Given an integer, turn it into a java byte, handling
+ * Given an integer, turn it into a java byte, handling
* the wrapping.
* This is a convenience method
*/
@@ -45,13 +45,15 @@ public static byte fromInt(int b) {
return (byte)(b - 256);
}
/**
- * Given a java byte, turn it into an integer between 0
+ * Given a java byte, turn it into an integer between 0
* and 255 (i.e. handle the unwrapping).
* This is a convenience method
*/
public static int fromByte(byte b) {
- if(b >= 0) return (int)b;
- return (int)(b + 256);
+ if(b >= 0) {
+ return b;
+ }
+ return b + 256;
}
/**
@@ -113,7 +115,7 @@ public void decode(InputStream src, OutputStream res) throws IOException {
// It needs to be unsigned, so that bit stuff works
int dataI;
// The compressed code sequence is held over 2 bytes
- int dataIPt1, dataIPt2;
+ int dataIPt1, dataIPt2;
// How long a code sequence is, and where in the
// dictionary to start at
int len, pntr;
@@ -138,7 +140,7 @@ public void decode(InputStream src, OutputStream res) throws IOException {
dataIPt1 = src.read();
dataIPt2 = src.read();
if(dataIPt1 == -1 || dataIPt2 == -1) break;
-
+
// Build up how long the code sequence is, and
// what position of the code to start at
// (The position is the first 12 bits, the
@@ -153,14 +155,14 @@ public void decode(InputStream src, OutputStream res) throws IOException {
} else {
pntr = pntr + 18;
}
-
+
// Loop over the codes, outputting what they correspond to
for(int i=0; i<len; i++) {
buffer [(pos + i) & 4095] = buffer [(pntr + i) & 4095];
dataB = buffer[(pntr + i) & 4095];
res.write(new byte[] {dataB});
}
-
+
// Record how far along the stream we have moved
pos = pos + len;
}
@@ -183,14 +185,14 @@ public void compress(InputStream src, OutputStream res) throws IOException {
* Need our own class to handle keeping track of the
* code buffer, pending bytes to write out etc.
*/
-private class Compressor {
+private static final class Compressor {
// We use 12 bit codes:
// * 0-255 are real bytes
// * 256-4095 are the substring codes
// Java handily initialises our buffer / dictionary
// to all zeros
byte[] dict = new byte[4096];
-
+
// The next block of data to be written out, minus
// its mask byte
byte[] buffer = new byte[16];
@@ -198,21 +200,24 @@ private class Compressor {
// (Un-compressed codes are 1 byte each, compressed codes
// are two)
int bufferLen = 0;
-
+
// The raw length of a code is limited to 4 bits
byte[] rawCode = new byte[16];
// And how much we're using
int rawCodeLen = 0;
-
+
// How far through the input and output streams we are
int posInp = 0;
int posOut = 0;
-
+
// What the next mask byte to output will be
int nextMask = 0;
// And how many bits we've already set
int maskBitsSet = 0;
-
+
+ public Compressor() {
+ //
+ }
/**
* Returns the last place that the bytes from rawCode are found
* at in the buffer, or -1 if they can't be found
@@ -230,7 +235,7 @@ private int findRawCodeInBuffer() {
matches = false;
}
}
-
+
// Was this position a match?
if(matches) {
return i;
@@ -255,7 +260,7 @@ private void outputCompressed(OutputStream res) throws IOException {
}
return;
}
-
+
// Increment the mask bit count, we've done another code
maskBitsSet++;
// Add the length+code to the buffer
@@ -263,7 +268,7 @@ private void outputCompressed(OutputStream res) throws IOException {
// length is the last 4 bits)
// TODO
posOut += 2;
-
+
// If we're now at 8 codes, output
if(maskBitsSet == 8) {
output8Codes(res);
@@ -273,15 +278,15 @@ private void outputCompressed(OutputStream res) throws IOException {
* Output the un-compressed byte
*/
private void outputUncompressed(byte b, OutputStream res) throws IOException {
- // Set the mask bit for us
+ // Set the mask bit for us
nextMask += (1<<maskBitsSet);
-
+
// And add us to the buffer + dictionary
buffer[bufferLen] = fromInt(b);
bufferLen++;
dict[(posOut&4095)] = fromInt(b);
posOut++;
-
+
// If we're now at 8 codes, output
if(maskBitsSet == 8) {
output8Codes(res);
@@ -296,20 +301,20 @@ private void output8Codes(OutputStream res) throws IOException {
// Output the mask and the data
res.write(new byte[] { fromInt(nextMask) } );
res.write(buffer, 0, bufferLen);
-
+
// Reset things
nextMask = 0;
maskBitsSet = 0;
bufferLen = 0;
}
-
+
/**
* Does the compression
*/
private void compress(InputStream src, OutputStream res) throws IOException {
// Have we hit the end of the file yet?
boolean going = true;
-
+
// This is a byte as looked up in the dictionary
// It needs to be signed, as it'll get passed on to
// the output stream
@@ -317,27 +322,27 @@ private void compress(InputStream src, OutputStream res) throws IOException {
// This is an unsigned byte read from the stream
// It needs to be unsigned, so that bit stuff works
int dataI;
-
+
while( going ) {
dataI = src.read();
posInp++;
if(dataI == -1) { going = false; }
dataB = fromInt(dataI);
-
+
// If we've run out of data, output anything that's
// pending then finish
if(!going && rawCodeLen > 0) {
outputCompressed(res);
break;
}
-
+
// Try adding this new byte onto rawCode, and
// see if all of that is still found in the
// buffer dictionary or not
rawCode[rawCodeLen] = dataB;
rawCodeLen++;
int rawAt = findRawCodeInBuffer();
-
+
// If we found it and are now at 16 bytes,
// we need to output our pending code block
if(rawCodeLen == 16 && rawAt > -1) {
@@ -345,24 +350,24 @@ private void compress(InputStream src, OutputStream res) throws IOException {
rawCodeLen = 0;
continue;
}
-
+
// If we did find all of rawCode with our new
// byte added on, we can wait to see what happens
// with the next byte
if(rawAt > -1) {
continue;
}
-
+
// If we get here, then the rawCode + this byte weren't
// found in the dictionary
-
+
// If there was something in rawCode before, then that was
// found in the dictionary, so output that compressed
rawCodeLen--;
if(rawCodeLen > 0) {
// Output the old rawCode
outputCompressed(res);
-
+
// Can this byte start a new rawCode, or does
// it need outputting itself?
rawCode[0] = dataB;
@@ -385,4 +390,4 @@ private void compress(InputStream src, OutputStream res) throws IOException {
}
}
-} \ No newline at end of file
+}
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
index 7808ce847d..1565074de9 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
@@ -51,11 +51,11 @@ public abstract class ChunkHeader {
} else if(documentVersion == 5 || documentVersion == 4) {
ChunkHeaderV4V5 ch = new ChunkHeaderV4V5();
- ch.type = (int)LittleEndian.getShort(data, offset + 0);
- ch.id = (int)LittleEndian.getShort(data, offset + 2);
+ ch.type = LittleEndian.getShort(data, offset + 0);
+ ch.id = LittleEndian.getShort(data, offset + 2);
ch.unknown2 = (short)LittleEndian.getUnsignedByte(data, offset + 4);
ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 5);
- ch.unknown1 = (short)LittleEndian.getShort(data, offset + 6);
+ ch.unknown1 = LittleEndian.getShort(data, offset + 6);
ch.length = (int)LittleEndian.getUInt(data, offset + 8);
return ch;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
index 80767b3a0e..90b2cfd3ed 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
@@ -257,7 +257,7 @@ public final class HSLFSlideShow extends POIDocument {
Record[] rec = new Record[lst.size()];
for (int i = 0; i < a.length; i++) {
Integer offset = (Integer)a[i];
- rec[i] = (Record)Record.buildRecordAtOffset(docstream, offset.intValue());
+ rec[i] = Record.buildRecordAtOffset(docstream, offset.intValue());
if(rec[i] instanceof PersistRecord) {
PersistRecord psr = (PersistRecord)rec[i];
Integer id = (Integer)offset2id.get(offset);
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java
index d9c1a2ae91..9cb1a45a55 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java
@@ -41,9 +41,7 @@ import org.apache.poi.util.LittleEndian;
*
* @author Nick Burch
*/
-
-public final class SlideShowDumper
-{
+public final class SlideShowDumper {
private InputStream istream;
private POIFSFileSystem filesystem;
@@ -196,7 +194,7 @@ public final class SlideShowDumper
}
public String makeHex(short s) {
- String hex = Integer.toHexString((int)s).toUpperCase();
+ String hex = Integer.toHexString(s).toUpperCase();
if(hex.length() == 1) { return "0" + hex; }
return hex;
}
@@ -232,7 +230,7 @@ public void walkTree(int depth, int startPos, int maxLen) {
System.out.println(ind + "That's a " + recordName);
// Now check if it's a container or not
- int container = (int)opt & 0x0f;
+ int container = opt & 0x0f;
// BinaryTagData seems to contain records, but it
// isn't tagged as doing so. Try stepping in anyway
diff --git a/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java b/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
index b2182edcd6..0446d4fba8 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
@@ -53,9 +53,7 @@ import org.apache.poi.hslf.model.TextRun;
*
* @author Nick Burch
*/
-
-public final class QuickButCruddyTextExtractor
-{
+public final class QuickButCruddyTextExtractor {
private POIFSFileSystem fs;
private InputStream is;
private byte[] pptContents;
@@ -169,7 +167,7 @@ public final class QuickButCruddyTextExtractor
// If it's a container, step into it and return
// (If it's a container, option byte 1 BINARY_AND 0x0f will be 0x0f)
- int container = (int)opt & 0x0f;
+ int container = opt & 0x0f;
if(container == 0x0f) {
return (startPos+8);
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java b/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java
index 302415068b..97c818e519 100755
--- a/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java
@@ -17,13 +17,22 @@
package org.apache.poi.hslf.model;
-import org.apache.poi.ddf.*;
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.POILogger;
-
-import java.awt.geom.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
+
+import org.apache.poi.ddf.EscherArrayProperty;
+import org.apache.poi.ddf.EscherContainerRecord;
+import org.apache.poi.ddf.EscherOptRecord;
+import org.apache.poi.ddf.EscherProperties;
+import org.apache.poi.ddf.EscherSimpleProperty;
+import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogger;
/**
* A "Freeform" shape.
@@ -85,8 +94,8 @@ public final class Freeform extends AutoShape {
Rectangle2D bounds = path.getBounds2D();
PathIterator it = path.getPathIterator(new AffineTransform());
- ArrayList segInfo = new ArrayList();
- ArrayList pntInfo = new ArrayList();
+ List<byte[]> segInfo = new ArrayList<byte[]>();
+ List<Point2D.Double> pntInfo = new ArrayList<Point2D.Double>();
boolean isClosed = false;
while (!it.isDone()) {
double[] vals = new double[6];
@@ -135,7 +144,7 @@ public final class Freeform extends AutoShape {
verticesProp.setNumberOfElementsInMemory(pntInfo.size());
verticesProp.setSizeOfElements(0xFFF0);
for (int i = 0; i < pntInfo.size(); i++) {
- Point2D.Double pnt = (Point2D.Double)pntInfo.get(i);
+ Point2D.Double pnt = pntInfo.get(i);
byte[] data = new byte[4];
LittleEndian.putShort(data, 0, (short)((pnt.getX() - bounds.getX())*MASTER_DPI/POINT_DPI));
LittleEndian.putShort(data, 2, (short)((pnt.getY() - bounds.getY())*MASTER_DPI/POINT_DPI));
@@ -148,7 +157,7 @@ public final class Freeform extends AutoShape {
segmentsProp.setNumberOfElementsInMemory(segInfo.size());
segmentsProp.setSizeOfElements(0x2);
for (int i = 0; i < segInfo.size(); i++) {
- byte[] seg = (byte[])segInfo.get(i);
+ byte[] seg = segInfo.get(i);
segmentsProp.setElement(i, seg);
}
opt.addEscherProperty(segmentsProp);
@@ -171,10 +180,10 @@ public final class Freeform extends AutoShape {
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.GEOMETRY__SHAPEPATH, 0x4));
EscherArrayProperty verticesProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__VERTICES + 0x4000));
- if(verticesProp == null) verticesProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__VERTICES));
+ if(verticesProp == null) verticesProp = (EscherArrayProperty)getEscherProperty(opt, EscherProperties.GEOMETRY__VERTICES);
EscherArrayProperty segmentsProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__SEGMENTINFO + 0x4000));
- if(segmentsProp == null) segmentsProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__SEGMENTINFO));
+ if(segmentsProp == null) segmentsProp = (EscherArrayProperty)getEscherProperty(opt, EscherProperties.GEOMETRY__SEGMENTINFO);
//sanity check
if(verticesProp == null) {
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/CString.java b/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
index a428621e63..41f49fcd9d 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
@@ -58,7 +58,7 @@ public final class CString extends RecordAtom {
* The meaning of the count is specific to the type of the parent record
*/
public int getOptions() {
- return (int)LittleEndian.getShort(_header);
+ return LittleEndian.getShort(_header);
}
/**
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java
index 4aea93f869..9d14b7bff5 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java
@@ -30,9 +30,7 @@ import java.io.ByteArrayOutputStream;
*
* @author Nick Burch
*/
-
-public final class ColorSchemeAtom extends RecordAtom
-{
+public final class ColorSchemeAtom extends RecordAtom {
private byte[] _header;
private static long _type = 2032l;
@@ -108,14 +106,14 @@ public final class ColorSchemeAtom extends RecordAtom
System.arraycopy(source,start,_header,0,8);
// Grab the rgb values
- backgroundColourRGB = (int)LittleEndian.getInt(source,start+8+0);
- textAndLinesColourRGB = (int)LittleEndian.getInt(source,start+8+4);
- shadowsColourRGB = (int)LittleEndian.getInt(source,start+8+8);
- titleTextColourRGB = (int)LittleEndian.getInt(source,start+8+12);
- fillsColourRGB = (int)LittleEndian.getInt(source,start+8+16);
- accentColourRGB = (int)LittleEndian.getInt(source,start+8+20);
- accentAndHyperlinkColourRGB = (int)LittleEndian.getInt(source,start+8+24);
- accentAndFollowingHyperlinkColourRGB = (int)LittleEndian.getInt(source,start+8+28);
+ backgroundColourRGB = LittleEndian.getInt(source,start+8+0);
+ textAndLinesColourRGB = LittleEndian.getInt(source,start+8+4);
+ shadowsColourRGB = LittleEndian.getInt(source,start+8+8);
+ titleTextColourRGB = LittleEndian.getInt(source,start+8+12);
+ fillsColourRGB = LittleEndian.getInt(source,start+8+16);
+ accentColourRGB = LittleEndian.getInt(source,start+8+20);
+ accentAndHyperlinkColourRGB = LittleEndian.getInt(source,start+8+24);
+ accentAndFollowingHyperlinkColourRGB = LittleEndian.getInt(source,start+8+28);
}
/**
@@ -181,7 +179,7 @@ public final class ColorSchemeAtom extends RecordAtom
byte[] with_zero = new byte[4];
System.arraycopy(rgb,0,with_zero,0,3);
with_zero[3] = 0;
- int ret = (int)LittleEndian.getInt(with_zero,0);
+ int ret = LittleEndian.getInt(with_zero,0);
return ret;
}
@@ -205,16 +203,15 @@ public final class ColorSchemeAtom extends RecordAtom
writeLittleEndian(accentAndFollowingHyperlinkColourRGB,out);
}
- /**
- * Returns color by its index
- *
- * @param idx 0-based color index
- * @return color by its index
- */
- public int getColor(int idx){
- int[] clr = {backgroundColourRGB, textAndLinesColourRGB, shadowsColourRGB, titleTextColourRGB,
- fillsColourRGB, accentColourRGB, accentAndHyperlinkColourRGB, accentAndFollowingHyperlinkColourRGB};
- return clr[idx];
- }
-
+ /**
+ * Returns color by its index
+ *
+ * @param idx 0-based color index
+ * @return color by its index
+ */
+ public int getColor(int idx){
+ int[] clr = {backgroundColourRGB, textAndLinesColourRGB, shadowsColourRGB, titleTextColourRGB,
+ fillsColourRGB, accentColourRGB, accentAndHyperlinkColourRGB, accentAndFollowingHyperlinkColourRGB};
+ return clr[idx];
+ }
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java
index 3b28ab56a5..22a9b7c3ef 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java
@@ -80,16 +80,23 @@ public final class DocumentAtom extends RecordAtom
/** Was the document saved with True Type fonts embeded? */
public boolean getSaveWithFonts() {
- if(saveWithFonts == 0) { return false; } else { return true; } }
+ return saveWithFonts != 0;
+ }
+
/** Have the placeholders on the title slide been omitted? */
public boolean getOmitTitlePlace() {
- if(omitTitlePlace == 0) { return false; } else { return true; } }
+ return omitTitlePlace != 0;
+ }
+
/** Is this a Bi-Directional PPT Doc? */
public boolean getRightToLeft() {
- if(rightToLeft == 0) { return false; } else { return true; } }
+ return rightToLeft != 0;
+ }
+
/** Are comment shapes visible? */
public boolean getShowComments() {
- if(showComments == 0) { return false; } else { return true; } }
+ return showComments != 0;
+ }
/* *************** record code follows ********************** */
@@ -118,10 +125,10 @@ public final class DocumentAtom extends RecordAtom
handoutMasterPersist = LittleEndian.getInt(source,start+28+8);
// Get the ID of the first slide
- firstSlideNum = (int)LittleEndian.getShort(source,start+32+8);
+ firstSlideNum = LittleEndian.getShort(source,start+32+8);
// Get the slide size type
- slideSizeType = (int)LittleEndian.getShort(source,start+34+8);
+ slideSizeType = LittleEndian.getShort(source,start+34+8);
// Get the booleans as bytes
saveWithFonts = source[start+36+8];
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java b/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java
index 8476d3dd56..37583354d1 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java
@@ -32,12 +32,10 @@ import java.io.ByteArrayOutputStream;
*
* @author Nick Burch
*/
-
-public final class EscherTextboxWrapper extends RecordContainer
-{
+public final class EscherTextboxWrapper extends RecordContainer {
private EscherTextboxRecord _escherRecord;
private long _type;
- private int shapeId;
+ private int shapeId;
/**
* Returns the underlying DDF Escher Record
@@ -49,7 +47,7 @@ public final class EscherTextboxWrapper extends RecordContainer
*/
public EscherTextboxWrapper(EscherTextboxRecord textbox) {
_escherRecord = textbox;
- _type = (long)_escherRecord.getRecordId();
+ _type = _escherRecord.getRecordId();
// Find the child records in the escher data
byte[] data = _escherRecord.getData();
@@ -93,17 +91,17 @@ public final class EscherTextboxWrapper extends RecordContainer
_escherRecord.setData(data);
}
- /**
- * @return Shape ID
- */
- public int getShapeId(){
- return shapeId;
- }
-
- /**
- * @param id Shape ID
- */
- public void setShapeId(int id){
- shapeId = id;
- }
+ /**
+ * @return Shape ID
+ */
+ public int getShapeId(){
+ return shapeId;
+ }
+
+ /**
+ * @param id Shape ID
+ */
+ public void setShapeId(int id){
+ shapeId = id;
+ }
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java
index bf4c5fe1a9..7aace80632 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java
@@ -65,7 +65,7 @@ public final class NotesAtom extends RecordAtom
System.arraycopy(source,start,_header,0,8);
// Get the slide ID
- slideID = (int)LittleEndian.getInt(source,start+8);
+ slideID = LittleEndian.getInt(source,start+8);
// Grok the flags, stored as bits
int flags = LittleEndian.getUShort(source,start+12);
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java
index f759ed02c1..8d697843fc 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java
@@ -86,8 +86,8 @@ public final class SlideAtom extends RecordAtom
layoutAtom = new SSlideLayoutAtom(SSlideLayoutAtomData);
// Get the IDs of the master and notes
- masterID = (int)LittleEndian.getInt(source,start+12+8);
- notesID = (int)LittleEndian.getInt(source,start+16+8);
+ masterID = LittleEndian.getInt(source,start+12+8);
+ notesID = LittleEndian.getInt(source,start+16+8);
// Grok the flags, stored as bits
int flags = LittleEndian.getUShort(source,start+20+8);
@@ -214,7 +214,7 @@ public final class SlideAtom extends RecordAtom
}
// Grab out our data
- geometry = (int)LittleEndian.getInt(data,0);
+ geometry = LittleEndian.getInt(data,0);
placeholderIDs = new byte[8];
System.arraycopy(data,4,placeholderIDs,0,8);
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java
index a567cff830..0ac22adf34 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java
@@ -27,9 +27,7 @@ import java.io.OutputStream;
*
* @author Nick Burch
*/
-
-public final class SlidePersistAtom extends RecordAtom
-{
+public final class SlidePersistAtom extends RecordAtom {
private byte[] _header;
private static long _type = 1011l;
@@ -76,10 +74,10 @@ public final class SlidePersistAtom extends RecordAtom
System.arraycopy(source,start,_header,0,8);
// Grab the reference ID
- refID = (int)LittleEndian.getInt(source,start+8);
+ refID = LittleEndian.getInt(source,start+8);
// Next up is a set of flags, but only bit 3 is used!
- int flags = (int)LittleEndian.getInt(source,start+12);
+ int flags = LittleEndian.getInt(source,start+12);
if(flags == 4) {
hasShapesOtherThanPlaceholders = true;
} else {
@@ -87,10 +85,10 @@ public final class SlidePersistAtom extends RecordAtom
}
// Now the number of Placeholder Texts
- numPlaceholderTexts = (int)LittleEndian.getInt(source,start+16);
+ numPlaceholderTexts = LittleEndian.getInt(source,start+16);
// Last useful one is the unique slide identifier
- slideIdentifier = (int)LittleEndian.getInt(source,start+20);
+ slideIdentifier = LittleEndian.getInt(source,start+20);
// Finally you have typically 4 or 8 bytes of reserved fields,
// all zero running from 24 bytes in to the end
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java
index 9931eb93b1..d19a6c1c01 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java
@@ -72,7 +72,7 @@ public final class TextHeaderAtom extends RecordAtom implements ParentAwareRecor
System.arraycopy(source,start,_header,0,8);
// Grab the type
- textType = (int)LittleEndian.getInt(source,start+8);
+ textType = LittleEndian.getInt(source,start+8);
}
/**
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java
index 97765c408b..878e846af5 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java
@@ -82,30 +82,30 @@ public final class UserEditAtom extends PositionDependentRecordAtom
System.arraycopy(source,start,_header,0,8);
// Get the last viewed slide ID
- lastViewedSlideID = (int)LittleEndian.getInt(source,start+0+8);
+ lastViewedSlideID = LittleEndian.getInt(source,start+0+8);
// Get the PPT version
- pptVersion = (int)LittleEndian.getInt(source,start+4+8);
+ pptVersion = LittleEndian.getInt(source,start+4+8);
// Get the offset to the previous incremental save's UserEditAtom
// This will be the byte offset on disk where the previous one
// starts, or 0 if this is the first one
- lastUserEditAtomOffset = (int)LittleEndian.getInt(source,start+8+8);
+ lastUserEditAtomOffset = LittleEndian.getInt(source,start+8+8);
// Get the offset to the persist pointers
// This will be the byte offset on disk where the preceding
// PersistPtrFullBlock or PersistPtrIncrementalBlock starts
- persistPointersOffset = (int)LittleEndian.getInt(source,start+12+8);
+ persistPointersOffset = LittleEndian.getInt(source,start+12+8);
// Get the persist reference for the document persist object
// Normally seems to be 1
- docPersistRef = (int)LittleEndian.getInt(source,start+16+8);
+ docPersistRef = LittleEndian.getInt(source,start+16+8);
// Maximum number of persist objects written
- maxPersistWritten = (int)LittleEndian.getInt(source,start+20+8);
+ maxPersistWritten = LittleEndian.getInt(source,start+20+8);
// Last view type
- lastViewType = (short)LittleEndian.getShort(source,start+24+8);
+ lastViewType = LittleEndian.getShort(source,start+24+8);
// There might be a few more bytes, which are a reserved field
reserved = new byte[len-26-8];
diff --git a/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java b/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
index 5004285050..47af9dfc52 100644
--- a/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
+++ b/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
@@ -42,17 +42,13 @@ import org.apache.poi.poifs.property.DocumentProperty;
import org.apache.poi.poifs.storage.BlockWritable;
/**
- * Provides a HashMap with the ability to parse a PIOFS object and provide
+ * Provides a HashMap with the ability to parse a PIOFS object and provide
* an 'easy to access' hashmap structure for the document chunks inside it.
- *
+ *
* @author Travis Ferguson
*/
-public class POIFSChunkParser {
- /**
- * Constructor
- * @param fs
- * @throws IOException
- */
+public final class POIFSChunkParser {
+
public POIFSChunkParser(POIFSFileSystem fs) throws IOException {
this.setFileSystem(fs);
}
@@ -61,7 +57,6 @@ public class POIFSChunkParser {
/**
* Set the POIFileSystem object that this object is using.
* @param fs
- * @throws IOException
*/
public void setFileSystem(POIFSFileSystem fs) throws IOException {
this.fs = fs;
@@ -77,33 +72,32 @@ public class POIFSChunkParser {
/**
* Reparse the FileSystem object, resetting all the chunks stored in this object
- * @throws IOException
*
*/
public void reparseFileSystem() throws IOException {
// first clear this object of all chunks
DirectoryEntry root = this.fs.getRoot();
Iterator iter = root.getEntries();
-
+
this.directoryMap = this.processPOIIterator(iter);
}
-
+
/**
- * Returns a list of the standard chunk types, as
+ * Returns a list of the standard chunk types, as
* appropriate for the chunks we find in the file.
*/
public Chunks identifyChunks() {
return Chunks.getInstance(this.isNewChunkVersion(this.directoryMap));
}
-
+
/**
- * Returns a list of the standard chunk types, as
+ * Returns a list of the standard chunk types, as
* appropriate for the chunks we find in the file attachment.
*/
private AttachmentChunks identifyAttachmentChunks(Map attachmentMap) {
return AttachmentChunks.getInstance(this.isNewChunkVersion(attachmentMap));
}
-
+
/**
* Return chunk version of the map in parameter
*/
@@ -113,10 +107,10 @@ public class POIFSChunkParser {
boolean hasNewStrings = false;
String oldStringEnd = Types.asFileEnding(Types.OLD_STRING);
String newStringEnd = Types.asFileEnding(Types.NEW_STRING);
-
+
for(Iterator i = map.keySet().iterator(); i.hasNext();) {
String entry = (String)i.next();
-
+
if(entry.endsWith( oldStringEnd )) {
hasOldStrings = true;
}
@@ -124,7 +118,7 @@ public class POIFSChunkParser {
hasNewStrings = true;
}
}
-
+
if(hasOldStrings && hasNewStrings) {
throw new IllegalStateException("Your file contains string chunks of both the old and new types. Giving up");
} else if(hasNewStrings) {
@@ -132,18 +126,18 @@ public class POIFSChunkParser {
}
return false;
}
-
+
/**
* Pull the chunk data that's stored in this object's hashmap out and return it as a HashMap.
* @param entryName
*/
public Object getChunk(HashMap dirMap, String entryName) {
- if(dirMap == null) return null;
- else {
- return dirMap.get(entryName);
+ if(dirMap == null) {
+ return null;
}
+ return dirMap.get(entryName);
}
-
+
/**
* Pull a directory/hashmap out of this hashmap and return it
* @param directoryName
@@ -155,14 +149,14 @@ public class POIFSChunkParser {
DirectoryChunkNotFoundException excep = new DirectoryChunkNotFoundException(directoryName);
Object obj = getChunk(this.directoryMap, directoryName);
if(obj == null || !(obj instanceof HashMap)) throw excep;
-
+
return (HashMap)obj;
}
-
+
/**
* Pulls a ByteArrayOutputStream from this objects HashMap, this can be used to read a byte array of the contents of the given chunk.
* @param dirNode
- * @param chunk
+ * @param chunk
* @throws ChunkNotFoundException
*/
public Chunk getDocumentNode(HashMap dirNode, Chunk chunk) throws ChunkNotFoundException {
@@ -170,12 +164,12 @@ public class POIFSChunkParser {
ChunkNotFoundException excep = new ChunkNotFoundException(entryName);
Object obj = getChunk(dirNode, entryName);
if(obj == null || !(obj instanceof ByteArrayOutputStream)) throw excep;
-
+
chunk.setValue((ByteArrayOutputStream)obj);
-
+
return chunk;
}
-
+
/**
* Pulls a Chunk out of this objects root Node tree.
* @param chunk
@@ -184,9 +178,9 @@ public class POIFSChunkParser {
public Chunk getDocumentNode(Chunk chunk) throws ChunkNotFoundException {
return getDocumentNode(this.directoryMap, chunk);
}
-
+
/**
- *
+ *
* @return a map containing attachment name (String) and data (ByteArrayInputStream)
*/
public Map getAttachmentList() {
@@ -194,12 +188,12 @@ public class POIFSChunkParser {
List attachmentList = new ArrayList();
for(Iterator i = directoryMap.keySet().iterator(); i.hasNext();) {
String entry = (String)i.next();
-
+
if(entry.startsWith(AttachmentChunks.namePrefix)) {
String attachmentIdString = entry.replace(AttachmentChunks.namePrefix, "");
try {
int attachmentId = Integer.parseInt(attachmentIdString);
- attachmentList.add((HashMap)directoryMap.get(entry));
+ attachmentList.add(directoryMap.get(entry));
} catch (NumberFormatException nfe) {
System.err.println("Invalid attachment id");
}
@@ -218,7 +212,7 @@ public class POIFSChunkParser {
}
return attachments;
}
-
+
/**
* Processes an iterator returned by a POIFS call to getRoot().getEntries()
* @param iter
@@ -226,85 +220,85 @@ public class POIFSChunkParser {
* @throws IOException
*/
private HashMap processPOIIterator(Iterator iter) throws IOException {
- HashMap currentNode = new HashMap();
-
- while(iter.hasNext()) {
- Object obj = iter.next();
- if(obj instanceof DocumentNode) {
- this.processDocumentNode((DocumentNode)obj, currentNode);
- } else if(obj instanceof DirectoryNode) {
- String blockName = ((DirectoryNode)obj).getName();
- Iterator viewIt = null;
- if( ((DirectoryNode)obj).preferArray()) {
- Object[] arr = ((DirectoryNode)obj).getViewableArray();
- ArrayList viewList = new ArrayList(arr.length);
-
- for(int i = 0; i < arr.length; i++) {
- viewList.add(arr[i]);
- }
- viewIt = viewList.iterator();
- } else {
- viewIt = ((DirectoryNode)obj).getViewableIterator();
- }
- //store the next node on the hashmap
- currentNode.put(blockName, processPOIIterator(viewIt));
- } else if(obj instanceof DirectoryProperty) {
- //don't do anything with the directory property chunk...
- } else {
- System.err.println("Unknown node: " + obj.toString());
- }
- }
- return currentNode;
- }
+ HashMap currentNode = new HashMap();
+
+ while(iter.hasNext()) {
+ Object obj = iter.next();
+ if(obj instanceof DocumentNode) {
+ this.processDocumentNode((DocumentNode)obj, currentNode);
+ } else if(obj instanceof DirectoryNode) {
+ String blockName = ((DirectoryNode)obj).getName();
+ Iterator viewIt = null;
+ if( ((DirectoryNode)obj).preferArray()) {
+ Object[] arr = ((DirectoryNode)obj).getViewableArray();
+ ArrayList viewList = new ArrayList(arr.length);
+
+ for(int i = 0; i < arr.length; i++) {
+ viewList.add(arr[i]);
+ }
+ viewIt = viewList.iterator();
+ } else {
+ viewIt = ((DirectoryNode)obj).getViewableIterator();
+ }
+ //store the next node on the hashmap
+ currentNode.put(blockName, processPOIIterator(viewIt));
+ } else if(obj instanceof DirectoryProperty) {
+ //don't do anything with the directory property chunk...
+ } else {
+ System.err.println("Unknown node: " + obj.toString());
+ }
+ }
+ return currentNode;
+ }
/**
- * Processes a document node and adds it to the current directory HashMap
- * @param obj
- * @throws java.io.IOException
- */
- private void processDocumentNode(DocumentNode obj, HashMap currentObj) throws IOException {
- String blockName = ((DocumentNode)obj).getName();
-
- Iterator viewIt = null;
- if( ((DocumentNode)obj).preferArray()) {
- Object[] arr = ((DocumentNode)obj).getViewableArray();
- ArrayList viewList = new ArrayList(arr.length);
-
- for(int i = 0; i < arr.length; i++) {
- viewList.add(arr[i]);
- }
- viewIt = viewList.iterator();
- } else {
- viewIt = ((DocumentNode)obj).getViewableIterator();
- }
-
- while(viewIt.hasNext()) {
- Object view = viewIt.next();
-
- if(view instanceof DocumentProperty) {
- //we don't care about the properties
- } else if(view instanceof POIFSDocument) {
- //check if our node has blocks or if it can just be read raw.
- int blockCount = ((POIFSDocument)view).countBlocks();
- //System.out.println("Block Name: " + blockName);
- if(blockCount <= 0) {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- BlockWritable[] bws = ((POIFSDocument)view).getSmallBlocks();
- for(int i = 0; i < bws.length; i++) {
- bws[i].writeBlocks(out);
- }
- currentObj.put(blockName, out);
- } else {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- ((POIFSDocument)view).writeBlocks(out);
- currentObj.put(blockName, out);
- }
- } else {
- System.err.println("Unknown View Type: " + view.toString());
- }
- }
- }
+ * Processes a document node and adds it to the current directory HashMap
+ * @param obj
+ * @throws java.io.IOException
+ */
+ private void processDocumentNode(DocumentNode obj, HashMap currentObj) throws IOException {
+ String blockName = obj.getName();
+
+ Iterator viewIt = null;
+ if( obj.preferArray()) {
+ Object[] arr = obj.getViewableArray();
+ ArrayList viewList = new ArrayList(arr.length);
+
+ for(int i = 0; i < arr.length; i++) {
+ viewList.add(arr[i]);
+ }
+ viewIt = viewList.iterator();
+ } else {
+ viewIt = obj.getViewableIterator();
+ }
+
+ while(viewIt.hasNext()) {
+ Object view = viewIt.next();
+
+ if(view instanceof DocumentProperty) {
+ //we don't care about the properties
+ } else if(view instanceof POIFSDocument) {
+ //check if our node has blocks or if it can just be read raw.
+ int blockCount = ((POIFSDocument)view).countBlocks();
+ //System.out.println("Block Name: " + blockName);
+ if(blockCount <= 0) {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ BlockWritable[] bws = ((POIFSDocument)view).getSmallBlocks();
+ for(int i = 0; i < bws.length; i++) {
+ bws[i].writeBlocks(out);
+ }
+ currentObj.put(blockName, out);
+ } else {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ ((POIFSDocument)view).writeBlocks(out);
+ currentObj.put(blockName, out);
+ }
+ } else {
+ System.err.println("Unknown View Type: " + view.toString());
+ }
+ }
+ }
/* private instance variables */
private static final long serialVersionUID = 1L;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java b/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java
index e9ab368b3a..be95dd17c5 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java
@@ -133,7 +133,7 @@ public final class ListData
int resetListID()
{
- _lsid = (int)(Math.random() * (double)System.currentTimeMillis());
+ _lsid = (int)(Math.random() * System.currentTimeMillis());
return _lsid;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
index c0a6a029aa..edb74eace6 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
@@ -225,21 +225,19 @@ public final class StyleSheet implements HDFType {
{
parentPAP = _styleDescriptions[baseIndex].getPAP();
- if(parentPAP == null)
- {
- if(baseIndex == istd) {
- // Oh dear, style claims that it is its own parent
- throw new IllegalStateException("Pap style " + istd + " claimed to have itself as its parent, which isn't allowed");
- } else {
- // Create the parent style
- createPap(baseIndex);
- parentPAP = _styleDescriptions[baseIndex].getPAP();
- }
+ if(parentPAP == null) {
+ if(baseIndex == istd) {
+ // Oh dear, style claims that it is its own parent
+ throw new IllegalStateException("Pap style " + istd + " claimed to have itself as its parent, which isn't allowed");
+ }
+ // Create the parent style
+ createPap(baseIndex);
+ parentPAP = _styleDescriptions[baseIndex].getPAP();
}
}
- pap = (ParagraphProperties)ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);
+ pap = ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);
sd.setPAP(pap);
}
}
@@ -274,7 +272,7 @@ public final class StyleSheet implements HDFType {
}
- chp = (CharacterProperties)CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);
+ chp = CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);
sd.setCHP(chp);
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java
index de5896ea40..00a19b30d8 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java
@@ -818,9 +818,7 @@ public abstract class CHPAbstractType
*/
public void setFBold(boolean value)
{
- field_2_format_flags = (int)fBold.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fBold.setBoolean(field_2_format_flags, value);
}
/**
@@ -830,7 +828,6 @@ public abstract class CHPAbstractType
public boolean isFBold()
{
return fBold.isSet(field_2_format_flags);
-
}
/**
@@ -839,9 +836,7 @@ public abstract class CHPAbstractType
*/
public void setFItalic(boolean value)
{
- field_2_format_flags = (int)fItalic.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fItalic.setBoolean(field_2_format_flags, value);
}
/**
@@ -851,7 +846,6 @@ public abstract class CHPAbstractType
public boolean isFItalic()
{
return fItalic.isSet(field_2_format_flags);
-
}
/**
@@ -860,9 +854,7 @@ public abstract class CHPAbstractType
*/
public void setFRMarkDel(boolean value)
{
- field_2_format_flags = (int)fRMarkDel.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fRMarkDel.setBoolean(field_2_format_flags, value);
}
/**
@@ -872,7 +864,6 @@ public abstract class CHPAbstractType
public boolean isFRMarkDel()
{
return fRMarkDel.isSet(field_2_format_flags);
-
}
/**
@@ -881,9 +872,7 @@ public abstract class CHPAbstractType
*/
public void setFOutline(boolean value)
{
- field_2_format_flags = (int)fOutline.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fOutline.setBoolean(field_2_format_flags, value);
}
/**
@@ -893,7 +882,6 @@ public abstract class CHPAbstractType
public boolean isFOutline()
{
return fOutline.isSet(field_2_format_flags);
-
}
/**
@@ -902,9 +890,7 @@ public abstract class CHPAbstractType
*/
public void setFFldVanish(boolean value)
{
- field_2_format_flags = (int)fFldVanish.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fFldVanish.setBoolean(field_2_format_flags, value);
}
/**
@@ -914,7 +900,6 @@ public abstract class CHPAbstractType
public boolean isFFldVanish()
{
return fFldVanish.isSet(field_2_format_flags);
-
}
/**
@@ -923,9 +908,7 @@ public abstract class CHPAbstractType
*/
public void setFSmallCaps(boolean value)
{
- field_2_format_flags = (int)fSmallCaps.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fSmallCaps.setBoolean(field_2_format_flags, value);
}
/**
@@ -935,7 +918,6 @@ public abstract class CHPAbstractType
public boolean isFSmallCaps()
{
return fSmallCaps.isSet(field_2_format_flags);
-
}
/**
@@ -944,9 +926,7 @@ public abstract class CHPAbstractType
*/
public void setFCaps(boolean value)
{
- field_2_format_flags = (int)fCaps.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fCaps.setBoolean(field_2_format_flags, value);
}
/**
@@ -956,7 +936,6 @@ public abstract class CHPAbstractType
public boolean isFCaps()
{
return fCaps.isSet(field_2_format_flags);
-
}
/**
@@ -965,9 +944,7 @@ public abstract class CHPAbstractType
*/
public void setFVanish(boolean value)
{
- field_2_format_flags = (int)fVanish.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fVanish.setBoolean(field_2_format_flags, value);
}
/**
@@ -977,7 +954,6 @@ public abstract class CHPAbstractType
public boolean isFVanish()
{
return fVanish.isSet(field_2_format_flags);
-
}
/**
@@ -986,9 +962,7 @@ public abstract class CHPAbstractType
*/
public void setFRMark(boolean value)
{
- field_2_format_flags = (int)fRMark.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fRMark.setBoolean(field_2_format_flags, value);
}
/**
@@ -998,7 +972,6 @@ public abstract class CHPAbstractType
public boolean isFRMark()
{
return fRMark.isSet(field_2_format_flags);
-
}
/**
@@ -1007,9 +980,7 @@ public abstract class CHPAbstractType
*/
public void setFSpec(boolean value)
{
- field_2_format_flags = (int)fSpec.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fSpec.setBoolean(field_2_format_flags, value);
}
/**
@@ -1019,7 +990,6 @@ public abstract class CHPAbstractType
public boolean isFSpec()
{
return fSpec.isSet(field_2_format_flags);
-
}
/**
@@ -1028,9 +998,7 @@ public abstract class CHPAbstractType
*/
public void setFStrike(boolean value)
{
- field_2_format_flags = (int)fStrike.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fStrike.setBoolean(field_2_format_flags, value);
}
/**
@@ -1040,7 +1008,6 @@ public abstract class CHPAbstractType
public boolean isFStrike()
{
return fStrike.isSet(field_2_format_flags);
-
}
/**
@@ -1049,9 +1016,7 @@ public abstract class CHPAbstractType
*/
public void setFObj(boolean value)
{
- field_2_format_flags = (int)fObj.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fObj.setBoolean(field_2_format_flags, value);
}
/**
@@ -1061,7 +1026,6 @@ public abstract class CHPAbstractType
public boolean isFObj()
{
return fObj.isSet(field_2_format_flags);
-
}
/**
@@ -1070,9 +1034,7 @@ public abstract class CHPAbstractType
*/
public void setFShadow(boolean value)
{
- field_2_format_flags = (int)fShadow.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fShadow.setBoolean(field_2_format_flags, value);
}
/**
@@ -1082,7 +1044,6 @@ public abstract class CHPAbstractType
public boolean isFShadow()
{
return fShadow.isSet(field_2_format_flags);
-
}
/**
@@ -1091,9 +1052,7 @@ public abstract class CHPAbstractType
*/
public void setFLowerCase(boolean value)
{
- field_2_format_flags = (int)fLowerCase.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fLowerCase.setBoolean(field_2_format_flags, value);
}
/**
@@ -1103,7 +1062,6 @@ public abstract class CHPAbstractType
public boolean isFLowerCase()
{
return fLowerCase.isSet(field_2_format_flags);
-
}
/**
@@ -1112,9 +1070,7 @@ public abstract class CHPAbstractType
*/
public void setFData(boolean value)
{
- field_2_format_flags = (int)fData.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fData.setBoolean(field_2_format_flags, value);
}
/**
@@ -1124,7 +1080,6 @@ public abstract class CHPAbstractType
public boolean isFData()
{
return fData.isSet(field_2_format_flags);
-
}
/**
@@ -1133,9 +1088,7 @@ public abstract class CHPAbstractType
*/
public void setFOle2(boolean value)
{
- field_2_format_flags = (int)fOle2.setBoolean(field_2_format_flags, value);
-
-
+ field_2_format_flags = fOle2.setBoolean(field_2_format_flags, value);
}
/**
@@ -1145,7 +1098,6 @@ public abstract class CHPAbstractType
public boolean isFOle2()
{
return fOle2.isSet(field_2_format_flags);
-
}
/**
@@ -1154,9 +1106,7 @@ public abstract class CHPAbstractType
*/
public void setFEmboss(boolean value)
{
- field_3_format_flags1 = (int)fEmboss.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fEmboss.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1166,7 +1116,6 @@ public abstract class CHPAbstractType
public boolean isFEmboss()
{
return fEmboss.isSet(field_3_format_flags1);
-
}
/**
@@ -1175,9 +1124,7 @@ public abstract class CHPAbstractType
*/
public void setFImprint(boolean value)
{
- field_3_format_flags1 = (int)fImprint.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fImprint.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1187,7 +1134,6 @@ public abstract class CHPAbstractType
public boolean isFImprint()
{
return fImprint.isSet(field_3_format_flags1);
-
}
/**
@@ -1196,9 +1142,7 @@ public abstract class CHPAbstractType
*/
public void setFDStrike(boolean value)
{
- field_3_format_flags1 = (int)fDStrike.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fDStrike.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1208,7 +1152,6 @@ public abstract class CHPAbstractType
public boolean isFDStrike()
{
return fDStrike.isSet(field_3_format_flags1);
-
}
/**
@@ -1217,9 +1160,7 @@ public abstract class CHPAbstractType
*/
public void setFUsePgsuSettings(boolean value)
{
- field_3_format_flags1 = (int)fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
-
-
+ field_3_format_flags1 = fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
}
/**
@@ -1229,7 +1170,6 @@ public abstract class CHPAbstractType
public boolean isFUsePgsuSettings()
{
return fUsePgsuSettings.isSet(field_3_format_flags1);
-
}
/**
@@ -1239,8 +1179,6 @@ public abstract class CHPAbstractType
public void setIcoHighlight(byte value)
{
field_33_Highlight = (short)icoHighlight.setValue(field_33_Highlight, value);
-
-
}
/**
@@ -1250,7 +1188,6 @@ public abstract class CHPAbstractType
public byte getIcoHighlight()
{
return ( byte )icoHighlight.getValue(field_33_Highlight);
-
}
/**
@@ -1260,8 +1197,6 @@ public abstract class CHPAbstractType
public void setFHighlight(boolean value)
{
field_33_Highlight = (short)fHighlight.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1271,7 +1206,6 @@ public abstract class CHPAbstractType
public boolean isFHighlight()
{
return fHighlight.isSet(field_33_Highlight);
-
}
/**
@@ -1281,8 +1215,6 @@ public abstract class CHPAbstractType
public void setKcd(byte value)
{
field_33_Highlight = (short)kcd.setValue(field_33_Highlight, value);
-
-
}
/**
@@ -1292,7 +1224,6 @@ public abstract class CHPAbstractType
public byte getKcd()
{
return ( byte )kcd.getValue(field_33_Highlight);
-
}
/**
@@ -1302,8 +1233,6 @@ public abstract class CHPAbstractType
public void setFNavHighlight(boolean value)
{
field_33_Highlight = (short)fNavHighlight.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1313,7 +1242,6 @@ public abstract class CHPAbstractType
public boolean isFNavHighlight()
{
return fNavHighlight.isSet(field_33_Highlight);
-
}
/**
@@ -1323,8 +1251,6 @@ public abstract class CHPAbstractType
public void setFChsDiff(boolean value)
{
field_33_Highlight = (short)fChsDiff.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1334,7 +1260,6 @@ public abstract class CHPAbstractType
public boolean isFChsDiff()
{
return fChsDiff.isSet(field_33_Highlight);
-
}
/**
@@ -1344,8 +1269,6 @@ public abstract class CHPAbstractType
public void setFMacChs(boolean value)
{
field_33_Highlight = (short)fMacChs.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1355,7 +1278,6 @@ public abstract class CHPAbstractType
public boolean isFMacChs()
{
return fMacChs.isSet(field_33_Highlight);
-
}
/**
@@ -1365,8 +1287,6 @@ public abstract class CHPAbstractType
public void setFFtcAsciSym(boolean value)
{
field_33_Highlight = (short)fFtcAsciSym.setBoolean(field_33_Highlight, value);
-
-
}
/**
@@ -1376,12 +1296,5 @@ public abstract class CHPAbstractType
public boolean isFFtcAsciSym()
{
return fFtcAsciSym.isSet(field_33_Highlight);
-
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/DOPAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/DOPAbstractType.java
index d7530196ab..b623f4a27e 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/DOPAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/DOPAbstractType.java
@@ -239,65 +239,63 @@ public abstract class DOPAbstractType implements HDFType {
field_51_nfcEdnRef = LittleEndian.getShort(data, 0x1ee + offset);
field_52_hpsZoonFontPag = LittleEndian.getShort(data, 0x1f0 + offset);
field_53_dywDispPag = LittleEndian.getShort(data, 0x1f2 + offset);
-
}
public void serialize(byte[] data, int offset)
{
- data[ 0x0 + offset] = field_1_formatFlags;;
- data[ 0x1 + offset] = field_2_unused2;;
- LittleEndian.putShort(data, 0x2 + offset, (short)field_3_footnoteInfo);;
- data[ 0x4 + offset] = field_4_fOutlineDirtySave;;
- data[ 0x5 + offset] = field_5_docinfo;;
- data[ 0x6 + offset] = field_6_docinfo1;;
- data[ 0x7 + offset] = field_7_docinfo2;;
- LittleEndian.putShort(data, 0x8 + offset, (short)field_8_docinfo3);;
- LittleEndian.putShort(data, 0xa + offset, (short)field_9_dxaTab);;
- LittleEndian.putShort(data, 0xc + offset, (short)field_10_wSpare);;
- LittleEndian.putShort(data, 0xe + offset, (short)field_11_dxaHotz);;
- LittleEndian.putShort(data, 0x10 + offset, (short)field_12_cConsexHypLim);;
- LittleEndian.putShort(data, 0x12 + offset, (short)field_13_wSpare2);;
- LittleEndian.putInt(data, 0x14 + offset, field_14_dttmCreated);;
- LittleEndian.putInt(data, 0x18 + offset, field_15_dttmRevised);;
- LittleEndian.putInt(data, 0x1c + offset, field_16_dttmLastPrint);;
- LittleEndian.putShort(data, 0x20 + offset, (short)field_17_nRevision);;
- LittleEndian.putInt(data, 0x22 + offset, field_18_tmEdited);;
- LittleEndian.putInt(data, 0x26 + offset, field_19_cWords);;
- LittleEndian.putInt(data, 0x2a + offset, field_20_cCh);;
- LittleEndian.putShort(data, 0x2e + offset, (short)field_21_cPg);;
- LittleEndian.putInt(data, 0x30 + offset, field_22_cParas);;
- LittleEndian.putShort(data, 0x34 + offset, (short)field_23_Edn);;
- LittleEndian.putShort(data, 0x36 + offset, (short)field_24_Edn1);;
- LittleEndian.putInt(data, 0x38 + offset, field_25_cLines);;
- LittleEndian.putInt(data, 0x3c + offset, field_26_cWordsFtnEnd);;
- LittleEndian.putInt(data, 0x40 + offset, field_27_cChFtnEdn);;
- LittleEndian.putShort(data, 0x44 + offset, (short)field_28_cPgFtnEdn);;
- LittleEndian.putInt(data, 0x46 + offset, field_29_cParasFtnEdn);;
- LittleEndian.putInt(data, 0x4a + offset, field_30_cLinesFtnEdn);;
- LittleEndian.putInt(data, 0x4e + offset, field_31_lKeyProtDoc);;
- LittleEndian.putShort(data, 0x52 + offset, (short)field_32_view);;
- LittleEndian.putInt(data, 0x54 + offset, field_33_docinfo4);;
- LittleEndian.putShort(data, 0x58 + offset, (short)field_34_adt);;
- System.arraycopy(field_35_doptypography, 0, data, 0x5a + offset, field_35_doptypography.length);;
- System.arraycopy(field_36_dogrid, 0, data, 0x190 + offset, field_36_dogrid.length);;
- LittleEndian.putShort(data, 0x19a + offset, (short)field_37_docinfo5);;
- LittleEndian.putShort(data, 0x19c + offset, (short)field_38_docinfo6);;
- System.arraycopy(field_39_asumyi, 0, data, 0x19e + offset, field_39_asumyi.length);;
- LittleEndian.putInt(data, 0x1aa + offset, field_40_cChWS);;
- LittleEndian.putInt(data, 0x1ae + offset, field_41_cChWSFtnEdn);;
- LittleEndian.putInt(data, 0x1b2 + offset, field_42_grfDocEvents);;
- LittleEndian.putInt(data, 0x1b6 + offset, field_43_virusinfo);;
- System.arraycopy(field_44_Spare, 0, data, 0x1ba + offset, field_44_Spare.length);;
- LittleEndian.putInt(data, 0x1d8 + offset, field_45_reserved1);;
- LittleEndian.putInt(data, 0x1dc + offset, field_46_reserved2);;
- LittleEndian.putInt(data, 0x1e0 + offset, field_47_cDBC);;
- LittleEndian.putInt(data, 0x1e4 + offset, field_48_cDBCFtnEdn);;
- LittleEndian.putInt(data, 0x1e8 + offset, field_49_reserved);;
- LittleEndian.putShort(data, 0x1ec + offset, (short)field_50_nfcFtnRef);;
- LittleEndian.putShort(data, 0x1ee + offset, (short)field_51_nfcEdnRef);;
- LittleEndian.putShort(data, 0x1f0 + offset, (short)field_52_hpsZoonFontPag);;
- LittleEndian.putShort(data, 0x1f2 + offset, (short)field_53_dywDispPag);;
-
+ data[ 0x0 + offset] = field_1_formatFlags;
+ data[ 0x1 + offset] = field_2_unused2;
+ LittleEndian.putShort(data, 0x2 + offset, field_3_footnoteInfo);
+ data[ 0x4 + offset] = field_4_fOutlineDirtySave;
+ data[ 0x5 + offset] = field_5_docinfo;
+ data[ 0x6 + offset] = field_6_docinfo1;
+ data[ 0x7 + offset] = field_7_docinfo2;
+ LittleEndian.putShort(data, 0x8 + offset, field_8_docinfo3);
+ LittleEndian.putShort(data, 0xa + offset, (short)field_9_dxaTab);
+ LittleEndian.putShort(data, 0xc + offset, (short)field_10_wSpare);
+ LittleEndian.putShort(data, 0xe + offset, (short)field_11_dxaHotz);
+ LittleEndian.putShort(data, 0x10 + offset, (short)field_12_cConsexHypLim);
+ LittleEndian.putShort(data, 0x12 + offset, (short)field_13_wSpare2);
+ LittleEndian.putInt(data, 0x14 + offset, field_14_dttmCreated);
+ LittleEndian.putInt(data, 0x18 + offset, field_15_dttmRevised);
+ LittleEndian.putInt(data, 0x1c + offset, field_16_dttmLastPrint);
+ LittleEndian.putShort(data, 0x20 + offset, (short)field_17_nRevision);
+ LittleEndian.putInt(data, 0x22 + offset, field_18_tmEdited);
+ LittleEndian.putInt(data, 0x26 + offset, field_19_cWords);
+ LittleEndian.putInt(data, 0x2a + offset, field_20_cCh);
+ LittleEndian.putShort(data, 0x2e + offset, (short)field_21_cPg);
+ LittleEndian.putInt(data, 0x30 + offset, field_22_cParas);
+ LittleEndian.putShort(data, 0x34 + offset, field_23_Edn);
+ LittleEndian.putShort(data, 0x36 + offset, field_24_Edn1);
+ LittleEndian.putInt(data, 0x38 + offset, field_25_cLines);
+ LittleEndian.putInt(data, 0x3c + offset, field_26_cWordsFtnEnd);
+ LittleEndian.putInt(data, 0x40 + offset, field_27_cChFtnEdn);
+ LittleEndian.putShort(data, 0x44 + offset, field_28_cPgFtnEdn);
+ LittleEndian.putInt(data, 0x46 + offset, field_29_cParasFtnEdn);
+ LittleEndian.putInt(data, 0x4a + offset, field_30_cLinesFtnEdn);
+ LittleEndian.putInt(data, 0x4e + offset, field_31_lKeyProtDoc);
+ LittleEndian.putShort(data, 0x52 + offset, field_32_view);
+ LittleEndian.putInt(data, 0x54 + offset, field_33_docinfo4);
+ LittleEndian.putShort(data, 0x58 + offset, field_34_adt);
+ System.arraycopy(field_35_doptypography, 0, data, 0x5a + offset, field_35_doptypography.length);
+ System.arraycopy(field_36_dogrid, 0, data, 0x190 + offset, field_36_dogrid.length);
+ LittleEndian.putShort(data, 0x19a + offset, field_37_docinfo5);
+ LittleEndian.putShort(data, 0x19c + offset, field_38_docinfo6);
+ System.arraycopy(field_39_asumyi, 0, data, 0x19e + offset, field_39_asumyi.length);
+ LittleEndian.putInt(data, 0x1aa + offset, field_40_cChWS);
+ LittleEndian.putInt(data, 0x1ae + offset, field_41_cChWSFtnEdn);
+ LittleEndian.putInt(data, 0x1b2 + offset, field_42_grfDocEvents);
+ LittleEndian.putInt(data, 0x1b6 + offset, field_43_virusinfo);
+ System.arraycopy(field_44_Spare, 0, data, 0x1ba + offset, field_44_Spare.length);
+ LittleEndian.putInt(data, 0x1d8 + offset, field_45_reserved1);
+ LittleEndian.putInt(data, 0x1dc + offset, field_46_reserved2);
+ LittleEndian.putInt(data, 0x1e0 + offset, field_47_cDBC);
+ LittleEndian.putInt(data, 0x1e4 + offset, field_48_cDBCFtnEdn);
+ LittleEndian.putInt(data, 0x1e8 + offset, field_49_reserved);
+ LittleEndian.putShort(data, 0x1ec + offset, field_50_nfcFtnRef);
+ LittleEndian.putShort(data, 0x1ee + offset, field_51_nfcEdnRef);
+ LittleEndian.putShort(data, 0x1f0 + offset, field_52_hpsZoonFontPag);
+ LittleEndian.putShort(data, 0x1f2 + offset, field_53_dywDispPag);
}
public String toString()
@@ -1426,8 +1424,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFFacingPages(boolean value)
{
field_1_formatFlags = (byte)fFacingPages.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1437,7 +1433,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFFacingPages()
{
return fFacingPages.isSet(field_1_formatFlags);
-
}
/**
@@ -1447,8 +1442,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFWidowControl(boolean value)
{
field_1_formatFlags = (byte)fWidowControl.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1458,7 +1451,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFWidowControl()
{
return fWidowControl.isSet(field_1_formatFlags);
-
}
/**
@@ -1468,8 +1460,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFPMHMainDoc(boolean value)
{
field_1_formatFlags = (byte)fPMHMainDoc.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1479,7 +1469,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPMHMainDoc()
{
return fPMHMainDoc.isSet(field_1_formatFlags);
-
}
/**
@@ -1489,8 +1478,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setGrfSupression(byte value)
{
field_1_formatFlags = (byte)grfSupression.setValue(field_1_formatFlags, value);
-
-
}
/**
@@ -1500,7 +1487,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getGrfSupression()
{
return ( byte )grfSupression.getValue(field_1_formatFlags);
-
}
/**
@@ -1510,8 +1496,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFpc(byte value)
{
field_1_formatFlags = (byte)fpc.setValue(field_1_formatFlags, value);
-
-
}
/**
@@ -1521,7 +1505,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getFpc()
{
return ( byte )fpc.getValue(field_1_formatFlags);
-
}
/**
@@ -1531,8 +1514,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setUnused1(boolean value)
{
field_1_formatFlags = (byte)unused1.setBoolean(field_1_formatFlags, value);
-
-
}
/**
@@ -1542,7 +1523,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isUnused1()
{
return unused1.isSet(field_1_formatFlags);
-
}
/**
@@ -1552,8 +1532,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setRncFtn(byte value)
{
field_3_footnoteInfo = (short)rncFtn.setValue(field_3_footnoteInfo, value);
-
-
}
/**
@@ -1563,7 +1541,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getRncFtn()
{
return ( byte )rncFtn.getValue(field_3_footnoteInfo);
-
}
/**
@@ -1573,8 +1550,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setNFtn(short value)
{
field_3_footnoteInfo = (short)nFtn.setValue(field_3_footnoteInfo, value);
-
-
}
/**
@@ -1584,7 +1559,6 @@ public abstract class DOPAbstractType implements HDFType {
public short getNFtn()
{
return ( short )nFtn.getValue(field_3_footnoteInfo);
-
}
/**
@@ -1594,8 +1568,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFOnlyMacPics(boolean value)
{
field_5_docinfo = (byte)fOnlyMacPics.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1605,7 +1577,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFOnlyMacPics()
{
return fOnlyMacPics.isSet(field_5_docinfo);
-
}
/**
@@ -1615,8 +1586,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFOnlyWinPics(boolean value)
{
field_5_docinfo = (byte)fOnlyWinPics.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1626,7 +1595,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFOnlyWinPics()
{
return fOnlyWinPics.isSet(field_5_docinfo);
-
}
/**
@@ -1636,8 +1604,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFLabelDoc(boolean value)
{
field_5_docinfo = (byte)fLabelDoc.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1647,7 +1613,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFLabelDoc()
{
return fLabelDoc.isSet(field_5_docinfo);
-
}
/**
@@ -1657,8 +1622,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFHyphCapitals(boolean value)
{
field_5_docinfo = (byte)fHyphCapitals.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1668,7 +1631,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFHyphCapitals()
{
return fHyphCapitals.isSet(field_5_docinfo);
-
}
/**
@@ -1678,8 +1640,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFAutoHyphen(boolean value)
{
field_5_docinfo = (byte)fAutoHyphen.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1689,7 +1649,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFAutoHyphen()
{
return fAutoHyphen.isSet(field_5_docinfo);
-
}
/**
@@ -1699,8 +1658,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFFormNoFields(boolean value)
{
field_5_docinfo = (byte)fFormNoFields.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1710,7 +1667,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFFormNoFields()
{
return fFormNoFields.isSet(field_5_docinfo);
-
}
/**
@@ -1720,8 +1676,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFLinkStyles(boolean value)
{
field_5_docinfo = (byte)fLinkStyles.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1731,7 +1685,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFLinkStyles()
{
return fLinkStyles.isSet(field_5_docinfo);
-
}
/**
@@ -1741,8 +1694,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFRevMarking(boolean value)
{
field_5_docinfo = (byte)fRevMarking.setBoolean(field_5_docinfo, value);
-
-
}
/**
@@ -1752,7 +1703,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFRevMarking()
{
return fRevMarking.isSet(field_5_docinfo);
-
}
/**
@@ -1762,8 +1712,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFBackup(boolean value)
{
field_6_docinfo1 = (byte)fBackup.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1773,7 +1721,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFBackup()
{
return fBackup.isSet(field_6_docinfo1);
-
}
/**
@@ -1783,8 +1730,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFExactCWords(boolean value)
{
field_6_docinfo1 = (byte)fExactCWords.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1794,7 +1739,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFExactCWords()
{
return fExactCWords.isSet(field_6_docinfo1);
-
}
/**
@@ -1804,8 +1748,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFPagHidden(boolean value)
{
field_6_docinfo1 = (byte)fPagHidden.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1815,7 +1757,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPagHidden()
{
return fPagHidden.isSet(field_6_docinfo1);
-
}
/**
@@ -1825,8 +1766,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFPagResults(boolean value)
{
field_6_docinfo1 = (byte)fPagResults.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1836,7 +1775,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPagResults()
{
return fPagResults.isSet(field_6_docinfo1);
-
}
/**
@@ -1846,8 +1784,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFLockAtn(boolean value)
{
field_6_docinfo1 = (byte)fLockAtn.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1857,7 +1793,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFLockAtn()
{
return fLockAtn.isSet(field_6_docinfo1);
-
}
/**
@@ -1867,8 +1802,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFMirrorMargins(boolean value)
{
field_6_docinfo1 = (byte)fMirrorMargins.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1878,7 +1811,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFMirrorMargins()
{
return fMirrorMargins.isSet(field_6_docinfo1);
-
}
/**
@@ -1888,8 +1820,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setUnused3(boolean value)
{
field_6_docinfo1 = (byte)unused3.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1899,7 +1829,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isUnused3()
{
return unused3.isSet(field_6_docinfo1);
-
}
/**
@@ -1909,8 +1838,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFDfltTrueType(boolean value)
{
field_6_docinfo1 = (byte)fDfltTrueType.setBoolean(field_6_docinfo1, value);
-
-
}
/**
@@ -1920,7 +1847,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFDfltTrueType()
{
return fDfltTrueType.isSet(field_6_docinfo1);
-
}
/**
@@ -1930,8 +1856,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFPagSupressTopSpacing(boolean value)
{
field_7_docinfo2 = (byte)fPagSupressTopSpacing.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -1941,7 +1865,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPagSupressTopSpacing()
{
return fPagSupressTopSpacing.isSet(field_7_docinfo2);
-
}
/**
@@ -1951,8 +1874,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFProtEnabled(boolean value)
{
field_7_docinfo2 = (byte)fProtEnabled.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -1962,7 +1883,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFProtEnabled()
{
return fProtEnabled.isSet(field_7_docinfo2);
-
}
/**
@@ -1972,8 +1892,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFDispFormFldSel(boolean value)
{
field_7_docinfo2 = (byte)fDispFormFldSel.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -1983,7 +1901,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFDispFormFldSel()
{
return fDispFormFldSel.isSet(field_7_docinfo2);
-
}
/**
@@ -1993,8 +1910,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFRMView(boolean value)
{
field_7_docinfo2 = (byte)fRMView.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2004,7 +1919,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFRMView()
{
return fRMView.isSet(field_7_docinfo2);
-
}
/**
@@ -2014,8 +1928,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFRMPrint(boolean value)
{
field_7_docinfo2 = (byte)fRMPrint.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2025,7 +1937,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFRMPrint()
{
return fRMPrint.isSet(field_7_docinfo2);
-
}
/**
@@ -2035,8 +1946,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setUnused4(boolean value)
{
field_7_docinfo2 = (byte)unused4.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2046,7 +1955,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isUnused4()
{
return unused4.isSet(field_7_docinfo2);
-
}
/**
@@ -2056,8 +1964,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFLockRev(boolean value)
{
field_7_docinfo2 = (byte)fLockRev.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2067,7 +1973,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFLockRev()
{
return fLockRev.isSet(field_7_docinfo2);
-
}
/**
@@ -2077,8 +1982,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFEmbedFonts(boolean value)
{
field_7_docinfo2 = (byte)fEmbedFonts.setBoolean(field_7_docinfo2, value);
-
-
}
/**
@@ -2088,7 +1991,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFEmbedFonts()
{
return fEmbedFonts.isSet(field_7_docinfo2);
-
}
/**
@@ -2098,8 +2000,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfNoTabForInd(boolean value)
{
field_8_docinfo3 = (short)oldfNoTabForInd.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2109,7 +2009,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfNoTabForInd()
{
return oldfNoTabForInd.isSet(field_8_docinfo3);
-
}
/**
@@ -2119,8 +2018,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfNoSpaceRaiseLower(boolean value)
{
field_8_docinfo3 = (short)oldfNoSpaceRaiseLower.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2130,7 +2027,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfNoSpaceRaiseLower()
{
return oldfNoSpaceRaiseLower.isSet(field_8_docinfo3);
-
}
/**
@@ -2140,8 +2036,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfSuppressSpbfAfterPageBreak(boolean value)
{
field_8_docinfo3 = (short)oldfSuppressSpbfAfterPageBreak.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2151,7 +2045,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfSuppressSpbfAfterPageBreak()
{
return oldfSuppressSpbfAfterPageBreak.isSet(field_8_docinfo3);
-
}
/**
@@ -2161,8 +2054,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfWrapTrailSpaces(boolean value)
{
field_8_docinfo3 = (short)oldfWrapTrailSpaces.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2172,7 +2063,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfWrapTrailSpaces()
{
return oldfWrapTrailSpaces.isSet(field_8_docinfo3);
-
}
/**
@@ -2182,8 +2072,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfMapPrintTextColor(boolean value)
{
field_8_docinfo3 = (short)oldfMapPrintTextColor.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2193,7 +2081,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfMapPrintTextColor()
{
return oldfMapPrintTextColor.isSet(field_8_docinfo3);
-
}
/**
@@ -2203,8 +2090,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfNoColumnBalance(boolean value)
{
field_8_docinfo3 = (short)oldfNoColumnBalance.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2214,7 +2099,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfNoColumnBalance()
{
return oldfNoColumnBalance.isSet(field_8_docinfo3);
-
}
/**
@@ -2224,8 +2108,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfConvMailMergeEsc(boolean value)
{
field_8_docinfo3 = (short)oldfConvMailMergeEsc.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2235,7 +2117,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfConvMailMergeEsc()
{
return oldfConvMailMergeEsc.isSet(field_8_docinfo3);
-
}
/**
@@ -2245,8 +2126,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfSupressTopSpacing(boolean value)
{
field_8_docinfo3 = (short)oldfSupressTopSpacing.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2256,7 +2135,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfSupressTopSpacing()
{
return oldfSupressTopSpacing.isSet(field_8_docinfo3);
-
}
/**
@@ -2266,8 +2144,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfOrigWordTableRules(boolean value)
{
field_8_docinfo3 = (short)oldfOrigWordTableRules.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2277,7 +2153,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfOrigWordTableRules()
{
return oldfOrigWordTableRules.isSet(field_8_docinfo3);
-
}
/**
@@ -2287,8 +2162,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfTransparentMetafiles(boolean value)
{
field_8_docinfo3 = (short)oldfTransparentMetafiles.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2298,7 +2171,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfTransparentMetafiles()
{
return oldfTransparentMetafiles.isSet(field_8_docinfo3);
-
}
/**
@@ -2308,8 +2180,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfShowBreaksInFrames(boolean value)
{
field_8_docinfo3 = (short)oldfShowBreaksInFrames.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2319,7 +2189,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfShowBreaksInFrames()
{
return oldfShowBreaksInFrames.isSet(field_8_docinfo3);
-
}
/**
@@ -2329,8 +2198,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setOldfSwapBordersFacingPgs(boolean value)
{
field_8_docinfo3 = (short)oldfSwapBordersFacingPgs.setBoolean(field_8_docinfo3, value);
-
-
}
/**
@@ -2340,7 +2207,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isOldfSwapBordersFacingPgs()
{
return oldfSwapBordersFacingPgs.isSet(field_8_docinfo3);
-
}
/**
@@ -2350,8 +2216,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setUnused5(byte value)
{
field_8_docinfo3 = (short)unused5.setValue(field_8_docinfo3, value);
-
-
}
/**
@@ -2361,7 +2225,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getUnused5()
{
return ( byte )unused5.getValue(field_8_docinfo3);
-
}
/**
@@ -2371,8 +2234,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setRncEdn(byte value)
{
field_23_Edn = (short)rncEdn.setValue(field_23_Edn, value);
-
-
}
/**
@@ -2382,7 +2243,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getRncEdn()
{
return ( byte )rncEdn.getValue(field_23_Edn);
-
}
/**
@@ -2392,8 +2252,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setNEdn(short value)
{
field_23_Edn = (short)nEdn.setValue(field_23_Edn, value);
-
-
}
/**
@@ -2403,7 +2261,6 @@ public abstract class DOPAbstractType implements HDFType {
public short getNEdn()
{
return ( short )nEdn.getValue(field_23_Edn);
-
}
/**
@@ -2413,8 +2270,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setEpc(byte value)
{
field_24_Edn1 = (short)epc.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2424,7 +2279,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getEpc()
{
return ( byte )epc.getValue(field_24_Edn1);
-
}
/**
@@ -2434,8 +2288,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setNfcFtnRef1(byte value)
{
field_24_Edn1 = (short)nfcFtnRef1.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2445,7 +2297,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getNfcFtnRef1()
{
return ( byte )nfcFtnRef1.getValue(field_24_Edn1);
-
}
/**
@@ -2455,8 +2306,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setNfcEdnRef1(byte value)
{
field_24_Edn1 = (short)nfcEdnRef1.setValue(field_24_Edn1, value);
-
-
}
/**
@@ -2466,7 +2315,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getNfcEdnRef1()
{
return ( byte )nfcEdnRef1.getValue(field_24_Edn1);
-
}
/**
@@ -2476,8 +2324,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFPrintFormData(boolean value)
{
field_24_Edn1 = (short)fPrintFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2487,7 +2333,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPrintFormData()
{
return fPrintFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2497,8 +2342,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFSaveFormData(boolean value)
{
field_24_Edn1 = (short)fSaveFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2508,7 +2351,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSaveFormData()
{
return fSaveFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2518,8 +2360,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFShadeFormData(boolean value)
{
field_24_Edn1 = (short)fShadeFormData.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2529,7 +2369,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFShadeFormData()
{
return fShadeFormData.isSet(field_24_Edn1);
-
}
/**
@@ -2539,8 +2378,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFWCFtnEdn(boolean value)
{
field_24_Edn1 = (short)fWCFtnEdn.setBoolean(field_24_Edn1, value);
-
-
}
/**
@@ -2550,7 +2387,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFWCFtnEdn()
{
return fWCFtnEdn.isSet(field_24_Edn1);
-
}
/**
@@ -2560,8 +2396,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setWvkSaved(byte value)
{
field_32_view = (short)wvkSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2571,7 +2405,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getWvkSaved()
{
return ( byte )wvkSaved.getValue(field_32_view);
-
}
/**
@@ -2581,8 +2414,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setWScaleSaved(short value)
{
field_32_view = (short)wScaleSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2592,7 +2423,6 @@ public abstract class DOPAbstractType implements HDFType {
public short getWScaleSaved()
{
return ( short )wScaleSaved.getValue(field_32_view);
-
}
/**
@@ -2602,8 +2432,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setZkSaved(byte value)
{
field_32_view = (short)zkSaved.setValue(field_32_view, value);
-
-
}
/**
@@ -2613,7 +2441,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getZkSaved()
{
return ( byte )zkSaved.getValue(field_32_view);
-
}
/**
@@ -2623,8 +2450,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFRotateFontW6(boolean value)
{
field_32_view = (short)fRotateFontW6.setBoolean(field_32_view, value);
-
-
}
/**
@@ -2634,7 +2459,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFRotateFontW6()
{
return fRotateFontW6.isSet(field_32_view);
-
}
/**
@@ -2644,8 +2468,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setIGutterPos(boolean value)
{
field_32_view = (short)iGutterPos.setBoolean(field_32_view, value);
-
-
}
/**
@@ -2655,7 +2477,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isIGutterPos()
{
return iGutterPos.isSet(field_32_view);
-
}
/**
@@ -2664,9 +2485,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFNoTabForInd(boolean value)
{
- field_33_docinfo4 = (int)fNoTabForInd.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoTabForInd.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2676,7 +2495,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFNoTabForInd()
{
return fNoTabForInd.isSet(field_33_docinfo4);
-
}
/**
@@ -2685,9 +2503,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFNoSpaceRaiseLower(boolean value)
{
- field_33_docinfo4 = (int)fNoSpaceRaiseLower.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoSpaceRaiseLower.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2697,7 +2513,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFNoSpaceRaiseLower()
{
return fNoSpaceRaiseLower.isSet(field_33_docinfo4);
-
}
/**
@@ -2706,9 +2521,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFSupressSpdfAfterPageBreak(boolean value)
{
- field_33_docinfo4 = (int)fSupressSpdfAfterPageBreak.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSupressSpdfAfterPageBreak.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2718,7 +2531,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSupressSpdfAfterPageBreak()
{
return fSupressSpdfAfterPageBreak.isSet(field_33_docinfo4);
-
}
/**
@@ -2727,9 +2539,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFWrapTrailSpaces(boolean value)
{
- field_33_docinfo4 = (int)fWrapTrailSpaces.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fWrapTrailSpaces.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2739,7 +2549,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFWrapTrailSpaces()
{
return fWrapTrailSpaces.isSet(field_33_docinfo4);
-
}
/**
@@ -2748,9 +2557,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFMapPrintTextColor(boolean value)
{
- field_33_docinfo4 = (int)fMapPrintTextColor.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fMapPrintTextColor.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2760,7 +2567,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFMapPrintTextColor()
{
return fMapPrintTextColor.isSet(field_33_docinfo4);
-
}
/**
@@ -2769,9 +2575,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFNoColumnBalance(boolean value)
{
- field_33_docinfo4 = (int)fNoColumnBalance.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoColumnBalance.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2781,7 +2585,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFNoColumnBalance()
{
return fNoColumnBalance.isSet(field_33_docinfo4);
-
}
/**
@@ -2790,9 +2593,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFConvMailMergeEsc(boolean value)
{
- field_33_docinfo4 = (int)fConvMailMergeEsc.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fConvMailMergeEsc.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2802,7 +2603,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFConvMailMergeEsc()
{
return fConvMailMergeEsc.isSet(field_33_docinfo4);
-
}
/**
@@ -2811,9 +2611,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFSupressTopSpacing(boolean value)
{
- field_33_docinfo4 = (int)fSupressTopSpacing.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSupressTopSpacing.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2823,7 +2621,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSupressTopSpacing()
{
return fSupressTopSpacing.isSet(field_33_docinfo4);
-
}
/**
@@ -2832,9 +2629,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFOrigWordTableRules(boolean value)
{
- field_33_docinfo4 = (int)fOrigWordTableRules.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fOrigWordTableRules.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2844,7 +2639,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFOrigWordTableRules()
{
return fOrigWordTableRules.isSet(field_33_docinfo4);
-
}
/**
@@ -2853,9 +2647,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFTransparentMetafiles(boolean value)
{
- field_33_docinfo4 = (int)fTransparentMetafiles.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fTransparentMetafiles.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2865,7 +2657,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFTransparentMetafiles()
{
return fTransparentMetafiles.isSet(field_33_docinfo4);
-
}
/**
@@ -2874,9 +2665,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFShowBreaksInFrames(boolean value)
{
- field_33_docinfo4 = (int)fShowBreaksInFrames.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fShowBreaksInFrames.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2886,7 +2675,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFShowBreaksInFrames()
{
return fShowBreaksInFrames.isSet(field_33_docinfo4);
-
}
/**
@@ -2895,9 +2683,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFSwapBordersFacingPgs(boolean value)
{
- field_33_docinfo4 = (int)fSwapBordersFacingPgs.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSwapBordersFacingPgs.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2907,7 +2693,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSwapBordersFacingPgs()
{
return fSwapBordersFacingPgs.isSet(field_33_docinfo4);
-
}
/**
@@ -2916,9 +2701,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFSuppressTopSPacingMac5(boolean value)
{
- field_33_docinfo4 = (int)fSuppressTopSPacingMac5.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fSuppressTopSPacingMac5.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2928,7 +2711,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSuppressTopSPacingMac5()
{
return fSuppressTopSPacingMac5.isSet(field_33_docinfo4);
-
}
/**
@@ -2937,9 +2719,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFTruncDxaExpand(boolean value)
{
- field_33_docinfo4 = (int)fTruncDxaExpand.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fTruncDxaExpand.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2949,7 +2729,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFTruncDxaExpand()
{
return fTruncDxaExpand.isSet(field_33_docinfo4);
-
}
/**
@@ -2958,9 +2737,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFPrintBodyBeforeHdr(boolean value)
{
- field_33_docinfo4 = (int)fPrintBodyBeforeHdr.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fPrintBodyBeforeHdr.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2970,7 +2747,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFPrintBodyBeforeHdr()
{
return fPrintBodyBeforeHdr.isSet(field_33_docinfo4);
-
}
/**
@@ -2979,9 +2755,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFNoLeading(boolean value)
{
- field_33_docinfo4 = (int)fNoLeading.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fNoLeading.setBoolean(field_33_docinfo4, value);
}
/**
@@ -2991,7 +2765,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFNoLeading()
{
return fNoLeading.isSet(field_33_docinfo4);
-
}
/**
@@ -3000,9 +2773,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFMWSmallCaps(boolean value)
{
- field_33_docinfo4 = (int)fMWSmallCaps.setBoolean(field_33_docinfo4, value);
-
-
+ field_33_docinfo4 = fMWSmallCaps.setBoolean(field_33_docinfo4, value);
}
/**
@@ -3012,7 +2783,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFMWSmallCaps()
{
return fMWSmallCaps.isSet(field_33_docinfo4);
-
}
/**
@@ -3022,8 +2792,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setLvl(byte value)
{
field_37_docinfo5 = (short)lvl.setValue(field_37_docinfo5, value);
-
-
}
/**
@@ -3033,7 +2801,6 @@ public abstract class DOPAbstractType implements HDFType {
public byte getLvl()
{
return ( byte )lvl.getValue(field_37_docinfo5);
-
}
/**
@@ -3043,8 +2810,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFGramAllDone(boolean value)
{
field_37_docinfo5 = (short)fGramAllDone.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3054,7 +2819,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFGramAllDone()
{
return fGramAllDone.isSet(field_37_docinfo5);
-
}
/**
@@ -3064,8 +2828,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFGramAllClean(boolean value)
{
field_37_docinfo5 = (short)fGramAllClean.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3075,7 +2837,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFGramAllClean()
{
return fGramAllClean.isSet(field_37_docinfo5);
-
}
/**
@@ -3085,8 +2846,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFSubsetFonts(boolean value)
{
field_37_docinfo5 = (short)fSubsetFonts.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3096,7 +2855,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSubsetFonts()
{
return fSubsetFonts.isSet(field_37_docinfo5);
-
}
/**
@@ -3106,8 +2864,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFHideLastVersion(boolean value)
{
field_37_docinfo5 = (short)fHideLastVersion.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3117,7 +2873,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFHideLastVersion()
{
return fHideLastVersion.isSet(field_37_docinfo5);
-
}
/**
@@ -3127,8 +2882,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFHtmlDoc(boolean value)
{
field_37_docinfo5 = (short)fHtmlDoc.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3138,7 +2891,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFHtmlDoc()
{
return fHtmlDoc.isSet(field_37_docinfo5);
-
}
/**
@@ -3148,8 +2900,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFSnapBorder(boolean value)
{
field_37_docinfo5 = (short)fSnapBorder.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3159,7 +2909,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFSnapBorder()
{
return fSnapBorder.isSet(field_37_docinfo5);
-
}
/**
@@ -3169,8 +2918,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFIncludeHeader(boolean value)
{
field_37_docinfo5 = (short)fIncludeHeader.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3180,7 +2927,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFIncludeHeader()
{
return fIncludeHeader.isSet(field_37_docinfo5);
-
}
/**
@@ -3190,8 +2936,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFIncludeFooter(boolean value)
{
field_37_docinfo5 = (short)fIncludeFooter.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3201,7 +2945,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFIncludeFooter()
{
return fIncludeFooter.isSet(field_37_docinfo5);
-
}
/**
@@ -3211,8 +2954,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFForcePageSizePag(boolean value)
{
field_37_docinfo5 = (short)fForcePageSizePag.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3222,7 +2963,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFForcePageSizePag()
{
return fForcePageSizePag.isSet(field_37_docinfo5);
-
}
/**
@@ -3232,8 +2972,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFMinFontSizePag(boolean value)
{
field_37_docinfo5 = (short)fMinFontSizePag.setBoolean(field_37_docinfo5, value);
-
-
}
/**
@@ -3243,7 +2981,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFMinFontSizePag()
{
return fMinFontSizePag.isSet(field_37_docinfo5);
-
}
/**
@@ -3253,8 +2990,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFHaveVersions(boolean value)
{
field_38_docinfo6 = (short)fHaveVersions.setBoolean(field_38_docinfo6, value);
-
-
}
/**
@@ -3264,7 +2999,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFHaveVersions()
{
return fHaveVersions.isSet(field_38_docinfo6);
-
}
/**
@@ -3274,8 +3008,6 @@ public abstract class DOPAbstractType implements HDFType {
public void setFAutoVersions(boolean value)
{
field_38_docinfo6 = (short)fAutoVersions.setBoolean(field_38_docinfo6, value);
-
-
}
/**
@@ -3285,7 +3017,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFAutoVersions()
{
return fAutoVersions.isSet(field_38_docinfo6);
-
}
/**
@@ -3294,9 +3025,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFVirusPrompted(boolean value)
{
- field_43_virusinfo = (int)fVirusPrompted.setBoolean(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = fVirusPrompted.setBoolean(field_43_virusinfo, value);
}
/**
@@ -3306,7 +3035,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFVirusPrompted()
{
return fVirusPrompted.isSet(field_43_virusinfo);
-
}
/**
@@ -3315,9 +3043,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setFVirusLoadSafe(boolean value)
{
- field_43_virusinfo = (int)fVirusLoadSafe.setBoolean(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = fVirusLoadSafe.setBoolean(field_43_virusinfo, value);
}
/**
@@ -3327,7 +3053,6 @@ public abstract class DOPAbstractType implements HDFType {
public boolean isFVirusLoadSafe()
{
return fVirusLoadSafe.isSet(field_43_virusinfo);
-
}
/**
@@ -3336,9 +3061,7 @@ public abstract class DOPAbstractType implements HDFType {
*/
public void setKeyVirusSession30(int value)
{
- field_43_virusinfo = (int)KeyVirusSession30.setValue(field_43_virusinfo, value);
-
-
+ field_43_virusinfo = KeyVirusSession30.setValue(field_43_virusinfo, value);
}
/**
@@ -3347,13 +3070,6 @@ public abstract class DOPAbstractType implements HDFType {
*/
public int getKeyVirusSession30()
{
- return ( int )KeyVirusSession30.getValue(field_43_virusinfo);
-
+ return KeyVirusSession30.getValue(field_43_virusinfo);
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/FIBAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/FIBAbstractType.java
index eebde48268..32c308e38d 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/FIBAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/FIBAbstractType.java
@@ -88,26 +88,24 @@ public abstract class FIBAbstractType implements HDFType {
field_12_chsTables = LittleEndian.getShort(data, 0x16 + offset);
field_13_fcMin = LittleEndian.getInt(data, 0x18 + offset);
field_14_fcMac = LittleEndian.getInt(data, 0x1c + offset);
-
}
public void serialize(byte[] data, int offset)
{
- LittleEndian.putShort(data, 0x0 + offset, (short)field_1_wIdent);;
- LittleEndian.putShort(data, 0x2 + offset, (short)field_2_nFib);;
- LittleEndian.putShort(data, 0x4 + offset, (short)field_3_nProduct);;
- LittleEndian.putShort(data, 0x6 + offset, (short)field_4_lid);;
- LittleEndian.putShort(data, 0x8 + offset, (short)field_5_pnNext);;
- LittleEndian.putShort(data, 0xa + offset, (short)field_6_options);;
- LittleEndian.putShort(data, 0xc + offset, (short)field_7_nFibBack);;
- LittleEndian.putShort(data, 0xe + offset, (short)field_8_lKey);;
- LittleEndian.putShort(data, 0x10 + offset, (short)field_9_envr);;
- LittleEndian.putShort(data, 0x12 + offset, (short)field_10_history);;
- LittleEndian.putShort(data, 0x14 + offset, (short)field_11_chs);;
- LittleEndian.putShort(data, 0x16 + offset, (short)field_12_chsTables);;
- LittleEndian.putInt(data, 0x18 + offset, field_13_fcMin);;
- LittleEndian.putInt(data, 0x1c + offset, field_14_fcMac);;
-
+ LittleEndian.putShort(data, 0x0 + offset, (short)field_1_wIdent);
+ LittleEndian.putShort(data, 0x2 + offset, (short)field_2_nFib);
+ LittleEndian.putShort(data, 0x4 + offset, (short)field_3_nProduct);
+ LittleEndian.putShort(data, 0x6 + offset, (short)field_4_lid);
+ LittleEndian.putShort(data, 0x8 + offset, (short)field_5_pnNext);
+ LittleEndian.putShort(data, 0xa + offset, field_6_options);
+ LittleEndian.putShort(data, 0xc + offset, (short)field_7_nFibBack);
+ LittleEndian.putShort(data, 0xe + offset, (short)field_8_lKey);
+ LittleEndian.putShort(data, 0x10 + offset, (short)field_9_envr);
+ LittleEndian.putShort(data, 0x12 + offset, field_10_history);
+ LittleEndian.putShort(data, 0x14 + offset, (short)field_11_chs);
+ LittleEndian.putShort(data, 0x16 + offset, (short)field_12_chsTables);
+ LittleEndian.putInt(data, 0x18 + offset, field_13_fcMin);
+ LittleEndian.putInt(data, 0x1c + offset, field_14_fcMac);
}
public String toString()
@@ -422,8 +420,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFDot(boolean value)
{
field_6_options = (short)fDot.setBoolean(field_6_options, value);
-
-
}
/**
@@ -433,7 +429,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFDot()
{
return fDot.isSet(field_6_options);
-
}
/**
@@ -443,8 +438,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFGlsy(boolean value)
{
field_6_options = (short)fGlsy.setBoolean(field_6_options, value);
-
-
}
/**
@@ -454,7 +447,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFGlsy()
{
return fGlsy.isSet(field_6_options);
-
}
/**
@@ -464,8 +456,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFComplex(boolean value)
{
field_6_options = (short)fComplex.setBoolean(field_6_options, value);
-
-
}
/**
@@ -475,7 +465,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFComplex()
{
return fComplex.isSet(field_6_options);
-
}
/**
@@ -485,8 +474,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFHasPic(boolean value)
{
field_6_options = (short)fHasPic.setBoolean(field_6_options, value);
-
-
}
/**
@@ -496,7 +483,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFHasPic()
{
return fHasPic.isSet(field_6_options);
-
}
/**
@@ -506,8 +492,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setCQuickSaves(byte value)
{
field_6_options = (short)cQuickSaves.setValue(field_6_options, value);
-
-
}
/**
@@ -517,7 +501,6 @@ public abstract class FIBAbstractType implements HDFType {
public byte getCQuickSaves()
{
return ( byte )cQuickSaves.getValue(field_6_options);
-
}
/**
@@ -527,8 +510,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFEncrypted(boolean value)
{
field_6_options = (short)fEncrypted.setBoolean(field_6_options, value);
-
-
}
/**
@@ -538,7 +519,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFEncrypted()
{
return fEncrypted.isSet(field_6_options);
-
}
/**
@@ -548,8 +528,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFWhichTblStm(boolean value)
{
field_6_options = (short)fWhichTblStm.setBoolean(field_6_options, value);
-
-
}
/**
@@ -559,7 +537,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFWhichTblStm()
{
return fWhichTblStm.isSet(field_6_options);
-
}
/**
@@ -569,8 +546,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFReadOnlyRecommended(boolean value)
{
field_6_options = (short)fReadOnlyRecommended.setBoolean(field_6_options, value);
-
-
}
/**
@@ -580,7 +555,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFReadOnlyRecommended()
{
return fReadOnlyRecommended.isSet(field_6_options);
-
}
/**
@@ -590,8 +564,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFWriteReservation(boolean value)
{
field_6_options = (short)fWriteReservation.setBoolean(field_6_options, value);
-
-
}
/**
@@ -601,7 +573,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFWriteReservation()
{
return fWriteReservation.isSet(field_6_options);
-
}
/**
@@ -611,8 +582,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFExtChar(boolean value)
{
field_6_options = (short)fExtChar.setBoolean(field_6_options, value);
-
-
}
/**
@@ -622,7 +591,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFExtChar()
{
return fExtChar.isSet(field_6_options);
-
}
/**
@@ -632,8 +600,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFLoadOverride(boolean value)
{
field_6_options = (short)fLoadOverride.setBoolean(field_6_options, value);
-
-
}
/**
@@ -643,7 +609,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFLoadOverride()
{
return fLoadOverride.isSet(field_6_options);
-
}
/**
@@ -653,8 +618,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFFarEast(boolean value)
{
field_6_options = (short)fFarEast.setBoolean(field_6_options, value);
-
-
}
/**
@@ -664,7 +627,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFFarEast()
{
return fFarEast.isSet(field_6_options);
-
}
/**
@@ -674,8 +636,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFCrypto(boolean value)
{
field_6_options = (short)fCrypto.setBoolean(field_6_options, value);
-
-
}
/**
@@ -685,7 +645,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFCrypto()
{
return fCrypto.isSet(field_6_options);
-
}
/**
@@ -695,8 +654,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFMac(boolean value)
{
field_10_history = (short)fMac.setBoolean(field_10_history, value);
-
-
}
/**
@@ -706,7 +663,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFMac()
{
return fMac.isSet(field_10_history);
-
}
/**
@@ -716,8 +672,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFEmptySpecial(boolean value)
{
field_10_history = (short)fEmptySpecial.setBoolean(field_10_history, value);
-
-
}
/**
@@ -727,7 +681,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFEmptySpecial()
{
return fEmptySpecial.isSet(field_10_history);
-
}
/**
@@ -737,8 +690,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFLoadOverridePage(boolean value)
{
field_10_history = (short)fLoadOverridePage.setBoolean(field_10_history, value);
-
-
}
/**
@@ -748,7 +699,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFLoadOverridePage()
{
return fLoadOverridePage.isSet(field_10_history);
-
}
/**
@@ -758,8 +708,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFFutureSavedUndo(boolean value)
{
field_10_history = (short)fFutureSavedUndo.setBoolean(field_10_history, value);
-
-
}
/**
@@ -769,7 +717,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFFutureSavedUndo()
{
return fFutureSavedUndo.isSet(field_10_history);
-
}
/**
@@ -779,8 +726,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFWord97Saved(boolean value)
{
field_10_history = (short)fWord97Saved.setBoolean(field_10_history, value);
-
-
}
/**
@@ -790,7 +735,6 @@ public abstract class FIBAbstractType implements HDFType {
public boolean isFWord97Saved()
{
return fWord97Saved.isSet(field_10_history);
-
}
/**
@@ -800,8 +744,6 @@ public abstract class FIBAbstractType implements HDFType {
public void setFSpare0(byte value)
{
field_10_history = (short)fSpare0.setValue(field_10_history, value);
-
-
}
/**
@@ -811,12 +753,5 @@ public abstract class FIBAbstractType implements HDFType {
public byte getFSpare0()
{
return ( byte )fSpare0.getValue(field_10_history);
-
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java
index d5a993566b..68b4a108c3 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/TCAbstractType.java
@@ -67,13 +67,12 @@ public abstract class TCAbstractType implements HDFType {
public void serialize(byte[] data, int offset)
{
- LittleEndian.putShort(data, 0x0 + offset, (short)field_1_rgf);;
- LittleEndian.putShort(data, 0x2 + offset, (short)field_2_unused);;
- field_3_brcTop.serialize(data, 0x4 + offset);;
- field_4_brcLeft.serialize(data, 0x8 + offset);;
- field_5_brcBottom.serialize(data, 0xc + offset);;
- field_6_brcRight.serialize(data, 0x10 + offset);;
-
+ LittleEndian.putShort(data, 0x0 + offset, field_1_rgf);
+ LittleEndian.putShort(data, 0x2 + offset, field_2_unused);
+ field_3_brcTop.serialize(data, 0x4 + offset);
+ field_4_brcLeft.serialize(data, 0x8 + offset);
+ field_5_brcBottom.serialize(data, 0xc + offset);
+ field_6_brcRight.serialize(data, 0x10 + offset);
}
public String toString()
@@ -225,8 +224,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFFirstMerged(boolean value)
{
field_1_rgf = (short)fFirstMerged.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -236,7 +233,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFFirstMerged()
{
return fFirstMerged.isSet(field_1_rgf);
-
}
/**
@@ -246,8 +242,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFMerged(boolean value)
{
field_1_rgf = (short)fMerged.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -257,7 +251,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFMerged()
{
return fMerged.isSet(field_1_rgf);
-
}
/**
@@ -267,8 +260,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFVertical(boolean value)
{
field_1_rgf = (short)fVertical.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -278,7 +269,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFVertical()
{
return fVertical.isSet(field_1_rgf);
-
}
/**
@@ -288,8 +278,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFBackward(boolean value)
{
field_1_rgf = (short)fBackward.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -299,7 +287,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFBackward()
{
return fBackward.isSet(field_1_rgf);
-
}
/**
@@ -309,8 +296,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFRotateFont(boolean value)
{
field_1_rgf = (short)fRotateFont.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -320,7 +305,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFRotateFont()
{
return fRotateFont.isSet(field_1_rgf);
-
}
/**
@@ -330,8 +314,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFVertMerge(boolean value)
{
field_1_rgf = (short)fVertMerge.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -341,7 +323,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFVertMerge()
{
return fVertMerge.isSet(field_1_rgf);
-
}
/**
@@ -351,8 +332,6 @@ public abstract class TCAbstractType implements HDFType {
public void setFVertRestart(boolean value)
{
field_1_rgf = (short)fVertRestart.setBoolean(field_1_rgf, value);
-
-
}
/**
@@ -362,7 +341,6 @@ public abstract class TCAbstractType implements HDFType {
public boolean isFVertRestart()
{
return fVertRestart.isSet(field_1_rgf);
-
}
/**
@@ -372,8 +350,6 @@ public abstract class TCAbstractType implements HDFType {
public void setVertAlign(byte value)
{
field_1_rgf = (short)vertAlign.setValue(field_1_rgf, value);
-
-
}
/**
@@ -383,12 +359,5 @@ public abstract class TCAbstractType implements HDFType {
public byte getVertAlign()
{
return ( byte )vertAlign.getValue(field_1_rgf);
-
}
-
-
-} // END OF CLASS
-
-
-
-
+}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
index 7dabf810f9..20c62ac282 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
@@ -46,7 +46,7 @@ public final class CharacterSprmUncompressor
while (sprmIt.hasNext())
{
- SprmOperation sprm = (SprmOperation)sprmIt.next();
+ SprmOperation sprm = sprmIt.next();
unCompressCHPOperation(parent, newProperties, sprm);
}
@@ -108,8 +108,8 @@ public final class CharacterSprmUncompressor
break;
case 0x9:
newCHP.setFSpec (true);
- newCHP.setFtcSym ((short) LittleEndian.getShort (sprm.getGrpprl(), sprm.getGrpprlOffset()));
- newCHP.setXchSym ((short) LittleEndian.getShort (sprm.getGrpprl(), sprm.getGrpprlOffset() + 2));
+ newCHP.setFtcSym (LittleEndian.getShort (sprm.getGrpprl(), sprm.getGrpprlOffset()));
+ newCHP.setXchSym (LittleEndian.getShort (sprm.getGrpprl(), sprm.getGrpprlOffset() + 2));
break;
case 0xa:
newCHP.setFOle2 (getFlag (sprm.getOperand()));
@@ -426,8 +426,8 @@ public final class CharacterSprmUncompressor
// styleSheet, opSize);
break;
case 0x4d:
- float percentage = (float) sprm.getOperand() / 100.0f;
- int add = (int) ((float) percentage * (float) newCHP.getHps ());
+ float percentage = sprm.getOperand() / 100.0f;
+ int add = (int) (percentage * newCHP.getHps ());
newCHP.setHps (newCHP.getHps () + add);
break;
case 0x4e:
@@ -462,7 +462,7 @@ public final class CharacterSprmUncompressor
byte[] buf = sprm.getGrpprl();
int offset = sprm.getGrpprlOffset();
newCHP.setFPropMark (buf[offset]);
- newCHP.setIbstPropRMark ((short) LittleEndian.getShort (buf, offset + 1));
+ newCHP.setIbstPropRMark (LittleEndian.getShort (buf, offset + 1));
newCHP.setDttmPropRMark (new DateAndTime(buf, offset +3));
break;
case 0x58:
@@ -494,7 +494,7 @@ public final class CharacterSprmUncompressor
buf = sprm.getGrpprl();
offset = sprm.getGrpprlOffset();
newCHP.setFDispFldRMark (buf[offset]);
- newCHP.setIbstDispFldRMark ((short) LittleEndian.getShort (buf, offset + 1));
+ newCHP.setIbstDispFldRMark (LittleEndian.getShort (buf, offset + 1));
newCHP.setDttmDispFldRMark (new DateAndTime(buf, offset + 3));
System.arraycopy (buf, offset + 7, xstDispFldRMark, 0, 32);
newCHP.setXstDispFldRMark (xstDispFldRMark);
@@ -553,14 +553,7 @@ public final class CharacterSprmUncompressor
*/
public static boolean getFlag (int x)
{
- if (x != 0)
- {
- return true;
- }
- else
- {
- return false;
- }
+ return x != 0;
}
private static boolean getCHPFlag (byte x, boolean oldVal)
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
index e8de893a2e..fc0fdf813e 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
@@ -54,7 +54,7 @@ public final class ParagraphSprmUncompressor
while (sprmIt.hasNext())
{
- SprmOperation sprm = (SprmOperation)sprmIt.next();
+ SprmOperation sprm = sprmIt.next();
// PAPXs can contain table sprms if the paragraph marks the end of a
// table row
@@ -326,8 +326,8 @@ public final class ParagraphSprmUncompressor
{
byte[] varParam = sprm.getGrpprl();
int offset = sprm.getGrpprlOffset();
- newPAP.setFPropRMark ((int) varParam[offset]);
- newPAP.setIbstPropRMark ((int) LittleEndian.getShort (varParam, offset + 1));
+ newPAP.setFPropRMark (varParam[offset]);
+ newPAP.setIbstPropRMark (LittleEndian.getShort (varParam, offset + 1));
newPAP.setDttmPropRMark (new DateAndTime(varParam, offset + 3));
}
catch (Exception e)
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
index 802b9fcbc2..2fc2a92fe9 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
@@ -33,7 +33,7 @@ public final class SectionSprmUncompressor extends SprmUncompressor
while (sprmIt.hasNext())
{
- SprmOperation sprm = (SprmOperation)sprmIt.next();
+ SprmOperation sprm = sprmIt.next();
unCompressSEPOperation(newProperties, sprm);
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
index 56de089e99..85ea447973 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
@@ -39,7 +39,7 @@ public final class TableSprmUncompressor
while (sprmIt.hasNext())
{
- SprmOperation sprm = (SprmOperation)sprmIt.next();
+ SprmOperation sprm = sprmIt.next();
//TAPXs are actually PAPXs so we have to make sure we are only trying to
//uncompress the right type of sprm.
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
index 540b30000a..8f3e4f1937 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
@@ -380,13 +380,11 @@ public final class CharacterProperties
cp.field_23_dttmRMarkDel = (DateAndTime)field_23_dttmRMarkDel.clone();
cp.field_36_dttmPropRMark = (DateAndTime)field_36_dttmPropRMark.clone();
cp.field_40_dttmDispFldRMark = (DateAndTime)field_40_dttmDispFldRMark.clone();
- cp.field_41_xstDispFldRMark = (byte[])field_41_xstDispFldRMark.clone();
+ cp.field_41_xstDispFldRMark = field_41_xstDispFldRMark.clone();
cp.field_42_shd = (ShadingDescriptor)field_42_shd.clone();
cp._ico24 = _ico24;
return cp;
}
-
-
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
index 9a779643a6..15d61776eb 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
@@ -546,7 +546,7 @@ public final class CharacterRun
cp._props.setDttmPropRMark((DateAndTime)_props.getDttmPropRMark().clone());
cp._props.setDttmDispFldRMark((DateAndTime)_props.getDttmDispFldRMark().
clone());
- cp._props.setXstDispFldRMark((byte[])_props.getXstDispFldRMark().clone());
+ cp._props.setXstDispFldRMark(_props.getXstDispFldRMark().clone());
cp._props.setShd((ShadingDescriptor)_props.getShd().clone());
return cp;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
index a9a95c6b4f..8a4c3fa007 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
@@ -55,7 +55,7 @@ public final class HWPFList {
*/
public HWPFList(boolean numbered, StyleSheet styleSheet)
{
- _listData = new ListData((int)(Math.random() * (double)System.currentTimeMillis()), numbered);
+ _listData = new ListData((int)(Math.random() * System.currentTimeMillis()), numbered);
_override = new ListFormatOverride(_listData.getLsid());
_styleSheet = styleSheet;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
index a6fe3fdf4a..ff6f2162e2 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
@@ -17,7 +17,6 @@
package org.apache.poi.hwpf.usermodel;
-
import org.apache.poi.util.LittleEndian;
import org.apache.poi.hwpf.HWPFDocument;
@@ -46,8 +45,8 @@ import java.util.NoSuchElementException;
import java.lang.ref.WeakReference;
/**
- * This class is the central class of the HWPF object model. All properties
- * that apply to a range of characters in a Word document extend this class.
+ * This class is the central class of the HWPF object model. All properties that
+ * apply to a range of characters in a Word document extend this class.
*
* It is possible to insert text and/or properties at the beginning or end of a
* range.
@@ -60,703 +59,712 @@ import java.lang.ref.WeakReference;
*/
public class Range { // TODO -instantiable superclass
- public static final int TYPE_PARAGRAPH = 0;
- public static final int TYPE_CHARACTER= 1;
- public static final int TYPE_SECTION = 2;
- public static final int TYPE_TEXT = 3;
- public static final int TYPE_LISTENTRY = 4;
- public static final int TYPE_TABLE = 5;
- public static final int TYPE_UNDEFINED = 6;
-
- /** Needed so inserts and deletes will ripple up through containing Ranges */
- private WeakReference _parent;
-
- /** The starting character offset of this range.*/
- protected int _start;
-
- /** The ending character offset of this range.*/
- protected int _end;
-
- /** The document this range blongs to.*/
- protected HWPFDocument _doc;
-
- /** Have we loaded the section indexes yet*/
- boolean _sectionRangeFound;
-
- /** All sections that belong to the document this Range belongs to.*/
- protected List _sections;
-
- /** The start index in the sections list for this Range*/
- protected int _sectionStart;
-
- /** The end index in the sections list for this Range.*/
- protected int _sectionEnd;
-
- /** Have we loaded the paragraph indexes yet.*/
- protected boolean _parRangeFound;
-
- /** All paragraphs that belong to the document this Range belongs to.*/
- protected List _paragraphs;
-
- /** The start index in the paragraphs list for this Range*/
- protected int _parStart;
-
- /** The end index in the paragraphs list for this Range.*/
- protected int _parEnd;
-
- /** Have we loaded the characterRun indexes yet.*/
- protected boolean _charRangeFound;
-
- /** All CharacterRuns that belong to the document this Range belongs to.*/
- protected List _characters;
-
- /** The start index in the characterRuns list for this Range*/
- protected int _charStart;
-
- /** The end index in the characterRuns list for this Range. */
- protected int _charEnd;
-
- /** Have we loaded the Text indexes yet*/
- protected boolean _textRangeFound;
-
- /** All text pieces that belong to the document this Range belongs to.*/
- protected List _text;
-
- /** The start index in the text list for this Range.*/
- protected int _textStart;
-
- /** The end index in the text list for this Range.*/
- protected int _textEnd;
-
-// protected Range()
-// {
-//
-// }
-
- /**
- * Used to construct a Range from a document. This is generally used to
- * create a Range that spans the whole document, or at least one
- * whole part of the document (eg main text, header, comment)
- *
- * @param start Starting character offset of the range.
- * @param end Ending character offset of the range.
- * @param doc The HWPFDocument the range is based on.
- */
- public Range(int start, int end, HWPFDocument doc)
- {
- _start = start;
- _end = end;
- _doc = doc;
- _sections = _doc.getSectionTable().getSections();
- _paragraphs = _doc.getParagraphTable().getParagraphs();
- _characters = _doc.getCharacterTable().getTextRuns();
- _text = _doc.getTextTable().getTextPieces();
- _parent = new WeakReference(null);
-
- sanityCheckStartEnd();
- }
-
-
- /**
- * Used to create Ranges that are children of other Ranges.
- *
- * @param start Starting character offset of the range.
- * @param end Ending character offset of the range.
- * @param parent The parent this range belongs to.
- */
- protected Range(int start, int end, Range parent)
- {
- _start = start;
- _end = end;
- _doc = parent._doc;
- _sections = parent._sections;
- _paragraphs = parent._paragraphs;
- _characters = parent._characters;
- _text = parent._text;
- _parent = new WeakReference(parent);
-
- sanityCheckStartEnd();
- }
-
- /**
- * Constructor used to build a Range from indexes in one of its internal
- * lists.
- *
- * @param startIdx The starting index in the list.
- * @param endIdx The ending index in the list.
- * @param idxType The list type.
- * @param parent The parent Range this range belongs to.
- */
- protected Range(int startIdx, int endIdx, int idxType, Range parent)
- {
- _doc = parent._doc;
- _sections = parent._sections;
- _paragraphs = parent._paragraphs;
- _characters = parent._characters;
- _text = parent._text;
- _parent = new WeakReference(parent);
-
- switch (idxType)
- {
- case TYPE_PARAGRAPH:
- _parStart = parent._parStart + startIdx;
- _parEnd = parent._parStart + endIdx;
- _start = ((PropertyNode)_paragraphs.get(_parStart)).getStart();
- _end = ((PropertyNode)_paragraphs.get(_parEnd)).getEnd();
- _parRangeFound = true;
- break;
- case TYPE_CHARACTER:
- _charStart = parent._charStart + startIdx;
- _charEnd = parent._charStart + endIdx;
- _start = ((PropertyNode)_characters.get(_charStart)).getStart();
- _end = ((PropertyNode)_characters.get(_charEnd)).getEnd();
- _charRangeFound = true;
- break;
- case TYPE_SECTION:
- _sectionStart = parent._sectionStart + startIdx;
- _sectionEnd = parent._sectionStart + endIdx;
- _start = ((PropertyNode)_sections.get(_sectionStart)).getStart();
- _end = ((PropertyNode)_sections.get(_sectionEnd)).getEnd();
- _sectionRangeFound = true;
- break;
- case TYPE_TEXT:
- _textStart = parent._textStart + startIdx;
- _textEnd = parent._textStart + endIdx;
- _start = ((PropertyNode)_text.get(_textStart)).getStart();
- _end = ((PropertyNode)_text.get(_textEnd)).getEnd();
- _textRangeFound = true;
- break;
- }
-
- sanityCheckStartEnd();
- }
-
- /**
- * Ensures that the start and end were were given
- * are actually valid, to avoid issues later on
- * if they're not
- */
- private void sanityCheckStartEnd() {
- if(_start < 0) {
- throw new IllegalArgumentException("Range start must not be negative. Given " + _start);
- }
- if(_end < _start) {
- throw new IllegalArgumentException("The end (" + _end + ") must not be before the start ("+_start+")");
- }
- }
-
- /**
- * Does any <code>TextPiece</code> in this Range use unicode?
- *
- * @return true if it does and false if it doesn't
- */
- public boolean usesUnicode() {
-
- initText();
-
- for (int i = _textStart; i < _textEnd; i++)
+ public static final int TYPE_PARAGRAPH = 0;
+ public static final int TYPE_CHARACTER = 1;
+ public static final int TYPE_SECTION = 2;
+ public static final int TYPE_TEXT = 3;
+ public static final int TYPE_LISTENTRY = 4;
+ public static final int TYPE_TABLE = 5;
+ public static final int TYPE_UNDEFINED = 6;
+
+ /** Needed so inserts and deletes will ripple up through containing Ranges */
+ private WeakReference _parent;
+
+ /** The starting character offset of this range. */
+ protected int _start;
+
+ /** The ending character offset of this range. */
+ protected int _end;
+
+ /** The document this range blongs to. */
+ protected HWPFDocument _doc;
+
+ /** Have we loaded the section indexes yet */
+ boolean _sectionRangeFound;
+
+ /** All sections that belong to the document this Range belongs to. */
+ protected List _sections;
+
+ /** The start index in the sections list for this Range */
+ protected int _sectionStart;
+
+ /** The end index in the sections list for this Range. */
+ protected int _sectionEnd;
+
+ /** Have we loaded the paragraph indexes yet. */
+ protected boolean _parRangeFound;
+
+ /** All paragraphs that belong to the document this Range belongs to. */
+ protected List _paragraphs;
+
+ /** The start index in the paragraphs list for this Range */
+ protected int _parStart;
+
+ /** The end index in the paragraphs list for this Range. */
+ protected int _parEnd;
+
+ /** Have we loaded the characterRun indexes yet. */
+ protected boolean _charRangeFound;
+
+ /** All CharacterRuns that belong to the document this Range belongs to. */
+ protected List _characters;
+
+ /** The start index in the characterRuns list for this Range */
+ protected int _charStart;
+
+ /** The end index in the characterRuns list for this Range. */
+ protected int _charEnd;
+
+ /** Have we loaded the Text indexes yet */
+ protected boolean _textRangeFound;
+
+ /** All text pieces that belong to the document this Range belongs to. */
+ protected List _text;
+
+ /** The start index in the text list for this Range. */
+ protected int _textStart;
+
+ /** The end index in the text list for this Range. */
+ protected int _textEnd;
+
+ // protected Range()
+ // {
+ //
+ // }
+
+ /**
+ * Used to construct a Range from a document. This is generally used to
+ * create a Range that spans the whole document, or at least one whole part
+ * of the document (eg main text, header, comment)
+ *
+ * @param start
+ * Starting character offset of the range.
+ * @param end
+ * Ending character offset of the range.
+ * @param doc
+ * The HWPFDocument the range is based on.
+ */
+ public Range(int start, int end, HWPFDocument doc) {
+ _start = start;
+ _end = end;
+ _doc = doc;
+ _sections = _doc.getSectionTable().getSections();
+ _paragraphs = _doc.getParagraphTable().getParagraphs();
+ _characters = _doc.getCharacterTable().getTextRuns();
+ _text = _doc.getTextTable().getTextPieces();
+ _parent = new WeakReference(null);
+
+ sanityCheckStartEnd();
+ }
+
+ /**
+ * Used to create Ranges that are children of other Ranges.
+ *
+ * @param start
+ * Starting character offset of the range.
+ * @param end
+ * Ending character offset of the range.
+ * @param parent
+ * The parent this range belongs to.
+ */
+ protected Range(int start, int end, Range parent) {
+ _start = start;
+ _end = end;
+ _doc = parent._doc;
+ _sections = parent._sections;
+ _paragraphs = parent._paragraphs;
+ _characters = parent._characters;
+ _text = parent._text;
+ _parent = new WeakReference(parent);
+
+ sanityCheckStartEnd();
+ }
+
+ /**
+ * Constructor used to build a Range from indexes in one of its internal
+ * lists.
+ *
+ * @param startIdx
+ * The starting index in the list.
+ * @param endIdx
+ * The ending index in the list.
+ * @param idxType
+ * The list type.
+ * @param parent
+ * The parent Range this range belongs to.
+ */
+ protected Range(int startIdx, int endIdx, int idxType, Range parent) {
+ _doc = parent._doc;
+ _sections = parent._sections;
+ _paragraphs = parent._paragraphs;
+ _characters = parent._characters;
+ _text = parent._text;
+ _parent = new WeakReference(parent);
+
+ switch (idxType) {
+ case TYPE_PARAGRAPH:
+ _parStart = parent._parStart + startIdx;
+ _parEnd = parent._parStart + endIdx;
+ _start = ((PropertyNode) _paragraphs.get(_parStart)).getStart();
+ _end = ((PropertyNode) _paragraphs.get(_parEnd)).getEnd();
+ _parRangeFound = true;
+ break;
+ case TYPE_CHARACTER:
+ _charStart = parent._charStart + startIdx;
+ _charEnd = parent._charStart + endIdx;
+ _start = ((PropertyNode) _characters.get(_charStart)).getStart();
+ _end = ((PropertyNode) _characters.get(_charEnd)).getEnd();
+ _charRangeFound = true;
+ break;
+ case TYPE_SECTION:
+ _sectionStart = parent._sectionStart + startIdx;
+ _sectionEnd = parent._sectionStart + endIdx;
+ _start = ((PropertyNode) _sections.get(_sectionStart)).getStart();
+ _end = ((PropertyNode) _sections.get(_sectionEnd)).getEnd();
+ _sectionRangeFound = true;
+ break;
+ case TYPE_TEXT:
+ _textStart = parent._textStart + startIdx;
+ _textEnd = parent._textStart + endIdx;
+ _start = ((PropertyNode) _text.get(_textStart)).getStart();
+ _end = ((PropertyNode) _text.get(_textEnd)).getEnd();
+ _textRangeFound = true;
+ break;
+ }
+
+ sanityCheckStartEnd();
+ }
+
+ /**
+ * Ensures that the start and end were were given are actually valid, to
+ * avoid issues later on if they're not
+ */
+ private void sanityCheckStartEnd() {
+ if (_start < 0) {
+ throw new IllegalArgumentException("Range start must not be negative. Given " + _start);
+ }
+ if (_end < _start) {
+ throw new IllegalArgumentException("The end (" + _end
+ + ") must not be before the start (" + _start + ")");
+ }
+ }
+
+ /**
+ * Does any <code>TextPiece</code> in this Range use unicode?
+ *
+ * @return true if it does and false if it doesn't
+ */
+ public boolean usesUnicode() {
+
+ initText();
+
+ for (int i = _textStart; i < _textEnd; i++) {
+ TextPiece piece = (TextPiece) _text.get(i);
+ if (piece.isUnicode())
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets the text that this Range contains.
+ *
+ * @return The text for this range.
+ */
+ public String text() {
+ initText();
+
+ StringBuffer sb = new StringBuffer();
+
+ for (int x = _textStart; x < _textEnd; x++) {
+ TextPiece piece = (TextPiece) _text.get(x);
+
+ // Figure out where in this piece the text
+ // we're after lives
+ int rStart = 0;
+ int rEnd = piece.characterLength();
+ if (_start > piece.getStart()) {
+ rStart = _start - piece.getStart();
+ }
+ if (_end < piece.getEnd()) {
+ rEnd -= (piece.getEnd() - _end);
+ }
+
+ // Luckily TextPieces work in characters, so we don't
+ // need to worry about unicode here
+ sb.append(piece.substring(rStart, rEnd));
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Removes any fields (eg macros, page markers etc) from the string.
+ * Normally used to make some text suitable for showing to humans, and the
+ * resultant text should not normally be saved back into the document!
+ */
+ public static String stripFields(String text) {
+ // First up, fields can be nested...
+ // A field can be 0x13 [contents] 0x15
+ // Or it can be 0x13 [contents] 0x14 [real text] 0x15
+
+ // If there are no fields, all easy
+ if (text.indexOf('\u0013') == -1)
+ return text;
+
+ // Loop over until they're all gone
+ // That's when we're out of both 0x13s and 0x15s
+ while (text.indexOf('\u0013') > -1 && text.indexOf('\u0015') > -1) {
+ int first13 = text.indexOf('\u0013');
+ int next13 = text.indexOf('\u0013', first13 + 1);
+ int first14 = text.indexOf('\u0014', first13 + 1);
+ int last15 = text.lastIndexOf('\u0015');
+
+ // If they're the wrong way around, give up
+ if (last15 < first13) {
+ break;
+ }
+
+ // If no more 13s and 14s, just zap
+ if (next13 == -1 && first14 == -1) {
+ text = text.substring(0, first13) + text.substring(last15 + 1);
+ break;
+ }
+
+ // If a 14 comes before the next 13, then
+ // zap from the 13 to the 14, and remove
+ // the 15
+ if (first14 != -1 && (first14 < next13 || next13 == -1)) {
+ text = text.substring(0, first13) + text.substring(first14 + 1, last15)
+ + text.substring(last15 + 1);
+ continue;
+ }
+
+ // Another 13 comes before the next 14.
+ // This means there's nested stuff, so we
+ // can just zap the lot
+ text = text.substring(0, first13) + text.substring(last15 + 1);
+ continue;
+ }
+
+ return text;
+ }
+
+ /**
+ * Used to get the number of sections in a range. If this range is smaller
+ * than a section, it will return 1 for its containing section.
+ *
+ * @return The number of sections in this range.
+ */
+ public int numSections() {
+ initSections();
+ return _sectionEnd - _sectionStart;
+ }
+
+ /**
+ * Used to get the number of paragraphs in a range. If this range is smaller
+ * than a paragraph, it will return 1 for its containing paragraph.
+ *
+ * @return The number of paragraphs in this range.
+ */
+
+ public int numParagraphs() {
+ initParagraphs();
+ return _parEnd - _parStart;
+ }
+
+ /**
+ *
+ * @return The number of characterRuns in this range.
+ */
+
+ public int numCharacterRuns() {
+ initCharacterRuns();
+ return _charEnd - _charStart;
+ }
+
+ /**
+ * Inserts text into the front of this range.
+ *
+ * @param text
+ * The text to insert
+ * @return The character run that text was inserted into.
+ */
+ public CharacterRun insertBefore(String text)
+ // throws UnsupportedEncodingException
+ {
+ initAll();
+
+ TextPiece tp = (TextPiece) _text.get(_textStart);
+ StringBuffer sb = tp.getStringBuffer();
+
+ // Since this is the first item in our list, it is safe to assume that
+ // _start >= tp.getStart()
+ int insertIndex = _start - tp.getStart();
+ sb.insert(insertIndex, text);
+
+ int adjustedLength = _doc.getTextTable().adjustForInsert(_textStart, text.length());
+ _doc.getCharacterTable().adjustForInsert(_charStart, adjustedLength);
+ _doc.getParagraphTable().adjustForInsert(_parStart, adjustedLength);
+ _doc.getSectionTable().adjustForInsert(_sectionStart, adjustedLength);
+ adjustForInsert(adjustedLength);
+
+ // update the FIB.CCPText + friends fields
+ adjustFIB(text.length());
+
+ return getCharacterRun(0);
+ }
+
+ /**
+ * Inserts text onto the end of this range
+ *
+ * @param text
+ * The text to insert
+ * @return The character run the text was inserted into.
+ */
+ public CharacterRun insertAfter(String text) {
+ initAll();
+
+ int listIndex = _textEnd - 1;
+ TextPiece tp = (TextPiece) _text.get(listIndex);
+ StringBuffer sb = tp.getStringBuffer();
+
+ int insertIndex = _end - tp.getStart();
+
+ if (tp.getStringBuffer().charAt(_end - 1) == '\r' && text.charAt(0) != '\u0007') {
+ insertIndex--;
+ }
+ sb.insert(insertIndex, text);
+ int adjustedLength = _doc.getTextTable().adjustForInsert(listIndex, text.length());
+ _doc.getCharacterTable().adjustForInsert(_charEnd - 1, adjustedLength);
+ _doc.getParagraphTable().adjustForInsert(_parEnd - 1, adjustedLength);
+ _doc.getSectionTable().adjustForInsert(_sectionEnd - 1, adjustedLength);
+ adjustForInsert(text.length());
+
+ return getCharacterRun(numCharacterRuns() - 1);
+
+ }
+
+ /**
+ * Inserts text into the front of this range and it gives that text the
+ * CharacterProperties specified in props.
+ *
+ * @param text
+ * The text to insert.
+ * @param props
+ * The CharacterProperties to give the text.
+ * @return A new CharacterRun that has the given text and properties and is
+ * n ow a part of the document.
+ */
+ public CharacterRun insertBefore(String text, CharacterProperties props)
+ // throws UnsupportedEncodingException
+ {
+ initAll();
+ PAPX papx = (PAPX) _paragraphs.get(_parStart);
+ short istd = papx.getIstd();
+
+ StyleSheet ss = _doc.getStyleSheet();
+ CharacterProperties baseStyle = ss.getCharacterStyle(istd);
+ byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
+ SprmBuffer buf = new SprmBuffer(grpprl);
+ _doc.getCharacterTable().insert(_charStart, _start, buf);
+
+ return insertBefore(text);
+ }
+
+ /**
+ * Inserts text onto the end of this range and gives that text the
+ * CharacterProperties specified in props.
+ *
+ * @param text
+ * The text to insert.
+ * @param props
+ * The CharacterProperties to give the text.
+ * @return A new CharacterRun that has the given text and properties and is
+ * n ow a part of the document.
+ */
+ public CharacterRun insertAfter(String text, CharacterProperties props)
+ // throws UnsupportedEncodingException
+ {
+ initAll();
+ PAPX papx = (PAPX) _paragraphs.get(_parEnd - 1);
+ short istd = papx.getIstd();
+
+ StyleSheet ss = _doc.getStyleSheet();
+ CharacterProperties baseStyle = ss.getCharacterStyle(istd);
+ byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
+ SprmBuffer buf = new SprmBuffer(grpprl);
+ _doc.getCharacterTable().insert(_charEnd, _end, buf);
+ _charEnd++;
+ return insertAfter(text);
+ }
+
+ /**
+ * Inserts and empty paragraph into the front of this range.
+ *
+ * @param props
+ * The properties that the new paragraph will have.
+ * @param styleIndex
+ * The index into the stylesheet for the new paragraph.
+ * @return The newly inserted paragraph.
+ */
+ public Paragraph insertBefore(ParagraphProperties props, int styleIndex)
+ // throws UnsupportedEncodingException
+ {
+ return this.insertBefore(props, styleIndex, "\r");
+ }
+
+ /**
+ * Inserts a paragraph into the front of this range. The paragraph will
+ * contain one character run that has the default properties for the
+ * paragraph's style.
+ *
+ * It is necessary for the text to end with the character '\r'
+ *
+ * @param props
+ * The paragraph's properties.
+ * @param styleIndex
+ * The index of the paragraph's style in the style sheet.
+ * @param text
+ * The text to insert.
+ * @return A newly inserted paragraph.
+ */
+ protected Paragraph insertBefore(ParagraphProperties props, int styleIndex, String text)
+ // throws UnsupportedEncodingException
{
- TextPiece piece = (TextPiece)_text.get(i);
- if (piece.isUnicode())
- return true;
+ initAll();
+ StyleSheet ss = _doc.getStyleSheet();
+ ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex);
+ CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
+
+ byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
+ byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
+ LittleEndian.putShort(withIndex, (short) styleIndex);
+ System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
+ SprmBuffer buf = new SprmBuffer(withIndex);
+
+ _doc.getParagraphTable().insert(_parStart, _start, buf);
+ insertBefore(text, baseChp);
+ return getParagraph(0);
}
- return false;
- }
-
- /**
- * Gets the text that this Range contains.
- *
- * @return The text for this range.
- */
- public String text()
- {
- initText();
-
- StringBuffer sb = new StringBuffer();
-
- for (int x = _textStart; x < _textEnd; x++)
- {
- TextPiece piece = (TextPiece)_text.get(x);
-
- // Figure out where in this piece the text
- // we're after lives
- int rStart = 0;
- int rEnd = piece.characterLength();
- if(_start > piece.getStart()) {
- rStart = _start - piece.getStart();
- }
- if(_end < piece.getEnd()) {
- rEnd -= (piece.getEnd() - _end);
- }
-
- // Luckily TextPieces work in characters, so we don't
- // need to worry about unicode here
- sb.append(piece.substring(rStart, rEnd));
- }
- return sb.toString();
- }
-
- /**
- * Removes any fields (eg macros, page markers etc)
- * from the string.
- * Normally used to make some text suitable for showing
- * to humans, and the resultant text should not normally
- * be saved back into the document!
- */
- public static String stripFields(String text) {
- // First up, fields can be nested...
- // A field can be 0x13 [contents] 0x15
- // Or it can be 0x13 [contents] 0x14 [real text] 0x15
-
- // If there are no fields, all easy
- if(text.indexOf('\u0013') == -1) return text;
-
- // Loop over until they're all gone
- // That's when we're out of both 0x13s and 0x15s
- while( text.indexOf('\u0013') > -1 &&
- text.indexOf('\u0015') > -1) {
- int first13 = text.indexOf('\u0013');
- int next13 = text.indexOf('\u0013', first13+1);
- int first14 = text.indexOf('\u0014', first13+1);
- int last15 = text.lastIndexOf('\u0015');
-
- // If they're the wrong way around, give up
- if(last15 < first13) {
- break;
- }
-
- // If no more 13s and 14s, just zap
- if(next13 == -1 && first14 == -1) {
- text = text.substring(0, first13) +
- text.substring(last15+1);
- break;
- }
-
- // If a 14 comes before the next 13, then
- // zap from the 13 to the 14, and remove
- // the 15
- if(first14 != -1 && (first14 < next13 || next13 == -1)) {
- text = text.substring(0, first13) +
- text.substring(first14+1, last15) +
- text.substring(last15+1);
- continue;
- }
-
- // Another 13 comes before the next 14.
- // This means there's nested stuff, so we
- // can just zap the lot
- text = text.substring(0, first13) +
- text.substring(last15+1);
- continue;
- }
-
- return text;
- }
-
- /**
- * Used to get the number of sections in a range. If this range is smaller
- * than a section, it will return 1 for its containing section.
- *
- * @return The number of sections in this range.
- */
- public int numSections()
- {
- initSections();
- return _sectionEnd - _sectionStart;
- }
-
- /**
- * Used to get the number of paragraphs in a range. If this range is smaller
- * than a paragraph, it will return 1 for its containing paragraph.
- *
- * @return The number of paragraphs in this range.
- */
-
- public int numParagraphs()
- {
- initParagraphs();
- return _parEnd - _parStart;
- }
-
- /**
- *
- * @return The number of characterRuns in this range.
- */
-
- public int numCharacterRuns()
- {
- initCharacterRuns();
- return _charEnd - _charStart;
- }
-
- /**
- * Inserts text into the front of this range.
- *
- * @param text The text to insert
- * @return The character run that text was inserted into.
- */
- public CharacterRun insertBefore(String text)
- //throws UnsupportedEncodingException
- {
- initAll();
-
- TextPiece tp = (TextPiece)_text.get(_textStart);
- StringBuffer sb = (StringBuffer)tp.getStringBuffer();
-
- // Since this is the first item in our list, it is safe to assume that
- // _start >= tp.getStart()
- int insertIndex = _start - tp.getStart();
- sb.insert(insertIndex, text);
-
- int adjustedLength = _doc.getTextTable().adjustForInsert(_textStart, text.length());
- _doc.getCharacterTable().adjustForInsert(_charStart, adjustedLength);
- _doc.getParagraphTable().adjustForInsert(_parStart, adjustedLength);
- _doc.getSectionTable().adjustForInsert(_sectionStart, adjustedLength);
- adjustForInsert(adjustedLength);
-
- // update the FIB.CCPText + friends fields
- adjustFIB(text.length());
-
- return getCharacterRun(0);
- }
-
- /**
- * Inserts text onto the end of this range
- *
- * @param text The text to insert
- * @return The character run the text was inserted into.
- */
- public CharacterRun insertAfter(String text)
- {
- initAll();
-
- int listIndex = _textEnd - 1;
- TextPiece tp = (TextPiece)_text.get(listIndex);
- StringBuffer sb = (StringBuffer)tp.getStringBuffer();
-
- int insertIndex = _end - tp.getStart();
-
- if (tp.getStringBuffer().charAt(_end - 1) == '\r' && text.charAt(0) != '\u0007')
- {
- insertIndex--;
- }
- sb.insert(insertIndex, text);
- int adjustedLength = _doc.getTextTable().adjustForInsert(listIndex, text.length());
- _doc.getCharacterTable().adjustForInsert(_charEnd - 1, adjustedLength);
- _doc.getParagraphTable().adjustForInsert(_parEnd - 1, adjustedLength);
- _doc.getSectionTable().adjustForInsert(_sectionEnd - 1, adjustedLength);
- adjustForInsert(text.length());
-
- return getCharacterRun(numCharacterRuns() - 1);
-
- }
-
- /**
- * Inserts text into the front of this range and it gives that text the
- * CharacterProperties specified in props.
- *
- * @param text The text to insert.
- * @param props The CharacterProperties to give the text.
- * @return A new CharacterRun that has the given text and properties and is n
- * ow a part of the document.
- */
- public CharacterRun insertBefore(String text, CharacterProperties props)
- //throws UnsupportedEncodingException
- {
- initAll();
- PAPX papx = (PAPX)_paragraphs.get(_parStart);
- short istd = papx.getIstd();
-
- StyleSheet ss = _doc.getStyleSheet();
- CharacterProperties baseStyle = ss.getCharacterStyle(istd);
- byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
- SprmBuffer buf = new SprmBuffer(grpprl);
- _doc.getCharacterTable().insert(_charStart, _start, buf);
-
- return insertBefore(text);
- }
-
- /**
- * Inserts text onto the end of this range and gives that text the
- * CharacterProperties specified in props.
- *
- * @param text The text to insert.
- * @param props The CharacterProperties to give the text.
- * @return A new CharacterRun that has the given text and properties and is n
- * ow a part of the document.
- */
- public CharacterRun insertAfter(String text, CharacterProperties props)
- //throws UnsupportedEncodingException
- {
- initAll();
- PAPX papx = (PAPX)_paragraphs.get(_parEnd - 1);
- short istd = papx.getIstd();
-
- StyleSheet ss = _doc.getStyleSheet();
- CharacterProperties baseStyle = ss.getCharacterStyle(istd);
- byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(props, baseStyle);
- SprmBuffer buf = new SprmBuffer(grpprl);
- _doc.getCharacterTable().insert(_charEnd, _end, buf);
- _charEnd++;
- return insertAfter(text);
- }
-
- /**
- * Inserts and empty paragraph into the front of this range.
- *
- * @param props The properties that the new paragraph will have.
- * @param styleIndex The index into the stylesheet for the new paragraph.
- * @return The newly inserted paragraph.
- */
- public Paragraph insertBefore(ParagraphProperties props, int styleIndex)
- //throws UnsupportedEncodingException
- {
- return this.insertBefore(props, styleIndex, "\r");
- }
-
- /**
- * Inserts a paragraph into the front of this range. The paragraph will
- * contain one character run that has the default properties for the
- * paragraph's style.
- *
- * It is necessary for the text to end with the character '\r'
- *
- * @param props The paragraph's properties.
- * @param styleIndex The index of the paragraph's style in the style sheet.
- * @param text The text to insert.
- * @return A newly inserted paragraph.
- */
- protected Paragraph insertBefore(ParagraphProperties props, int styleIndex, String text)
- //throws UnsupportedEncodingException
- {
- initAll();
- StyleSheet ss = _doc.getStyleSheet();
- ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex);
- CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
-
- byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
- byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
- LittleEndian.putShort(withIndex, (short)styleIndex);
- System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
- SprmBuffer buf = new SprmBuffer(withIndex);
-
- _doc.getParagraphTable().insert(_parStart, _start, buf);
- insertBefore(text, baseChp);
- return getParagraph(0);
- }
-
- /**
- * Inserts and empty paragraph into the end of this range.
- *
- * @param props The properties that the new paragraph will have.
- * @param styleIndex The index into the stylesheet for the new paragraph.
- * @return The newly inserted paragraph.
- */
-
- public Paragraph insertAfter(ParagraphProperties props, int styleIndex)
- //throws UnsupportedEncodingException
- {
- return this.insertAfter(props, styleIndex, "\r");
- }
-
- /**
- * Inserts a paragraph into the end of this range. The paragraph will
- * contain one character run that has the default properties for the
- * paragraph's style.
- *
- * It is necessary for the text to end with the character '\r'
- *
- * @param props The paragraph's properties.
- * @param styleIndex The index of the paragraph's style in the style sheet.
- * @param text The text to insert.
- * @return A newly inserted paragraph.
- */
- protected Paragraph insertAfter(ParagraphProperties props, int styleIndex, String text)
- //throws UnsupportedEncodingException
- {
- initAll();
- StyleSheet ss = _doc.getStyleSheet();
- ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex);
- CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
-
- byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
- byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
- LittleEndian.putShort(withIndex, (short)styleIndex);
- System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
- SprmBuffer buf = new SprmBuffer(withIndex);
-
- _doc.getParagraphTable().insert(_parEnd, _end, buf);
- _parEnd++;
- insertAfter(text, baseChp);
- return getParagraph(numParagraphs() - 1);
- }
-
- public void delete()
- {
-
- initAll();
-
- int numSections = _sections.size();
- int numRuns = _characters.size();
- int numParagraphs = _paragraphs.size();
- int numTextPieces = _text.size();
-
- for (int x = _charStart; x < numRuns; x++)
- {
- CHPX chpx = (CHPX)_characters.get(x);
- chpx.adjustForDelete(_start, _end - _start);
- }
-
- for (int x = _parStart; x < numParagraphs; x++)
- {
- PAPX papx = (PAPX)_paragraphs.get(x);
- //System.err.println("Paragraph " + x + " was " + papx.getStart() + " -> " + papx.getEnd());
- papx.adjustForDelete(_start, _end - _start);
- //System.err.println("Paragraph " + x + " is now " + papx.getStart() + " -> " + papx.getEnd());
- }
-
- for (int x = _sectionStart; x < numSections; x++)
- {
- SEPX sepx = (SEPX)_sections.get(x);
- //System.err.println("Section " + x + " was " + sepx.getStart() + " -> " + sepx.getEnd());
- sepx.adjustForDelete(_start, _end - _start);
- //System.err.println("Section " + x + " is now " + sepx.getStart() + " -> " + sepx.getEnd());
- }
-
- for (int x = _textStart; x < numTextPieces; x++)
- {
- TextPiece piece = (TextPiece)_text.get(x);
- piece.adjustForDelete(_start, _end - _start);
- }
-
- // update the FIB.CCPText + friends field
- adjustFIB(-(_end - _start));
- }
-
- /**
- * Inserts a simple table into the beginning of this range. The number of
- * columns is determined by the TableProperties passed into this function.
- *
- * @param props The table properties for the table.
- * @param rows The number of rows.
- * @return The empty Table that is now part of the document.
- */
- public Table insertBefore(TableProperties props, int rows)
- {
- ParagraphProperties parProps = new ParagraphProperties();
- parProps.setFInTable((byte)1);
- parProps.setTableLevel((byte)1);
-
- int columns = props.getItcMac();
- for (int x = 0; x < rows; x++)
- {
- Paragraph cell = this.insertBefore(parProps, StyleSheet.NIL_STYLE);
- cell.insertAfter(String.valueOf('\u0007'));
- for(int y = 1; y < columns; y++)
- {
- cell = cell.insertAfter(parProps, StyleSheet.NIL_STYLE);
- cell.insertAfter(String.valueOf('\u0007'));
- }
- cell = cell.insertAfter(parProps, StyleSheet.NIL_STYLE, String.valueOf('\u0007'));
- cell.setTableRowEnd(props);
- }
- return new Table(_start, _start + (rows * (columns + 1)), this, 1);
- }
-
- /**
- * Inserts a list into the beginning of this range.
- *
- * @param props The properties of the list entry. All list entries are
- * paragraphs.
- * @param listID The id of the list that contains the properties.
- * @param level The indentation level of the list.
- * @param styleIndex The base style's index in the stylesheet.
- * @return The empty ListEntry that is now part of the document.
- */
- public ListEntry insertBefore(ParagraphProperties props, int listID, int level, int styleIndex)
- {
- ListTables lt = _doc.getListTables();
- if (lt.getLevel(listID, level) == null)
- {
- throw new NoSuchElementException("The specified list and level do not exist");
- }
-
- int ilfo = lt.getOverrideIndexFromListID(listID);
- props.setIlfo(ilfo);
- props.setIlvl((byte)level);
-
- return (ListEntry)insertBefore(props, styleIndex);
- }
-
- /**
- * Inserts a list into the beginning of this range.
- *
- * @param props The properties of the list entry. All list entries are
- * paragraphs.
- * @param listID The id of the list that contains the properties.
- * @param level The indentation level of the list.
- * @param styleIndex The base style's index in the stylesheet.
- * @return The empty ListEntry that is now part of the document.
- */
- public ListEntry insertAfter(ParagraphProperties props, int listID, int level, int styleIndex)
- {
- ListTables lt = _doc.getListTables();
- if (lt.getLevel(listID, level) == null)
- {
- throw new NoSuchElementException("The specified list and level do not exist");
- }
- int ilfo = lt.getOverrideIndexFromListID(listID);
- props.setIlfo(ilfo);
- props.setIlvl((byte)level);
-
- return (ListEntry)insertAfter(props, styleIndex);
- }
-
- /**
- * Replace (one instance of) a piece of text with another...
- *
- * @param pPlaceHolder The text to be replaced (e.g., "${organization}")
- * @param pValue The replacement text (e.g., "Apache Software Foundation")
- * @param pOffset The offset or index where the text to be replaced begins
- * (relative to/within this <code>Range</code>)
- */
- public void replaceText(String pPlaceHolder, String pValue, int pOffset)
- {
- int absPlaceHolderIndex = getStartOffset() + pOffset;
- Range subRange = new Range(
- absPlaceHolderIndex,
- (absPlaceHolderIndex + pPlaceHolder.length()), getDocument()
- );
-
- // this Range isn't a proper parent of the subRange() so we'll have to keep
- // track of an updated endOffset on our own
- int previousEndOffset = subRange.getEndOffset();
-
- subRange.insertBefore(pValue);
-
- if (subRange.getEndOffset() != previousEndOffset)
- _end += (subRange.getEndOffset() - previousEndOffset);
-
- // re-create the sub-range so we can delete it
- subRange = new Range(
- (absPlaceHolderIndex + pValue.length()),
- (absPlaceHolderIndex + pPlaceHolder.length() + pValue.length()),
- getDocument()
- );
-
- // deletes are automagically propagated
- subRange.delete();
- }
-
- /**
- * Replace (all instances of) a piece of text with another...
- *
- * @param pPlaceHolder The text to be replaced (e.g., "${organization}")
- * @param pValue The replacement text (e.g., "Apache Software Foundation")
- */
- public void replaceText(String pPlaceHolder, String pValue)
- {
+ /**
+ * Inserts and empty paragraph into the end of this range.
+ *
+ * @param props
+ * The properties that the new paragraph will have.
+ * @param styleIndex
+ * The index into the stylesheet for the new paragraph.
+ * @return The newly inserted paragraph.
+ */
+
+ public Paragraph insertAfter(ParagraphProperties props, int styleIndex)
+ // throws UnsupportedEncodingException
+ {
+ return this.insertAfter(props, styleIndex, "\r");
+ }
+
+ /**
+ * Inserts a paragraph into the end of this range. The paragraph will
+ * contain one character run that has the default properties for the
+ * paragraph's style.
+ *
+ * It is necessary for the text to end with the character '\r'
+ *
+ * @param props
+ * The paragraph's properties.
+ * @param styleIndex
+ * The index of the paragraph's style in the style sheet.
+ * @param text
+ * The text to insert.
+ * @return A newly inserted paragraph.
+ */
+ protected Paragraph insertAfter(ParagraphProperties props, int styleIndex, String text)
+ // throws UnsupportedEncodingException
+ {
+ initAll();
+ StyleSheet ss = _doc.getStyleSheet();
+ ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex);
+ CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);
+
+ byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
+ byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
+ LittleEndian.putShort(withIndex, (short) styleIndex);
+ System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
+ SprmBuffer buf = new SprmBuffer(withIndex);
+
+ _doc.getParagraphTable().insert(_parEnd, _end, buf);
+ _parEnd++;
+ insertAfter(text, baseChp);
+ return getParagraph(numParagraphs() - 1);
+ }
+
+ public void delete() {
+
+ initAll();
+
+ int numSections = _sections.size();
+ int numRuns = _characters.size();
+ int numParagraphs = _paragraphs.size();
+ int numTextPieces = _text.size();
+
+ for (int x = _charStart; x < numRuns; x++) {
+ CHPX chpx = (CHPX) _characters.get(x);
+ chpx.adjustForDelete(_start, _end - _start);
+ }
+
+ for (int x = _parStart; x < numParagraphs; x++) {
+ PAPX papx = (PAPX) _paragraphs.get(x);
+ // System.err.println("Paragraph " + x + " was " + papx.getStart() +
+ // " -> " + papx.getEnd());
+ papx.adjustForDelete(_start, _end - _start);
+ // System.err.println("Paragraph " + x + " is now " +
+ // papx.getStart() + " -> " + papx.getEnd());
+ }
+
+ for (int x = _sectionStart; x < numSections; x++) {
+ SEPX sepx = (SEPX) _sections.get(x);
+ // System.err.println("Section " + x + " was " + sepx.getStart() +
+ // " -> " + sepx.getEnd());
+ sepx.adjustForDelete(_start, _end - _start);
+ // System.err.println("Section " + x + " is now " + sepx.getStart()
+ // + " -> " + sepx.getEnd());
+ }
+
+ for (int x = _textStart; x < numTextPieces; x++) {
+ TextPiece piece = (TextPiece) _text.get(x);
+ piece.adjustForDelete(_start, _end - _start);
+ }
+
+ // update the FIB.CCPText + friends field
+ adjustFIB(-(_end - _start));
+ }
+
+ /**
+ * Inserts a simple table into the beginning of this range. The number of
+ * columns is determined by the TableProperties passed into this function.
+ *
+ * @param props
+ * The table properties for the table.
+ * @param rows
+ * The number of rows.
+ * @return The empty Table that is now part of the document.
+ */
+ public Table insertBefore(TableProperties props, int rows) {
+ ParagraphProperties parProps = new ParagraphProperties();
+ parProps.setFInTable((byte) 1);
+ parProps.setTableLevel((byte) 1);
+
+ int columns = props.getItcMac();
+ for (int x = 0; x < rows; x++) {
+ Paragraph cell = this.insertBefore(parProps, StyleSheet.NIL_STYLE);
+ cell.insertAfter(String.valueOf('\u0007'));
+ for (int y = 1; y < columns; y++) {
+ cell = cell.insertAfter(parProps, StyleSheet.NIL_STYLE);
+ cell.insertAfter(String.valueOf('\u0007'));
+ }
+ cell = cell.insertAfter(parProps, StyleSheet.NIL_STYLE, String.valueOf('\u0007'));
+ cell.setTableRowEnd(props);
+ }
+ return new Table(_start, _start + (rows * (columns + 1)), this, 1);
+ }
+
+ /**
+ * Inserts a list into the beginning of this range.
+ *
+ * @param props
+ * The properties of the list entry. All list entries are
+ * paragraphs.
+ * @param listID
+ * The id of the list that contains the properties.
+ * @param level
+ * The indentation level of the list.
+ * @param styleIndex
+ * The base style's index in the stylesheet.
+ * @return The empty ListEntry that is now part of the document.
+ */
+ public ListEntry insertBefore(ParagraphProperties props, int listID, int level, int styleIndex) {
+ ListTables lt = _doc.getListTables();
+ if (lt.getLevel(listID, level) == null) {
+ throw new NoSuchElementException("The specified list and level do not exist");
+ }
+
+ int ilfo = lt.getOverrideIndexFromListID(listID);
+ props.setIlfo(ilfo);
+ props.setIlvl((byte) level);
+
+ return (ListEntry) insertBefore(props, styleIndex);
+ }
+
+ /**
+ * Inserts a list into the beginning of this range.
+ *
+ * @param props
+ * The properties of the list entry. All list entries are
+ * paragraphs.
+ * @param listID
+ * The id of the list that contains the properties.
+ * @param level
+ * The indentation level of the list.
+ * @param styleIndex
+ * The base style's index in the stylesheet.
+ * @return The empty ListEntry that is now part of the document.
+ */
+ public ListEntry insertAfter(ParagraphProperties props, int listID, int level, int styleIndex) {
+ ListTables lt = _doc.getListTables();
+ if (lt.getLevel(listID, level) == null) {
+ throw new NoSuchElementException("The specified list and level do not exist");
+ }
+ int ilfo = lt.getOverrideIndexFromListID(listID);
+ props.setIlfo(ilfo);
+ props.setIlvl((byte) level);
+
+ return (ListEntry) insertAfter(props, styleIndex);
+ }
+
+ /**
+ * Replace (one instance of) a piece of text with another...
+ *
+ * @param pPlaceHolder
+ * The text to be replaced (e.g., "${organization}")
+ * @param pValue
+ * The replacement text (e.g., "Apache Software Foundation")
+ * @param pOffset
+ * The offset or index where the text to be replaced begins
+ * (relative to/within this <code>Range</code>)
+ */
+ public void replaceText(String pPlaceHolder, String pValue, int pOffset) {
+ int absPlaceHolderIndex = getStartOffset() + pOffset;
+ Range subRange = new Range(absPlaceHolderIndex, (absPlaceHolderIndex + pPlaceHolder
+ .length()), getDocument());
+
+ // this Range isn't a proper parent of the subRange() so we'll have to
+ // keep
+ // track of an updated endOffset on our own
+ int previousEndOffset = subRange.getEndOffset();
+
+ subRange.insertBefore(pValue);
+
+ if (subRange.getEndOffset() != previousEndOffset)
+ _end += (subRange.getEndOffset() - previousEndOffset);
+
+ // re-create the sub-range so we can delete it
+ subRange = new Range((absPlaceHolderIndex + pValue.length()), (absPlaceHolderIndex
+ + pPlaceHolder.length() + pValue.length()), getDocument());
+
+ // deletes are automagically propagated
+ subRange.delete();
+ }
+
+ /**
+ * Replace (all instances of) a piece of text with another...
+ *
+ * @param pPlaceHolder
+ * The text to be replaced (e.g., "${organization}")
+ * @param pValue
+ * The replacement text (e.g., "Apache Software Foundation")
+ */
+ public void replaceText(String pPlaceHolder, String pValue) {
boolean keepLooking = true;
while (keepLooking) {
@@ -767,299 +775,285 @@ public class Range { // TODO -instantiable superclass
else
keepLooking = false;
}
- }
-
- /**
- * Gets the character run at index. The index is relative to this range.
- *
- * @param index The index of the character run to get.
- * @return The character run at the specified index in this range.
- */
- public CharacterRun getCharacterRun(int index)
- {
- initCharacterRuns();
- CHPX chpx = (CHPX)_characters.get(index + _charStart);
-
- int[] point = findRange(_paragraphs, _parStart, Math.max(chpx.getStart(), _start),
- chpx.getEnd());
- PAPX papx = (PAPX)_paragraphs.get(point[0]);
- short istd = papx.getIstd();
-
- CharacterRun chp = new CharacterRun(chpx, _doc.getStyleSheet(), istd, this);
-
- return chp;
- }
-
- /**
- * Gets the section at index. The index is relative to this range.
- *
- * @param index The index of the section to get.
- * @return The section at the specified index in this range.
- */
- public Section getSection(int index)
- {
- initSections();
- SEPX sepx = (SEPX)_sections.get(index + _sectionStart);
- Section sep = new Section(sepx, this);
- return sep;
- }
-
- /**
- * Gets the paragraph at index. The index is relative to this range.
- *
- * @param index The index of the paragraph to get.
- * @return The paragraph at the specified index in this range.
- */
-
- public Paragraph getParagraph(int index)
- {
- initParagraphs();
- PAPX papx = (PAPX)_paragraphs.get(index + _parStart);
-
- ParagraphProperties props = papx.getParagraphProperties(_doc.getStyleSheet());
- Paragraph pap = null;
- if (props.getIlfo() > 0)
- {
- pap = new ListEntry(papx, this, _doc.getListTables());
- }
- else
- {
- pap = new Paragraph(papx, this);
- }
-
- return pap;
- }
-
- /**
- * This method is used to determine the type. Handy for switch statements
- * compared to the instanceof operator.
- *
- * @return A TYPE constant.
- */
- public int type()
- {
- return TYPE_UNDEFINED;
- }
-
- /**
- * Gets the table that starts with paragraph. In a Word file, a table consists
- * of a group of paragraphs with certain flags set.
- *
- * @param paragraph The paragraph that is the first paragraph in the table.
- * @return The table that starts with paragraph
- */
- public Table getTable(Paragraph paragraph)
- {
- if (!paragraph.isInTable())
- {
- throw new IllegalArgumentException("This paragraph doesn't belong to a table");
- }
-
- Range r = (Range)paragraph;
- if (r._parent.get() != this)
- {
- throw new IllegalArgumentException("This paragraph is not a child of this range");
- }
-
- r.initAll();
- int tableEnd = r._parEnd;
-
- if (r._parStart != 0 && getParagraph(r._parStart - 1).isInTable()
- && getParagraph(r._parStart - 1)._sectionEnd >= r._sectionStart)
- {
- throw new IllegalArgumentException("This paragraph is not the first one in the table");
- }
-
- int limit = _paragraphs.size();
- for (; tableEnd < limit; tableEnd++)
- {
- if (!getParagraph(tableEnd).isInTable())
- {
- break;
- }
- }
-
- initAll();
- if (tableEnd > _parEnd)
- {
- throw new ArrayIndexOutOfBoundsException("The table's bounds fall outside of this Range");
- }
- if (tableEnd < 0)
- {
- throw new ArrayIndexOutOfBoundsException("The table's end is negative, which isn't allowed!");
- }
- return new Table(r._parStart, tableEnd, r._doc.getRange(), paragraph.getTableLevel());
- }
-
- /**
- * loads all of the list indexes.
- */
- protected void initAll()
- {
- initText();
- initCharacterRuns();
- initParagraphs();
- initSections();
- }
-
- /**
- * inits the paragraph list indexes.
- */
- private void initParagraphs()
- {
- if (!_parRangeFound)
- {
- int[] point = findRange(_paragraphs, _parStart, _start, _end);
- _parStart = point[0];
- _parEnd = point[1];
- _parRangeFound = true;
- }
- }
-
- /**
- * inits the character run list indexes.
- */
- private void initCharacterRuns()
- {
- if (!_charRangeFound)
- {
- int[] point = findRange(_characters, _charStart, _start, _end);
- _charStart = point[0];
- _charEnd = point[1];
- _charRangeFound = true;
- }
- }
-
- /**
- * inits the text piece list indexes.
- */
- private void initText()
- {
- if (!_textRangeFound)
- {
- int[] point = findRange(_text, _textStart, _start, _end);
- _textStart = point[0];
- _textEnd = point[1];
- _textRangeFound = true;
- }
- }
-
- /**
- * inits the section list indexes.
- */
- private void initSections()
- {
- if (!_sectionRangeFound)
- {
- int[] point = findRange(_sections, _sectionStart, _start, _end);
- _sectionStart = point[0];
- _sectionEnd = point[1];
- _sectionRangeFound = true;
- }
- }
-
- /**
- * Used to find the list indexes of a particular property.
- *
- * @param rpl A list of property nodes.
- * @param min A hint on where to start looking.
- * @param start The starting character offset.
- * @param end The ending character offset.
- * @return An int array of length 2. The first int is the start index and the
- * second int is the end index.
- */
- private int[] findRange(List rpl, int min, int start, int end)
- {
- int x = min;
- PropertyNode node = (PropertyNode)rpl.get(x);
- while(node.getEnd() <= start && x < rpl.size()-1)
- {
- x++;
- node = (PropertyNode)rpl.get(x);
- }
-
- if (node.getEnd() <= start) {
- return new int[] {rpl.size(), rpl.size()};
- }
-
- int y = x;
- node = (PropertyNode)rpl.get(y);
- while(node.getEnd() < end && y < rpl.size()-1)
- {
- y++;
- node = (PropertyNode)rpl.get(y);
- }
- return new int[]{x, y + 1};
- }
-
- /**
- * resets the list indexes.
- */
- private void reset()
- {
- _textRangeFound = false;
- _charRangeFound = false;
- _parRangeFound = false;
- _sectionRangeFound = false;
- }
-
- /**
- * Adjust the value of the various FIB character count fields,
- * eg <code>FIB.CCPText</code> after an insert or a delete...
- *
- * Works on all CCP fields from this range onwards
- *
- * @param adjustment The (signed) value that should be added to the FIB CCP fields
- */
- protected void adjustFIB(int adjustment) {
- // update the FIB.CCPText field (this should happen once per adjustment, so we don't want it in
- // adjustForInsert() or it would get updated multiple times if the range has a parent)
- // without this, OpenOffice.org (v. 2.2.x) does not see all the text in the document
-
- CPSplitCalculator cpS = _doc.getCPSplitCalculator();
- FileInformationBlock fib = _doc.getFileInformationBlock();
-
- // Do for each affected part
- if(_start < cpS.getMainDocumentEnd()) {
- fib.setCcpText(fib.getCcpText() + adjustment);
}
- if(_start < cpS.getCommentsEnd()) {
- fib.setCcpAtn(fib.getCcpAtn() + adjustment);
+ /**
+ * Gets the character run at index. The index is relative to this range.
+ *
+ * @param index
+ * The index of the character run to get.
+ * @return The character run at the specified index in this range.
+ */
+ public CharacterRun getCharacterRun(int index) {
+ initCharacterRuns();
+ CHPX chpx = (CHPX) _characters.get(index + _charStart);
+
+ int[] point = findRange(_paragraphs, _parStart, Math.max(chpx.getStart(), _start), chpx
+ .getEnd());
+ PAPX papx = (PAPX) _paragraphs.get(point[0]);
+ short istd = papx.getIstd();
+
+ CharacterRun chp = new CharacterRun(chpx, _doc.getStyleSheet(), istd, this);
+
+ return chp;
+ }
+
+ /**
+ * Gets the section at index. The index is relative to this range.
+ *
+ * @param index
+ * The index of the section to get.
+ * @return The section at the specified index in this range.
+ */
+ public Section getSection(int index) {
+ initSections();
+ SEPX sepx = (SEPX) _sections.get(index + _sectionStart);
+ Section sep = new Section(sepx, this);
+ return sep;
+ }
+
+ /**
+ * Gets the paragraph at index. The index is relative to this range.
+ *
+ * @param index
+ * The index of the paragraph to get.
+ * @return The paragraph at the specified index in this range.
+ */
+
+ public Paragraph getParagraph(int index) {
+ initParagraphs();
+ PAPX papx = (PAPX) _paragraphs.get(index + _parStart);
+
+ ParagraphProperties props = papx.getParagraphProperties(_doc.getStyleSheet());
+ Paragraph pap = null;
+ if (props.getIlfo() > 0) {
+ pap = new ListEntry(papx, this, _doc.getListTables());
+ } else {
+ pap = new Paragraph(papx, this);
+ }
+
+ return pap;
+ }
+
+ /**
+ * This method is used to determine the type. Handy for switch statements
+ * compared to the instanceof operator.
+ *
+ * @return A TYPE constant.
+ */
+ public int type() {
+ return TYPE_UNDEFINED;
+ }
+
+ /**
+ * Gets the table that starts with paragraph. In a Word file, a table
+ * consists of a group of paragraphs with certain flags set.
+ *
+ * @param paragraph
+ * The paragraph that is the first paragraph in the table.
+ * @return The table that starts with paragraph
+ */
+ public Table getTable(Paragraph paragraph) {
+ if (!paragraph.isInTable()) {
+ throw new IllegalArgumentException("This paragraph doesn't belong to a table");
+ }
+
+ Range r = paragraph;
+ if (r._parent.get() != this) {
+ throw new IllegalArgumentException("This paragraph is not a child of this range");
+ }
+
+ r.initAll();
+ int tableEnd = r._parEnd;
+
+ if (r._parStart != 0 && getParagraph(r._parStart - 1).isInTable()
+ && getParagraph(r._parStart - 1)._sectionEnd >= r._sectionStart) {
+ throw new IllegalArgumentException("This paragraph is not the first one in the table");
+ }
+
+ int limit = _paragraphs.size();
+ for (; tableEnd < limit; tableEnd++) {
+ if (!getParagraph(tableEnd).isInTable()) {
+ break;
+ }
+ }
+
+ initAll();
+ if (tableEnd > _parEnd) {
+ throw new ArrayIndexOutOfBoundsException(
+ "The table's bounds fall outside of this Range");
+ }
+ if (tableEnd < 0) {
+ throw new ArrayIndexOutOfBoundsException(
+ "The table's end is negative, which isn't allowed!");
+ }
+ return new Table(r._parStart, tableEnd, r._doc.getRange(), paragraph.getTableLevel());
+ }
+
+ /**
+ * loads all of the list indexes.
+ */
+ protected void initAll() {
+ initText();
+ initCharacterRuns();
+ initParagraphs();
+ initSections();
+ }
+
+ /**
+ * inits the paragraph list indexes.
+ */
+ private void initParagraphs() {
+ if (!_parRangeFound) {
+ int[] point = findRange(_paragraphs, _parStart, _start, _end);
+ _parStart = point[0];
+ _parEnd = point[1];
+ _parRangeFound = true;
+ }
}
- if(_start < cpS.getEndNoteEnd()) {
- fib.setCcpEdn(fib.getCcpEdn() + adjustment);
+
+ /**
+ * inits the character run list indexes.
+ */
+ private void initCharacterRuns() {
+ if (!_charRangeFound) {
+ int[] point = findRange(_characters, _charStart, _start, _end);
+ _charStart = point[0];
+ _charEnd = point[1];
+ _charRangeFound = true;
+ }
+ }
+
+ /**
+ * inits the text piece list indexes.
+ */
+ private void initText() {
+ if (!_textRangeFound) {
+ int[] point = findRange(_text, _textStart, _start, _end);
+ _textStart = point[0];
+ _textEnd = point[1];
+ _textRangeFound = true;
+ }
}
- if(_start < cpS.getFootnoteEnd()) {
- fib.setCcpFtn(fib.getCcpFtn() + adjustment);
+
+ /**
+ * inits the section list indexes.
+ */
+ private void initSections() {
+ if (!_sectionRangeFound) {
+ int[] point = findRange(_sections, _sectionStart, _start, _end);
+ _sectionStart = point[0];
+ _sectionEnd = point[1];
+ _sectionRangeFound = true;
+ }
}
- if(_start < cpS.getHeaderStoryEnd()) {
- fib.setCcpHdd(fib.getCcpHdd() + adjustment);
+
+ /**
+ * Used to find the list indexes of a particular property.
+ *
+ * @param rpl
+ * A list of property nodes.
+ * @param min
+ * A hint on where to start looking.
+ * @param start
+ * The starting character offset.
+ * @param end
+ * The ending character offset.
+ * @return An int array of length 2. The first int is the start index and
+ * the second int is the end index.
+ */
+ private int[] findRange(List rpl, int min, int start, int end) {
+ int x = min;
+ PropertyNode node = (PropertyNode) rpl.get(x);
+ while (node.getEnd() <= start && x < rpl.size() - 1) {
+ x++;
+ node = (PropertyNode) rpl.get(x);
+ }
+
+ if (node.getEnd() <= start) {
+ return new int[] { rpl.size(), rpl.size() };
+ }
+
+ int y = x;
+ node = (PropertyNode) rpl.get(y);
+ while (node.getEnd() < end && y < rpl.size() - 1) {
+ y++;
+ node = (PropertyNode) rpl.get(y);
+ }
+ return new int[] { x, y + 1 };
}
- if(_start < cpS.getHeaderTextboxEnd()) {
- fib.setCcpHdrTxtBx(fib.getCcpHdrTxtBx() + adjustment);
+
+ /**
+ * resets the list indexes.
+ */
+ private void reset() {
+ _textRangeFound = false;
+ _charRangeFound = false;
+ _parRangeFound = false;
+ _sectionRangeFound = false;
}
- if(_start < cpS.getMainTextboxEnd()) {
- fib.setCcpTxtBx(fib.getCcpTxtBx() + adjustment);
+
+ /**
+ * Adjust the value of the various FIB character count fields, eg
+ * <code>FIB.CCPText</code> after an insert or a delete...
+ *
+ * Works on all CCP fields from this range onwards
+ *
+ * @param adjustment
+ * The (signed) value that should be added to the FIB CCP fields
+ */
+ protected void adjustFIB(int adjustment) {
+ // update the FIB.CCPText field (this should happen once per adjustment,
+ // so we don't want it in
+ // adjustForInsert() or it would get updated multiple times if the range
+ // has a parent)
+ // without this, OpenOffice.org (v. 2.2.x) does not see all the text in
+ // the document
+
+ CPSplitCalculator cpS = _doc.getCPSplitCalculator();
+ FileInformationBlock fib = _doc.getFileInformationBlock();
+
+ // Do for each affected part
+ if (_start < cpS.getMainDocumentEnd()) {
+ fib.setCcpText(fib.getCcpText() + adjustment);
+ }
+
+ if (_start < cpS.getCommentsEnd()) {
+ fib.setCcpAtn(fib.getCcpAtn() + adjustment);
+ }
+ if (_start < cpS.getEndNoteEnd()) {
+ fib.setCcpEdn(fib.getCcpEdn() + adjustment);
+ }
+ if (_start < cpS.getFootnoteEnd()) {
+ fib.setCcpFtn(fib.getCcpFtn() + adjustment);
+ }
+ if (_start < cpS.getHeaderStoryEnd()) {
+ fib.setCcpHdd(fib.getCcpHdd() + adjustment);
+ }
+ if (_start < cpS.getHeaderTextboxEnd()) {
+ fib.setCcpHdrTxtBx(fib.getCcpHdrTxtBx() + adjustment);
+ }
+ if (_start < cpS.getMainTextboxEnd()) {
+ fib.setCcpTxtBx(fib.getCcpTxtBx() + adjustment);
+ }
}
- }
-
- /**
- * adjust this range after an insert happens.
- * @param length the length to adjust for (expected to be a count of code-points, not necessarily chars)
- */
- private void adjustForInsert(int length)
- {
- _end += length;
-
- reset();
- Range parent = (Range)_parent.get();
- if (parent != null)
- {
- parent.adjustForInsert(length);
- }
- }
+ /**
+ * adjust this range after an insert happens.
+ *
+ * @param length
+ * the length to adjust for (expected to be a count of
+ * code-points, not necessarily chars)
+ */
+ private void adjustForInsert(int length) {
+ _end += length;
+
+ reset();
+ Range parent = (Range) _parent.get();
+ if (parent != null) {
+ parent.adjustForInsert(length);
+ }
+ }
public int getStartOffset() {
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java
index b06526ccd1..9d136f77f1 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java
@@ -65,7 +65,7 @@ public final class TableProperties
tap.field_14_brcRight = (BorderCode)field_14_brcRight.clone();
tap.field_15_brcVertical = (BorderCode)field_15_brcVertical.clone();
tap.field_16_brcHorizontal = (BorderCode)field_16_brcHorizontal.clone();
- tap.field_8_rgdxaCenter = (short[])field_8_rgdxaCenter.clone();
+ tap.field_8_rgdxaCenter = field_8_rgdxaCenter.clone();
tap.field_9_rgtc = new TableCellDescriptor[field_9_rgtc.length];
for (int x = 0; x < field_9_rgtc.length; x++)
{
diff --git a/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java b/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java
index f342fd7231..7cb7f11644 100644
--- a/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java
+++ b/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java
@@ -50,11 +50,10 @@ public class TestModelFactory extends TestCase {
{
ModelFactory mf = new ModelFactory();
assertTrue("listeners member cannot be null", mf.listeners != null);
- assertTrue("listeners member must be a List", mf.listeners instanceof List);
models = new ArrayList(3);
factory = new ModelFactory();
book = new HSSFWorkbook();
- ByteArrayOutputStream stream = (ByteArrayOutputStream)setupRunFile(book);
+ ByteArrayOutputStream stream = setupRunFile(book);
POIFSFileSystem fs = new POIFSFileSystem(
new ByteArrayInputStream(stream.toByteArray())
);
diff --git a/src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java b/src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java
index 4dface4251..1ade68044d 100644
--- a/src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java
+++ b/src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java
@@ -115,7 +115,6 @@ public final class TestRecordFactory extends TestCase {
* constructs the expected array of records.<P>
* SUCCESS: Record factory creates the expected records.<P>
* FAILURE: The wrong records are created or contain the wrong values <P>
- *
*/
public void testContinuedUnknownRecord() {
byte[] data = {
@@ -125,8 +124,7 @@ public final class TestRecordFactory extends TestCase {
};
ByteArrayInputStream bois = new ByteArrayInputStream(data);
- Record[] records = (Record[])
- RecordFactory.createRecords(bois).toArray(new Record[0]);
+ Record[] records = RecordFactory.createRecords(bois).toArray(new Record[0]);
assertEquals("Created record count", 3, records.length);
assertEquals("1st record's type",
UnknownRecord.class.getName(),