public XDGFSheet(SheetType sheet, XDGFDocument document) { try { _sheet = sheet; _document = document; for (CellType cell: sheet.getCellArray()) { if (_cells.containsKey(cell.getN())) throw new POIXMLException("Unexpected duplicate cell " + cell.getN()); // this shouldn't happen _cells.put(cell.getN(), new XDGFCell(cell)); } // only geometry sections can have duplicate names // sections can be found in the master too, if there are no attributes here! // no idea if I have a master in this space. go figure. for (SectionType section: sheet.getSectionArray()) { String name = section.getN(); if (name.equals("Geometry")) { _geometry.put(section.getIX(), new GeometrySection(section, this)); } else if (name.equals("Character")) { _character = new CharacterSection(section, this); } else { _sections.put(name, XDGFSection.load(section, this)); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }
protected void setupSectionMasters() { if (_masterShape == null) { return; } try { for (Entry<String, XDGFSection> section : _sections.entrySet()) { XDGFSection master = _masterShape.getSection(section.getKey()); if (master != null) { section.getValue().setupMaster(master); } } for (Entry<Long, GeometrySection> section : _geometry.entrySet()) { GeometrySection master = _masterShape.getGeometryByIdx(section .getKey()); if (master != null) { section.getValue().setupMaster(master); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }
protected void setupSectionMasters() { if (_masterShape == null) { return; } try { for (Entry<String, XDGFSection> section : _sections.entrySet()) { XDGFSection master = _masterShape.getSection(section.getKey()); if (master != null) { section.getValue().setupMaster(master); } } for (Entry<Long, GeometrySection> section : _geometry.entrySet()) { GeometrySection master = _masterShape.getGeometryByIdx(section .getKey()); if (master != null) { section.getValue().setupMaster(master); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }
public XDGFSheet(SheetType sheet, XDGFDocument document) { try { _sheet = sheet; _document = document; for (CellType cell: sheet.getCellArray()) { if (_cells.containsKey(cell.getN())) throw new POIXMLException("Unexpected duplicate cell " + cell.getN()); // this shouldn't happen _cells.put(cell.getN(), new XDGFCell(cell)); } // only geometry sections can have duplicate names // sections can be found in the master too, if there are no attributes here! // no idea if I have a master in this space. go figure. for (SectionType section: sheet.getSectionArray()) { String name = section.getN(); if (name.equals("Geometry")) { _geometry.put(section.getIX(), new GeometrySection(section, this)); } else if (name.equals("Character")) { _character = new CharacterSection(section, this); } else { _sections.put(name, XDGFSection.load(section, this)); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }