poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "honyk" <j.tosov...@email.cz>
Subject RE: [XSLF] Create entry without record in presentation.xml.rels
Date Tue, 20 Aug 2013 11:42:10 GMT
On 2013-07-03 honyk wrote:
> 
> I create new Notes Slide (XSLFNotes) this way:
> 
> in XMLSlideShow:
> 
> private XSLFNotes createNotesSlide(XSLFSlide slide) {
>   ...
>   // (1) determines the slide index (nasty way) used for unique notes
> index
>   Integer slideIndex =
> Integer.parseInt(slide.getPackageRelationship().getId().substring(3));
> 
>   // (2) creates a new Notes Slide
>   XSLFNotes notesSlide = (XSLFNotes)
> createRelationship(XSLFRelation.NOTES,
>       XSLFFactory.getInstance(), slideIndex);
> 
>   // (3) create relation to Notes Master
>   notesSlide.addRelation(_notesMaster.getPackageRelationship().getId(),
> _notesMaster);
>   PackagePartName notesMasterPackagePartName =
> _notesMaster.getPackagePart().getPartName();
> 
> notesSlide.getPackagePart().addRelationship(notesMasterPackagePartName,
> TargetMode.INTERNAL,
>           _notesMaster.getPackageRelationship().getRelationshipType());
> 
>   // other relations...
> 
> The new created Notes Slide (2) creates relations in
> presentation.xml.rels
> automatically, but here this kind of entry is not allowed. The presence
> is
> not fatal, file can be opened in PowerPoint 2007-2010, but it is
> reported by
> OOXML SDK validation tool.
> 
> I've tried to use createRelationship(..., ..., ..., ..., true) which do
> not
> create relation (which one?), but in this case I cannot create
> relations in
> the next step (3) - I am getting NPE.
> 
> Is there any way to fix this?
> 

Can I create a new entry (Notes Slide in my case) without record in
presentation.xml.rels ?

Thanks, Jan


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


Mime
View raw message