Lines 155-160
Link Here
|
155 |
|
155 |
|
156 |
private boolean _lastRecordWasEOFLevelZero; |
156 |
private boolean _lastRecordWasEOFLevelZero; |
157 |
|
157 |
|
|
|
158 |
private boolean _filePassRecordFound; |
158 |
|
159 |
|
159 |
/** |
160 |
/** |
160 |
* @param shouldIncludeContinueRecords caller can pass <code>false</code> if loose |
161 |
* @param shouldIncludeContinueRecords caller can pass <code>false</code> if loose |
Lines 233-239
Link Here
|
233 |
// step underlying RecordInputStream to the next record |
234 |
// step underlying RecordInputStream to the next record |
234 |
_recStream.nextRecord(); |
235 |
_recStream.nextRecord(); |
235 |
|
236 |
|
236 |
r = readNextRecord(); |
237 |
try { |
|
|
238 |
r = readNextRecord(); |
239 |
} catch (RecordFormatException e) { |
240 |
if (_filePassRecordFound) { |
241 |
throw new EncryptedDocumentException(e); |
242 |
} else { |
243 |
throw e; |
244 |
} |
245 |
} |
237 |
if (r == null) { |
246 |
if (r == null) { |
238 |
// some record types may get skipped (e.g. DBCellRecord and ContinueRecord) |
247 |
// some record types may get skipped (e.g. DBCellRecord and ContinueRecord) |
239 |
continue; |
248 |
continue; |
Lines 292-297
Link Here
|
292 |
if (record instanceof RKRecord) { |
301 |
if (record instanceof RKRecord) { |
293 |
return RecordFactory.convertToNumberRecord((RKRecord) record); |
302 |
return RecordFactory.convertToNumberRecord((RKRecord) record); |
294 |
} |
303 |
} |
|
|
304 |
|
305 |
if (record instanceof FilePassRecord) { |
306 |
_filePassRecordFound = true; |
307 |
return record; |
308 |
} |
295 |
|
309 |
|
296 |
if (record instanceof MulRKRecord) { |
310 |
if (record instanceof MulRKRecord) { |
297 |
Record[] records = RecordFactory.convertRKRecords((MulRKRecord) record); |
311 |
Record[] records = RecordFactory.convertRKRecords((MulRKRecord) record); |
Lines 307-312
Link Here
|
307 |
lastDGRecord.join((AbstractEscherHolderRecord) record); |
321 |
lastDGRecord.join((AbstractEscherHolderRecord) record); |
308 |
return null; |
322 |
return null; |
309 |
} |
323 |
} |
|
|
324 |
|
325 |
|
326 |
|
310 |
if (record.getSid() == ContinueRecord.sid) { |
327 |
if (record.getSid() == ContinueRecord.sid) { |
311 |
ContinueRecord contRec = (ContinueRecord) record; |
328 |
ContinueRecord contRec = (ContinueRecord) record; |
312 |
|
329 |
|