poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Stern <stefan.st...@mind8.com>
Subject Issue in POIXMLDocumentPart with PPTX
Date Thu, 06 Aug 2009 08:59:14 GMT
Hello devs

While building the PPTX according to your code in XSSF and XWPT, I 
stumbled accross a problem with the recursive loading in the 

While Word and Spreadsheet do not have any loops in their relations, 
Powerpoint defines a lot of vice-versa relationships. Example: the 
SlideMaster has relations to its SlideLayouts, while the SlideLayouts 
have a relation to their SlideMaster. The POIXMLDocument.read 
implementation in beta6 says: go and load your stuff (with the factory), 
then check your relations. If you have any, go down and load them too. 
As PPTX defines SlideMaster and SlideLayout , which reference each 
other, this ends up in a endless loop.

My proposal:
Let the POIXMLDocument manage the link between a PackagePart and its 
POIXMLDocumentPart element. When reading the POIXMLDocument, traverse 
the relations, but instatiate new POIXMLDocumentPart objects only once 
per PackagePart. If it already available, do nothing and return the 
object which is already linked to this PackagePart. As the 
POIXMLDocument is on the same hierarchy as the OPCPackage, as it is the 
single root element from that package. And the POIXMLDocumentParts are 
on par with PackageParts, so the hierarchy maps and the object 
lifecycles are congruent.

Hope I was able to describe the problem. :)

Kind regards,
Stefan Stern

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message