/** * Reads VBA Project modules from a VBA Project directory located at * <tt>macroDir</tt> into <tt>modules</tt>. * * @since 3.15-beta2 */ protected void readMacros(DirectoryNode macroDir, ModuleMap modules) throws IOException { //bug59858 shows that dirstream may not be in this directory (\MBD00082648\_VBA_PROJECT_CUR\VBA ENTRY NAME) //but may be in another directory (\_VBA_PROJECT_CUR\VBA ENTRY NAME) //process the dirstream first -- "dir" is case insensitive for (String entryName : macroDir.getEntryNames()) { if ("dir".equalsIgnoreCase(entryName)) { processDirStream(macroDir.getEntry(entryName), modules); break; } } for (Entry entry : macroDir) { if (! (entry instanceof DocumentNode)) { continue; } String name = entry.getName(); DocumentNode document = (DocumentNode)entry; if (! "dir".equalsIgnoreCase(name) && !startsWithIgnoreCase(name, "__SRP") && !startsWithIgnoreCase(name, "_VBA_PROJECT")) { // process module, skip __SRP and _VBA_PROJECT since these do not contain macros readModuleFromDocumentStream(document, name, modules); } } }
/** * Reads VBA Project modules from a VBA Project directory located at * <tt>macroDir</tt> into <tt>modules</tt>. * * @since 3.15-beta2 */ protected void readMacros(DirectoryNode macroDir, ModuleMap modules) throws IOException { //bug59858 shows that dirstream may not be in this directory (\MBD00082648\_VBA_PROJECT_CUR\VBA ENTRY NAME) //but may be in another directory (\_VBA_PROJECT_CUR\VBA ENTRY NAME) //process the dirstream first -- "dir" is case insensitive for (String entryName : macroDir.getEntryNames()) { if ("dir".equalsIgnoreCase(entryName)) { processDirStream(macroDir.getEntry(entryName), modules); break; } } for (Entry entry : macroDir) { if (! (entry instanceof DocumentNode)) { continue; } String name = entry.getName(); DocumentNode document = (DocumentNode)entry; if (! "dir".equalsIgnoreCase(name) && !startsWithIgnoreCase(name, "__SRP") && !startsWithIgnoreCase(name, "_VBA_PROJECT")) { // process module, skip __SRP and _VBA_PROJECT since these do not contain macros readModuleFromDocumentStream(document, name, modules); } } }
if(startsWithIgnoreCase(header, "date:")) { s.append("Date:").append(header, header.indexOf(':')+1, header.length()).append("\n"); break;