Bug 39256

Summary: Patch: TextBox shape, how-to guide and misc. refactoring
Product: POI Reporter: Yegor Kozlov <yegor>
Component: HSLFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Attachments: patch with changes
archive with the affected source code

Description Yegor Kozlov 2006-04-09 16:53:30 UTC
Commit notes:
 (1) More refactoring of the code.
Summary of Changes
 - SlideShow, Sheet and Shape should be navigatable in both directions, i.e.
given a shape it should be possible to get the owning sheet and given a sheet 
get the owning SlideShow:

Shape shape = ....;
Sheet sheet = shape.getSheet();
SlideShow ppt = sheet.getSlideShow();

I added the required members and accessors to Sheet and Shape. Also had to make
SlideShow.getDocumentRecord public 
since we need to access it outside of usermodel package.

- Added default constructors to create new TextBytesAtom, StyleTextPropAtom,
EscherTextboxWrapper and TextHeaderAtom

- added PPDrawing.addTextboxWrapper. 
If we add a new EscherTextbox we need to tell about it to the owning PPDrawing

 (2) TextBox shape is implemented. It depends on Bug 39177 (TextRun.setText sets
incorrect length of text in the underlying StyleTextPropAtom).
So this bug becomes a blocker.
Nick, do you have serious reasons to delay commit with its fix? 
I'm ready to discuss it or take responsibility to write more tests, etc. 

 (3) A quick how-to guide on how to work with shapes in HSLF.
(See src\documentation\content\xdocs\hslf\how-to.xml)
If see that the English is clumsy or there are errors please change them without

 (4) src\scratchpad\src\org\apache\poi\hslf\data\empty.ppt
Changed document properties, set Author and Company to Apache Software Foundation.

Best Regards, Yegor Kozlov
Comment 1 Yegor Kozlov 2006-04-09 16:54:22 UTC
Created attachment 18046 [details]
patch with changes
Comment 2 Yegor Kozlov 2006-04-09 16:55:27 UTC
Created attachment 18047 [details]
archive with the affected source code
Comment 3 Nick Burch 2006-04-12 19:54:18 UTC
Thanks, I've committed this with only a few tweaks (mostly to comments). I
ditched the empty constructor to StyleTextPropAtom, since you can get the same
behaviour by calling the int constructor with a size 0.

I've also put your new documentation page on the site (just needed a slight
tweak to make the XML valid)