private static final int MODULETYPE_PROCEDURAL = 0x0021;
private static final int MODULETYPE_DOCUMENT_CLASS_OR_DESIGNER = 0x0022;
private static final int PROJECTLCID = 0x0002;
+ private static final int MODULE_NAME = 0x0019;
+ private static final int MODULE_NAME_UNICODE = 0x0047;
+ private static final int MODULE_DOC_STRING = 0x001c;
/**
* Reads VBA Project modules from a VBA Project directory located at
}
}
}
-
- // This test is written as expected-to-fail and should be rewritten
- // as expected-to-pass when the bug is fixed.
+
@Test
public void bug60158() throws IOException {
- try {
- fromFile(POIDataSamples.getDocumentInstance(), "60158.docm");
- testPassesNow(60158);
- } catch (ArrayIndexOutOfBoundsException e) {
- skipTest(e);
- }
+ File f = POIDataSamples.getDocumentInstance().getFile("60158.docm");
+ VBAMacroReader r = new VBAMacroReader(f);
+ Map<String, String> macros = r.readMacros();
+ assertNotNull(macros.get("NewMacros"));
+ assertContains(macros.get("NewMacros"), "' dirty");
}
}