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

--- Comment #2 from Tim Allison <talli...@mitre.org> ---
The macros are stored in a POIFS within an ExOleObjStg within the "PowerPoint
Document".  Brilliant!!! 

If you add this to the end of buildRecords() in HSLFSlideShowImpl:

        for (Record r : _records) {
            if (r.getRecordType() == 4113) {
                ExOleObjStg exOleObjStg = (ExOleObjStg) r;
                try {
                    NPOIFSFileSystem npoifs = new
POIFSFileSystem(exOleObjStg.getData());
                    VBAMacroReader reader = new VBAMacroReader(npoifs);
                    System.out.println(reader.readMacros());
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }
        }

The macros are correctly read.

Recommendations for the least smelly way to extract these?  Unlike the other
document formats, this requires a full parse of the document, we can't just
pass in the parent POIFs.

Add a getMacros() to HSLFSlideShowImpl for now?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to