[prev in list] [next in list] [prev in thread] [next in thread]
List: poi-dev
Subject: cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model CHPFormattedDiskPage.java Compl
From: sackley () apache ! org
Date: 2004-04-19 23:49:48
Message-ID: 20040419234948.96105.qmail () minotaur ! apache ! org
[Download RAW message or body]
sackley 2004/04/19 16:49:48
Modified: src/scratchpad/src/org/apache/poi/hwpf/model
CHPFormattedDiskPage.java ComplexFileTable.java
ListFormatOverrideLevel.java PropertyNode.java
StyleSheet.java
Log:
<No Comment Entered>
Revision Changes Path
1.3 +1 -2 \
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
Index: CHPFormattedDiskPage.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CHPFormattedDiskPage.java 9 Apr 2004 13:05:32 -0000 1.2
+++ CHPFormattedDiskPage.java 19 Apr 2004 23:49:48 -0000 1.3
@@ -114,7 +114,7 @@
int fcOffset = 0;
// total size is currently the size of one FC
- int totalSize = FC_SIZE + 1;
+ int totalSize = FC_SIZE + 2;
int index = 0;
for (; index < size; index++)
@@ -164,7 +164,6 @@
buf[offsetOffset] = (byte)(grpprlOffset/2);
buf[grpprlOffset] = (byte)grpprl.length;
System.arraycopy(grpprl, 0, buf, grpprlOffset + 1, grpprl.length);
-
offsetOffset += 1;
fcOffset += FC_SIZE;
1.4 +1 -1 \
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
Index: ComplexFileTable.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ComplexFileTable.java 9 Apr 2004 13:05:32 -0000 1.3
+++ ComplexFileTable.java 19 Apr 2004 23:49:48 -0000 1.4
@@ -30,7 +30,7 @@
private static final byte GRPPRL_TYPE = 1;
private static final byte TEXT_PIECE_TABLE_TYPE = 2;
- TextPieceTable _tpt;
+ protected TextPieceTable _tpt;
public ComplexFileTable()
{
1.4 +12 -3 \
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java \
Index: ListFormatOverrideLevel.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ListFormatOverrideLevel.java 9 Apr 2004 13:05:32 -0000 1.3
+++ ListFormatOverrideLevel.java 19 Apr 2004 23:49:48 -0000 1.4
@@ -80,10 +80,19 @@
{
return false;
}
-
ListFormatOverrideLevel lfolvl = (ListFormatOverrideLevel)obj;
- return lfolvl._iStartAt == _iStartAt && lfolvl._info == _info &&
- lfolvl._lvl.equals(_lvl) && Arrays.equals(lfolvl._reserved, _reserved);
+ boolean lvlEquality = false;
+ if (_lvl != null)
+ {
+ lvlEquality = _lvl.equals(lfolvl._lvl);
+ }
+ else
+ {
+ lvlEquality = lfolvl._lvl == null;
+ }
+
+ return lvlEquality && lfolvl._iStartAt == _iStartAt && lfolvl._info == _info \
&& + Arrays.equals(lfolvl._reserved, _reserved);
}
public byte[] toByteArray()
1.4 +10 -3 \
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
Index: PropertyNode.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PropertyNode.java 9 Apr 2004 13:05:32 -0000 1.3
+++ PropertyNode.java 19 Apr 2004 23:49:48 -0000 1.4
@@ -28,7 +28,7 @@
*
* @author Ryan Ackley
*/
-public abstract class PropertyNode implements Comparable
+public abstract class PropertyNode implements Comparable, Cloneable
{
protected Object _buf;
private int _cpStart;
@@ -56,7 +56,7 @@
return _cpStart;
}
- void setStart(int start)
+ public void setStart(int start)
{
_cpStart = start;
}
@@ -69,7 +69,7 @@
return _cpEnd;
}
- void setEnd(int end)
+ public void setEnd(int end)
{
_cpEnd = end;
}
@@ -118,6 +118,13 @@
}
return false;
}
+
+ public Object clone()
+ throws CloneNotSupportedException
+ {
+ return super.clone();
+ }
+
/**
* Used for sorting in collections.
*/
1.3 +2 -1 \
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
Index: StyleSheet.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StyleSheet.java 9 Apr 2004 13:05:32 -0000 1.2
+++ StyleSheet.java 19 Apr 2004 23:49:48 -0000 1.3
@@ -159,7 +159,8 @@
{
byte[] std = _styleDescriptions[x].toByteArray();
- LittleEndian.putShort(sizeHolder, (short)(std.length));
+ // adjust the size so it is always on a word boundary
+ LittleEndian.putShort(sizeHolder, (short)((std.length) + (std.length % \
2))); out.write(sizeHolder);
out.write(std);
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic