DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39395>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39395

           Summary: PATCH: Placeholder shape and other improvements
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


(1) Obsolete classes which go away:
org.apache.poi.hslf.model.Ellipse.java
org.apache.poi.hslf.model.Rectangle.java

(2) TextBox didn't properly handle text in placeholders. 
Now the problem is fixed. 
Placeholder is a new subclass of TextBox which handles such text.
I also had to implement a couple of new records:

OEPlaceholderAtom.java
 - Describes a placeholder. 

OutlineTextRefAtom.java
 - If present it indicates that TextHeaderAtom, TextBytesAtom and 
StyleTextPropAtom
are stored in Document.SlideListWithText instead of the shape'S escher 
container.
The content is just a 0-based index of the [TextHeaderAtom, TextBytesAtom and
StyleTextPropAtom] block in SlideListWithText.

If you iterate over text shapes in a slide and collect them in a set 
it must be the same as returned by Slide.getTextRuns().
The test code is in TestShapes.testTextBoxSet() . It is a good sanity check
which revealed some bugs.

(4) Placeholder shape. It is a subclass of TextBox which stores text attributes
outside of it's escher container.

For now I can create the only type of placeholder: slide title.
Use case:

 Slide slide = ppt.createSlide(); //blank slide

 TextBox title = slide.addTitle(); //add title placeholder. 
 title.setText("Hello, World");

...

 If you edit this shape in powerpoint you can
  (a) see that it is a placeholder
  (b) see that it holds slide's title. Outline view shows the  correct title 
text .

I also added the sample code in how-to-shapes.xml

(5) Added getFontColor and setFontColor to RichTextRun. Now I think all
character format properties are covered.

Regards, Yegor Kozlov

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to