Bug 43781 - HSLF: wrong text in TextBoxes
Summary: HSLF: wrong text in TextBoxes
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.0-FINAL
Hardware: Macintosh Mac OS X 10.4
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-02 04:55 UTC by nick jones
Modified: 2007-12-24 01:51 UTC (History)
0 users



Attachments
ppt file with 2 textruns which yield wrong text in shapes->textruns (36.00 KB, application/vnd.ms-powerpoint)
2007-11-02 04:57 UTC, nick jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nick jones 2007-11-02 04:55:31 UTC
Problem with extracting text and geometry info from a
powerpoint file.  Sometimes (not always), I find that while slide->getTextRuns
returns the correct text, slide->getShapes->getTextRun returns the
wrong text: it seems to replace the text of an earlier run with that
of the last run.


Jython code of an example below.

----

> slideshow
org.apache.poi.hslf.usermodel.SlideShow@faa9e2
> slide = slideshow.getSlides()[0]
> slide
org.apache.poi.hslf.model.Slide@83413f
> for run in slide.getTextRuns():
>    print run.getText()
>
First run
Second run
> for shape in slide.getShapes():
>    print shape.getAnchor(), shape.getTextRun().getText()
>
java.awt.Rectangle[x=54,y=105,width=624,height=122] Second run
java.awt.Rectangle[x=48,y=270,width=624,height=36] Second run
Comment 1 nick jones 2007-11-02 04:57:35 UTC
Created attachment 21079 [details]
ppt file with 2 textruns which yield wrong text in shapes->textruns
Comment 2 Yegor Kozlov 2007-12-24 01:51:55 UTC
Fixed

Yegor