https://bz.apache.org/bugzilla/show_bug.cgi?id=62319

            Bug ID: 62319
           Summary: Decommission XSLF-/PowerPointExtractor
           Product: POI
           Version: 4.0-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SL Common
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

This following commit includes the refactorings to use SlideShowExtractor
instead of the format specific XSLF/PowerPointExtractor classes. As
SlideShowExtractor extends POITextExtractor directly, the OLE2ExtractorFactory
can't always return a POIOLE2TextExtractor. I've tried to minimize/hide the
effects on this by using generics, so user-code probably just needs to be
recompiled ... but will throw an exception for slideshows, if it assigns it to
a POIOLE2TextExtractor reference.

I think the abstract classes POIOLE2TextExtractor and POIXMLTextExtractor
should be deprecated anyway, as the use-case of using the extractor to
determine the format and then use it to access the document and OLE2/OOXML
specific properties is not what the extractors are thought for.

We have WorkbookFactory and SlideShowFactory (and maybe sometime also a factory
for H/XWPF) which job is to create a document from different sources, that's
also the reason why SlideShowExtractor only accepts a SlideShow and not any
other low-level sources, i.e. to keep the concers of determining the format and
extracting the text separate.

As a compromise I've introduced the getDocument() in POITextExtractor, but user
code needs to know what kind of document is returned and cast it accordingly.

What's currently missing is the extraction of SlideLayout shapes (see
TestXSLFPowerPointExtractor.testGetMasterText()), which I want to provide as a
separate commit to this issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to