use of com.tom_roush.pdfbox.cos.COSUpdateInfo in project PdfBox-Android by TomRoush.
the class COSWriter method addObjectToWrite.
private void addObjectToWrite(COSBase object) {
COSBase actual = object;
if (actual instanceof COSObject) {
actual = ((COSObject) actual).getObject();
}
if (!writtenObjects.contains(object) && !objectsToWriteSet.contains(object) && !actualsAdded.contains(actual)) {
COSBase cosBase = null;
COSObjectKey cosObjectKey = null;
if (actual != null) {
cosObjectKey = objectKeys.get(actual);
}
if (cosObjectKey != null) {
cosBase = keyObject.get(cosObjectKey);
}
if (actual != null && objectKeys.containsKey(actual) && object instanceof COSUpdateInfo && !((COSUpdateInfo) object).isNeedToBeUpdated() && cosBase instanceof COSUpdateInfo && !((COSUpdateInfo) cosBase).isNeedToBeUpdated()) {
return;
}
objectsToWrite.add(object);
objectsToWriteSet.add(object);
if (actual != null) {
actualsAdded.add(actual);
}
}
}
Aggregations