in src/java/org/apache/fop/render/pdf/pdfbox/StructureTreeMerger.java [237:261]
private void createKidFromCOSObject(COSObject baseObj, COSDictionary parentDict, PDFStructElem parent,
boolean originatedFromTableRow) throws IOException {
COSBase baseKid = baseObj.getObject();
if (baseKid instanceof COSInteger) {
COSInteger number = (COSInteger) baseKid;
createKids(number, parentDict, parent, originatedFromTableRow);
} else if (baseKid instanceof COSDictionary) {
COSDictionary unwrappedDict = (COSDictionary)baseKid;
if (unwrappedDict.getDictionaryObject(COSName.S) == null) {
COSDictionary mcrDict = (COSDictionary)baseKid;
createKidFromCOSDictionary(mcrDict, parent, parentDict);
} else if (originatedFromTableRow) {
int objID = (int)baseObj.getObjectNumber();
if (structElemCache.get(objID) != null) {
PDFStructElem kidElem = structElemCache.get(objID);
parent.addKid(kidElem);
kidElem.setParent(parent);
} else {
createkidEntryFromCosObjectForRow(baseObj, parent);
}
} else {
parent.addKid(null);
}
}
}