/** * Gets the sp container from the internal data * * @param spgrContainer the spgr container * @param sps the list of sp records */ private void getSpContainers(EscherContainer spgrContainer, ArrayList sps) { EscherRecord[] spgrChildren = spgrContainer.getChildren(); for (int i = 0; i < spgrChildren.length; i++) { if (spgrChildren[i].getType() == EscherRecordType.SP_CONTAINER) { sps.add(spgrChildren[i]); } else if (spgrChildren[i].getType() == EscherRecordType.SPGR_CONTAINER) { getSpContainers((EscherContainer) spgrChildren[i], sps); } else { logger.warn("Spgr Containers contains a record other than Sp/Spgr " + "containers"); } } }
/** * Gets the sp container from the internal data * * @param spgrContainer the spgr container * @param sps the list of sp records */ private void getSpContainers(EscherContainer spgrContainer, ArrayList sps) { EscherRecord[] spgrChildren = spgrContainer.getChildren(); for (int i = 0; i < spgrChildren.length; i++) { if (spgrChildren[i].getType() == EscherRecordType.SP_CONTAINER) { sps.add(spgrChildren[i]); } else if (spgrChildren[i].getType() == EscherRecordType.SPGR_CONTAINER) { getSpContainers((EscherContainer) spgrChildren[i], sps); } else { logger.warn("Spgr Containers contains a record other than Sp/Spgr " + "containers"); } } }
getSpContainers(spgrContainer, sps); spContainers = new EscherRecord[sps.size()]; spContainers = (EscherRecord[]) sps.toArray(spContainers);
getSpContainers(spgrContainer, sps); spContainers = new EscherRecord[sps.size()]; spContainers = (EscherRecord[]) sps.toArray(spContainers);