ASF Bugzilla – Attachment 23911 Details for
Bug 47456
[PATCH] Support for OLE-object extraction in PowerPointExtractor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
ppe.patch (text/plain), 1.77 KB, created by
Maxim Valyanskiy
on 2009-06-30 04:53:44 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Maxim Valyanskiy
Created:
2009-06-30 04:53:44 UTC
Size:
1.77 KB
patch
obsolete
>Index: src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java (revision 789239) >+++ src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java (working copy) >@@ -21,14 +21,12 @@ > import java.io.IOException; > import java.io.InputStream; > import java.util.HashSet; >+import java.util.List; >+import java.util.ArrayList; > > import org.apache.poi.POIOLE2TextExtractor; > import org.apache.poi.hslf.HSLFSlideShow; >-import org.apache.poi.hslf.model.Comment; >-import org.apache.poi.hslf.model.HeadersFooters; >-import org.apache.poi.hslf.model.Notes; >-import org.apache.poi.hslf.model.Slide; >-import org.apache.poi.hslf.model.TextRun; >+import org.apache.poi.hslf.model.*; > import org.apache.poi.hslf.usermodel.SlideShow; > import org.apache.poi.poifs.filesystem.DirectoryNode; > import org.apache.poi.poifs.filesystem.POIFSFileSystem; >@@ -151,6 +149,23 @@ > return getText(false,true); > } > >+ public List<OLEShape> getOLEShapes() { >+ List<OLEShape> list = new ArrayList<OLEShape>(); >+ >+ for(int i=0; i<_slides.length; i++) { >+ Slide slide = _slides[i]; >+ >+ Shape[] shapes = slide.getShapes(); >+ for (int j = 0; j < shapes.length; j++) { >+ if (shapes[j] instanceof OLEShape) { >+ list.add((OLEShape) shapes[j]); >+ } >+ } >+ } >+ >+ return list; >+ } >+ > /** > * Fetches text from the slideshow, be it slide text or note text. > * Because the final block of text in a TextRun normally have their
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47456
: 23911