Bug 39256 - Patch: TextBox shape, how-to guide and misc. refactoring
Summary: Patch: TextBox shape, how-to guide and misc. refactoring
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: unspecified
Hardware: Other All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2006-04-09 16:53 UTC by Yegor Kozlov
Modified: 2006-04-12 12:54 UTC (History)
0 users

patch with changes (41.07 KB, patch)
2006-04-09 16:54 UTC, Yegor Kozlov
Details | Diff
archive with the affected source code (64.81 KB, application/zip)
2006-04-09 16:55 UTC, Yegor Kozlov

Note You need to log in before you can comment on or make changes to this bug.
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)