@Override protected void onDocumentRead() { try { try { _pageContents = PageContentsDocument.Factory.parse(getPackagePart().getInputStream()).getPageContents(); } catch (XmlException | IOException e) { throw new POIXMLException(e); } for (POIXMLDocumentPart part: getRelations()) { if (!(part instanceof XDGFMasterContents)) continue; //throw new POIXMLException("Unexpected page relation: " + part); XDGFMaster master = ((XDGFMasterContents)part).getMaster(); _masters.put(master.getID(), master); } super.onDocumentRead(); for (XDGFShape shape: _shapes.values()) { if (shape.isTopmost()) shape.setupMaster(this, null); } } catch (POIXMLException e) { throw XDGFException.wrap(this, e); } }
shape.setupMaster(pageContents, _master == null ? master : _master.getContent());
@Override protected void onDocumentRead() { try { try { _pageContents = PageContentsDocument.Factory.parse(getPackagePart().getInputStream()).getPageContents(); } catch (XmlException | IOException e) { throw new POIXMLException(e); } for (POIXMLDocumentPart part: getRelations()) { if (!(part instanceof XDGFMasterContents)) continue; //throw new POIXMLException("Unexpected page relation: " + part); XDGFMaster master = ((XDGFMasterContents)part).getMaster(); _masters.put(master.getID(), master); } super.onDocumentRead(); for (XDGFShape shape: _shapes.values()) { if (shape.isTopmost()) shape.setupMaster(this, null); } } catch (POIXMLException e) { throw XDGFException.wrap(this, e); } }
shape.setupMaster(pageContents, _master == null ? master : _master.getContent());