Bug 41711 - Better exception for PowerPoint documents from unsupported versions
Summary: Better exception for PowerPoint documents from unsupported versions
Status: VERIFIED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-26 19:12 UTC by Trejkaz (pen name)
Modified: 2009-10-29 16:18 UTC (History)
0 users



Attachments
Example PowerPoint 95 document (113.40 KB, application/octet-stream)
2007-03-01 20:36 UTC, Trejkaz (pen name)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz (pen name) 2007-02-26 19:12:59 UTC
At the moment when constructing a CurrentUserAtom, a
CorruptPowerPointFileException is thrown when the atom is of the incorrect
length.  Problem is, this document may not be corrupt, but may instead come from
a different version of PowerPoint.

I would suggest throwing a WrongPowerPointVersionException exception, or
similar, if the length is incorrect or if the magic number is not matched.
Comment 1 Nick Burch 2007-03-01 07:40:10 UTC
I think we should only through something like WrongPowerPointVersionException if
we can detect that. Most of the cases I've seen with broken CurrentUserAtoms
really have been corrupt files.

If you can upload a sample file from an older version of PPT with a short
CurrentUserAtom, I'll look at detecting that and returning a more useful exception.
Comment 2 Trejkaz (pen name) 2007-03-01 20:08:28 UTC
The way we currently detect if the PowerPoint document is of the form HSLF
supports, is to open the CurrentUserAtom and look for the magic number.  If it
isn't there, then we consider that it isn't of the right version, and so far
that's been good enough since Office was able to open the remaining ones.
Comment 3 Trejkaz (pen name) 2007-03-01 20:36:41 UTC
Created attachment 19655 [details]
Example PowerPoint 95 document
Comment 4 Nick Burch 2009-05-16 13:51:47 UTC
I've added OldPowerPointFormatException, which CurrentUserAtom will now throw if it detects a ppt95 file
Comment 5 Trejkaz (pen name) 2009-10-29 16:18:44 UTC
Noting that this works for our test data, including all the ones we didn't attach.