Lines 49-55
Link Here
|
49 |
private short _reserved; |
49 |
private short _reserved; |
50 |
private byte[] _grpprlPapx; |
50 |
private byte[] _grpprlPapx; |
51 |
private byte[] _grpprlChpx; |
51 |
private byte[] _grpprlChpx; |
52 |
private char[] _numberText; |
52 |
private char[] _numberText=null; |
53 |
|
53 |
|
54 |
public ListLevel(int startAt, int numberFormatCode, int alignment, |
54 |
public ListLevel(int startAt, int numberFormatCode, int alignment, |
55 |
byte[] numberProperties, byte[] entryProperties, |
55 |
byte[] numberProperties, byte[] entryProperties, |
Lines 111-123
Link Here
|
111 |
System.arraycopy(buf, offset, _grpprlChpx, 0, _cbGrpprlChpx); |
111 |
System.arraycopy(buf, offset, _grpprlChpx, 0, _cbGrpprlChpx); |
112 |
offset += _cbGrpprlChpx; |
112 |
offset += _cbGrpprlChpx; |
113 |
|
113 |
|
114 |
int numberTextLength = LittleEndian.getShort(buf, offset); |
114 |
int numberTextLength = LittleEndian.getShort(buf, offset); |
115 |
_numberText = new char[numberTextLength]; |
115 |
/* sometimes numberTextLength<0 */ |
116 |
offset += LittleEndian.SHORT_SIZE; |
116 |
/* by derjohng */ |
117 |
for (int x = 0; x < numberTextLength; x++) |
117 |
if (numberTextLength>0) |
118 |
{ |
118 |
{ |
119 |
_numberText[x] = (char)LittleEndian.getShort(buf, offset); |
119 |
_numberText = new char[numberTextLength]; |
120 |
offset += LittleEndian.SHORT_SIZE; |
120 |
offset += LittleEndian.SHORT_SIZE; |
|
|
121 |
for (int x = 0; x < numberTextLength; x++) |
122 |
{ |
123 |
_numberText[x] = (char)LittleEndian.getShort(buf, offset); |
124 |
offset += LittleEndian.SHORT_SIZE; |
125 |
} |
121 |
} |
126 |
} |
122 |
|
127 |
|
123 |
} |
128 |
} |
Lines 230-236
Link Here
|
230 |
} |
235 |
} |
231 |
public int getSizeInBytes() |
236 |
public int getSizeInBytes() |
232 |
{ |
237 |
{ |
233 |
return 28 + _cbGrpprlChpx + _cbGrpprlPapx + (_numberText.length * LittleEndian.SHORT_SIZE) + 2; |
238 |
if (_numberText!=null) |
|
|
239 |
{ |
240 |
return 28 + _cbGrpprlChpx + _cbGrpprlPapx + (_numberText.length * LittleEndian.SHORT_SIZE) + 2; |
241 |
} else { |
242 |
return 28 + _cbGrpprlChpx + _cbGrpprlPapx + 2; |
243 |
} |
234 |
} |
244 |
} |
235 |
|
245 |
|
236 |
} |
246 |
} |