summaryrefslogtreecommitdiff
path: root/migrationanalysis
diff options
context:
space:
mode:
Diffstat (limited to 'migrationanalysis')
-rw-r--r--migrationanalysis/Read Me.odtbin0 -> 15137 bytes
-rw-r--r--migrationanalysis/prj/build.lst7
-rw-r--r--migrationanalysis/prj/d.lst3
-rw-r--r--migrationanalysis/src/driver_docs/CreateDriverDocs.wsf224
-rw-r--r--migrationanalysis/src/driver_docs/DocAnalysisRunMacro.vbs441
-rw-r--r--migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisExcelDriver.xlsbin0 -> 696832 bytes
-rw-r--r--migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisPPTDriver.pptbin0 -> 284672 bytes
-rw-r--r--migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisWordDriver.docbin0 -> 664064 bytes
-rw-r--r--migrationanalysis/src/driver_docs/allstrings.ulf2371
-rw-r--r--migrationanalysis/src/driver_docs/makefile.mk131
-rw-r--r--migrationanalysis/src/driver_docs/sources/AnalysisDriver.bas3648
-rw-r--r--migrationanalysis/src/driver_docs/sources/CollectedFiles.cls380
-rw-r--r--migrationanalysis/src/driver_docs/sources/CommonMigrationAnalyser.bas1121
-rw-r--r--migrationanalysis/src/driver_docs/sources/CommonPreparation.bas228
-rw-r--r--migrationanalysis/src/driver_docs/sources/DocumentAnalysis.cls344
-rw-r--r--migrationanalysis/src/driver_docs/sources/FileTypeAssociation.cls58
-rw-r--r--migrationanalysis/src/driver_docs/sources/IssueInfo.cls208
-rw-r--r--migrationanalysis/src/driver_docs/sources/LocalizeResults.bas308
-rw-r--r--migrationanalysis/src/driver_docs/sources/PrepareInfo.cls44
-rw-r--r--migrationanalysis/src/driver_docs/sources/StringDataManager.cls133
-rw-r--r--migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisExcelDriver.xlsbin0 -> 31232 bytes
-rw-r--r--migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisPPTDriver.pptbin0 -> 64512 bytes
-rw-r--r--migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisWordDriver.docbin0 -> 38912 bytes
-rw-r--r--migrationanalysis/src/driver_docs/sources/common_res.bas286
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/ApplicationSpecific.bas166
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/MigrationAnalyser.cls2321
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/Preparation.bas53
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/SetTextBoxFont.bas52
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/ThisWorkbook.cls55
-rw-r--r--migrationanalysis/src/driver_docs/sources/excel/excel_res.bas377
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas178
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas64
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls826
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas43
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls56
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas109
-rw-r--r--migrationanalysis/src/driver_docs/sources/results_res.bas613
-rw-r--r--migrationanalysis/src/driver_docs/sources/word/ApplicationSpecific.bas158
-rw-r--r--migrationanalysis/src/driver_docs/sources/word/MigrationAnalyser.cls1524
-rw-r--r--migrationanalysis/src/driver_docs/sources/word/Preparation.bas153
-rw-r--r--migrationanalysis/src/driver_docs/sources/word/ThisDocument.cls54
-rw-r--r--migrationanalysis/src/driver_docs/sources/word/word_res.bas291
-rw-r--r--migrationanalysis/src/driver_docs/ulf2dat.pl156
-rw-r--r--migrationanalysis/src/exe/LaunchDrivers.exebin0 -> 28672 bytes
-rw-r--r--migrationanalysis/src/exe/ProAnalysisWizard.exebin0 -> 843776 bytes
-rw-r--r--migrationanalysis/src/msokill/StdAfx.cpp37
-rw-r--r--migrationanalysis/src/msokill/StdAfx.h56
-rw-r--r--migrationanalysis/src/msokill/makefile.mk85
-rw-r--r--migrationanalysis/src/msokill/msokill.cpp261
-rw-r--r--migrationanalysis/src/resources/analysis.dtd52
-rw-r--r--migrationanalysis/src/resources/makefile.mk61
-rw-r--r--migrationanalysis/src/resources/results_paw.xltbin0 -> 140800 bytes
-rw-r--r--migrationanalysis/src/wizard/Analyse.bas592
-rw-r--r--migrationanalysis/src/wizard/CollectedFiles.cls533
-rw-r--r--migrationanalysis/src/wizard/DocAnalysisWizard.exe.manifest22
-rw-r--r--migrationanalysis/src/wizard/Get Directory Dialog.bas146
-rw-r--r--migrationanalysis/src/wizard/IniSupport.bas272
-rw-r--r--migrationanalysis/src/wizard/LaunchDrivers.vbp42
-rw-r--r--migrationanalysis/src/wizard/LaunchDrivers.vbw1
-rw-r--r--migrationanalysis/src/wizard/OOo3_Analysis.icobin0 -> 295606 bytes
-rw-r--r--migrationanalysis/src/wizard/OOo_AnalysisBitmap.pngbin0 -> 8625 bytes
-rw-r--r--migrationanalysis/src/wizard/Office10Issues.bas364
-rw-r--r--migrationanalysis/src/wizard/ProAnalysisWizard.vbp65
-rw-r--r--migrationanalysis/src/wizard/RunServer.bas202
-rw-r--r--migrationanalysis/src/wizard/ScanFolders.frm157
-rw-r--r--migrationanalysis/src/wizard/SearchDocs.frm124
-rw-r--r--migrationanalysis/src/wizard/Terminate.frm81
-rw-r--r--migrationanalysis/src/wizard/Utilities.bas555
-rw-r--r--migrationanalysis/src/wizard/Wizard.DCAbin0 -> 3927 bytes
-rw-r--r--migrationanalysis/src/wizard/Wizard.Dsr79
-rw-r--r--migrationanalysis/src/wizard/Wizard.FRXbin0 -> 416643 bytes
-rw-r--r--migrationanalysis/src/wizard/Wizard.bas654
-rw-r--r--migrationanalysis/src/wizard/Wizard.frm3458
-rw-r--r--migrationanalysis/src/wizard/makefile.mk118
-rw-r--r--migrationanalysis/src/wizard/rcfooter.txt1
-rw-r--r--migrationanalysis/src/wizard/rcheader.txt17
-rw-r--r--migrationanalysis/src/wizard/rctmpl.txt126
-rw-r--r--migrationanalysis/src/wizard/res_defines.h150
-rw-r--r--migrationanalysis/src/wizard/wizard.ulf352
-rw-r--r--migrationanalysis/util/delzip1
-rw-r--r--migrationanalysis/util/makefile.mk84
81 files changed, 25932 insertions, 0 deletions
diff --git a/migrationanalysis/Read Me.odt b/migrationanalysis/Read Me.odt
new file mode 100644
index 000000000000..02c8db4b5eaa
--- /dev/null
+++ b/migrationanalysis/Read Me.odt
Binary files differ
diff --git a/migrationanalysis/prj/build.lst b/migrationanalysis/prj/build.lst
new file mode 100644
index 000000000000..19b8893dae10
--- /dev/null
+++ b/migrationanalysis/prj/build.lst
@@ -0,0 +1,7 @@
+at migrationanalysis : soltools NULL
+at migrationanalysis\src\msokill nmake - w at_src NULL
+at migrationanalysis\src\driver_docs nmake - w at_src_driver NULL
+at migrationanalysis\src\resources nmake - w at_src_resources NULL
+at migrationanalysis\src\wizard nmake - w at_src_wizard NULL
+at migrationanalysis\util nmake - w at_util at_src.w at_src_driver.w at_src_resources.w at_src_wizard.w NULL
+
diff --git a/migrationanalysis/prj/d.lst b/migrationanalysis/prj/d.lst
new file mode 100644
index 000000000000..9d07d2e618fa
--- /dev/null
+++ b/migrationanalysis/prj/d.lst
@@ -0,0 +1,3 @@
+..\%__SRC%\bin\ProAnalysisWizard\ProAnalysisWizard.exe %_DEST%\bin%_EXT%\ProAnalysisWizard.exe
+..\%__SRC%\bin\ProAnalysisWizard.zip %_DEST%\bin%_EXT%\ProAnalysisWizard.zip
+
diff --git a/migrationanalysis/src/driver_docs/CreateDriverDocs.wsf b/migrationanalysis/src/driver_docs/CreateDriverDocs.wsf
new file mode 100644
index 000000000000..8fc82d96d53a
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/CreateDriverDocs.wsf
@@ -0,0 +1,224 @@
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: CreateDriverDocs.wsf,v $
+' * $Revision: 1.2.140.3 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * http://www.openoffice.org/license.html
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+'### Build Support Module for running commands to export and import
+'### modules from Word, Excel and PowerPoint Document Analysis driver documents
+
+
+<job id="DocAnalysisBuildCmd" error="true" debug="true">
+ <script language="VBScript" src="DocAnalysisRunMacro.vbs"/>
+ <script language="VBScript">
+
+Const CTITLE = "Document Analysis Command"
+
+Const CWORD_DRIVER = "_OOoDocAnalysisWordDriver.doc"
+Const CEXCEL_DRIVER = "_OOoDocAnalysisExcelDriver.xls"
+Const CPP_DRIVER = "_OOoDocAnalysisPPTDriver.ppt"
+Const CStub = "Stripped"
+
+Const CUTIL_APPNAME_WORD = "Word"
+Const CUTIL_APPNAME_EXCEL = "Excel"
+Const CUTIL_APPNAME_POWERPOINT = "Powerpoint"
+
+Const CDIAG_STD_DELAY = 2
+
+Const CDEFAULT_SOURCE_DIR = ".\sources\"
+Const CDEFAULT_TARGET_DIR = "."
+
+Const CSOURCE_DIR_ARG = "X"
+Const CTARGET_DIR_ARG = "T"
+Const CUSAGE_ARG = "?"
+
+Const CSTR_PAW = "\PAW\"
+
+'######### Doc Analysis Build - Main Script Body #############
+Dim mArgsNamed, mArgsUnnamed
+Dim mSourceDir
+Dim mTargetDir
+
+On Error Resume Next
+
+'### Process Arguments ###
+Set mArgsNamed = WScript.Arguments.Named
+Set mArgsUnnamed = WScript.Arguments.Unnamed
+
+If mArgsNamed.Exists(CUSAGE_ARG) Then
+ Usage
+ FinalExit
+End If
+
+'# Source Dir
+if mArgsNamed.Exists(CSOURCE_DIR_ARG) Then
+ mSourceDir = mArgsNamed.Item(CSOURCE_DIR_ARG)
+Else
+ mSourceDir = CDEFAULT_SOURCE_DIR
+End If
+
+'# Target Dir
+if mArgsNamed.Exists(CTARGET_DIR_ARG ) Then
+ mTargetDir = mArgsNamed.Item(CTARGET_DIR_ARG )
+Else
+ mTargetDir = CDEFAULT_TARGET_DIR
+End If
+
+mSourceDir = daFso.GetAbsolutePathName(mSourceDir )
+mTargetDir = daFso.GetAbsolutePathName(mTargetDir )
+
+'# Check source and target dirs exist
+If Not daFso.FolderExists(mSourceDir) Then
+ DAErrMsg "Source directory does not exist: " & mSourceDir, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+If Not daFso.FolderExists(mTargetDir) Then
+ DAErrMsg "Target directory does not exist: " & mTargetDir, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+Set mArgsNamed = Nothing
+Set mArgsUnnamed = Nothing
+
+'#### then continue with PAW
+ImportAll mTargetDir & CSTR_PAW
+
+'# Cleanup
+FinalExit
+
+
+'######### End - Main Script Body #############
+
+
+'#### Doc Analysis Build - Support Functions ####
+
+Sub Usage()
+ DAdiagMsg "Build command line tool to create Document Analysis driver documents" & vbLf & vbLf &_
+ "DocAnalysisBuildCmd [/X:<sourceDir>] [/T:<targetDir>]" & vbLf & vbLf &_
+ "/X:<sourceDir> base <source> directory " & vbLf & _
+ " The <sourceDir> is the base dir under which all the " & vbLf & _
+ " _res.bas files are located to import from" & vbLf & vbLf & _
+ "/T:<targetDir> target directory " & vbLf & _
+ " <targetDir> is where the new Driver docs" & vbLf & _
+ " will be created", 30
+End Sub
+
+'######################
+Sub FinalExit()
+ DACleanUp
+ wscript.quit
+End Sub
+
+'######################
+Sub ImportAll( aTargetDir )
+
+ '#### Create automation servers ####
+ DAsetupWrdServer
+ DAsetupExcelServer
+ DAsetupPPServer
+
+ If Not daFso.FolderExists( aTargetDir ) Then
+ daFso.CreateFolder( aTargetDir )
+ End If
+
+ BackupDrivers aTargetDir
+
+ DAOpenWrdDriver mSourceDir & "\" & CSTUB & CWORD_DRIVER
+ DAOpenExcelDriver mSourceDir & "\" & CSTUB & CEXCEL_DRIVER
+ DAOpenPPDriver mSourceDir & "\" & CSTUB & CPP_DRIVER
+
+ DASetTitle CTITLE & " - Import"
+
+ ImportSelectedProjectFiles mSourceDir, CUTIL_APPNAME_WORD
+ ImportSelectedProjectFiles mSourceDir, CUTIL_APPNAME_EXCEL
+ ImportSelectedProjectFiles mSourceDir, CUTIL_APPNAME_POWERPOINT
+
+ DAsaveWrdDriver aTargetDir & "\" & CWORD_DRIVER
+ DAsaveExcelDriver aTargetDir & "\" & CEXCEL_DRIVER
+ DAsavePPDriver aTargetDir & "\" & CPP_DRIVER
+
+ DACloseApps
+End Sub
+
+'######################
+Sub BackupDrivers(importdir)
+ On Error Resume Next
+
+ Dim wrdPath
+ Dim xlsPath
+ Dim ppPath
+
+ wrdPath = daFso.GetAbsolutePathName(importdir & "\" & CWORD_DRIVER)
+ xlsPath= daFso.GetAbsolutePathName(importdir & "\" & CEXCEL_DRIVER)
+ ppPath= daFso.GetAbsolutePathName(importdir & "\" & CPP_DRIVER)
+
+ If daFso.FileExists( wrdPath ) Then daFso.CopyFile wrdPath, wrdPath & ".bak"
+ If daFso.FileExists( xlsPath ) Then daFso.CopyFile xlsPath, xlsPath & ".bak"
+ If daFso.FileExists( ppPath ) Then daFso.CopyFile ppPath, ppPath & ".bak"
+End Sub
+
+'######################
+Sub ImportSelectedProjectFiles(dir, app_name)
+ On Error Resume Next
+
+ Dim base
+ Dim lcApp_name
+ lcApp_name = LCase(app_name)
+
+ 'Driver Specific
+ base = dir & "\" & lcApp_name & "\"
+
+ DAImportFile base & "ApplicationSpecific.bas", "ApplicationSpecific", app_name
+ DAImportFile base & "MigrationAnalyser.cls", "MigrationAnalyser", app_name
+
+ DAImportFile base & "Preparation.bas", "Preparation", app_name
+
+ 'app resource
+ DAImportFile base & lcApp_name & "_res.bas", lcApp_name & "_res", app_name
+
+ 'Common
+ base = dir & "\"
+ DAImportFile base & "AnalysisDriver.bas", "AnalysisDriver", app_name
+ DAImportFile base & "CommonMigrationAnalyser.bas", "CommonMigrationAnalyser", app_name
+ DAImportFile base & "CollectedFiles.cls", "CollectedFiles", app_name
+ DAImportFile base & "DocumentAnalysis.cls", "DocumentAnalysis", app_name
+ DAImportFile base & "FileTypeAssociation.cls", "FileTypeAssociation", app_name
+ DAImportFile base & "IssueInfo.cls", "IssueInfo", app_name
+ DAImportFile base & "PrepareInfo.cls", "PrepareInfo", app_name
+ DAImportFile base & "StringDataManager.cls", "StringDataManager", app_name
+ DAImportFile base & "LocalizeResults.bas", "LocalizeResults", app_name
+
+ DAImportFile base & "CommonPreparation.bas", "CommonPreparation", app_name
+
+ 'common resource
+ DAImportFile base & "common_res.bas", "common_res", app_name
+ DAImportFile base & "results_res.bas", "results_res", app_name
+
+End Sub
+
+</script>
+</job>
+
diff --git a/migrationanalysis/src/driver_docs/DocAnalysisRunMacro.vbs b/migrationanalysis/src/driver_docs/DocAnalysisRunMacro.vbs
new file mode 100644
index 000000000000..7ec5083107cd
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/DocAnalysisRunMacro.vbs
@@ -0,0 +1,441 @@
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: DocAnalysisRunMacro.vbs,v $
+' * $Revision: 1.2.140.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+'### Support Module for running macros in Word. Excel and Powerpoint
+'### using automation
+
+CONST CDA_TITLE = "Document Analysis Run Macro"
+CONST CDA_ANALYSIS_INI = "analysis.ini"
+Const CDA_ERR_STD_DELAY = 10
+Const CDA_APPNAME_WORD = "Word"
+Const CDA_APPNAME_EXCEL = "Excel"
+Const CDA_APPNAME_POWERPOINT = "Powerpoint"
+
+Dim daWrd
+Dim daDoc
+Dim daXl
+Dim daWb
+Dim daPP
+Dim daPres
+Dim daWshShell
+Dim daFso
+Dim daTitle
+
+daTitle = CDA_TITLE
+
+'# Setup Scripting objects
+set daFso = WScript.CreateObject("Scripting.FileSystemObject")
+set daWshShell = Wscript.CreateObject("Wscript.Shell")
+
+
+'##### Run Macro FUNCTIONS ######
+
+'######################
+Sub DASetTitle(newTitle)
+ daTitle = newTitle
+End Sub
+
+'######################
+Sub DAsetupWrdServer
+
+On Error Resume Next
+
+Set daWrd = wscript.CreateObject("Word.Application")
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to create Word Automation server: " & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+End Sub
+
+'######################
+Sub DAOpenWrdDriver(driver)
+Dim sWordDriverDocPath
+
+On Error Resume Next
+daWrd.Visible = False
+
+'# Open a driver doc
+sWordDriverDocPath = daFso.GetAbsolutePathName(driver)
+'DAdiagMsg "sWordDriverDocPath : " & sWordDriverDocPath , CDIAG_STD_DELAY
+
+If Not daFso.FileExists(sWordDriverDocPath) Then
+ DAErrMsg "Driver doc does not exist: " & sWordDriverDocPath, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+Set daDoc = daWrd.Documents.Open(sWordDriverDocPath)
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to open driver doc: " & vbLf & sWordDriverDocPath & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+End Sub
+
+'######################
+Function DArunWrdDriver(driver, macro)
+
+On Error Resume Next
+'# Run macro
+DArunWrdDriver = True
+daWrd.Run ("AnalysisTool." & macro)
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to run macro: " & macro & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ DArunWrdDriver = False
+End If
+
+End Function
+
+'######################
+Sub DAsaveWrdDriver(saveDriver)
+'DAdiagMsg "saveDriver : " & saveDriver , CDIAG_STD_DELAY
+'DAdiagMsg "Abs(saveDriver) : " & daFso.GetAbsolutePathName( saveDriver) , CDIAG_STD_DELAY
+ daDoc.SaveAs daFso.GetAbsolutePathName( saveDriver)
+End Sub
+
+'######################
+Sub DAsetupExcelServer
+
+On Error Resume Next
+
+Set daXl = wscript.CreateObject("Excel.Application")
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to create Excel Automation server: " & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+End Sub
+
+'######################
+Sub DAOpenExcelDriver(driver)
+ Dim sExcelDriverDocPath
+
+ On Error Resume Next
+ daXl.Visible = False
+
+ '# Open driver doc
+ sExcelDriverDocPath = daFso.GetAbsolutePathName(driver)
+ If Not daFso.FileExists(sExcelDriverDocPath) Then
+ DAErrMsg "Driver doc does not exist: " & sExcelDriverDocPath, CDA_ERR_STD_DELAY
+ FinalExit
+ End If
+
+ Set daWb = daXl.Workbooks.Open(sExcelDriverDocPath)
+ If Err.Number <> 0 Then
+ DAErrMsg "Failed to open driver doc: " & vbLf & sExcelDriverDocPath & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+ End If
+
+End Sub
+
+'######################
+Function DArunExcelDriver(driver, macro)
+On Error Resume Next
+
+'# Run macro
+DArunExcelDriver = True
+daXl.Run ("AnalysisTool." & macro)
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to run macro: " & macro & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ DArunExcelDriver = False
+End If
+
+End Function
+
+'######################
+Sub DAsaveExcelDriver(saveDriver)
+ '# Not overwritting - Excel hangs, need to remove file first
+ if daFso.FileExists(daFso.GetAbsolutePathName(saveDriver)) Then
+ daFso.DeleteFile(daFso.GetAbsolutePathName(saveDriver))
+ End If
+ daWb.SaveAs daFso.GetAbsolutePathName(saveDriver)
+End Sub
+
+'######################
+Sub DAsetupPPServer
+
+On Error Resume Next
+
+Set daPP = wscript.CreateObject("PowerPoint.Application")
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to create PowerPoint Automation server: " & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+End Sub
+
+'######################
+Sub DAOpenPPDriver(driver)
+Dim sPPDriverDocPath
+
+On Error Resume Next
+
+
+'# Open driver doc
+sPPDriverDocPath = daFso.GetAbsolutePathName(driver)
+If Not daFso.FileExists(sPPDriverDocPath ) Then
+ DAErrMsg "Driver doc does not exist: " & sPPDriverDocPath, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+
+'## MS: KB Article 155073 ##
+'# PPT7: OLE Automation Error Using Open Method
+'# MUST show the PowerPoint application window at least once before calling the Application.Presentations.Open method
+daPP.Visible = True
+daPP.WindowState = 2 'Minimize PowerPoint
+
+daPP.Presentations.Open sPPDriverDocPath
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to open driver doc: " & vbLf & sPPDriverDocPath & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ FinalExit
+End If
+
+set daPres = daPP.Presentations(1)
+
+End Sub
+
+'######################
+Function DArunPPDriver(driver, macro)
+
+On Error Resume Next
+'# Run macro
+DArunPPDriver = True
+daPP.Run (daFso.GetFileName(driver) & "!" & macro)
+If Err.Number <> 0 Then
+ DAErrMsg "Failed to run macro: " & macro & vbLf & vbLf & "Error: " _
+ & CStr(Err.Number) & " " & Err.Description, CDA_ERR_STD_DELAY
+ DArunPPDriver = False
+End If
+
+End Function
+
+'######################
+Sub DAsavePPDriver(saveDriver)
+ daPres.SaveAs daFso.GetAbsolutePathName(saveDriver)
+End Sub
+
+
+'######################
+
+Sub DACloseApps()
+ '# Quit apps
+ On Error Resume Next
+ If Not daWrd Is Nothing Then
+ daDoc.Close wdDoNotSaveChanges
+ daWrd.Quit
+ End If
+ If Not daXl Is Nothing Then
+ daWb.Close False
+ daXl.Quit
+ End If
+ If Not daPP Is Nothing Then
+ daPres.Close
+ daPP.Quit
+ End If
+
+ Set daDoc = Nothing
+ Set daWb = Nothing
+ Set daPres = Nothing
+
+ Set daWrd = Nothing
+ Set daXl = Nothing
+ Set daPP = Nothing
+End Sub
+
+'######################
+
+Sub DACleanUp()
+ '# Quit apps
+ On Error Resume Next
+
+ DACloseApps
+
+ Set daFso = Nothing
+ Set daWshShell = Nothing
+End Sub
+
+
+'######################
+Sub DAdiagMsg( msg, delay)
+ '# WSHShell.echo: Popup if run with Wscript.exe, command line output if run with Cscript.exe
+ WScript.Echo msg
+
+ 'WSHShell.popup msg, delay, daTitle, 64
+End Sub
+
+'######################
+Sub DAErrMsg( msg, delay)
+ daWshShell.Popup msg, delay, daTitle, 16
+
+ 'WScript.Echo msg
+End Sub
+
+'######################
+Sub DAVerifyAnalysisIni()
+ if daFso.FileExists(daFso.GetAbsolutePathName(".\" & CDA_ANALYSIS_INI)) Then Exit Sub
+
+ DAErrMsg CDA_ANALYSIS_INI & " does not exist. " & vbLf & vbLf & _
+ "You need to create it manually or use the DocAnalysisWizard to create one for you." & vbLf & _
+ "Once this is done you can rerun the Document Analysis command line.", CDA_ERR_STD_DELAY
+ FinalExit
+End Sub
+
+'######################
+Sub DAExportFile(fileName, projectFile, app_name)
+ On Error Resume Next
+
+ Dim myProject
+
+ '# Setup App Specifc VB Project
+ Set myProject = DAgetProject(fileName, projectFile, app_name)
+
+ Dim myComponent
+ Set myComponent = myProject.VBComponents(projectFile)
+ If Err.Number <> 0 Then
+ DAErrMsg "Missing Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ myProject.VBComponents(projectFile).Export fileName
+ If Err.Number <> 0 Then
+ DAErrMsg "Error exporting Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ Set myComponent = Nothing
+ Set myProject = Nothing
+
+End Sub
+
+'######################
+Sub DAImportFile(fileName, projectFile, app_name)
+ On Error Resume Next
+
+ Dim myProject
+
+ '# Setup App Specifc VB Project
+ Set myProject = DAgetProject(fileName, projectFile, app_name)
+
+ '# Check if module already exists raise error
+ Dim myComponent
+ Set myComponent = myProject.VBComponents(projectFile)
+ If Err.Number = 0 Then
+ DAErrMsg "Duplicate Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ '#If module not there need to clear out of index error
+ Err.Clear
+
+ If Not daFso.FileExists(fileName) Then
+ DAErrMsg "Missing File " & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ Call myProject.VBComponents.Import(fileName)
+
+ If Err.Number <> 0 Then
+ DAErrMsg "Error importing Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ Set myComponent = Nothing
+ Set myProject = Nothing
+End Sub
+
+'#################
+
+Sub DARemoveModule(fileName, projectFile, app_name)
+ On Error Resume Next
+
+ Dim myProject
+
+ '# Setup App Specifc VB Project
+ Set myProject = DAgetProject(fileName, projectFile, app_name)
+
+ '# Check if module already exists raise error
+ Dim myComponent
+ Set myComponent = myProject.VBComponents(projectFile)
+
+
+ myProject.VBComponents.Remove myComponent
+
+ If Err.Number <> 0 Then
+ DAErrMsg "Error removing Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, CERR_STD_DELAY
+ Set myComponent = Nothing
+ Set myProject = Nothing
+ FinalExit
+ End If
+
+ Set myComponent = Nothing
+ Set myProject = Nothing
+End Sub
+
+'######################
+Function DAgetProject(fileName, projectFile, app_name)
+ On Error Resume Next
+
+ If app_name = CDA_APPNAME_WORD Then
+ Set DAgetProject = daWrd.ActiveDocument.VBProject
+
+ ElseIf app_name = CDA_APPNAME_EXCEL Then
+ Set DAgetProject = daXl.ActiveWorkbook.VBProject
+
+ ElseIf app_name = CDA_APPNAME_POWERPOINT Then
+ Set DAgetProject = daPP.ActivePresentation.VBProject
+ End If
+
+ If Err.Number <> 0 Then
+ DAErrMsg "Cannot access VBProject for Project File [" & projectFile & "] - Path:" & vbLf & vbLf & fileName, _
+ CERR_STD_DELAY
+ Set DAgetProject = Nothing
+ FinalExit
+ End If
+
+End Function
+
diff --git a/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisExcelDriver.xls b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisExcelDriver.xls
new file mode 100644
index 000000000000..a5a52adc1350
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisExcelDriver.xls
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisPPTDriver.ppt b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisPPTDriver.ppt
new file mode 100644
index 000000000000..e5f9de418b9a
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisPPTDriver.ppt
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisWordDriver.doc b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisWordDriver.doc
new file mode 100644
index 000000000000..501274bc5220
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/PAW/_OOoDocAnalysisWordDriver.doc
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/allstrings.ulf b/migrationanalysis/src/driver_docs/allstrings.ulf
new file mode 100644
index 000000000000..0f36a93290ff
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/allstrings.ulf
@@ -0,0 +1,2371 @@
+[RID_STR_COMMON_PRODUCTNAME]
+en-US = "OpenOffice.org"
+
+[RID_STR_COMMON_PRODUCTVERSION]
+en-US = "3.0"
+
+[RID_STR_COMMON_NEXTPRODUCTVERSION]
+en-US = "3.1"
+
+[RID_STR_COMMON_OLE_CONTROL]
+en-US = "OLE Control"
+
+[RID_STR_COMMON_OLE_FIELD_LINK]
+en-US = "OLE Field Link"
+
+[RID_STR_COMMON_OLE_UNKNOWN]
+en-US = "Unknown Type"
+
+[RID_STR_COMMON_VB_COMPONENT_MODULE]
+en-US = "Module"
+
+[RID_STR_COMMON_VB_COMPONENT_STANDARD]
+en-US = "Standard Module"
+
+[RID_STR_COMMON_VB_COMPONENT_CLASS]
+en-US = "Class Module"
+
+[RID_STR_COMMON_VB_COMPONENT_USER_FORM]
+en-US = "User Form"
+
+[RID_STR_COMMON_VB_COMPONENT_DOCUMENT]
+en-US = "Document"
+
+[RID_STR_COMMON_VB_COMPONENT_ACTIVEX_DESIGNER]
+en-US = "ActiveX Designer"
+
+[RID_STR_COMMON_VB_COMPONENT_UNKNOWN]
+en-US = "Unknown"
+
+[RID_STR_COMMON_YES_OR_NO]
+en-US = "Yes or No"
+
+[RID_STR_COMMON_DATE]
+en-US = "Date"
+
+[RID_STR_COMMON_NUMBER]
+en-US = "Number"
+
+[RID_STR_COMMON_TEXT]
+en-US = "Text"
+
+[RID_STR_COMMON_UNKNOWN]
+en-US = "Unknown"
+
+[RID_STR_COMMON_DEC_TO_EXTERNAL_LIBRARY]
+en-US = "Declaration to external library"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT]
+en-US = "Document"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_PAGE]
+en-US = "Page"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK]
+en-US = "WorkBook"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_SHEET]
+en-US = "Sheet"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION]
+en-US = "Presentation"
+
+[RID_STR_COMMON_RESULTS_LOCATION_TYPE_SLIDE]
+en-US = "Slide"
+
+[RID_STR_COMMON_INVALID_PASSWORD]
+en-US = "Invalid Password"
+
+[RID_STR_COMMON_PASSWORD_SKIPDOC]
+en-US = "Skip Password Protected"
+
+[RID_STR_COMMON_NA]
+en-US = "na"
+
+[RID_STR_COMMON_ATTRIBUTE_BROKEN]
+en-US = "Broken!"
+
+[RID_STR_COMMON_ATTRIBUTE_BUILTIN]
+en-US = "BuiltIn"
+
+[RID_STR_COMMON_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES]
+en-US = "Check document VB-IDE/Tools/References"
+
+[RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT]
+en-US = "Class refs to Me"
+
+[RID_STR_COMMON_ATTRIBUTE_COMPONENT]
+en-US = "Component"
+
+[RID_STR_COMMON_ATTRIBUTE_CONTROLS]
+en-US = "Controls"
+
+[RID_STR_COMMON_ATTRIBUTE_CUSTOM]
+en-US = "Custom"
+
+[RID_STR_COMMON_ATTRIBUTE_DESCRIPTION]
+en-US = "Description"
+
+[RID_STR_COMMON_ATTRIBUTE_GUID]
+en-US = "GUID"
+
+[RID_STR_COMMON_ATTRIBUTE_FILE]
+en-US = "File"
+
+[RID_STR_COMMON_ATTRIBUTE_PROPERTIES]
+en-US = "Properties"
+
+[RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE]
+en-US = "Further macro analysis not possible"
+
+[RID_STR_COMMON_ATTRIBUTE_INCLUDING]
+en-US = "including:"
+
+[RID_STR_COMMON_ATTRIBUTE_INTACT]
+en-US = "Intact"
+
+[RID_STR_COMMON_ATTRIBUTE_ISBROKEN]
+en-US = "IsBroken"
+
+[RID_STR_COMMON_ATTRIBUTE_MAJOR]
+en-US = "Major"
+
+[RID_STR_COMMON_ATTRIBUTE_MINOR]
+en-US = "Minor"
+
+[RID_STR_COMMON_ATTRIBUTE_MISSING]
+en-US = "MISSING"
+
+[RID_STR_COMMON_ATTRIBUTE_NAME]
+en-US = "Name"
+
+[RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES]
+en-US = "Non Portable External References"
+
+[RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT]
+en-US = "External Reference Count"
+
+[RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES]
+en-US = "Number of Lines"
+
+[RID_STR_COMMON_ATTRIBUTE_SIGNATURE]
+en-US = "MD5 Hash"
+
+[RID_STR_COMMON_ATTRIBUTE_PASSWORD]
+en-US = "Password"
+
+[RID_STR_COMMON_ATTRIBUTE_PATH]
+en-US = "Path"
+
+[RID_STR_COMMON_ATTRIBUTE_PROCEDURES]
+en-US = "Procedures"
+
+[RID_STR_COMMON_ATTRIBUTE_PROJECT]
+en-US = "Project"
+
+[RID_STR_COMMON_ATTRIBUTE_TYPE]
+en-US = "Type"
+
+[RID_STR_COMMON_ATTRIBUTE_TYPELIB]
+en-US = "Type Library"
+
+[RID_STR_COMMON_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT]
+en-US = "Unable to access VBProject"
+
+[RID_STR_COMMON_ATTRIBUTE_UNKNOWN]
+en-US = "Unknown"
+
+[RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE]
+en-US = "Control Types"
+
+[RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT]
+en-US = "Control Types Count"
+
+[RID_STR_COMMON_ATTRIBUTE_VALUE]
+en-US = "Value"
+
+[RID_STR_COMMON_ATTRIBUTE_VBPROJECT_PASSWORD]
+en-US = "VBProject Password set"
+
+[RID_STR_COMMON_ISSUE_INFORMATION]
+en-US = "Information"
+
+[RID_STR_COMMON_ISSUE_FORMAT]
+en-US = "Format"
+
+[RID_STR_COMMON_ISSUE_PORTABILITY]
+en-US = "Portability"
+
+[RID_STR_COMMON_ISSUE_VBA_MACROS]
+en-US = "VBA Macros"
+
+[RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES]
+en-US = "Content and Document Properties"
+
+[RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST]
+en-US = "this summary property is lost"
+
+[RID_STR_COMMON_SUBISSUE_PROPERTIES]
+en-US = "Properties"
+
+[RID_STR_COMMON_SUBISSUE_REFERENCES]
+en-US = "References"
+
+[RID_STR_COMMON_SUBISSUE_EXTERNAL_REFERENCES_IN_MACROS]
+en-US = "External References in Macro"
+
+[RID_STR_COMMON_SUBISSUE_INVALID_PASSWORD_ENTERED]
+en-US = "Invalid Password Entered"
+
+[RID_STR_COMMON_SUBISSUE_DOCUMENT_PARTS_PROTECTION]
+en-US = "Document Parts Protection"
+
+[RID_STR_COMMON_SUBISSUE_MACRO_PASSWORD_PROTECTION]
+en-US = "Password Protected"
+
+[RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION]
+en-US = "Password Protection"
+
+[RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME]
+en-US = "Object Name"
+
+[RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE]
+en-US = "Object Type"
+
+[RID_STR_COMMON_ATTRIBUTE_SOURCE]
+en-US = "Source"
+
+[RID_STR_COMMON_NOTE_HF_PREPARABLE]
+en-US = "will add additional returns to the header/footer"
+
+[RID_STR_COMMON_PREPARATION_FOLDER]
+en-US = "prepared"
+
+[RID_STR_COMMON_SUBISSUE_DOCUMENT_CUSTOM_PROPERTY]
+en-US = "Document Custom Property"
+
+[RID_STR_COMMON_MACRO_CLASS_COMPLEX]
+en-US = "Complex"
+
+[RID_STR_COMMON_MACRO_CLASS_MEDIUM]
+en-US = "Medium"
+
+[RID_STR_COMMON_MACRO_CLASS_SIMPLE]
+en-US = "Simple"
+
+[RID_STR_COMMON_MACRO_CLASS_NONE]
+en-US = "No Macros"
+
+[RID_STR_COMMON_ISSUE_CLASS_COMPLEX]
+en-US = "Complex"
+
+[RID_STR_COMMON_ISSUE_CLASS_MINOR]
+en-US = "Minor"
+
+[RID_STR_COMMON_ISSUE_CLASS_NONE]
+en-US = "No Issues"
+
+[RID_STR_COMMON_OV_VERSION_STR]
+en-US = "Created by"
+
+[RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_TITLE]
+en-US = "Which documents do you need to migrate?"
+
+[RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_BODY]
+en-US = "<CR>The last modified date is an indicator of the importance of a document. It helps you decide which documents should just be archived to a read only format such as Adobe PDF and which actually need to be migrated to <PRODUCTNAME> where they can continue to be updated and modified."
+
+[RID_STR_COMMON_OV_LEGEND_TITLE]
+en-US = "Legend"
+
+[RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY]
+en-US = "< 3 months: Migrate to <PRODUCTNAME>.<CR>3 - 6 Months: Careful review to see if they should be archived or migrated to <PRODUCTNAME>.<CR>6 - 12 Months: Quick review, either archive or migrate to the read/write <PRODUCTNAME> XML file format.<CR>> 1 Year: Older than 1 year, archive to read-only format such as PDF"
+
+[RID_STR_COMMON_OV_DOC_MACRO_COMMENT_TITLE]
+en-US = "How many documents contain macros?"
+
+[RID_STR_COMMON_OV_DOC_MACRO_COMMENT_BODY]
+en-US = "<CR><PRODUCTNAME> includes <PRODUCTNAME> BASIC, a Basic dialect that is similar to Microsoft's Visual Basic for Application (VBA), but <PRODUCTNAME> uses a different sets of objects to access the underlying Office.<CR>This makes it necessary to migrate the VBA macros into the platform independent <PRODUCTNAME> BASIC. Your local <PRODUCTNAME> Migration partner can help you with these VBA macro migrations."
+
+[RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY]
+en-US = "Complex: Macros using Forms, Controls and external references<CR>Medium: Macros with more than 50 lines of code<CR>Simple: Macros with less than 50 lines of code<CR>None: No macros in the document"
+
+[RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_DAW]
+en-US = "Analysis of document migration issues for documents modified within the last <TOPIC> months"
+
+[RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT]
+en-US = "High level analysis of document migration issues"
+
+[RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_TITLE]
+en-US = "Which documents may have migration issues?"
+
+[RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_BODY]
+en-US = "<CR>Some Microsoft Office documents may not migrate perfectly into <PRODUCTNAME>. These issues are outlined in the <PRODUCTNAME> Migration Guide. <PRODUCTNAME> engineering is working continously to resolve these issues by improving the Microsoft Office filters.<CR>The Document Analysis Wizard has been provided by <PRODUCTNAME> engineering to detect the most important of these migration issues in any Microsoft Office document you wish to specify. These findings are summarised below [refer to the 'List of documents' sheet to see the list of all analyzed documents]."
+
+[RID_STR_COMMON_OV_DOC_ANALYSIS_DAW_LEGEND_BODY]
+en-US = "Complex: More complex migration issues.<CR>Minor: Minor migration issues easily fixed by any user.<CR>None: No issues Migrate to <PRODUCTNAME> without any issues.<CR><CR>Your <PRODUCTNAME> Migration Partners can help you with these more complex migration issues [refer to link above]. For instance they can migrate these documents to custom templates that achieve the same functionality but work well in both Office environments allowing the documents to be freely exchanged."
+
+[RID_STR_COMMON_OV_DOC_ANALYSIS_PAW_LEGEND_BODY]
+en-US = "Complex: More complex migration issues.<CR>Minor: Minor migration issues easily fixed by any user.<CR>None: No issues Migrate to <PRODUCTNAME> without any issues."
+
+[RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE]
+en-US = "Document modification dates"
+
+[RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE]
+en-US = "Document with Macro Migration Issues"
+
+[RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE]
+en-US = "Documents with Document Migration Issues"
+
+[RID_STR_COMMON_PREPARATION_NOTE]
+en-US = "Preparation"
+
+[RID_STR_COMMON_CANNOT_OPEN]
+en-US = "Cannot open - no analysis possible"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW]
+en-US = "Overview"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_COSTS]
+en-US = "Issues Analyzed"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD]
+en-US = "Word Issues"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL]
+en-US = "Excel Issues"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT]
+en-US = "PowerPoint Issues"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS]
+en-US = "Issue Details"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS]
+en-US = "Reference Details"
+
+[RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP]
+en-US = "List of documents"
+
+[RID_STR_COMMON_ANALYSIS_STR]
+en-US = "Analysis"
+
+[RID_STR_COMMON_NOTE_PRE]
+en-US = "Note"
+
+[RID_STR_COMMON_NOTE_POST]
+en-US = " on migration"
+
+[RID_STR_COMMON_OLE_EMBEDDED]
+en-US = "Embedded OLE Object"
+
+[RID_STR_COMMON_OLE_LINKED]
+en-US = "Linked OLE Object"
+
+[RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES]
+en-US = "Charts and Tables"
+
+[RID_STR_EXCEL_ISSUE_FORMAT]
+en-US = "Format"
+
+[RID_STR_EXCEL_ISSUE_FUNCTIONS]
+en-US = "Functions"
+
+[RID_STR_EXCEL_ISSUE_PORTABILITY]
+en-US = "Portability"
+
+[RID_STR_EXCEL_ISSUE_VBA_MACROS]
+en-US = "VBA Macros"
+
+[RID_STR_EXCEL_ISSUE_INFORMATION]
+en-US = "Information"
+
+[RID_STR_EXCEL_SUBISSUE_PIVOT]
+en-US = "Pivot"
+
+[RID_STR_EXCEL_SUBISSUE_ZOOM]
+en-US = "Zoom"
+
+[RID_STR_EXCEL_TRUE]
+en-US = "True"
+
+[RID_STR_EXCEL_FALSE]
+en-US = "False"
+
+[RID_STR_EXCEL_SUBISSUE_MAX_SHEETS_EXCEEDED]
+en-US = "Maximum Sheets Exceeded"
+
+[RID_STR_EXCEL_SUBISSUE_ATTRIBUTES]
+en-US = "Cell Attributes"
+
+[RID_STR_EXCEL_SUBISSUE_EXTERNAL]
+en-US = "External"
+
+[RID_STR_EXCEL_SUBISSUE_SHEET_CHART]
+en-US = "Sheet Chart"
+
+[RID_STR_EXCEL_SUBISSUE_EMBEDDED_CHART]
+en-US = "Embedded Chart"
+
+[RID_STR_EXCEL_SUBISSUE_INVALID_WORKSHEET_NAME]
+en-US = "Invalid Worksheet Name"
+
+[RID_STR_EXCEL_ATTRIBUTE_BADCHARACTER]
+en-US = "'<TOKEN1>' at pos <TOKEN2>"
+
+[RID_STR_EXCEL_ATTRIBUTE_DB_QUERY]
+en-US = "Connection string"
+
+[RID_STR_EXCEL_ATTRIBUTE_NAME]
+en-US = "Name"
+
+[RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_PIVOTFIELDS]
+en-US = "Number of PivotFields"
+
+[RID_STR_EXCEL_ATTRIBUTE_TITLE]
+en-US = "Title"
+
+[RID_STR_EXCEL_ATTRIBUTE_TYPE]
+en-US = "Type"
+
+[RID_STR_EXCEL_ATTRIBUTE_PIE]
+en-US = "Pie"
+
+[RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION]
+en-US = "Slices in diff. direction"
+
+[RID_STR_EXCEL_ATTRIBUTE_LEGEND_NAME]
+en-US = "Legend Name"
+
+[RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LEGEND_ENTRIES]
+en-US = "Number of Legend Entries"
+
+[RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME]
+en-US = "PivotTable Name"
+
+[RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE]
+en-US = "PivotFields Visible"
+
+[RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM]
+en-US = "Number of PivotFields"
+
+[RID_STR_EXCEL_ATTRIBUTE_PRINT_RANGE]
+en-US = "Print Range"
+
+[RID_STR_EXCEL_ATTRIBUTE_DISPLAY_ZOOM]
+en-US = "Display Zoom"
+
+[RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_SHEETS]
+en-US = "Number of Sheets"
+
+[RID_STR_EXCEL_ATTRIBUTE_LIST_SOURCE]
+en-US = "ListSource"
+
+[RID_STR_EXCEL_ATTRIBUTE_CUSTOM_FORMULA]
+en-US = "Custom Formula"
+
+[RID_STR_EXCEL_ATTRIBUTE_SET]
+en-US = "Set"
+
+[RID_STR_EXCEL_ATTRIBUTE_LINE_STYLE]
+en-US = "Line Style"
+
+[RID_STR_EXCEL_ATTRIBUTE_DASHED_DOT]
+en-US = "Dashed/Dot"
+
+[RID_STR_EXCEL_ATTRIBUTE_FILL_PATTERN]
+en-US = "Fill Pattern"
+
+[RID_STR_EXCEL_ATTRIBUTE_PATTERNED]
+en-US = "Patterned"
+
+[RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING]
+en-US = "Function String"
+
+[RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_OPEN]
+en-US = "Password to Open"
+
+[RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_MODIFY]
+en-US = "Password to Modify"
+
+[RID_STR_EXCEL_ATTRIBUTE_OBJECT_TYPE]
+en-US = "Object Type"
+
+[RID_STR_EXCEL_ATTRIBUTE_OBJECT_NAME]
+en-US = "Object Name"
+
+[RID_STR_EXCEL_ATTRIBUTE_SOURCE]
+en-US = "Source"
+
+[RID_STR_EXCEL_ATTRIBUTE_VALUE]
+en-US = "Value"
+
+[RID_STR_EXCEL_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT]
+en-US = "Unable to access VBProject"
+
+[RID_STR_EXCEL_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE]
+en-US = "Further macro analysis not possible"
+
+[RID_STR_EXCEL_ATTRIBUTE_VBPROJECT_PASSWORD_SET]
+en-US = "VBProject Password Set"
+
+[RID_STR_EXCEL_ATTRIBUTE_PROJECT]
+en-US = "Project"
+
+[RID_STR_EXCEL_ATTRIBUTE_COMPONENT]
+en-US = "Component"
+
+[RID_STR_EXCEL_ATTRIBUTE_PROCEDURES]
+en-US = "Procedures"
+
+[RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LINES]
+en-US = "Number of Lines"
+
+[RID_STR_EXCEL_ATTRIBUTE_CONTROLS]
+en-US = "Controls"
+
+[RID_STR_EXCEL_ATTRIBUTE_TYPES]
+en-US = "Types"
+
+[RID_STR_EXCEL_ATTRIBUTE_DESCRIPTION]
+en-US = "Description"
+
+[RID_STR_EXCEL_ATTRIBUTE_FILE]
+en-US = "File"
+
+[RID_STR_EXCEL_ATTRIBUTE_PATH]
+en-US = "Path"
+
+[RID_STR_EXCEL_ATTRIBUTE_MISSING]
+en-US = "MISSING"
+
+[RID_STR_EXCEL_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES]
+en-US = "Check document VB-IDE/Tools/References"
+
+[RID_STR_EXCEL_ATTRIBUTE_MAJOR]
+en-US = "Major"
+
+[RID_STR_EXCEL_ATTRIBUTE_MINOR]
+en-US = "Minor"
+
+[RID_STR_EXCEL_ATTRIBUTE_BUILT_IN]
+en-US = "Built In"
+
+[RID_STR_EXCEL_ATTRIBUTE_INTACT]
+en-US = "Intact"
+
+[RID_STR_EXCEL_ATTRIBUTE_TYPELIB]
+en-US = "TypeLib"
+
+[RID_STR_EXCEL_ATTRIBUTE_GUID]
+en-US = "GUID"
+
+[RID_STR_EXCEL_ATTRIBUTE_CUSTOM]
+en-US = "Custom"
+
+[RID_STR_EXCEL_ATTRIBUTE_IS_BROKEN]
+en-US = "Is Broken"
+
+[RID_STR_EXCEL_ATTRIBUTE_BROKEN]
+en-US = "Broken!"
+
+[RID_STR_EXCEL_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES]
+en-US = "Non Portable External References"
+
+[RID_STR_EXCEL_ATTRIBUTE_INCLUDING]
+en-US = "including:"
+
+[RID_STR_EXCEL_ATTRIBUTE_PASSWORD]
+en-US = "Password"
+
+[RID_STR_EXCEL_ENUMERATION_CUSTOM]
+en-US = "Custom"
+
+[RID_STR_EXCEL_ENUMERATION_LIST]
+en-US = "List"
+
+[RID_STR_EXCEL_ENUMERATION_UNKNOWN]
+en-US = "Unknown"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_CONTINUOUS]
+en-US = "Continuous"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASH]
+en-US = "Dash"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASHDOT]
+en-US = "DashDot"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOT]
+en-US = "Dot"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOUBLE]
+en-US = "Double"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_SLANTDASHDOT]
+en-US = "SlantDashDot"
+
+[RID_STR_EXCEL_ENUMERATION_LINE_STYLE_LINESTYLENONE]
+en-US = "LineStyleNone"
+
+[RID_STR_EXCEL_NOTE_DB_QUERY]
+en-US = "The connection to the database in <PRODUCTNAME> will be lost . The data will appear correctly but can not be updated."
+
+[RID_STR_EXCEL_NOTE_INVALIDWORKSHEETNAME]
+en-US = "The worksheet name contains characters that are not supported by <PRODUCTNAME>. Please rename your sheet and exclude these characters."
+
+[RID_STR_EXCEL_NOTE_ZOOM]
+en-US = "all sheets will have the same zoom irrespective of their Excel View/Zoom setting after migration to <PRODUCTNAME>"
+
+[RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_3]
+en-US = "this line style is imported as a solid line. Only solid line syles are supported in <PRODUCTNAME>"
+
+[RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_4]
+en-US = "this fill pattern is imported as a solid gray. Only solid fill patterns are supported in <PRODUCTNAME>"
+
+[RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_1]
+en-US = "this function returns platform dependent information specific to Windows and is not imported to <PRODUCTNAME>"
+
+[RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_2]
+en-US = "this function returns error codes specific to Excel and is imported in <PRODUCTNAME> as the stub function ErrorType() always returning Err.520"
+
+[RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_3]
+en-US = "this is an external function referenced from an Excel spreadsheet. It does not import correctly to <PRODUCTNAME>. The external reference is stripped and the resulting formula always returns #ADDIN?"
+
+[RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_1]
+en-US = "this summary property is lost"
+
+[RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_2]
+en-US = "this custom property is lost"
+
+[RID_STR_EXCEL_NOTE_SHEET_LIMITS_1]
+en-US = "all sheets will be lost in <PRODUCTNAME> that are greater than "
+
+[RID_STR_EXCEL_NOTE_SHEET_LIMITS_2]
+en-US = "all sheets must be moved to a new workbook before migration that are greater than "
+
+[RID_STR_EXCEL_SUBLOCATION_NA]
+en-US = "na"
+
+[RID_STR_EXCEL_SUBISSUE_WORKBOOK_PROTECTION]
+en-US = "Workbook Protection"
+
+[RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_SHARING]
+en-US = "Protection Sharing"
+
+[RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_STRUCTURE]
+en-US = "Protection Structure"
+
+[RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_WINDOWS]
+en-US = "Protection Windows"
+
+[RID_STR_EXCEL_NOTE_PASSWORD_TO_OPEN]
+en-US = "workbook is protected"
+
+[RID_STR_EXCEL_NOTE_DATATABLE]
+en-US = "no simple workaround, could copy the data table and paste below the chart"
+
+[RID_STR_EXCEL_NOTE_XAXISCATEGORY]
+en-US = "only category option supported. Setup your category labels you need on the sheet"
+
+[RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE1]
+en-US = "following chart types not supported"
+
+[RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE2]
+en-US = "pie of pie,exploded 3D pie,bar of pie,bubble,filled radar,exploded doughnut"
+
+[RID_STR_EXCEL_NOTE_TRENDLINE]
+en-US = "replace the trend line by drawing a line on the chart. You must click outside the chart when adding the line and drag it onto the chart. Objects created by clicking on the chart will not import"
+
+[RID_STR_EXCEL_NOTE_DATALABELWITHLEGEND]
+en-US = "after import into <PRODUCTNAME>, select Insert->Data Labels->show legend icon with label and the legend key will appear"
+
+[RID_STR_EXCEL_NOTE_LEGENDPOSITION]
+en-US = "only legend to the right is supported on import. Change legend position in <PRODUCTNAME> after import"
+
+[RID_STR_EXCEL_NOTE_TITLEFONT]
+en-US = "title font with different font size is not supported on import, set a sub-title in <PRODUCTNAME>, then change the font size"
+
+[RID_STR_EXCEL_NOTE_SERIESCHARTTYPE]
+en-US = "multiple series with different chart types. SO only supports one chart type for all series. Adjust the chart type to best display the series"
+
+[RID_STR_EXCEL_NOTE_DATASOURCENOTLINKEDTOCELL]
+en-US = "data sources to catalogue or other external sources not supported. Data source must be set to cell or range on the sheet"
+
+[RID_STR_EXCEL_NOTE_CATEGORYANDDATA]
+en-US = "category names must be located above or to the left of the value ranges"
+
+[RID_STR_EXCEL_NOTE_DATASOURCEONDIFFERENTSHEET]
+en-US = "data sources must be located on the same sheet. Paste the data sources onto the same sheet"
+
+[RID_STR_EXCEL_NOTE_CATEGORYLABELMORETHANONECELL]
+en-US = "category labels spanning multiple cells are not supported. Copy all the text to one cell"
+
+[RID_STR_EXCEL_NOTE_COLUMNBAR]
+en-US = "chart 'series in' must match the data source. For data source in single row, set 'series in' = row. For data source in single column, set 'series in' = column"
+
+[RID_STR_EXCEL_NOTE_BORDER]
+en-US = "chart border will not appear in <PRODUCTNAME>, before import,set border to none, draw a rectangle around the border of the chart"
+
+[RID_STR_EXCEL_NOTE_AXISINTERVAL]
+en-US = " y axis interval setting will be changed in <PRODUCTNAME>. Modify axes interval setting in <PRODUCTNAME>, re-set major interval scale"
+
+[RID_STR_EXCEL_ATTRIBUTE_DATATABLE]
+en-US = "Data Table"
+
+[RID_STR_EXCEL_ATTRIBUTE_INVALIDCHARACTER]
+en-US = "Invalid Characters"
+
+[RID_STR_EXCEL_ATTRIBUTE_XAXISCATEGORY]
+en-US = "Chart Axes"
+
+[RID_STR_EXCEL_ATTRIBUTE_TIMESCALE]
+en-US = "time scale/auto"
+
+[RID_STR_EXCEL_ATTRIBUTE_UNSUPPORTEDTYPE]
+en-US = "Unsupported Chart Type"
+
+[RID_STR_EXCEL_ATTRIBUTE_TRENDLINE]
+en-US = "Trendline"
+
+[RID_STR_EXCEL_ATTRIBUTE_DATALABELWITHLEGEND]
+en-US = "Data Label With Legend"
+
+[RID_STR_EXCEL_ATTRIBUTE_LEGENDPOSITION]
+en-US = "Legend Position"
+
+[RID_STR_EXCEL_ATTRIBUTE_TITLEFONT]
+en-US = "Title Font"
+
+[RID_STR_EXCEL_ATTRIBUTE_DIFFERENT]
+en-US = "Different"
+
+[RID_STR_EXCEL_ATTRIBUTE_SERIESCHARTTYPE]
+en-US = "Multiple series chart type"
+
+[RID_STR_EXCEL_ATTRIBUTE_CHANGED]
+en-US = "changed"
+
+[RID_STR_EXCEL_ATTRIBUTE_DATASOURCE]
+en-US = "Data Source"
+
+[RID_STR_EXCEL_ATTRIBUTE_DATASOURCENOTLINKEDTOCELL]
+en-US = "Not Linked To A Cell"
+
+[RID_STR_EXCEL_ATTRIBUTE_CATEGORYANDDATA]
+en-US = "Category And Data"
+
+[RID_STR_EXCEL_ATTRIBUTE_SEPARATE]
+en-US = "Separate"
+
+[RID_STR_EXCEL_ATTRIBUTE_DATASOURCEONDIFFERENTSHEET]
+en-US = "On Different Sheet"
+
+[RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABEL]
+en-US = "Category Label"
+
+[RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABELMORETHANONECELL]
+en-US = "More Than One Cell"
+
+[RID_STR_EXCEL_ATTRIBUTE_COLUMNBAR]
+en-US = "Column/Bar Chart"
+
+[RID_STR_EXCEL_ATTRIBUTE_ONECOLUMNROW]
+en-US = "Data Source With Single Column/ Chart Series In Row"
+
+[RID_STR_EXCEL_ATTRIBUTE_BORDER]
+en-US = "Border"
+
+[RID_STR_EXCEL_ATTRIBUTE_AXISINTERVAL]
+en-US = "Y Axis Interval"
+
+[RID_STR_EXCEL_ATTRIBUTE_AUTO]
+en-US = "Auto"
+
+[RID_STR_EXCEL_ATTRIBUTE_CHARTNAME]
+en-US = "Chart Name"
+
+[RID_STR_EXCEL_SUBISSUE_CHART_COMPLEX]
+en-US = "Chart Issues Complex"
+
+[RID_STR_EXCEL_SUBISSUE_CHART_MINOR]
+en-US = "Chart Issues Minor"
+
+[RID_STR_EXCEL_ATTRIBUTE_NOTRIGHT]
+en-US = "not at right hand side"
+
+[RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS]
+en-US = "number cells effected"
+
+[RID_STR_PP_TRUE]
+en-US = "True"
+
+[RID_STR_PP_FALSE]
+en-US = "False"
+
+[RID_STR_PP_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES]
+en-US = "Objects, Graphics and Textboxes"
+
+[RID_STR_PP_SUBISSUE_COMMENT]
+en-US = "Comment"
+
+[RID_STR_PP_SUBISSUE_MOVIE]
+en-US = "Movie"
+
+[RID_STR_PP_ATTRIBUTE_CONTENT]
+en-US = "Content"
+
+[RID_STR_PP_ATTRIBUTE_LOOP]
+en-US = "Loop"
+
+[RID_STR_PP_ATTRIBUTE_PLAYONENTRY]
+en-US = "PlayOnEntry"
+
+[RID_STR_PP_ATTRIBUTE_REWIND]
+en-US = "Rewind"
+
+[RID_STR_PP_ATTRIBUTE_TYPES]
+en-US = "Types"
+
+[RID_STR_PP_ENUMERATION_VIEW_HANDOUT_MASTER]
+en-US = "View Handout Master"
+
+[RID_STR_PP_ENUMERATION_VIEW_NORMAL]
+en-US = "View Normal"
+
+[RID_STR_PP_ENUMERATION_VIEW_NOTES_MASTER]
+en-US = "View Notes Master"
+
+[RID_STR_PP_ENUMERATION_VIEW_NOTES_PAGE]
+en-US = "View Notes Page"
+
+[RID_STR_PP_ENUMERATION_VIEW_OUTLINE]
+en-US = "View Outline"
+
+[RID_STR_PP_ENUMERATION_VIEW_SLIDE]
+en-US = "View Slide"
+
+[RID_STR_PP_ENUMERATION_VIEW_SLIDE_MASTER]
+en-US = "View Slide Master"
+
+[RID_STR_PP_ENUMERATION_VIEW_SLIDE_SORTER]
+en-US = "View Slide Sorter"
+
+[RID_STR_PP_ENUMERATION_VIEW_TITLE_MASTER]
+en-US = "View Title Master"
+
+[RID_STR_PP_ENUMERATION_UNKNOWN]
+en-US = "Unknown"
+
+[RID_RESXLS_COST_Action_Settings]
+en-US = "Action Settings"
+
+[RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field]
+en-US = "Add custom properties to document Properties Summary Comments field."
+
+[RID_RESXLS_COST_Additional_Weighting_Factors]
+en-US = "Additional Weighting Factors"
+
+[RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook]
+en-US = "All sheets >256 will need to be moved to a new workbook"
+
+[RID_RESXLS_COST_Appearance]
+en-US = "Appearance"
+
+[RID_RESXLS_COST_Application]
+en-US = "Application"
+
+[RID_RESXLS_COST_AutoFilter]
+en-US = "AutoFilter"
+
+[RID_RESXLS_COST_Border_Styles]
+en-US = "Border Styles"
+
+[RID_RESXLS_COST_Cell_Attributes]
+en-US = "Cell Attributes"
+
+[RID_RESXLS_COST_CELL_SPAN_WORKAROUND]
+en-US = "Add extra row below cell. Cut and paste contents running onto 2nd page into new cell."
+
+[RID_RESXLS_COST_Cell_Spanning_Page]
+en-US = "Cell Spanning Page"
+
+[RID_RESXLS_COST_ChangesAndReviewing]
+en-US = "Changes And Reviewing"
+
+[RID_RESXLS_COST_Charts_And_Tables]
+en-US = "Charts And Tables"
+
+[RID_RESXLS_COST_Comment]
+en-US = "Comment"
+
+[RID_RESXLS_COST_Content_And_Document_Properties]
+en-US = "Content And Document Properties"
+
+[RID_RESXLS_COST_ContentAndDocumentProperties]
+en-US = "Content And Document Properties"
+
+[RID_RESXLS_COST_Controls]
+en-US = "Controls"
+
+[RID_RESXLS_COST_Cost]
+en-US = "Cost Comment"
+
+[RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min]
+en-US = "Cost: In simple cases cut and paste to new sheet. 3 - 5 min. May exist functions that refer to these cells. 10+"
+
+[RID_RESXLS_COST_COST_0]
+en-US = "Cost = 0. No work around."
+
+[RID_RESXLS_COST_COST_EMBED_CHART]
+en-US = "Variations in cost can range from 0 - 30 mins. Cost caused by uneven data souce, external data source, unsupported chart types, floating legend position."
+
+[RID_RESXLS_COST_COST_ERROR_TYPE]
+en-US = "Fix up cost can vary depending on the context in which this is used. Cost 3 - 5"
+
+[RID_RESXLS_COST_COST_INFO]
+en-US = "Fix up cost can vary depending on the context in which this is used. Cost 2 - 4"
+
+[RID_RESXLS_COST_COST_INVAL_PASS]
+en-US = "Cost = 0. Rerun analysis with correct password."
+
+[RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME]
+en-US = "Aufewand: Vergewissern Sie sich nach der Umbenennung, dass alle Makros mit Verweisen auf dieses Arbeitsblatt ebenfalls angepaßt werden. Der Aufwand hängt von der Zahl der Codezeilen ab, die auf den Arbeitsblattnamen verweisen."
+en-US = "Cost: When the worksheet has been renamed, ensure that all macros with a reference to the worksheet are also renamed accordingly. Cost depends on how many lines of code there are that refer to the worksheet name."
+
+[RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on]
+en-US = "Cost of 4 min per line, takes no account of complexity of code, number of comment lines and so on"
+
+[RID_RESXLS_COST_Cost_per_Issue_or_Factor__min]
+en-US = "Cost per Issue or Factor (min)"
+
+[RID_RESXLS_COST_COST_PIVOT]
+en-US = "Cost = 0. Calc does not support dynamically created charts. No workaround."
+
+[RID_RESXLS_COST_COST_SHEET_CHART]
+en-US = "Variations in cost can range from 0 - 30 mins. Cost caused by uneven data souce, external data source, unsupported chart types, floating legend position."
+
+[RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls]
+en-US = "Cost variations occur because of the use of macros with controls."
+
+[RID_RESXLS_COST_COST_VBA_CONT_TYPE]
+en-US = "Cost = 0. Total number of controls better estimate - this information is useful as an indication of complexity of the Forms."
+
+[RID_RESXLS_COST_COST_VBA_CONTROLS]
+en-US = "Cost = 3 minute per control, this does not take account of issues with Frame controls or the number of these controls that have event handlers that need manually linked to migrated code."
+
+[RID_RESXLS_COST_COST_VBA_FORMS]
+en-US = "Cost = 0. Using total number of controls on forms as better estimate"
+
+[RID_RESXLS_COST_COST_VBA_LOC]
+en-US = "Cost of 4 min per line, takes no account of complexity of code, number of comment lines and so on"
+
+[RID_RESXLS_COST_COST_VBA_PROPS]
+en-US = "Cost = 0 using lines of code as better cost estimate."
+
+[RID_RESXLS_COST_Costs__min]
+en-US = "Costs (min)"
+
+[RID_RESXLS_COST_Custom_Bullet_List]
+en-US = "Custom Bullet List"
+
+[RID_RESXLS_COST_Document_Custom_Properties]
+en-US = "Document Custom Properties"
+
+[RID_RESXLS_COST_Document_Parts_Protection]
+en-US = "Document Parts Protection"
+
+[RID_RESXLS_COST_Embedded_Chart]
+en-US = "Chart Issues Minor"
+
+[RID_RESXLS_COST_embedded_objects]
+en-US = "Cost = 0. Most embedded objects come across. If one does not then this may require some reenginering and is not in the scope of an automated cost calculation."
+
+[RID_RESXLS_COST_Embedded_OLE_Object]
+en-US = "Embedded OLE Object"
+
+[RID_RESXLS_COST_Excel]
+en-US = "Excel"
+
+[RID_RESXLS_COST_Excel_Totals]
+en-US = "Excel Totals"
+
+[RID_RESXLS_COST_External]
+en-US = "External"
+
+[RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm]
+en-US = "External References In Macro - Module, Class or UserForm"
+
+[RID_RESXLS_COST_Factor_Count]
+en-US = "Factor Count"
+
+[RID_RESXLS_COST_Fields]
+en-US = "Fields"
+
+[RID_RESXLS_COST_Filters]
+en-US = "Filters"
+
+[RID_RESXLS_COST_Fixed_SO7]
+en-US = "Fixed <PRODUCTNAME> <PRODUCTVERSION>"
+
+[RID_RESXLS_COST_Form_Field]
+en-US = "Form Field"
+
+[RID_RESXLS_COST_Format]
+en-US = "Format"
+
+[RID_RESXLS_COST_Functions]
+en-US = "Functions"
+
+[RID_RESXLS_COST_Zoom]
+en-US = "Zoom"
+
+[RID_RESXLS_COST_HEADERFOOTER_WORKAROUND]
+en-US = "Insert carriage returns to resize header/ footer to the size of the graphic."
+
+[RID_RESXLS_COST_Hours_Per_MD]
+en-US = "Hours Per MD ="
+
+[RID_RESXLS_COST_Indexes_And_References]
+en-US = "Indexes And References"
+
+[RID_RESXLS_COST_Invalid_Password_Entered]
+en-US = "Invalid Password Entered"
+
+[RID_RESXLS_COST_Invalid_Worksheet_Name]
+en-US = "Invalid Worksheet Name"
+
+[RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly]
+en-US = "Issue: 18 of the 24 table border styles do not display correctly."
+
+[RID_RESXLS_COST_Issue__256_sheet_limit_exceeded]
+en-US = "Issue: 256 sheet limit exceeded."
+
+[RID_RESXLS_COST_Issue__32000_row_limit_exceeded]
+en-US = "Issue: 32000 row limit exceeded."
+
+[RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters]
+en-US = "Issue: A worksheet in the workbook has a name with invalid characters."
+
+[RID_RESXLS_COST_Issue__AutoFilter_does_not_function_properly]
+en-US = "Issue: AutoFilter does not function properly."
+
+[RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific]
+en-US = "Issue: Calls to windows API functions are windows specific."
+
+[RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7]
+en-US = "Issue: Chart support is limited in <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7]
+en-US = "Issue: Comments are lost on migration to <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration]
+en-US = "Issue: Custom Properties are lost on migration"
+
+[RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO]
+en-US = "Issue: Document is password protected and cannot be opened by SO."
+
+[RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7]
+en-US = "Issue: External functions not supported by <PRODUCTNAME>"
+
+[RID_RESXLS_COST_Issue__External_references_are_windows_specific]
+en-US = "Issue: External references are windows specific."
+
+[RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset]
+en-US = "Issue: Fields are imported but need to have the link to data source reset."
+
+[RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced]
+en-US = "Issue: Graphics & frames in header footer tend to be misplaced."
+
+[RID_RESXLS_COST_Issue__Incorrect_password_entered]
+en-US = "Issue: Incorrect password entered. "
+
+[RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration]
+en-US = "Issue: Information relating to the data source is lost in migration."
+
+[RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis]
+en-US = "Issue: Invalid password entered. Rerun analysis."
+
+[RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent]
+en-US = "Issue: Lost during migration. No <PRODUCTNAME> equivalent."
+
+[RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7]
+en-US = "Issue: Macros from old workbook versions do not import into SO9."
+
+[RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic]
+en-US = "Issue: Modules will need porting to <PRODUCTNAME> Basic."
+
+[RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip]
+en-US = "Issue: Most migrate ok but do not roundtrip."
+
+[RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7]
+en-US = "Issue: Movies are not supported by <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7]
+en-US = "Issue: Need to set these to be included in TOC in <PRODUCTNAME>"
+
+[RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost]
+en-US = "Issue: Password protection of comments, tracked changes and forms is lost."
+
+[RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7]
+en-US = "Issue: Pivot charts are not supported by <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue]
+en-US = "Issue: Presents a cross platform interoperability issue."
+
+[RID_RESXLS_COST_Issue__Print_wide_pages_not_supported]
+en-US = "Issue: Print wide pages not supported."
+
+[RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word]
+en-US = "Issue: Shading can be applied to fields and to controls separately in Word. <PRODUCTNAME> does not differentiate between controls and fields so shading can look different in Writer."
+
+[RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent]
+en-US = "Issue: Table imported as text as no <PRODUCTNAME> equivalent."
+
+[RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7]
+en-US = "Issue: Tables nested in tables are not supported by <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration]
+en-US = "Issue: Tabs are incorrect after migration. Certain format types do not migrate to <PRODUCTNAME>."
+
+[RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field]
+en-US = "Issue: Text form fields roundtrip as Fill In field. Field attributes are lost."
+
+[RID_RESXLS_COST_Issue__Unsupported_formatting_set]
+en-US = "Issue: Unsupported formatting set."
+
+[RID_RESXLS_COST_Issue__Unsupported_function_type]
+en-US = "Issue: Unsupported function type. "
+
+[RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic]
+en-US = "Issue: Userform controls will need porting to <PRODUCTNAME> Basic."
+
+[RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic]
+en-US = "Issue: Userform controls will need porting to <PRODUCTNAME> Basic."
+
+[RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic]
+en-US = "Issue: Userforms will need porting to <PRODUCTNAME> Basic."
+
+[RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis]
+en-US = "Issue: VBProject is password protected. Remove password, rerun analysis."
+
+[RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported]
+en-US = "Issue: Will need refreshing in <PRODUCTNAME>. External data sources and functions are not supported"
+
+[RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported]
+en-US = "Issue: Workbook protection is not supported"
+
+[RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page]
+en-US = "Issue: Writer cannot correctly display cells spanning more than 1 page."
+
+[RID_RESXLS_COST_Issue_Category]
+en-US = "Issue Category"
+
+[RID_RESXLS_COST_Issue_Count]
+en-US = " Issue Count"
+
+[RID_RESXLS_COST_Issue_Type]
+en-US = "Issue Type"
+
+[RID_RESXLS_COST_Linked_OLE_Object]
+en-US = "Linked OLE Object"
+
+[RID_RESXLS_COST_Mail_Merge_Datasource]
+en-US = "Mail Merge Data Source"
+
+[RID_RESXLS_COST_Mail_Merge_Field]
+en-US = "Mail Merge Field"
+
+[RID_RESXLS_COST_Major_Issue]
+en-US = "Complex Issue"
+
+[RID_RESXLS_COST_MAX_SHEETS_WORKAROUND]
+en-US = "Need to move sheets to new workbook. "
+
+[RID_RESXLS_COST_Maximum_Rows_Exceeded]
+en-US = "Maximum Rows Exceeded"
+
+[RID_RESXLS_COST_Maximum_Sheets_Exceeded]
+en-US = "Maximum Sheets Exceeded"
+
+[RID_RESXLS_COST_Migration_Issues_Costs]
+en-US = "Migration Issues Analyzed"
+
+[RID_RESXLS_COST_Movie]
+en-US = "Movie"
+
+[RID_RESXLS_COST_NESTED_TABLE_WORKAROUND]
+en-US = "In word use split cell to create similar layout."
+
+[RID_RESXLS_COST_Nested_Tables]
+en-US = "Nested Tables"
+
+[RID_RESXLS_COST_Not_Planned]
+en-US = "Not Planned"
+
+[RID_RESXLS_COST_Notes_And_Handouts]
+en-US = "Notes And Handouts"
+
+[RID_RESXLS_COST_Number_Of_External_References]
+en-US = "Number Of External References"
+
+[RID_RESXLS_COST_Number_Of_Lines]
+en-US = "Number Of Lines"
+
+[RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules]
+en-US = "Number of Lines in Unique Code Modules"
+
+[RID_RESXLS_COST_Number_of_Modules]
+en-US = "Number of Modules"
+
+[RID_RESXLS_COST_Number_of_Unique_Modules]
+en-US = "Number of Unique Code Modules"
+
+[RID_RESXLS_COST_Numbering_Reference]
+en-US = "Numbering Reference"
+
+[RID_RESXLS_COST_Numbering_Reference_Comment]
+en-US = "Issue: <PRODUCTNAME> can not import references that refer in a numbered list."
+
+[RID_RESXLS_COST_Object_In_Header_Footer]
+en-US = "Object In Header Footer"
+
+[RID_RESXLS_COST_Objects_And_Graphics]
+en-US = "Objects And Graphics"
+
+[RID_RESXLS_COST_Objects_Graphics_And_Frames]
+en-US = "Objects Graphics And Frames"
+
+[RID_RESXLS_COST_Objects_Graphics_And_Textboxes]
+en-US = "Objects Graphics And Textboxes"
+
+[RID_RESXLS_COST_Old_Workbook_Version]
+en-US = "Old Workbook Version"
+
+[RID_RESXLS_COST_OLE_Control]
+en-US = "OLE Control"
+
+[RID_RESXLS_COST_OLECONTR_COST]
+en-US = "Cost variations occur because of the use of macros with controls."
+
+[RID_RESXLS_COST_Page_Setup]
+en-US = "Page Setup"
+
+[RID_RESXLS_COST_Password_Protected]
+en-US = "Password Protected"
+
+[RID_RESXLS_COST_Password_Protection]
+en-US = "Password Protection"
+
+[RID_RESXLS_COST_Pivot]
+en-US = "Pivot Chart"
+
+[RID_RESXLS_COST_Planned_SO8]
+en-US = "Planned"
+
+[RID_RESXLS_COST_Portability]
+en-US = "Portability"
+
+[RID_RESXLS_COST_PowerPoint]
+en-US = "PowerPoint"
+
+[RID_RESXLS_COST_PowerPoint_Totals]
+en-US = "PowerPoint Totals"
+
+[RID_RESXLS_COST_Prepared_Issue_Count]
+en-US = "Prepared Issue Count"
+
+[RID_RESXLS_COST_Prepared_Savings__min]
+en-US = "Prepared Savings (min)"
+
+[RID_RESXLS_COST_Properties___Module__Class_or_UserForm]
+en-US = "Properties - Module, Class or UserForm"
+
+[RID_RESXLS_COST_Remove_password_to_open]
+en-US = "Remove password to open."
+
+[RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name]
+en-US = "Remove the invalid characters from the worksheet name."
+
+[RID_RESXLS_COST_Rerun_analysis_with_correct_password]
+en-US = "Rerun analysis with correct password."
+
+[RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7]
+en-US = "Reset link to database having setup a data source in <PRODUCTNAME>."
+
+[RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows]
+en-US = "Cost = 0. Set a cost factor if the macro has to be ported off Windows. "
+
+[RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version]
+en-US = "Save workbook as a new workbook version."
+
+[RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource]
+en-US = "Setup data source in <PRODUCTNAME> using Tools/Data source"
+
+[RID_RESXLS_COST_Sheet_Chart]
+en-US = "Chart Issues Complex"
+
+[RID_RESXLS_COST_Status]
+en-US = "Status"
+
+[RID_RESXLS_COST_Table_Of_Authorities]
+en-US = "Table Of Authorities"
+
+[RID_RESXLS_COST_Table_Of_Authorities_Field]
+en-US = "Table Of Authorities Field"
+
+[RID_RESXLS_COST_Table_Of_Contents]
+en-US = "Table Of Contents"
+
+[RID_RESXLS_COST_Tables]
+en-US = "Tables"
+
+[RID_RESXLS_COST_TOC_ISSUE_WORKAROUND]
+en-US = "Tab Issues: use fancy format. Numbering incorrect: remove blank lines with heading style used by TOC. Numbering abuts Header: replace leading tabs in Header style used in TOC with spaces."
+
+[RID_RESXLS_COST_Total_Cost___MD]
+en-US = "Total Cost (MD) = "
+
+[RID_RESXLS_COST_User_Error]
+en-US = "User Error"
+
+[RID_RESXLS_COST_User_Forms_Control_Count]
+en-US = "User Forms Control Count"
+
+[RID_RESXLS_COST_User_Forms_Control_Type_Count]
+en-US = "User Forms Control Type Count"
+
+[RID_RESXLS_COST_User_Forms_Count]
+en-US = "User Forms Count"
+
+[RID_RESXLS_COST_VBA_Macros]
+en-US = "VBA Macros"
+
+[RID_RESXLS_COST_Word]
+en-US = "Word"
+
+[RID_RESXLS_COST_Word_Totals]
+en-US = "Word Totals"
+
+[RID_RESXLS_COST_Work_Around]
+en-US = "Work Around"
+
+[RID_RESXLS_COST_Workaround_Remove_protection_before_importing]
+en-US = "Remove protection before importing"
+
+[RID_RESXLS_COST_WorkbookProtection]
+en-US = "WorkbookProtection "
+
+[RID_RESXLS_DP_Accessed]
+en-US = "Accessed"
+
+[RID_RESXLS_DP_All_Analysed_Documents___Properties]
+en-US = "All Analysed Documents - properties"
+
+[RID_RESXLS_DP_Application]
+en-US = "Application"
+
+[RID_RESXLS_DP_Based_on_Template]
+en-US = "Based on Template"
+
+[RID_RESXLS_DP_Costs]
+en-US = "Costs"
+
+[RID_RESXLS_DP_Created]
+en-US = "Created"
+
+[RID_RESXLS_DP_Document_Details]
+en-US = "Document Details"
+
+[RID_RESXLS_DP_Document_Issue_Costs]
+en-US = "Document Migration Costs (min)"
+
+[RID_RESXLS_DP_Document_Migration_Issues]
+en-US = "Document Migration Issues"
+
+[RID_RESXLS_DP_Document_Name]
+en-US = "Document Name"
+
+[RID_RESXLS_DP_Document_Name_and_Path]
+en-US = "Document Name and Path"
+
+[RID_RESXLS_DP_Issues_Complex_count]
+en-US = "Issues Complex Count"
+
+[RID_RESXLS_DP_Last_Saved_By]
+en-US = "Last Saved By"
+
+[RID_RESXLS_DP_Lines_of_Macro_Code]
+en-US = "Lines of Macro Code"
+
+[RID_RESXLS_DP_Macro_Issues]
+en-US = "Macro Migration Issues"
+
+[RID_RESXLS_DP_Macro_Migration_Costs]
+en-US = "Macro Migration Costs (min)"
+
+[RID_RESXLS_DP_Macro_Migration_Issues]
+en-US = "Macro Migration Issues"
+
+[RID_RESXLS_DP_Migration_Issues]
+en-US = "Document Migration Issues"
+
+[RID_RESXLS_DP_Minor_Issues]
+en-US = "Issues Minor Count"
+
+[RID_RESXLS_DP_Modified]
+en-US = "Modified"
+
+[RID_RESXLS_DP_Pages_Sheets_Slides]
+en-US = "Pages, Sheets or Slides Count"
+
+[RID_RESXLS_DP_Prepareable_Issues_Costs]
+en-US = "Prepareable Issues Savings (min)"
+
+[RID_RESXLS_DP_Prepared_Issues]
+en-US = "Prepareable Document Issues"
+
+[RID_RESXLS_DP_Printed]
+en-US = "Printed"
+
+[RID_RESXLS_DP_Revision]
+en-US = "Revision"
+
+[RID_RESXLS_DP_User_Form_Count]
+en-US = "User Form Count"
+
+[RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details]
+en-US = "All Documents with Issues - Issue Details"
+
+[RID_RESXLS_ID_Application]
+en-US = "Application"
+
+[RID_RESXLS_ID_Column__Left]
+en-US = "Column/ Left"
+
+[RID_RESXLS_ID_Document_Name]
+en-US = "Document Name"
+
+[RID_RESXLS_ID_Document_Name_and_Path]
+en-US = "Document Name and Path"
+
+[RID_RESXLS_ID_Issue_Category]
+en-US = "Issue Category"
+
+[RID_RESXLS_ID_Issue_Details]
+en-US = "Issue Details"
+
+[RID_RESXLS_ID_Issue_Type]
+en-US = "Issue Type"
+
+[RID_RESXLS_ID_Line__Row__Top]
+en-US = "Line/ Row/ Top"
+
+[RID_RESXLS_ID_Location]
+en-US = "Location"
+
+[RID_RESXLS_ID_Location_Type]
+en-US = "Location Type"
+
+[RID_RESXLS_OV_3_to_6_months]
+en-US = "3 - 6 months"
+
+[RID_RESXLS_OV_6_to_12_months]
+en-US = "6 - 12 months"
+
+[RID_RESXLS_OV_Complex]
+en-US = "Complex"
+
+[RID_RESXLS_OV_Cost_estimates_for_migration]
+en-US = "Cost estimates for migration of all analyzed documents"
+
+[RID_RESXLS_OV_Costs]
+en-US = "Costs (MD)"
+
+[RID_RESXLS_OV_Docs_with_DocumentMigrationIssues]
+en-US = "Documents with Document Migration Issues (excludes macro issues)"
+
+[RID_RESXLS_OV_Document_Migration_Costs]
+en-US = "Document Migration Costs<CR>( costs based on: issues listed in Issues Analyzed, excludes macros issues )"
+
+[RID_RESXLS_OV_Document_Modification_Dates]
+en-US = "Document Modification Dates"
+
+[RID_RESXLS_OV_Document_Type]
+en-US = "Type"
+
+[RID_RESXLS_OV_Documents_with_Macro_Migration_Issues]
+en-US = "Documents with Macro Migration Issues"
+
+[RID_RESXLS_OV_Excel]
+en-US = "Excel"
+
+[RID_RESXLS_OV_Excel_Costs]
+en-US = "Excel "
+
+[RID_RESXLS_OV_Excel_Spreadsheet]
+en-US = " Spreadsheets (.xls)"
+
+[RID_RESXLS_OV_Excel_Template]
+en-US = " Templates (.xlt)"
+
+[RID_RESXLS_OV_GREATER_THAN_1_year]
+en-US = "> 1 year"
+
+[RID_RESXLS_OV_Last_Modified]
+en-US = "Last Modified"
+
+[RID_RESXLS_OV_LESS_3_months]
+en-US = "< 3 months"
+
+[RID_RESXLS_OV_LESS_THAN3MONTHS]
+en-US = "Templates (.dot)"
+
+[RID_RESXLS_OV_Macro_Migration_Costs]
+en-US = "Manual Macro Migration Costs<CR>( costs based on: number of lines in unique code modules and number of user form controls )"
+
+[RID_RESXLS_OV_Medium]
+en-US = "Medium"
+
+[RID_RESXLS_OV_Minor]
+en-US = "Minor"
+
+[RID_RESXLS_OV_None]
+en-US = "None"
+
+[RID_RESXLS_OV_Number]
+en-US = "Number"
+
+[RID_RESXLS_OV_Number_of_Documents_Analyzed]
+en-US = "Number of Documents Analyzed"
+
+[RID_RESXLS_OV_NumberOfDocs]
+en-US = "Number of docs"
+
+[RID_RESXLS_OV_Potential_savings_macro_conversion]
+en-US = "Potential Savings with Automated Macro Migration of 20 to 60%"
+
+[RID_RESXLS_OV_Potential_savings_prepared_docs]
+en-US = "Potential Savings with Automated Preparation"
+
+[RID_RESXLS_OV_PowerPoint]
+en-US = "PowerPoint"
+
+[RID_RESXLS_OV_PowerPoint_Costs]
+en-US = "PowerPoint "
+
+[RID_RESXLS_OV_PowerPoint_Document]
+en-US = " Presentations (.ppt)"
+
+[RID_RESXLS_OV_PowerPoint_Template]
+en-US = " Templates (.pot)"
+
+[RID_RESXLS_OV_Simple]
+en-US = "Simple"
+
+[RID_RESXLS_OV_Total]
+en-US = "Total"
+
+[RID_RESXLS_OV_Totals]
+en-US = "Totals"
+
+[RID_RESXLS_OV_Word]
+en-US = "Word"
+
+[RID_RESXLS_OV_Word_Costs]
+en-US = "Word "
+
+[RID_RESXLS_OV_Word_Document]
+en-US = "Documents (.doc)"
+
+[RID_RESXLS_OV_Word_Template]
+en-US = "Templates (.dot)"
+
+[RID_RESXLS_PP_Action_Settings]
+en-US = "Action Settings"
+
+[RID_RESXLS_PP_Application]
+en-US = "Application"
+
+[RID_RESXLS_PP_Content___Document_Properties]
+en-US = "Content & Document Properties"
+
+[RID_RESXLS_PP_Document_Name_and_Path]
+en-US = "Document Name and Path"
+
+[RID_RESXLS_PP_Fields]
+en-US = "Fields"
+
+[RID_RESXLS_PP_Format]
+en-US = "Format"
+
+[RID_RESXLS_PP_Notes___Handouts]
+en-US = "Notes & Handouts"
+
+[RID_RESXLS_PP_Objects__Graphics___Textboxes]
+en-US = "Objects, Graphics & Textboxes"
+
+[RID_RESXLS_PP_Portability]
+en-US = "Portability"
+
+[RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary]
+en-US = "PowerPoint Documents with Issues - Issue Summary"
+
+[RID_RESXLS_PP_PowerPoint_Presentation_Name]
+en-US = "PowerPoint Presentation Name"
+
+[RID_RESXLS_PP_VBA_Macros]
+en-US = "VBA Macros"
+
+[RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details]
+en-US = "All Documents with Macros - Reference Details"
+
+[RID_RESXLS_RD_Application]
+en-US = "Application"
+
+[RID_RESXLS_RD_Description]
+en-US = "Description"
+
+[RID_RESXLS_RD_Document_Name]
+en-US = "Document Name"
+
+[RID_RESXLS_RD_Document_Name_and_Path]
+en-US = "Document Name and Path"
+
+[RID_RESXLS_RD_Location]
+en-US = "Location"
+
+[RID_RESXLS_RD_Reference]
+en-US = "Reference"
+
+[RID_RESXLS_RD_Reference_Details]
+en-US = "Reference Details"
+
+[RID_RESXLS_WI_Application]
+en-US = "Application"
+
+[RID_RESXLS_WI_Changes_and_Reviewing]
+en-US = "Changes and Reviewing"
+
+[RID_RESXLS_WI_Content___Document_Properties]
+en-US = "Content & Document Properties"
+
+[RID_RESXLS_WI_Controls]
+en-US = "Controls"
+
+[RID_RESXLS_WI_Document_Name_and_Path]
+en-US = "Document Name and Path"
+
+[RID_RESXLS_WI_Fields]
+en-US = "Fields"
+
+[RID_RESXLS_WI_Format]
+en-US = "Format"
+
+[RID_RESXLS_WI_Index_and_References]
+en-US = "Index and References"
+
+[RID_RESXLS_WI_Objects__Graphics____Frames]
+en-US = "Objects, Graphics & Frames"
+
+[RID_RESXLS_WI_Portability]
+en-US = "Portability"
+
+[RID_RESXLS_WI_Tables]
+en-US = "Tables"
+
+[RID_RESXLS_WI_VBA_Macros]
+en-US = "VBA Macros"
+
+[RID_RESXLS_WI_Word_Document_Name]
+en-US = "Word Document Name"
+
+[RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary]
+en-US = "Word Documents with Issues - Issue Summary"
+
+[RID_RESXLS_XL_Application]
+en-US = "Application"
+
+[RID_RESXLS_XL_Changes___Reviewing]
+en-US = "Changes & Reviewing"
+
+[RID_RESXLS_XL_Charts___Tables]
+en-US = "Charts & Tables"
+
+[RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary]
+en-US = "Excel Documents with Issues - Issue Summary"
+
+[RID_RESXLS_XL_Excel_Spreadsheet_Name]
+en-US = "Excel Spreadsheet Name"
+
+[RID_RESXLS_XL_Filters]
+en-US = "Filters"
+
+[RID_RESXLS_XL_Format]
+en-US = "Format"
+
+[RID_RESXLS_XL_Functions]
+en-US = "Functions"
+
+[RID_RESXLS_XL_Objects___Graphics]
+en-US = "Objects & Graphics"
+
+[RID_STR_DVR_XL_EXCEL_DRIVER]
+en-US = "Excel Driver"
+
+[RID_STR_DVR_XL_ISSUES]
+en-US = "2. Issues"
+
+[RID_STR_DVR_XL_PURPOSE]
+en-US = "1. Purpose"
+
+[RID_STR_DVR_XL_READ_README]
+en-US = "If there are any problems running the Wizard please refer to the Readme.doc"
+
+[RID_STR_DVR_XL_THE_MACROS]
+en-US = "The macros in this document are used by the Analysis Wizard to analyze the collection of Excel documents you specify using the Wizard. It should not be modified in any way, the Wizard will open and close it as required by the tool."
+
+[RID_STR_DVR_XL_THIS_DOC]
+en-US = "This document contains VBA macros which collect and analyse Excel documents for known issues when importing into <PRODUCTNAME>"
+
+[RID_STR_DVR_XL_TITLE]
+en-US = "<PRODUCTNAME> Migration Analysis - Excel Driver"
+
+[RID_STR_DVR_PP_TXT2]
+en-US = "This document contains VBA macros which collect and analyse PowerPoint documents for known issues when importing into <PRODUCTNAME>"
+
+[RID_STR_DVR_PP_TXT3]
+en-US = "<PRODUCTNAME> Migration Analysis - PowerPoint Driver"
+
+[RID_STR_DVR_PP_TXT4]
+en-US = "PowerPoint Driver"
+
+[RID_STR_DVR_PP_TXT5]
+en-US = "Purpose"
+
+[RID_STR_DVR_PP_TXT6]
+en-US = "The macros in this document are used by the Analysis Wizard to analyze the collection of PowerPoint documents you specify using the Wizard. It should not be modified in any way, the Wizard will open and close it as required by the tool."
+
+[RID_STR_DVR_PP_TXT7]
+en-US = "Issues"
+
+[RID_STR_DVR_PP_TXT8]
+en-US = "If there are any problems running the Wizard please refer to the Readme.doc"
+
+[RID_STR_WDVR_SOANA]
+en-US = "<PRODUCTNAME> MIGRATION ANALYSIS - WORD DRIVER"
+
+[RID_STR_WDVR_INTRO]
+en-US = "This document contains VBA macros, which collect and analyse Word documents for known issues when importing into <PRODUCTNAME>"
+
+[RID_STR_WDVR_TITLE]
+en-US = "Word Driver"
+
+[RID_STR_WDVR_PURPO]
+en-US = "Purpose"
+
+[RID_STR_WDVR_PARA1]
+en-US = "The macros in this document are used by the Analysis Wizard to analyze the collection of Word documents you specify using the Wizard. It should not be modified in any way, the Wizard will open and close it as required by the tool."
+
+[RID_STR_WDVR_ISSUE]
+en-US = "Issues"
+
+[RID_STR_WDVR_PARA2]
+en-US = "If there are any problems running the Wizard please refer to the Readme.doc"
+
+[RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_COMMENTS]
+en-US = "Allow Only Comments"
+
+[RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_FORM_FIELDS]
+en-US = "Allow Only FormFields"
+
+[RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_REVISIONS]
+en-US = "Allow Only Revisions"
+
+[RID_STR_WORD_ATTRIBUTE_AUTHOR]
+en-US = "Author"
+
+[RID_STR_WORD_ATTRIBUTE_DATASOURCE]
+en-US = "Datasource"
+
+[RID_STR_WORD_ATTRIBUTE_FIELD_TEXT]
+en-US = "Field Text"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_AUTOSIZE]
+en-US = "Autosize"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_ENTRY_MACRO]
+en-US = "Entry macro"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_EXIT_MACRO]
+en-US = "Exit macro"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_FILLIN_ENABLED]
+en-US = "Fill-in enabled"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_GREYED]
+en-US = "FormFields Greyed"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_AUTO_TEXT]
+en-US = "Help Key(F1) [Auto Text]"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_OWN_TEXT]
+en-US = "Help Key(F1) [Own Text]"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_LOCKED]
+en-US = "Locked"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_MAX_LENGTH]
+en-US = "Maximum Length"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_AUTO_TEXT]
+en-US = "Status Bar Help [Auto Text]"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_OWN_TEXT]
+en-US = "Status Bar Help [Own Text]"
+
+[RID_STR_WORD_ATTRIBUTE_FORM_FIELD_TEXT_FORM_FIELD_TYPE]
+en-US = "Text Form Field Type"
+
+[RID_STR_WORD_ATTRIBUTE_FOOTER]
+en-US = "Footer"
+
+[RID_STR_WORD_ATTRIBUTE_HEADER]
+en-US = "Header"
+
+[RID_STR_WORD_ATTRIBUTE_FRAME]
+en-US = "Frame"
+
+[RID_STR_WORD_ATTRIBUTE_GRAPHIC]
+en-US = "Graphic"
+
+[RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_H]
+en-US = "Height Greater Than Header Height"
+
+[RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_F]
+en-US = "Height Greater Than Footer Height"
+
+[RID_STR_WORD_ATTRIBUTE_NUM_OF_GRAPHIC]
+en-US = "Number of Graphics"
+
+[RID_STR_WORD_ATTRIBUTE_OBJECT_LOCATED_BELOW_HEADER]
+en-US = "Located Below Header"
+
+[RID_STR_WORD_ATTRIBUTE_NUM_OF_FRAME]
+en-US = "Number of Frames"
+
+[RID_STR_WORD_ATTRIBUTE_HEADER_EVEN_PAGES]
+en-US = "Even Page(s)"
+
+[RID_STR_WORD_ATTRIBUTE_HEADER_FIRST_PAGE]
+en-US = "First Page"
+
+[RID_STR_WORD_ATTRIBUTE_HEADER_ODD_PAGES]
+en-US = "Odd Page(s)"
+
+[RID_STR_WORD_ATTRIBUTE_HEADER_PAGE_DEFAULT]
+en-US = "Page Default"
+
+[RID_STR_WORD_ATTRIBUTE_GRAPHICTYPE]
+en-US = "Graphic Type"
+
+[RID_STR_WORD_ATTRIBUTE_INLINESHAPE]
+en-US = "Inline Shape"
+
+[RID_STR_WORD_ATTRIBUTE_INNER_TABLE]
+en-US = "InnerTable"
+
+[RID_STR_WORD_ATTRIBUTE_LEADER]
+en-US = "Leader"
+
+[RID_STR_WORD_ATTRIBUTE_LINK]
+en-US = "Link"
+
+[RID_STR_WORD_ATTRIBUTE_LOCATION]
+en-US = "Location"
+
+[RID_STR_WORD_ATTRIBUTE_NUMBER_CUSTOM_PARAGRAPHS]
+en-US = "Number of custom paragraphs"
+
+[RID_STR_WORD_ATTRIBUTE_OUTER_TABLE]
+en-US = "Outer Table"
+
+[RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_MODIFY]
+en-US = "Password to Modify"
+
+[RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_OPEN]
+en-US = "Password to Open"
+
+[RID_STR_WORD_ATTRIBUTE_PROTECTION]
+en-US = "Protection"
+
+[RID_STR_WORD_ATTRIBUTE_SET]
+en-US = "Set"
+
+[RID_STR_WORD_ATTRIBUTE_START_COL]
+en-US = "Start Column"
+
+[RID_STR_WORD_ATTRIBUTE_START_ROW]
+en-US = "Start Row"
+
+[RID_STR_WORD_ATTRIBUTE_TEXT]
+en-US = "Text"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_ISSUE]
+en-US = "Potential problem with TOC Format matching Modern style"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_MIGRATE_CLEAN]
+en-US = "TOC Format will not migrate cleanly"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_ROUNDTRIP_CLEAN]
+en-US = "TOC will not roundtrip cleanly due to following settings"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_WITH_LEVEL]
+en-US = "Format [FromTemplate] Level"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_TAB_DOTS]
+en-US = "Format [FromTemplate] TabLeader [Dots]"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FORMAL_WITH_LEVEL]
+en-US = "Format [Formal] Level"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_CLASSIC_WITH_LEVEL]
+en-US = "Format [Classic] Level"
+
+[RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_DISTINCTIVE_WITH_LEVEL]
+en-US = "Format [Distinctive] Level"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_CALCULATION]
+en-US = "Calculation"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_CHECK_BOX]
+en-US = "Check Box Form Field"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_DATE]
+en-US = "Current Date"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_TIME]
+en-US = "Current Time"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DATE]
+en-US = "Date"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE]
+en-US = "Default date"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_EXPRESSION]
+en-US = "Expression"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_NUMBER]
+en-US = "Default number"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TEXT]
+en-US = "Default text"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TIME]
+en-US = "Default time"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_DROP_DOWN]
+en-US = "Drop-Down Form Field"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE]
+en-US = "Date format"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER]
+en-US = "Number format"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TEXT]
+en-US = "Text format"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TIME]
+en-US = "Time format"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_NUMBER]
+en-US = "Number"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_REGULAR]
+en-US = "Regular"
+
+[RID_STR_WORD_ENUMERATION_FORM_FIELD_TEXT]
+en-US = "Text Form Field"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_ASK]
+en-US = "Ask"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER]
+en-US = "Auto Number"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_LEGAL]
+en-US = "Auto Number Legal"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_OUTLINE]
+en-US = "Auto Number Outline"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_FIELD_NAME_NOT_KNOWN]
+en-US = "Field name not known"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_FILL_IN]
+en-US = "Fill In"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_RECORDS]
+en-US = "Merge Records"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_FIELDS]
+en-US = "Merge Fields"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_NEXT]
+en-US = "Next"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_REVISION_NUMBER]
+en-US = "Revision Number"
+
+[RID_STR_WORD_ENUMERATION_MAILMERGE_SEQUENCE]
+en-US = "Sequence"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_CLASSIC]
+en-US = "Classic"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_DISTINCTIVE]
+en-US = "Distinctive"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_FANCY]
+en-US = "Fancy"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_FORMAL]
+en-US = "Formal"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_MODERN]
+en-US = "Modern"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_SIMPLE]
+en-US = "Simple"
+
+[RID_STR_WORD_ENUMERATION_INDEX_TABLES_FROM_TEMPLATE]
+en-US = "From Template"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_DASHES]
+en-US = "Dashes"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_DOTS]
+en-US = "Dots"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_HEAVY]
+en-US = "Heavy"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_LINES]
+en-US = "Lines"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_MIDDLEDOT]
+en-US = "MiddleDot"
+
+[RID_STR_WORD_ENUMERATION_INDEX_LEADER_SPACES]
+en-US = "Spaces"
+
+[RID_STR_WORD_ENUMERATION_UNKNOWN]
+en-US = "Unknown"
+
+[RID_STR_WORD_FALSE]
+en-US = "False"
+
+[RID_STR_WORD_TRUE]
+en-US = "True"
+
+[RID_STR_WORD_ISSUE_FIELDS]
+en-US = "Fields"
+
+[RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES]
+en-US = "Indexes and References"
+
+[RID_STR_WORD_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES]
+en-US = "Objects, Graphics and Frames"
+
+[RID_STR_WORD_ISSUE_TABLES]
+en-US = "Tables"
+
+[RID_STR_WORD_NOTE_FORM_FIELD_ATTRIBUTES_LOST]
+en-US = "following attribute values lost"
+
+[RID_STR_WORD_NOTE_FORM_FIELD_TYPE_LOST]
+en-US = "Type lost, converted to plain text"
+
+[RID_STR_WORD_NOTE_NESTED_TABLE_WILL_BE_LOST]
+en-US = "The inner table will be lost on roundtrip."
+
+[RID_STR_WORD_NOTE_TOA_FIELD_LOST_ON_ROUNDTRIP]
+en-US = "Field will be lost on roundtrip"
+
+[RID_STR_WORD_NOTE_TOA_MIGRATE_AS_PLAIN_TEXT]
+en-US = "Table will migrate as plain text"
+
+[RID_STR_WORD_SUBISSUE_APPEARANCE]
+en-US = "Appearance"
+
+[RID_STR_WORD_SUBISSUE_COMMENT]
+en-US = "Comment"
+
+[RID_STR_WORD_SUBISSUE_CUSTOM_BULLET_LIST]
+en-US = "Custom bullet list"
+
+[RID_STR_WORD_SUBISSUE_FORM_FIELD]
+en-US = "Form Field"
+
+[RID_STR_WORD_SUBISSUE_MAILMERGE_DATASOURCE]
+en-US = "Mail Merge Datasource"
+
+[RID_STR_WORD_SUBISSUE_MAILMERGE_FIELD]
+en-US = "Mail Merge Field"
+
+[RID_STR_WORD_SUBISSUE_NESTED_TABLES]
+en-US = "Nested Tables"
+
+[RID_STR_WORD_SUBISSUE_OBJECT_IN_HEADER_FOOTER]
+en-US = "Object in Header Footer"
+
+[RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES]
+en-US = "Table of Authorities"
+
+[RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD]
+en-US = "Table of Authorities Field"
+
+[RID_RESXLT_COST_CHART_Radar_AWF]
+en-US = "Radar chart, Radar with symbol"
+
+[RID_RESXLT_COST_CHART_Radar_Comment]
+en-US = "Although <PRODUCTNAME> Net charts appear similar to Excel Radar charts, but they are not equivalent. Radar charts are drawn clockwise whereas Net charts are drawn counter-clockwise."
+
+[RID_RESXLT_COST_CHART_Scattered_AWF]
+en-US = "Scattered chart"
+
+[RID_RESXLT_COST_CHART_Scattered_Comment]
+en-US = "The XY-Chart of <PRODUCTNAME> has the same appearance as the scattered chart in Excel."
+
+[RID_RESXLT_COST_CHART_Bubble_AWF]
+en-US = "Bubble chart"
+
+[RID_RESXLT_COST_CHART_Bubble_Comment]
+en-US = "XY-Chart has similar functionality to a Bubble chart in Excel but a completely different look."
+
+[RID_RESXLT_COST_CHART_BarOfPie_AWF]
+en-US = "Bar of Pie and Pie of Pie charts"
+
+[RID_RESXLT_COST_CHART_BarOfPie_Comment]
+en-US = "<PRODUCTNAME> imports these types of charts as Column charts, which look completely different."
+
+[RID_RESXLT_COST_CHART_FilledRadar_AWF]
+en-US = "Filled Radar chart"
+
+[RID_RESXLT_COST_CHART_FilledRadar_Comment]
+en-US = "This chart type does not have a <PRODUCTNAME> equivalent. Instead, the import filter in <PRODUCTNAME> converts a Filled Radar chart to a Column chart."
+
+[RID_RESXLT_COST_CHART_Surface_AWF]
+en-US = "Surface chart"
+
+[RID_RESXLT_COST_CHART_Surface_Comment]
+en-US = "This chart type does not have a <PRODUCTNAME> equivalent. The imported chart will look completely different than the original chart."
+
+[RID_RESXLT_COST_PIVOT_MultConsRanges_AWF]
+en-US = "Multiple Consolidation Ranges"
+
+[RID_RESXLT_COST_PIVOT_MultConsRanges_Comment]
+en-US = "A Pivot table from Excel can use data from multiple consolidation ranges, Calc does not support this."
+
+[RID_RESXLT_COST_PIVOT_PivotChart_Comment]
+en-US = "A pivot chart is created dynamically in Excel using a pivot table as it's datasource. <PRODUCTNAME> does not support generating charts from dynamically created tables."
+
+[RID_RESXLT_COST_PIVOT_ManSort_AWF]
+en-US = "Manual Sorting"
+
+[RID_RESXLT_COST_PIVOT_ManSort_Comment]
+en-US = "Pivot table users could sort the results manually. Excel preserves the sorting. Calc does not."
+
+[RID_RESXLT_COST_PIVOT_CalcVal_AWF]
+en-US = "Calculated Values"
+
+[RID_RESXLT_COST_PIVOT_CalcVal_Comment]
+en-US = "Excel users can create a formula that writes the results in a new column within the pivot table. Users can use the same type of formula to replace the content of an existing column. Calc does not support this."
+
+[RID_RESXLT_COST_PIVOT_ExternData_AWF]
+en-US = "External Data"
+
+[RID_RESXLT_COST_PIVOT_ExternData_Comment]
+en-US = "A Pivot table from Excel can use data from external sources. Calc does not support this."
+
+[RID_RESXLS_COST_IAR_Numbering_IssueType]
+en-US = "Numbering Order"
+
+[RID_RESXLS_COST_IAR_Numbering_Comment]
+en-US = "<PRODUCTNAME> first calculates numbering located in frames and then the numbering within the text. Word does not separate this."
+
+[RID_RESXLS_COST_IAR_Numbering_WorkAround]
+en-US = "Move the numberings from within the frames into the text body area."
+
+[RID_RESXLS_COST_WorkbookPartProtection_AWF]
+en-US = "Protection for Parts of Workbooks"
+
+[RID_RESXLS_COST_WorkbookPartProtection_Comment]
+en-US = "In Excel users can protect certain parts of workbooks. Workbooks, sheets, charts and ranges can all be individually protected. These do not all migrate to <PRODUCTNAME>."
+
+[RID_RESXLS_COST_WorkbookPartProtection_WorkAround]
+en-US = "Do not protect Excel workbooks"
+
+[RID_RESXLS_COST_FORMAT_TabStop_IssueType]
+en-US = "Tabstop"
+
+[RID_RESXLS_COST_FORMAT_TabStop_Comment]
+en-US = "The minimum tabstop distance in word is shorter than <PRODUCTNAME>. That means that if, in Word, the user tabs a distance shorter than <PRODUCTNAME>'s minimum, that after migration the text spacing will be pushed one tab further."
+
+[RID_RESXLS_COST_GraphicAnchorEndOfPage_IssueType]
+en-US = "Graphic Object Anchor - End of Page"
+
+[RID_RESXLS_COST_GraphicAnchorEndOfPage_Comment]
+en-US = "If a frame or graphic object (not including AutoShapes) is too close to the end of a page it will be pushed to the next page in <PRODUCTNAME>."
+
+[RID_RESXLS_COST_GraphicAnchorLostGraphic_IssueType]
+en-US = "Graphic Object Anchor - Lost Graphic Object"
+
+[RID_RESXLS_COST_GraphicAnchorLostGraphic_Comment]
+en-US = "If a graphic object is anchored off a paragraph (Format Autoshape | Layout | Advanced | Vertical Position = Paragraph) which contains just a blank carriage return, then this can lead to the graphic object being lost in <PRODUCTNAME>."
+
+[RID_RESXLS_COST_TABLE_Leading_IssueType]
+en-US = "Leading"
+
+[RID_RESXLS_COST_TABLE_Leading_Comment]
+en-US = "Leading can cause extra lines in tables. In a table, if the column width is very close to the text, it can lead to a single character being pushed to new line in <PRODUCTNAME>. This is caused by extra leading in <PRODUCTNAME>."
+
+[RID_RESXLS_COST_TABLE_Misplaced_IssueType]
+en-US = "Misplaced"
+
+[RID_RESXLS_COST_TABLE_Misplaced_Comment]
+en-US = "Text wrapping can cause misplaced tables."
+
+[RID_RESXLS_COST_TOC_HeadlinesWithoutNum_IssueType]
+en-US = "Headings Without Numbering"
+
+[RID_RESXLS_COST_TOC_HeadlinesWithoutNum_Comment]
+en-US = "Many users do not use automatic heading or section numbering. They type the numbers in front of the heading manually instead. Word displays the first TAB of the heading in the TOC. <PRODUCTNAME> does not. The TOC will look different."
+
+[RID_RESXLS_COST_TOC_HeadlinesWithoutNum_WorkAround]
+en-US = "Replace the manual numbering with automatic numbering or add spaces between the manual numbers and the text."
+
+[RID_RESXLS_COST_TABLE_AlignmentOfObjects_IssueType]
+en-US = "Horizontal Alignment of Objects"
+
+[RID_RESXLS_COST_TABLE_AlignmentOfObjects_Comment]
+en-US = "Graphics, WordArt or similar objects located in text tables get displayed in the wrong position when the absolute position of the horizontal alignment is defined instead of a relative position."
+
+[RID_RESXLS_COST_TABLE_AlignmentOfObjects_WorkAround]
+en-US = "Adjust the horizontal alignment manually."
+
+[RID_STR_WORD_ATTRIBUTE_COUNT]
+en-US = "Count"
+
+[RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_DATEDIF]
+en-US = "<PRODUCTNAME> Calc does not have an equivalent 'DATEDIF' function."
+
+[RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_PHONETIC]
+en-US = "<PRODUCTNAME> does not have an equivalent 'PHONETIC' function."
+
+[RID_STR_PP_SUBISSUE_BACKGROUND_NOTE]
+en-US = "Fill style background colors applied to shapes in PowerPoint might be lost after a round trip conversion in <PRODUCTNAME>."
+
+[RID_STR_PP_SUBISSUE_NUMBERING_NOTE]
+en-US = "Only the first paragraph in a numbered sequence can start with "1" in <PRODUCTNAME>. The numbering can only start with "2" or higher in subsequent paragraphs."
+
+[RID_STR_PP_SUBISSUE_HYPERLINK_NOTE]
+en-US = "Unlike PowerPoint, <PRODUCTNAME> does not support multiple text formats in hyperlink text. Instead, <PRODUCTNAME> creates a separate hyperlink for each formatting style in an imported hyperlink."
+
+[RID_STR_PP_SUBISSUE_HYPERLINK_SPLIT_NOTE]
+en-US = "PowerPoint splits the text representation of a hyperlink into several lines when the text box is not wide enough. <PRODUCTNAME> does not split hyperlinks so the hyperlink text might extend out of the text box."
+
+[RID_STR_PP_SUBISSUE_TEMPLATE_NOTE]
+en-US = "<PRODUCTNAME> does not support the PowerPoint 'Title Slide' layout. When you import this layout, most of the subtitle object attributes are converted to hard attributes. PowerPoint 97 users require the multiple master page patch from Microsoft to view 'Title Slide' layouts that are contained in round trip documents."
+
+[RID_STR_PP_SUBISSUE_TABSTOP_NOTE]
+en-US = "Unlike PowerPoint, <PRODUCTNAME> only supports one default tab stop in a document and not one for each text object. If a PowerPoint document uses more than one default tab stop for text objects, <PRODUCTNAME> assigns hard tab stops to these text objects to ensure an identical layout when you import the document. The default tab stops are not reinserted when you save the document in PowerPoint format."
+
+[RID_STR_PP_SUBISSUE_FONTS]
+en-US = "Embedded Fonts"
+
+[RID_STR_PP_SUBISSUE_FONTS_NOTE]
+en-US = "<PRODUCTNAME> doesn't support embedded fonts."
+
+[RID_STR_COMMON_SUBISSUE_TRANSPARENCY_NOTE]
+en-US = "Microsoft Office supports a color attribute that allows you to make a bitmap color transparent without modifying the orginal bitmap. When you import a document with such a bitmap, <PRODUCTNAME> changes the bitmap to match the transparent color. The transparent color attribute is lost."
+
+[RID_STR_COMMON_SUBISSUE_LINE_NOTE]
+en-US = "<PRODUCTNAME> does not support all of the line styles that you can apply to MS Office AutoShapes. As a result, <PRODUCTNAME> replaces double and triple line styles with a single line."
+
+[RID_STR_COMMON_SUBISSUE_GRADIENT_PRESET_NOTE]
+en-US = "<PRODUCTNAME> does not support preset gradient styles."
+
+[RID_STR_COMMON_SUBISSUE_GRADIENT_CORNER_NOTE]
+en-US = "<PRODUCTNAME> does not support the 'from center' gradient style."
+
+[RID_STR_COMMON_SUBISSUE_GRADIENT_CENTER_NOTE]
+en-US = "<PRODUCTNAME> does not support the 'from corner' gradient style."
+
+[RID_RESXLS_COST_DB_Query]
+en-US = "Database Query"
+
+[RID_RESXLS_COST_DB_Query_Comment]
+en-US = "Issue: <PRODUCTNAME> can not import the database query. "
+
+[RID_RESXLS_COST_LineStyle]
+en-US = "Line Style"
+
+[RID_RESXLS_COST_LineStyle_Comment]
+en-US = "Issue: Line style is not supported."
+
+[RID_RESXLS_COST_Numbering]
+en-US = "Numbering"
+
+[RID_RESXLS_COST_Numbering_Comment]
+en-US = "Issue: Text numbering starts with wrong number."
+
+[RID_RESXLS_COST_Template]
+en-US = "Layout 'Title Slide'"
+
+[RID_RESXLS_COST_Template_Comment]
+en-US = "Issue: 'Title Slide' layout is not supported."
+
+[RID_RESXLS_COST_DATEDIF_Note]
+en-US = "Use a date or time function that <PRODUCTNAME> Calc supports."
+
+[RID_RESXLS_COST_Tabstop]
+en-US = "Default Tabulator"
+
+[RID_RESXLS_COST_Tabstop_Comment]
+en-US = "Issue: Different default tabulators are not supported for text objects."
+
+[RID_RESXLS_COST_Transparent]
+en-US = "Transparent Color"
+
+[RID_RESXLS_COST_Transparent_Comment]
+en-US = "Issue: <PRODUCTNAME> does not support the transparent color attribute in bitmaps."
+
+[RID_RESXLS_COST_GradientStyle]
+en-US = "Gradient Style"
+
+[RID_RESXLS_COST_GradientStyle_Comment]
+en-US = "Issue: Unsupported gradient styles used."
+
+[RID_RESXLS_COST_GradientStyle_Note]
+en-US = "Replacing gradient styles by styles that are supported."
+
+[RID_RESXLS_COST_Hyperlink]
+en-US = "Textrange Hyperlinks"
+
+[RID_RESXLS_COST_Hyperlink_Comment]
+en-US = "Issue: Multiple text formatting is not supported in Hyperlinks."
+
+[RID_RESXLS_COST_HyperlinkSplit]
+en-US = "Split Hyperlinks"
+
+[RID_RESXLS_COST_HyperlinkSplit_Comment]
+en-US = "Issue: Hyperlink will not be split onto several lines."
+
+[RID_RESXLS_COST_Background]
+en-US = "Fill Type Background"
+
+[RID_RESXLS_COST_Background_Comment]
+en-US = "Issue: Fillstyle background is not supported."
+
diff --git a/migrationanalysis/src/driver_docs/makefile.mk b/migrationanalysis/src/driver_docs/makefile.mk
new file mode 100644
index 000000000000..bc337be70099
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/makefile.mk
@@ -0,0 +1,131 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.8.34.3 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=migrationanalysis
+TARGET=driverdocs
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+PAW_DOCDEST:=$(BIN)$/ProAnalysisWizard$/Resources
+PAW_DATDEST:=$(BIN)$/ProAnalysisWizard$/Resources$/lang
+
+PAW_DRIVER_DOCS:= \
+ $(PAW_DOCDEST)$/_OOoDocAnalysisExcelDriver.xls \
+ $(PAW_DOCDEST)$/_OOoDocAnalysisWordDriver.doc \
+ $(PAW_DOCDEST)$/_OOoDocAnalysisPPTDriver.ppt
+
+PAW_DRIVER_DOCS_SRC:= \
+ .$/PAW$/_OOoDocAnalysisExcelDriver.xls \
+ .$/PAW$/_OOoDocAnalysisWordDriver.doc \
+ .$/PAW$/_OOoDocAnalysisPPTDriver.ppt
+
+PAW_DAT_FILES= \
+ $(foreach,i,$(alllangiso) $(PAW_DATDEST)$/$i.dat)
+
+DAT_DATA_FILE=allstrings.ulf
+DAT_DON_FILE_PAW=$(MISC)$/$(DAT_DATA_FILE).paw
+
+ULFFILES=$(DAT_DATA_FILE)
+.IF "$(WITH_LANG)"!=""
+ULFDIR:=$(COMMONMISC)$/$(TARGET)
+.ELSE # "$(WITH_LANG)"!=""
+ULFDIR:=.
+.ENDIF # "$(WITH_LANG)"!=""
+
+COMMON_SRC:= \
+ .$/sources$/AnalysisDriver.bas \
+ .$/sources$/CollectedFiles.cls \
+ .$/sources$/CommonMigrationAnalyser.bas \
+ .$/sources$/CommonPreparation.bas \
+ .$/sources$/DocumentAnalysis.cls \
+ .$/sources$/FileTypeAssociation.cls \
+ .$/sources$/IssueInfo.cls \
+ .$/sources$/LocalizeResults.bas \
+ .$/sources$/PrepareInfo.cls \
+ .$/sources$/StringDataManager.cls \
+ .$/sources$/Stripped_OOoDocAnalysisExcelDriver.xls \
+ .$/sources$/Stripped_OOoDocAnalysisPPTDriver.ppt \
+ .$/sources$/Stripped_OOoDocAnalysisWordDriver.doc \
+ .$/sources$/common_res.bas \
+ .$/sources$/results_res.bas
+
+EXCEL_SRC:= \
+ .$/sources$/excel$/ApplicationSpecific.bas \
+ .$/sources$/excel$/MigrationAnalyser.cls \
+ .$/sources$/excel$/Preparation.bas \
+ .$/sources$/excel$/excel_res.bas
+
+PP_SRC:= \
+ .$/sources$/powerpoint$/ApplicationSpecific.bas \
+ .$/sources$/powerpoint$/MigrationAnalyser.cls \
+ .$/sources$/powerpoint$/Preparation.bas \
+ .$/sources$/powerpoint$/powerpoint_res.bas
+
+WORD_SRC:= \
+ .$/sources$/word$/ApplicationSpecific.bas \
+ .$/sources$/word$/MigrationAnalyser.cls \
+ .$/sources$/word$/Preparation.bas \
+ .$/sources$/word$/word_res.bas
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : $(PAW_DRIVER_DOCS) $(DAT_DON_FILE_PAW)
+
+$(PAW_DRIVER_DOCS) : .$/PAW$/$$(@:f)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) .$/PAW$/$(@:f) $@
+
+$(PAW_DAT_FILES) : $(ULFDIR)$/$(DAT_DATA_FILE)
+ -$(MKDIRHIER) $(@:d)
+ $(TOUCH) $@
+
+$(DAT_DON_FILE_PAW) : $(PAW_DAT_FILES)
+ @echo --------------------------------
+ @echo building $@
+ -$(MKDIRHIER) $(@:d)
+ @echo making $(PAW_DAT_FILES)
+ $(PERL) ulf2dat.pl -i $(ULFDIR)$/$(DAT_DATA_FILE) $(PAW_DAT_FILES) && $(TOUCH) $@
+
+.IF "$(VB6_LOCATION)" != ""
+$(PAW_DRIVER_DOCS_SRC) : $(COMMON_SRC) $(EXCEL_SRC) $(PP_SRC) $(WORD_SRC)
+ @echo --------------------------------
+ @echo create driver docs
+ cscript CreateDriverDocs.wsf
+.ENDIF
+
diff --git a/migrationanalysis/src/driver_docs/sources/AnalysisDriver.bas b/migrationanalysis/src/driver_docs/sources/AnalysisDriver.bas
new file mode 100644
index 000000000000..5cb0fa6c5401
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/AnalysisDriver.bas
@@ -0,0 +1,3648 @@
+Attribute VB_Name = "AnalysisDriver"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: AnalysisDriver.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+' Declare Public variables.
+Public Type ShortItemId
+ cb As Long
+ abID As Byte
+End Type
+
+Public Type ITEMIDLIST
+ mkid As ShortItemId
+End Type
+
+Public Declare Function FindWindow Lib "user32" Alias _
+ "FindWindowA" (ByVal lpClassName As String, _
+ ByVal lpWindowName As Long) As Long
+
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+
+'This function saves the passed value to the file,
+'under the section and key names specified.
+'If the ini file, lpFileName, does not exist, it is created.
+'If the section, lpSectionName, does not exist, it is created.
+'If the key name, lpKeyName, does not exist, it is created.
+'If the key name exists, it's value, lpString, is replaced.
+Private Declare Function WritePrivateProfileString Lib "kernel32" _
+ Alias "WritePrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpString As Any, _
+ ByVal lpFileName As String) As Long
+
+Private Declare Function GetPrivateProfileString Lib "kernel32" _
+ Alias "GetPrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpDefault As String, _
+ ByVal lpReturnedString As String, _
+ ByVal nSize As Long, _
+ ByVal lpFileName As String) As Long
+
+Private Declare Function UrlEscape Lib "shlwapi" _
+ Alias "UrlEscapeA" _
+ (ByVal pszURL As String, _
+ ByVal pszEscaped As String, _
+ pcchEscaped As Long, _
+ ByVal dwFlags As Long) As Long
+
+Public Declare Function SHGetPathFromIDList Lib "shell32.dll" _
+ (ByVal pidl As Long, ByVal pszPath As String) As Long
+
+Public Declare Function SHGetSpecialFolderLocation Lib _
+ "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder _
+ As Long, pidl As ITEMIDLIST) As Long
+
+Public Const LOCALE_ILANGUAGE As Long = &H1 'language id
+Public Const LOCALE_SLANGUAGE As Long = &H2 'localized name of lang
+Public Const LOCALE_SENGLANGUAGE As Long = &H1001 'English name of lang
+Public Const LOCALE_SABBREVLANGNAME As Long = &H3 'abbreviated lang name
+Public Const LOCALE_SNATIVELANGNAME As Long = &H4 'native name of lang
+Public Const LOCALE_ICOUNTRY As Long = &H5 'country code
+Public Const LOCALE_SCOUNTRY As Long = &H6 'localized name of country
+Public Const LOCALE_SENGCOUNTRY As Long = &H1002 'English name of country
+Public Const LOCALE_SABBREVCTRYNAME As Long = &H7 'abbreviated country name
+Public Const LOCALE_SNATIVECTRYNAME As Long = &H8 'native name of country
+Public Const LOCALE_SINTLSYMBOL As Long = &H15 'intl monetary symbol
+Public Const LOCALE_IDEFAULTLANGUAGE As Long = &H9 'def language id
+Public Const LOCALE_IDEFAULTCOUNTRY As Long = &HA 'def country code
+Public Const LOCALE_IDEFAULTCODEPAGE As Long = &HB 'def oem code page
+Public Const LOCALE_IDEFAULTANSICODEPAGE As Long = &H1004 'def ansi code page
+Public Const LOCALE_IDEFAULTMACCODEPAGE As Long = &H1011 'def mac code page
+
+Public Const LOCALE_IMEASURE As Long = &HD '0 = metric, 1 = US
+Public Const LOCALE_SSHORTDATE As Long = &H1F 'short date format string
+
+'#if(WINVER >= &H0400)
+Public Const LOCALE_SISO639LANGNAME As Long = &H59 'ISO abbreviated language name
+Public Const LOCALE_SISO3166CTRYNAME As Long = &H5A 'ISO abbreviated country name
+'#endif /* WINVER >= as long = &H0400 */
+
+'#if(WINVER >= &H0500)
+Public Const LOCALE_SNATIVECURRNAME As Long = &H1008 'native name of currency
+Public Const LOCALE_IDEFAULTEBCDICCODEPAGE As Long = &H1012 'default ebcdic code page
+Public Const LOCALE_SSORTNAME As Long = &H1013 'sort name
+'#endif /* WINVER >= &H0500 */
+
+Public Declare Function GetSystemDefaultLangID Lib "kernel32" () As Long
+Public Declare Function GetUserDefaultLangID Lib "kernel32" () As Long
+
+Public Declare Function GetLocaleInfo Lib "kernel32" _
+ Alias "GetLocaleInfoA" _
+ (ByVal Locale As Long, _
+ ByVal LCType As Long, _
+ ByVal lpLCData As String, _
+ ByVal cchData As Long) As Long
+
+
+Public Const CWIZARD = "analysis"
+
+Const CROWOFFSET = 2
+Const CDOCPROP_PAW_ROWOFFSET = 3
+Private mDocPropRowOffset As Long
+
+Const CNUMBERDOC_ALL = "All"
+Const CTOTAL_DOCS_ANALYZED = "TotalDocsAnalysed"
+Const CNUMDAYS_IN_MONTH = 30
+Const CMAX_LIMIT = 10000
+
+Const CISSUE_DETDOCNAME = 1
+Const CISSUE_DETDOCAPPLICATION = CISSUE_DETDOCNAME + 1
+Const CISSUE_DETTYPE = CISSUE_DETDOCAPPLICATION + 1
+Const CISSUE_DETSUBTYPE = CISSUE_DETTYPE + 1
+Const CISSUE_DETLOCATION = CISSUE_DETSUBTYPE + 1
+Const CISSUE_DETSUBLOCATION = CISSUE_DETLOCATION + 1
+Const CISSUE_DETLINE = CISSUE_DETSUBLOCATION + 1
+Const CISSUE_DETCOLUMN = CISSUE_DETLINE + 1
+Const CISSUE_DETATTRIBUTES = CISSUE_DETCOLUMN + 1
+Const CISSUE_DETNAMEANDPATH = CISSUE_DETATTRIBUTES + 1
+
+Const CREF_DETDOCNAME = 1
+Const CREF_DETDOCAPPLICATION = CREF_DETDOCNAME + 1
+Const CREF_DETREFERENCE = CREF_DETDOCAPPLICATION + 1
+Const CREF_DETDESCRIPTION = CREF_DETREFERENCE + 1
+Const CREF_DETLOCATION = CREF_DETDESCRIPTION + 1
+Const CREF_DETATTRIBUTES = CREF_DETLOCATION + 1
+Const CREF_DETNAMEANDPATH = CREF_DETATTRIBUTES + 1
+
+Const CINPUT_DIR = "indir"
+Const COUTPUT_DIR = "outdir"
+Const CRESULTS_FILE = "resultsfile"
+Const CLOG_FILE = "logfile"
+Const CRESULTS_TEMPLATE = "resultstemplate"
+Const CRESULTS_EXIST = "resultsexist"
+Const COVERWRITE_FILE = "overwritefile"
+Const CNEW_RESULTS_FILE = "newresultsfile"
+Const CINCLUDE_SUBDIRS = "includesubdirs"
+Const CDEBUG_LEVEL = "debuglevel"
+Const COUTPUT_TYPE = "outputtype"
+Const COUTPUT_TYPE_XLS = "xls"
+Const COUTPUT_TYPE_XML = "xml"
+Const COUTPUT_TYPE_BOTH = "both"
+Const COVERVIEW_TITLE_LABEL = "OV_Document_Analysis_Overview_lbl"
+Const CDEFAULT_PASSWORD = "defaultpassword"
+Const CVERSION = "version"
+Const CTITLE = "title"
+Const CDOPREPARE = "prepare"
+Const CISSUES_LIMIT = "issuesmonthlimit"
+Const CSINGLE_FILE = "singlefile"
+Const CFILE_LIST = "filelist"
+Const CSTAT_FILE = "statfilename"
+Const C_ABORT_ANALYSIS = "abortanalysis"
+Const C_DOCS_LESS_3_MONTH = "DocumentsYoungerThan3Month"
+Const C_DOCS_LESS_6_MONTH = "DocumentsYoungerThan6Month"
+Const C_DOCS_LESS_12_MONTH = "DocumentsYoungerThan12Month"
+Const C_DOCS_MORE_12_MONTH = "DocumentsOlderThan12Month"
+
+Private Const C_ANALYSIS As String = "Analysis"
+Private Const C_LAST_CHECKPOINT As String = "LastCheckpoint"
+Private Const C_NEXT_FILE As String = "NextFile"
+Private Const C_MAX_CHECK_INI As String = "FilesBeforeSave"
+Private Const C_MAX_WAIT_BEFORE_WRITE_INI As String = "SecondsBeforeSave"
+Private Const C_MAX_RANGE_PROCESS_TIME_INI As String = "ExcelMaxRangeProcessTime"
+Private Const C_ERROR_HANDLING_DOC As String = "_ERROR_HANDLING_DOC_"
+Private Const C_MAX_CHECK As Long = 100
+Private Const C_MAX_WAIT_BEFORE_WRITE As Long = 300 ' sec
+Private Const C_MAX_RANGE_PROCESS_TIME As Integer = 30 'sec
+
+Private Const C_STAT_STARTING As Integer = 1
+Private Const C_STAT_DONE As Integer = 2
+Private Const C_STAT_FINISHED As Integer = 3
+
+Private Type DocumentCount
+ numDocsAnalyzed As Long
+ numDocsAnalyzedWithIssues As Long
+ numMinorIssues As Long
+ numComplexIssues As Long
+ numMacroIssues As Long
+ numPreparableIssues As Long
+ totalMacroCosts As Long
+ totalDocIssuesCosts As Long
+ totalPreparableIssuesCosts As Long
+End Type
+
+Private Type DocModificationDates
+ lessThanThreemonths As Long
+ threeToSixmonths As Long
+ sixToTwelvemonths As Long
+ greaterThanOneYear As Long
+End Type
+
+Private Type DocMacroClassifications
+ None As Long
+ Simple As Long
+ Medium As Long
+ complex As Long
+End Type
+
+Private Type DocIssueClassifications
+ None As Long
+ Minor As Long
+ complex As Long
+End Type
+
+Const CCOST_COL_OFFSET = -1
+
+Private mLogFilePath As String
+Private mDocIndex As String
+Private mDebugLevel As Long
+Private mIniFilePath As String
+Private mUserFormTypesDict As Scripting.Dictionary
+Private mIssuesDict As Scripting.Dictionary
+Private mMacroDict As Scripting.Dictionary
+Private mPreparedIssuesDict As Scripting.Dictionary
+Private mIssuesClassificationDict As Scripting.Dictionary
+Private mIssuesCostDict As Scripting.Dictionary
+Private mIssuesLimit As Date
+
+Public Const CWORD_DRIVER_FILE = "_OOoDocAnalysisWordDriver.doc"
+Public Const CEXCEL_DRIVER_FILE = "_OOoDocAnalysisExcelDriver.xls"
+Public Const CPP_DRIVER_FILE = "_OOoDocAnalysisPPTDriver.ppt"
+Public Const CWORD_DRIVER_FILE_TEMP = "~$OoDocAnalysisWordDriver.doc"
+Public Const CEXCEL_DRIVER_FILE_TEMP = "~$OoDocAnalysisExcelDriver.xls"
+Public Const CPP_DRIVER_FILE_TEMP = "~$OoDocAnalysisPPTDriver.ppt"
+
+'Doc Properties Offsets - used in WriteDocProperties and GetPreparableFilesFromDocProps
+Const CDOCINFONAME = 1
+Const CDOCINFOAPPLICATION = CDOCINFONAME + 1
+
+Const CDOCINFOISSUE_CLASS = CDOCINFOAPPLICATION + 1
+Const CDOCINFOCOMPLEXISSUES = CDOCINFOISSUE_CLASS + 1
+Const CDOCINFOMINORISSUES = CDOCINFOCOMPLEXISSUES + 1
+Const CDOCINFOPREPAREDISSUES = CDOCINFOMINORISSUES + 1
+
+Const CDOCINFOMACRO_CLASS = CDOCINFOPREPAREDISSUES + 1
+Const CDOCINFOMACRO_USERFORMS = CDOCINFOMACRO_CLASS + 1
+Const CDOCINFOMACRO_LINESOFCODE = CDOCINFOMACRO_USERFORMS + 1
+
+Const CDOCINFODOCISSUECOSTS = CDOCINFOMACRO_LINESOFCODE + 1
+Const CDOCINFOPREPARABLEISSUECOSTS = CDOCINFODOCISSUECOSTS + 1
+Const CDOCINFOMACROISSUECOSTS = CDOCINFOPREPARABLEISSUECOSTS + 1
+
+Const CDOCINFONUMBERPAGES = CDOCINFOMACROISSUECOSTS + 1
+Const CDOCINFOCREATED = CDOCINFONUMBERPAGES + 1
+Const CDOCINFOLASTMODIFIED = CDOCINFOCREATED + 1
+Const CDOCINFOLASTACCESSED = CDOCINFOLASTMODIFIED + 1
+Const CDOCINFOLASTPRINTED = CDOCINFOLASTACCESSED + 1
+Const CDOCINFOLASTSAVEDBY = CDOCINFOLASTPRINTED + 1
+Const CDOCINFOREVISION = CDOCINFOLASTSAVEDBY + 1
+Const CDOCINFOTEMPLATE = CDOCINFOREVISION + 1
+Const CDOCINFONAMEANDPATH = CDOCINFOTEMPLATE + 1
+
+'Overview shapes
+Const COV_DOC_MOD_DATES_CHART = "Chart 21"
+Const COV_DOC_MACRO_CHART = "Chart 22"
+Const COV_DOC_ANALYSIS_CHART = "Chart 23"
+
+Const COV_DOC_MOD_DATES_COMMENT_TXB = "Text Box 25"
+Const COV_DOC_MOD_DATES_LEGEND_TXB = "Text Box 12"
+
+Const COV_DOC_MACRO_COMMENT_TXB = "Text Box 26"
+Const COV_DOC_MACRO_LEGEND_TXB = "Text Box 16"
+
+Const COV_DOC_ANALYSIS_COMMENT_TXB = "Text Box 27"
+Const COV_DOC_ANALYSIS_LEGEND_DAW_TXB = "Text Box 28"
+Const COV_DOC_ANALYSIS_LEGEND_PAW_TXB = "Text Box 18"
+
+Const COV_HIGH_LEVEL_ANALYSIS_RANGE = "OV_High_Level_Analysis_Range"
+Const COV_COST_RANGE = "OV_Cost_Range"
+
+'Sheet labels
+Const COV_HIGH_LEVEL_ANALYSIS_LBL = "OV_High_level_analysis_lbl"
+Const COV_DP_PREPISSUES_COL_LBL = "DocProperties_PreparedIssues_Column"
+Const COV_COSTS_PREPISSUE_COUNT_COL_LBL = "Costs_PreparedIssueCount_Column"
+Const CDP_DAW_HIDDEN_COLS_LBL = "DP_DAW_HIDDEN_COLS_RANGE"
+Const CDP_DAW_HIDDEN_COLS2_LBL = "DP_DAW_HIDDEN_COLS_RANGE2"
+Const CDP_DAW_HIDDEN_ROW_LBL = "DP_DAW_HIDDEN_ROW_RANGE"
+
+Const COV_DAW_SETUP_SHEETS_RUN_LBL = "OV_DAW_SETUP_SHEETS_RUN"
+Const COV_PAW_SETUP_SHEETS_RUN_LBL = "OV_PAW_SETUP_SHEETS_RUN"
+Const COV_Internal_Attributes_Cols_LBL = "OV_Internal_Attributes_Cols"
+
+Const CR_STR = "<CR>"
+Const CR_TOPIC = "<TOPIC>"
+Const CR_PRODUCT = "<PRODUCT>"
+
+Const CLEGEND_FONT_SIZE = 8
+Const CCOMMENTS_FONT_SIZE = 10
+
+Dim mTstart As Single
+Dim mTend As Single
+Public gExcelMaxRangeProcessTime As Integer
+
+Sub AnalyseDirectory()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AnalyseDirectory"
+
+ Dim iniFilePath As String
+ Dim startDir As String
+ Dim fileList As String
+ Dim storeToDir As String
+ Dim resultsFile As String
+ Dim resultsTemplate As String
+ Dim statFileName As String
+ Dim bOverwriteResultsFile As Boolean
+ Dim bNewResultsFile As Boolean
+ Dim outputType As String
+ Dim singleFile As String
+ Dim nTimeNeeded As Long
+ Dim nIncrementFileCounter As Long
+ Dim nMaxWaitBeforeWrite As Long
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+
+ SetAppToMinimized
+
+ If InDocPreparation Then
+ mDocPropRowOffset = CDOCPROP_PAW_ROWOFFSET
+ Else
+ mDocPropRowOffset = CROWOFFSET
+ End If
+
+ 'Get Wizard input variables
+ SetupWizardVariables fileList, storeToDir, resultsFile, _
+ mLogFilePath, resultsTemplate, bOverwriteResultsFile, bNewResultsFile, _
+ statFileName, mDebugLevel, outputType, singleFile
+
+ startDir = ProfileGetItem("Analysis", CINPUT_DIR, "", mIniFilePath)
+
+ nIncrementFileCounter = CLng(ProfileGetItem("Analysis", _
+ C_MAX_CHECK_INI, C_MAX_CHECK, mIniFilePath))
+ nMaxWaitBeforeWrite = CLng(ProfileGetItem("Analysis", _
+ C_MAX_WAIT_BEFORE_WRITE_INI, C_MAX_WAIT_BEFORE_WRITE, mIniFilePath))
+ gExcelMaxRangeProcessTime = CInt(ProfileGetItem("Analysis", _
+ C_MAX_RANGE_PROCESS_TIME_INI, C_MAX_RANGE_PROCESS_TIME, mIniFilePath))
+ LocalizeResources
+
+ 'Setup File List
+ 'For Prepare - get list from results spreadsheet with docs analysis found as preparable
+ 'If no results spreadsheet then just try to prepare all the docs - run over full analysis list
+ Dim myFiles As Collection
+ Set myFiles = New Collection
+ Dim sAnalysisOrPrep As String
+ If InDocPreparation And CheckDoPrepare Then
+ sAnalysisOrPrep = "Prepared"
+ If fso.FileExists(storeToDir & "\" & resultsFile) Then
+ If Not GetPrepareFilesToAnalyze(storeToDir & "\" & resultsFile, myFiles, fso) Then
+ SetPrepareToNone
+ WriteDebug currentFunctionName & ": No files to analyse!"
+ GoTo FinalExit 'No files to prepare - exit
+ End If
+ Else
+ If Not GetFilesToAnalyze(fileList, singleFile, myFiles) Then
+ SetPrepareToNone
+ WriteDebug currentFunctionName & ": No files to analyse! Filelist (" & fileList & ") empty?"
+ GoTo FinalExit 'No files to prepare - exit
+ End If
+ End If
+ Else
+ sAnalysisOrPrep = "Analyzed"
+ If Not GetFilesToAnalyze(fileList, singleFile, myFiles) Then
+ WriteDebug currentFunctionName & ": No files to analyse! Filelist (" & fileList & ") empty?"
+ GoTo FinalExit
+ End If
+ End If
+
+ Dim index As Long
+ Dim numFiles As Long
+ Dim nextSave As Long
+ Dim startIndex As Long
+ Dim bResultsWaiting As Boolean
+ Dim AnalysedDocs As Collection
+ Dim startDate As Date
+ Dim currentDate As Date
+
+ Set AnalysedDocs = New Collection
+ numFiles = myFiles.count
+ bResultsWaiting = False
+
+ If (singleFile <> "") Then
+ ' No recovery handling for single file analysis and the value in the
+ ' ini file should be used for bNewResultsFile
+ startIndex = 1
+ Else
+ bNewResultsFile = bNewResultsFile And GetIndexValues(startIndex, nextSave, myFiles)
+ End If
+
+ startDate = Now()
+
+ ' Analyse all files
+ For index = startIndex To numFiles
+ Set mIssuesClassificationDict = New Scripting.Dictionary
+ mIssuesClassificationDict.CompareMode = TextCompare
+ Set mIssuesCostDict = New Scripting.Dictionary
+ 'mIssuesCostDict.CompareMode = TextCompare
+
+ Set mUserFormTypesDict = New Scripting.Dictionary
+ Set mIssuesDict = New Scripting.Dictionary
+ Set mMacroDict = New Scripting.Dictionary
+ Set mPreparedIssuesDict = New Scripting.Dictionary
+
+ 'Write to Application log
+ Dim myAnalyser As MigrationAnalyser
+ Set myAnalyser = New MigrationAnalyser
+
+ If (CheckForAbort) Then GoTo FinalExit
+
+ 'Log Analysis
+ WriteToStatFile statFileName, C_STAT_STARTING, myFiles.item(index), fso
+ WriteToLog "Analyzing", myFiles.item(index)
+ WriteToIni C_NEXT_FILE, myFiles.item(index)
+ mDocIndex = index
+
+ 'Do Analysis
+ myAnalyser.DoAnalyse myFiles.item(index), mUserFormTypesDict, startDir, storeToDir, fso
+
+ AnalysedDocs.Add myAnalyser.Results
+ bResultsWaiting = True
+
+ WriteToLog sAnalysisOrPrep, index & "of" & numFiles & _
+ " " & getAppSpecificApplicationName & " Documents"
+ WriteToLog "Analyzing", "Done"
+ WriteToLog sAnalysisOrPrep & "Doc" & index, myFiles.item(index)
+ Set myAnalyser = Nothing
+
+ If (CheckForAbort) Then GoTo FinalExit
+
+ 'No need to output results spreadsheet, just doing prepare
+ If CheckDoPrepare Then GoTo CONTINUE_FOR
+
+ nTimeNeeded = val(DateDiff("s", startDate, Now()))
+ If ((nTimeNeeded > nMaxWaitBeforeWrite) Or _
+ (index >= nextSave)) Then
+ If WriteResults(storeToDir, resultsFile, resultsTemplate, _
+ bOverwriteResultsFile, bNewResultsFile, _
+ outputType, AnalysedDocs, fso) Then
+ nextSave = index + C_MAX_CHECK
+ bResultsWaiting = False
+ Set AnalysedDocs = New Collection
+ WriteToIni C_LAST_CHECKPOINT, myFiles.item(index)
+ startDate = Now()
+ Else
+ 'write error
+ End If
+ End If
+ WriteToStatFile statFileName, C_STAT_DONE, myFiles.item(index), fso
+CONTINUE_FOR:
+ Next index
+
+ If (bResultsWaiting) Then
+ If WriteResults(storeToDir, resultsFile, resultsTemplate, _
+ bOverwriteResultsFile, bNewResultsFile, _
+ outputType, AnalysedDocs, fso) Then
+ WriteToIni C_LAST_CHECKPOINT, myFiles.item(index - 1)
+ Else
+ 'write error
+ End If
+ End If
+ WriteToStatFile statFileName, C_STAT_FINISHED, "", fso
+
+FinalExit:
+
+ Set fso = Nothing
+ Set myFiles = Nothing
+ Set mIssuesClassificationDict = Nothing
+ Set mIssuesCostDict = Nothing
+ Set mUserFormTypesDict = Nothing
+ Set mIssuesDict = Nothing
+ Set mMacroDict = Nothing
+ Set mPreparedIssuesDict = Nothing
+
+ Set AnalysedDocs = Nothing
+
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function WriteResults(storeToDir As String, resultsFile As String, resultsTemplate As String, _
+ bOverwriteResultsFile As Boolean, bNewResultsFile As Boolean, _
+ outputType As String, AnalysedDocs As Collection, _
+ fso As FileSystemObject) As Boolean
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteResults"
+
+ If InDocPreparation Then
+ If outputType = COUTPUT_TYPE_XML Or outputType = COUTPUT_TYPE_BOTH Then
+ WriteXMLOutput storeToDir, resultsFile, _
+ bOverwriteResultsFile, bNewResultsFile, AnalysedDocs, fso
+ End If
+ End If
+
+ If outputType = COUTPUT_TYPE_XLS Or outputType = COUTPUT_TYPE_BOTH Then
+ WriteXLSOutput storeToDir, resultsFile, fso.GetAbsolutePathName(resultsTemplate), _
+ bOverwriteResultsFile, bNewResultsFile, AnalysedDocs, fso
+ End If
+
+ WriteResults = True
+ bNewResultsFile = False
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteResults = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetFilesToAnalyze_old(startDir As String, bIncludeSubdirs As Boolean, _
+ myFiles As Collection) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetFilesToAnalyze"
+ Dim fso As New FileSystemObject
+ Dim theResultsFile As String
+ theResultsFile = ProfileGetItem("Analysis", CINPUT_DIR, "c:\", mIniFilePath) & "\" & ProfileGetItem("Analysis", CRESULTS_FILE, "", mIniFilePath)
+
+ GetFilesToAnalyze = False
+
+ Dim searchTypes As Collection
+ Set searchTypes = New Collection
+ SetupSearchTypes searchTypes
+ If searchTypes.count = 0 Then
+ GoTo FinalExit
+ End If
+
+ Dim myDocFiles As CollectedFiles
+ Set myDocFiles = New CollectedFiles
+ With myDocFiles
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CWORD_DRIVER_FILE)
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CEXCEL_DRIVER_FILE)
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CPP_DRIVER_FILE)
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CWORD_DRIVER_FILE_TEMP)
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CEXCEL_DRIVER_FILE_TEMP)
+ .BannedList.Add fso.GetAbsolutePathName(getAppSpecificPath & "\" & CPP_DRIVER_FILE_TEMP)
+ .BannedList.Add theResultsFile
+ End With
+ myDocFiles.Search rootDir:=startDir, FileSpecs:=searchTypes, _
+ IncludeSubdirs:=bIncludeSubdirs
+
+ If getAppSpecificApplicationName = CAPPNAME_WORD Then
+ Set myFiles = myDocFiles.WordFiles
+ ElseIf getAppSpecificApplicationName = CAPPNAME_EXCEL Then
+ Set myFiles = myDocFiles.ExcelFiles
+ ElseIf getAppSpecificApplicationName = CAPPNAME_POWERPOINT Then
+ Set myFiles = myDocFiles.PowerPointFiles
+ Else
+ WriteDebug currentFunctionName & " : invalid application " & getAppSpecificApplicationName
+ GoTo FinalExit
+ End If
+
+ GetFilesToAnalyze = True
+
+FinalExit:
+ Set searchTypes = Nothing
+ Set myDocFiles = Nothing
+
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetFilesToAnalyze(fileList As String, startFile As String, _
+ myFiles As Collection) As Boolean
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetFilesToAnalyze"
+
+ Dim fso As New FileSystemObject
+ Dim fileContent As TextStream
+ Dim fileName As String
+
+ GetFilesToAnalyze = False
+
+ If (startFile = "") Then
+ If (fso.FileExists(fileList)) Then
+ Set fileContent = fso.OpenTextFile(fileList, ForReading, False, TristateTrue)
+ While (Not fileContent.AtEndOfStream)
+ fileName = fileContent.ReadLine
+ fileName = Trim(fileName)
+ If (fileName <> "") Then
+ myFiles.Add (fileName)
+ End If
+ Wend
+ fileContent.Close
+ End If
+ Else
+ myFiles.Add (startFile)
+ End If
+
+ If (myFiles.count <> 0) Then GetFilesToAnalyze = True
+
+FinalExit:
+ Set fileContent = Nothing
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetPrepareFilesToAnalyze(resultsFilePath As String, myFiles As Collection, _
+ fso As FileSystemObject) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetPrepareFilesToAnalyze"
+
+ GetPrepareFilesToAnalyze = False
+
+ If Not fso.FileExists(resultsFilePath) Then
+ WriteDebug currentFunctionName & ": results file does not exist : " & resultsFilePath
+ GoTo FinalExit
+ End If
+
+ 'Open results spreadsheet
+ Dim xl As Excel.Application
+ If getAppSpecificApplicationName = CAPPNAME_EXCEL Then
+ Set xl = Application
+ xl.Visible = True
+ Else
+ Set xl = GetExcelInstance
+ xl.Visible = False
+ End If
+ Dim logWb As WorkBook
+ Set logWb = xl.Workbooks.Open(resultsFilePath)
+
+ Dim wsDocProp As Worksheet
+ Set wsDocProp = logWb.Sheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP)
+
+ Dim startRow As Long
+ Dim endRow As Long
+ startRow = mDocPropRowOffset + 1
+ endRow = GetWorkbookNameValueAsLong(logWb, CTOTAL_DOCS_ANALYZED) + mDocPropRowOffset
+
+ GetPreparableFilesFromDocProps wsDocProp, startRow, endRow, fso, myFiles
+
+ GetPrepareFilesToAnalyze = (myFiles.count > 0)
+
+FinalExit:
+ Set wsDocProp = Nothing
+ If Not logWb Is Nothing Then logWb.Close
+ Set logWb = Nothing
+
+ If getAppSpecificApplicationName <> CAPPNAME_EXCEL Then
+ If Not xl Is Nothing Then
+ If xl.Workbooks.count = 0 Then
+ xl.Quit
+ End If
+ End If
+ End If
+ Set xl = Nothing
+
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetPreparableFilesFromDocProps(wsDocProp As Worksheet, startRow As Long, _
+ endRow As Long, fso As FileSystemObject, myFiles As Collection) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetPreparableFilesFromDocProps"
+ GetPreparableFilesFromDocProps = False
+
+ Dim index As Long
+ Dim fileName As String
+ Dim fileExt As String
+ Dim docExt As String
+ Dim templateExt As String
+
+ docExt = getAppSpecificDocExt
+ templateExt = getAppSpecificTemplateExt
+
+ For index = startRow To endRow
+ If GetWorksheetCellValueAsLong(wsDocProp, index, CDOCINFOPREPAREDISSUES) > 0 Then
+ fileName = GetWorksheetCellValueAsString(wsDocProp, index, CDOCINFONAME)
+ fileExt = "." & fso.GetExtensionName(fileName)
+ 'Don't have to worry about search types - just looking at existing results
+ 'so just check both legal extensions for this application
+ If fileExt = docExt Or fileExt = templateExt Then
+ myFiles.Add GetWorksheetCellValueAsString(wsDocProp, index, CDOCINFONAMEANDPATH)
+ End If
+ End If
+ Next index
+
+ GetPreparableFilesFromDocProps = myFiles.count > 0
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ GetPreparableFilesFromDocProps = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub OpenXLSResultFile(resultsFile As String, _
+ resultsTemplate As String, _
+ bNewResultsFile As Boolean, _
+ excelApp As Excel.Application, _
+ resultSheet As Excel.WorkBook)
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OpenXLSResultFile"
+
+ If getAppSpecificApplicationName = CAPPNAME_EXCEL Then
+ Set excelApp = Application
+ excelApp.Visible = True
+ Else
+ Set excelApp = GetExcelInstance
+ excelApp.Visible = False
+ End If
+
+ If bNewResultsFile Then
+ Set resultSheet = excelApp.Workbooks.Add(Template:=resultsTemplate)
+ Localize_WorkBook resultSheet
+ Else
+ Set resultSheet = excelApp.Workbooks.Open(resultsFile)
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ excelApp.DisplayAlerts = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub CloseXLSResultFile(excelApp As Excel.Application, _
+ resultSheet As Excel.WorkBook)
+
+ On Error Resume Next
+
+ If Not resultSheet Is Nothing Then resultSheet.Close
+ Set resultSheet = Nothing
+
+ If getAppSpecificApplicationName <> CAPPNAME_EXCEL Then
+ If Not excelApp Is Nothing Then
+ excelApp.Visible = True
+ If excelApp.Workbooks.count = 0 Then
+ excelApp.Quit
+ End If
+ End If
+ End If
+ Set excelApp = Nothing
+
+ Exit Sub
+End Sub
+
+Sub WriteXLSOutput(storeToDir As String, resultsFile As String, resultsTemplate As String, _
+ bOverwriteResultsFile As Boolean, bNewResultsFile As Boolean, AnalysedDocs As Collection, _
+ fso As Scripting.FileSystemObject)
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXLSOutput"
+
+ Dim offsetDocPropRow As Long
+ Dim offsetDocIssuesRow As Long
+ Dim offsetDocIssueDetailsRow As Long
+ Dim offsetDocRefDetailsRow As Long
+
+ Const COVERVIEW_SHEET_IDX = 1
+ Const CDOCLIST_SHEET_IDX = 2
+ Const CISSUES_ANALYSED_SHEET = 3
+ Const CISSUE_DETAILS_SHEET = 4
+ Const CWORD_ISSUES_SHEET = 5
+ Const CEXCEL_ISSUES_SHEET = 6
+ Const CPOWERPOINT_ISSUES_SHEET = 7
+ Const CREFERENCE_ISSUES_SHEET = 8
+
+ 'Begin writing stats to excel
+ Dim xl As Excel.Application
+ If getAppSpecificApplicationName = CAPPNAME_EXCEL Then
+ Set xl = Application
+ xl.Visible = True
+ Else
+ Set xl = GetExcelInstance
+ xl.Visible = False
+ End If
+
+ Dim logWb As WorkBook
+
+ If bNewResultsFile Then
+ Set logWb = xl.Workbooks.Add(Template:=resultsTemplate)
+ Localize_WorkBook logWb
+ Else
+ Set logWb = xl.Workbooks.Open(storeToDir & "\" & resultsFile)
+ End If
+
+ SetupAnalysisResultsVariables logWb, offsetDocPropRow, _
+ offsetDocIssuesRow, offsetDocIssueDetailsRow, offsetDocRefDetailsRow
+
+ ' Iterate through results and write info
+ Dim aAnalysis As DocumentAnalysis
+ Dim row As Long
+ Dim docCounts As DocumentCount
+ Dim templateCounts As DocumentCount
+
+ Dim issuesRow As Long
+ Dim issueDetailsRow As Long
+ Dim refDetailsRow As Long
+
+ Dim wsOverview As Worksheet
+ Dim wsCosts As Worksheet
+ Dim wsPgStats As Worksheet
+ Dim wsIssues As Worksheet
+ Dim wsIssueDetails As Worksheet
+ Dim wsRefDetails As Worksheet
+
+ Set wsOverview = logWb.Sheets(COVERVIEW_SHEET_IDX)
+ Set wsPgStats = logWb.Sheets(CDOCLIST_SHEET_IDX)
+
+ 'Some localized names might be longer than 31 chars, excel doesn't
+ 'allow such names!
+ On Error Resume Next
+ wsOverview.name = RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW
+ wsPgStats.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP
+ On Error GoTo HandleErrors
+
+ If InDocPreparation Then
+ Set wsCosts = logWb.Sheets(CISSUES_ANALYSED_SHEET)
+ Dim appName As String
+ appName = getAppSpecificApplicationName
+ Select Case appName
+ Case "Word"
+ Set wsIssues = logWb.Worksheets(CWORD_ISSUES_SHEET)
+ Case "Excel"
+ Set wsIssues = logWb.Worksheets(CEXCEL_ISSUES_SHEET)
+ Case "PowerPoint"
+ Set wsIssues = logWb.Worksheets(CPOWERPOINT_ISSUES_SHEET)
+ Case Default
+ Err.Raise Number:=-1, Description:="BadAppName"
+ End Select
+ Set wsIssueDetails = logWb.Sheets(CISSUE_DETAILS_SHEET)
+ Set wsRefDetails = logWb.Sheets(CREFERENCE_ISSUES_SHEET)
+ issuesRow = 1 + CROWOFFSET + offsetDocIssuesRow
+ issueDetailsRow = 1 + CROWOFFSET + offsetDocIssueDetailsRow
+ refDetailsRow = 1 + CROWOFFSET + offsetDocRefDetailsRow
+ ' localize PAW worksheets
+ Dim wsWordIssues As Worksheet
+ Dim wsExcelIssues As Worksheet
+ Dim wsPowerPointIssues As Worksheet
+ Set wsWordIssues = logWb.Worksheets(CWORD_ISSUES_SHEET)
+ Set wsExcelIssues = logWb.Worksheets(CEXCEL_ISSUES_SHEET)
+ Set wsPowerPointIssues = logWb.Worksheets(CPOWERPOINT_ISSUES_SHEET)
+
+ On Error Resume Next
+ wsCosts.name = RID_STR_COMMON_RESULTS_SHEET_NAME_COSTS
+ wsIssueDetails.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS
+ wsRefDetails.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS
+ wsWordIssues.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD
+ wsExcelIssues.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL
+ wsPowerPointIssues.name = RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT
+ On Error GoTo HandleErrors
+ End If
+
+ Dim fileName As String
+ Dim macroClasses As DocMacroClassifications
+ Dim issueClasses As DocIssueClassifications
+
+ For row = 1 To AnalysedDocs.count 'Need Row count - so not using Eor Each
+ Set aAnalysis = AnalysedDocs.item(row)
+ fileName = fso.GetFileName(aAnalysis.name)
+
+ If InDocPreparation Then
+ issuesRow = WriteDocIssues(wsIssues, issuesRow, aAnalysis, fileName)
+ issueDetailsRow = _
+ ProcessIssuesAndWriteDocIssueDetails(logWb, wsIssueDetails, issueDetailsRow, aAnalysis, fileName)
+ refDetailsRow = _
+ WriteDocRefDetails(wsRefDetails, refDetailsRow, aAnalysis, fileName)
+ aAnalysis.MacroCosts = getMacroIssueCosts(logWb, aAnalysis)
+ WriteDocProperties wsPgStats, row + offsetDocPropRow, aAnalysis, fileName
+ Else
+ ProcessIssuesForDAW logWb, aAnalysis, fileName
+ WriteDocProperties wsPgStats, row + offsetDocPropRow, aAnalysis, fileName
+ End If
+
+ UpdateAllCounts aAnalysis, docCounts, templateCounts, macroClasses, issueClasses, fso
+
+ Set aAnalysis = Nothing
+ Next row
+
+ ' We change the font used for text box shapes here for the japanese
+ ' version, because office 2000 sometimes displays squares instead of
+ ' chars
+ Dim langStr As String
+ Dim userLCID As Long
+ Dim textSize As Long
+ Dim fontName As String
+
+ userLCID = GetUserDefaultLangID()
+ langStr = GetUserLocaleInfo(userLCID, LOCALE_SISO639LANGNAME)
+
+ If (langStr = "ja") Then
+ WriteDebug currentFunctionName & " : Setting font to MS PGothic for 'ja' locale"
+ fontName = "MS PGothic"
+ textSize = 10
+ Else
+ fontName = "Arial"
+ textSize = CLEGEND_FONT_SIZE
+ End If
+
+ 'DAW - PAW switches
+ If InDocPreparation Then
+ SaveAnalysisResultsVariables logWb, issueDetailsRow - (1 + CROWOFFSET), _
+ refDetailsRow - (1 + CROWOFFSET)
+
+ WriteOverview logWb, docCounts, templateCounts, macroClasses, issueClasses
+
+ SetupPAWResultsSpreadsheet logWb, fontName, textSize
+ WriteIssueCounts logWb
+ Else
+ WriteOverview logWb, docCounts, templateCounts, macroClasses, issueClasses
+
+ 'StartTiming
+ SetupDAWResultsSpreadsheet logWb, fontName, textSize
+ 'EndTiming "SetupDAWResultsSpreadsheet"
+ End If
+
+ SetupPrintRanges logWb, row, issuesRow, issueDetailsRow, refDetailsRow
+
+ If resultsFile <> "" Then
+ 'Overwrite existing results file without prompting
+ If bOverwriteResultsFile Or (Not bNewResultsFile) Then
+ xl.DisplayAlerts = False
+ End If
+
+ logWb.SaveAs fileName:=storeToDir & "\" & resultsFile
+ xl.DisplayAlerts = True
+ End If
+
+FinalExit:
+ If Not xl Is Nothing Then
+ xl.Visible = True
+ End If
+
+ Set wsOverview = Nothing
+ Set wsPgStats = Nothing
+
+ If InDocPreparation Then
+ Set wsCosts = Nothing
+ Set wsIssues = Nothing
+ Set wsIssueDetails = Nothing
+ Set wsRefDetails = Nothing
+ End If
+
+ If Not logWb Is Nothing Then logWb.Close
+ Set logWb = Nothing
+
+ If getAppSpecificApplicationName <> CAPPNAME_EXCEL Then
+ If Not xl Is Nothing Then
+ If xl.Workbooks.count = 0 Then
+ xl.Quit
+ End If
+ End If
+ End If
+ Set xl = Nothing
+
+ Exit Sub
+
+HandleErrors:
+ xl.DisplayAlerts = False
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Public Sub StartTiming()
+ mTstart = 0
+ mTend = 0
+ mTstart = GetTickCount()
+End Sub
+Public Sub EndTiming(what As String)
+ mTend = GetTickCount()
+ WriteDebug "Timing: " & what & ": " & (FormatNumber((mTend - mTstart) / 1000, 0) & " seconds")
+ mTstart = 0
+ mTend = 0
+End Sub
+Sub WriteIssueCounts(logWb As WorkBook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteIssueCounts"
+
+ Dim Str As String
+ Dim str1 As String
+ Dim val1 As Long
+ Dim count As Long
+ Dim vKeyArray As Variant
+ Dim vItemArray As Variant
+ Dim vPrepKeyArray As Variant
+ Dim vPrepItemArray As Variant
+
+ vKeyArray = mIssuesDict.Keys
+ vItemArray = mIssuesDict.Items
+
+ vPrepKeyArray = mPreparedIssuesDict.Keys
+ vPrepItemArray = mPreparedIssuesDict.Items
+
+ 'Write Issue Counts across all Documents
+ For count = 0 To mIssuesDict.count - 1
+ str1 = vKeyArray(count)
+ val1 = CInt(vItemArray(count))
+ logWb.Names(str1).RefersToRange.Cells(1, 1) = _
+ logWb.Names(str1).RefersToRange.Cells(1, 1).value + vItemArray(count)
+ 'DEBUG: str = str & "Key: " & str1 & " Value: " & val1 & vbLf
+ Next count
+
+ 'Write Prepared Issues Counts across all Documents
+ For count = 0 To mPreparedIssuesDict.count - 1
+ str1 = vPrepKeyArray(count)
+ val1 = CInt(vPrepItemArray(count))
+ AddVariantToWorkbookNameValue logWb, str1, vPrepItemArray(count)
+ 'DEBUG: str = str & "Key: " & str1 & " Value: " & val1 & vbLf
+ Next count
+
+ 'User Form control type count across all analyzed documents of this type
+ str1 = getAppSpecificApplicationName & "_" & _
+ CSTR_ISSUE_VBA_MACROS & "_" & _
+ CSTR_SUBISSUE_PROPERTIES & "_" & _
+ CSTR_SUBISSUE_VBA_MACROS_USERFORMS_CONTROLTYPE_COUNT
+ SetWorkbookNameValueToLong logWb, str1, mUserFormTypesDict.count
+
+ 'Add list of User Form controls and counts to ...USERFORMS_CONTROLTYPE_COUNT field
+ If mUserFormTypesDict.count > 0 Then
+ vKeyArray = mUserFormTypesDict.Keys
+ vItemArray = mUserFormTypesDict.Items
+
+ Str = RID_STR_COMMON_ATTRIBUTE_CONTROLS & ": "
+ For count = 0 To mUserFormTypesDict.count - 1
+ Str = Str & vbLf & vKeyArray(count) & " " & vItemArray(count)
+ Next count
+ WriteUserFromControlTypesComment logWb, str1, Str
+ End If
+ 'DEBUG: MsgBox str & vbLf & mIssuesDict.count
+
+ WriteUniqueModuleCount logWb
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : logging costs : " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub WriteUniqueModuleCount(logWb As WorkBook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteUniqueModuleCount"
+
+ Dim strLabel As String
+ Dim uniqueLineCount As Long
+ Dim uniqueModuleCount As Long
+ Dim count As Long
+ Dim vItemArray As Variant
+
+ vItemArray = mMacroDict.Items
+
+ 'Write Issues Costs
+ uniqueLineCount = 0
+ For count = 0 To mMacroDict.count - 1
+ uniqueLineCount = uniqueLineCount + CInt(vItemArray(count))
+ Next count
+ uniqueModuleCount = mMacroDict.count
+
+
+ strLabel = getAppSpecificApplicationName & "_" & _
+ CSTR_ISSUE_VBA_MACROS & "_" & _
+ CSTR_SUBISSUE_PROPERTIES & "_" & _
+ CSTR_SUBISSUE_VBA_MACROS_UNIQUE_MODULE_COUNT
+ SetWorkbookNameValueToLong logWb, strLabel, uniqueModuleCount
+
+ strLabel = getAppSpecificApplicationName & "_" & _
+ CSTR_ISSUE_VBA_MACROS & "_" & _
+ CSTR_SUBISSUE_PROPERTIES & "_" & _
+ CSTR_SUBISSUE_VBA_MACROS_UNIQUE_LINE_COUNT
+ SetWorkbookNameValueToLong logWb, strLabel, uniqueLineCount
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : logging Unique Module/ Line Counts : " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteUserFromControlTypesComment(logWb As WorkBook, name As String, comment As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteUserFromControlTypesComment"
+
+ On Error Resume Next 'Ignore error if trying to add comment again - would happen on append to results
+ logWb.Names(name).RefersToRange.Cells(1, 1).AddComment
+
+ On Error GoTo HandleErrors
+ logWb.Names(name).RefersToRange.Cells(1, 1).comment.Text Text:=comment
+ 'Autosize not supported - Office 2000
+ 'logWb.Names(name).RefersToRange.Cells(1, 1).comment.AutoSize = True
+ logWb.Names(name).RefersToRange.Cells(1, 1).comment.Visible = False
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : name : " & name & _
+ " : comment : " & comment & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub UpdateAllCounts(aAnalysis As DocumentAnalysis, counts As DocumentCount, templateCounts As DocumentCount, _
+ macroClasses As DocMacroClassifications, issueClasses As DocIssueClassifications, _
+ fso As FileSystemObject)
+ Const CMODDATE_LESS3MONTHS = 91
+ Const CMODDATE_LESS6MONTHS = 182
+ Const CMODDATE_LESS12MONTHS = 365
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "UpdateAllCounts"
+ 'DocIssue Classification occurs in setDocOverallIssueClassification under
+ ' ProcessIssuesAndWriteDocIssueDetails when all DocIssues are being traversed.
+ 'MacroClass for the Doc is setup at the end of the Analyze_Macros in DoAnalysis
+ 'Mod Dates are determined in SetDocProperties in DoAnalysis
+
+ 'DocMacroClassifications
+ Select Case aAnalysis.MacroOverallClass
+ Case enMacroComplex
+ macroClasses.complex = macroClasses.complex + 1
+ Case enMacroMedium
+ macroClasses.Medium = macroClasses.Medium + 1
+ Case enMacroSimple
+ macroClasses.Simple = macroClasses.Simple + 1
+ Case Else
+ macroClasses.None = macroClasses.None + 1
+ End Select
+
+ 'DocIssueClassifications
+ aAnalysis.BelowIssuesLimit = True
+ Select Case aAnalysis.DocOverallIssueClass
+ Case enComplex
+ issueClasses.complex = issueClasses.complex + 1
+ Case enMinor
+ issueClasses.Minor = issueClasses.Minor + 1
+ Case Else
+ issueClasses.None = issueClasses.None + 1
+ End Select
+
+ 'DocumentCounts
+ Dim extStr As String
+ extStr = "." & LCase(fso.GetExtensionName(aAnalysis.name))
+ If extStr = getAppSpecificDocExt Then
+ UpdateDocCounts counts, aAnalysis
+ ElseIf extStr = getAppSpecificTemplateExt Then
+ UpdateDocCounts templateCounts, aAnalysis
+ Else
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & _
+ ": unhandled file extesnion " & extStr & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub UpdateDocCounts(counts As DocumentCount, aAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "UpdateDocCounts"
+
+ counts.numDocsAnalyzed = counts.numDocsAnalyzed + 1
+ If aAnalysis.IssuesCount > 0 Then 'During Analysis incremented
+ counts.numDocsAnalyzedWithIssues = counts.numDocsAnalyzedWithIssues + 1
+
+ If aAnalysis.BelowIssuesLimit Then
+ counts.numMinorIssues = _
+ counts.numMinorIssues + aAnalysis.MinorIssuesCount
+ 'MinorIssuesCount incemented as all DocIssues are being traversed are being written out - ProcessIssuesAndWriteDocIssueDetails
+ counts.numComplexIssues = counts.numComplexIssues + aAnalysis.ComplexIssuesCount 'Calculated
+ counts.totalDocIssuesCosts = counts.totalDocIssuesCosts + _
+ aAnalysis.DocIssuesCosts
+ counts.totalPreparableIssuesCosts = counts.totalPreparableIssuesCosts + _
+ aAnalysis.PreparableIssuesCosts
+ End If
+
+ counts.numMacroIssues = counts.numMacroIssues + aAnalysis.MacroIssuesCount 'During Analysis incremented
+ counts.totalMacroCosts = counts.totalMacroCosts + aAnalysis.MacroCosts
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+
+Sub WriteDocProperties(wsPgStats As Worksheet, row As Long, aAnalysis As DocumentAnalysis, _
+ fileName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteDocProperties"
+
+ Dim rowIndex As Long
+ rowIndex = row + mDocPropRowOffset
+
+ If aAnalysis.Application = RID_STR_COMMON_CANNOT_OPEN Then
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAME, fileName
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOAPPLICATION, aAnalysis.Application
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAMEANDPATH, aAnalysis.name
+
+ GoTo FinalExit
+ End If
+
+ If InDocPreparation Then
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAME, fileName
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOAPPLICATION, aAnalysis.Application
+
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFODOCISSUECOSTS, aAnalysis.DocIssuesCosts
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOPREPARABLEISSUECOSTS, aAnalysis.PreparableIssuesCosts
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOMACROISSUECOSTS, aAnalysis.MacroCosts
+
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOISSUE_CLASS, _
+ getDocOverallIssueClassificationAsString(aAnalysis.DocOverallIssueClass)
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOCOMPLEXISSUES, aAnalysis.ComplexIssuesCount
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOMINORISSUES, aAnalysis.MinorIssuesCount
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOPREPAREDISSUES, aAnalysis.PreparableIssuesCount
+
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOMACRO_CLASS, _
+ getDocOverallMacroClassAsString(aAnalysis.MacroOverallClass)
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOMACRO_USERFORMS, aAnalysis.MacroNumUserForms
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFOMACRO_LINESOFCODE, aAnalysis.MacroTotalNumLines
+
+ SetWorksheetCellValueToLong wsPgStats, rowIndex, CDOCINFONUMBERPAGES, aAnalysis.PageCount
+ SetWorksheetCellValueToVariant wsPgStats, rowIndex, CDOCINFOCREATED, CheckDate(aAnalysis.Created)
+ SetWorksheetCellValueToVariant wsPgStats, rowIndex, CDOCINFOLASTMODIFIED, CheckDate(aAnalysis.Modified)
+ SetWorksheetCellValueToVariant wsPgStats, rowIndex, CDOCINFOLASTACCESSED, CheckDate(aAnalysis.Accessed)
+ SetWorksheetCellValueToVariant wsPgStats, rowIndex, CDOCINFOLASTPRINTED, CheckDate(aAnalysis.Printed)
+
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOLASTSAVEDBY, aAnalysis.SavedBy
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOREVISION, aAnalysis.Revision
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOTEMPLATE, aAnalysis.Template
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAMEANDPATH, aAnalysis.name
+ Else
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAME, fileName
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOAPPLICATION, aAnalysis.Application
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOISSUE_CLASS, _
+ getDocOverallIssueClassificationAsString(aAnalysis.DocOverallIssueClass)
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFOMACRO_CLASS, _
+ getDocOverallMacroClassAsString(aAnalysis.MacroOverallClass)
+ SetWorksheetCellValueToVariant wsPgStats, rowIndex, CDOCINFOLASTMODIFIED, CheckDate(aAnalysis.Modified)
+ SetWorksheetCellValueToString wsPgStats, rowIndex, CDOCINFONAMEANDPATH, aAnalysis.name
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Function CheckDate(myDate As Date) As Variant
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckDate"
+
+ Dim lowerNTDateLimit As Date
+ If Not IsDate(myDate) Then
+ CheckDate = RID_STR_COMMON_NA
+ Exit Function
+ End If
+
+ lowerNTDateLimit = DateSerial(1980, 1, 1)
+ CheckDate = IIf(myDate < lowerNTDateLimit, RID_STR_COMMON_NA, myDate)
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : date " & myDate & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function WriteDocIssues(wsIssues As Worksheet, row As Long, _
+ aAnalysis As DocumentAnalysis, fileName As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteDocIssues"
+
+ Const CNAME = 1
+ Const CAPPLICATION = CNAME + 1
+ Const CISSUE_COLUMNOFFSET = CAPPLICATION
+
+ If aAnalysis.IssuesCount = 0 Then
+ WriteDocIssues = row
+ Exit Function
+ End If
+ SetWorksheetCellValueToString wsIssues, row, CNAME, fileName
+ SetWorksheetCellValueToString wsIssues, row, CAPPLICATION, aAnalysis.Application
+
+ Dim index As Integer
+ For index = 1 To aAnalysis.TotalIssueTypes
+ If aAnalysis.IssuesCountArray(index) > 0 Then
+ SetWorksheetCellValueToString wsIssues, row, CISSUE_COLUMNOFFSET + index, aAnalysis.IssuesCountArray(index)
+ End If
+ Next index
+ SetWorksheetCellValueToString wsIssues, row, CISSUE_COLUMNOFFSET + aAnalysis.TotalIssueTypes + 1, aAnalysis.name
+
+ WriteDocIssues = row + 1
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Sub ProcessIssuesForDAW(logWb As WorkBook, aAnalysis As DocumentAnalysis, fileName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "ProcessIssuesForDAW"
+
+ Dim myIssue As IssueInfo
+ Dim issueClass As EnumDocOverallIssueClass
+
+ Dim index As Integer
+ For index = 1 To aAnalysis.Issues.count
+ Set myIssue = aAnalysis.Issues(index)
+
+ If Not isMacroIssue(myIssue) Then
+ issueClass = getDocIssueClassification(logWb, myIssue)
+ CountDocIssuesForDoc issueClass, aAnalysis
+ SetOverallDocIssueClassification issueClass, aAnalysis
+ End If
+
+ Set myIssue = Nothing
+ Next index
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function ProcessIssuesAndWriteDocIssueDetails(logWb As WorkBook, wsIssueDetails As Worksheet, DetailsRow As Long, _
+ aAnalysis As DocumentAnalysis, fileName As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "ProcessIssueAndWriteDocIssueDetails"
+
+ Dim myIssue As IssueInfo
+ Dim rowIndex As Long
+ Dim issueClass As EnumDocOverallIssueClass
+ Dim issueCost As Long
+
+ rowIndex = DetailsRow
+
+ Dim index As Integer
+ For index = 1 To aAnalysis.Issues.count
+ Set myIssue = aAnalysis.Issues(index)
+
+ ' Process Document Issues and Costs for the Document
+ ' Will be output to List of Documents sheet by WriteDocProperties( )
+ If Not isMacroIssue(myIssue) Then
+ issueClass = getDocIssueClassification(logWb, myIssue)
+ CountDocIssuesForDoc issueClass, aAnalysis
+ SetOverallDocIssueClassification issueClass, aAnalysis
+ issueCost = getDocIssueCost(logWb, aAnalysis, myIssue)
+ aAnalysis.DocIssuesCosts = aAnalysis.DocIssuesCosts + issueCost
+ If myIssue.Preparable Then
+ aAnalysis.PreparableIssuesCosts = aAnalysis.PreparableIssuesCosts + issueCost
+ End If
+ End If
+
+ 'Collate Issue and Factor counts across all Documents
+ 'Will be output to the Issues Analyzed sheet by WriteIssueCounts( )
+ CollateIssueAndFactorCountsAcrossAllDocs aAnalysis, myIssue, fileName
+
+ OutputCommonIssueDetails wsIssueDetails, rowIndex, aAnalysis, myIssue, fileName
+ OutputCommonIssueAttributes wsIssueDetails, rowIndex, myIssue
+ rowIndex = rowIndex + 1
+ Set myIssue = Nothing
+ Next index
+
+ ProcessIssuesAndWriteDocIssueDetails = rowIndex
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function getDocIssueCost(logWb As WorkBook, aAnalysis As DocumentAnalysis, myIssue As IssueInfo) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getDocIssueCost"
+
+ Dim issueKey As String
+ Dim ret As Long
+ ret = 0
+
+ issueKey = getAppSpecificApplicationName & "_" & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML
+
+ ret = getIssueValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, issueKey, 1, CCOST_COL_OFFSET)
+
+FinalExit:
+ getDocIssueCost = ret
+ Exit Function
+
+HandleErrors:
+ ret = 0
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Function getMacroIssueCosts(logWb As WorkBook, aAnalysis As DocumentAnalysis) As Long
+ 'Error handling not required
+ getMacroIssueCosts = getVBAMacroIssueCost(logWb, aAnalysis) '+ getMacroExtRefIssueCost(logWb, aAnalysis)
+ 'NOTE: Currently not counting External Refs as Macro Cost
+ 'could be added if porting off Windows
+
+End Function
+
+Function getVBAMacroIssueCost(logWb As WorkBook, aAnalysis As DocumentAnalysis) As Long
+ Const CMACRO_ROW_OFFSET_UNIQUE_LINES_COST = 4
+ Const CMACRO_ROW_OFFSET_USER_FORMS_COUNT_COST = 5
+ Const CMACRO_ROW_OFFSET_USER_FORMS_CONTROL_COUNT_COST = 6
+ Const CMACRO_ROW_OFFSET_USER_FORMS_CONTROL_TYPE_COUNT_COST = 7
+
+ Const CMACRO_NUM_OF_LINES_FACTOR_KEY = "_UniqueLineCount"
+ Const CMACRO_USER_FORMS_COUNT_FACTOR_KEY = "_UserFormsCount"
+ Const CMACRO_USER_FORMS_CONTROL_COUNT_FACTOR_KEY = "_UserFormsControlCount"
+ Const CMACRO_USER_FORMS_CONTROL_TYPE_COUNT_FACTOR_KEY = "_UserFormsControlTypeCount"
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getVBAMacroIssueCost"
+
+ Dim baseIssueKey As String
+ Dim ret As Long
+ ret = 0
+
+ If Not aAnalysis.HasMacros Then GoTo FinalExit
+
+ 'Fetch VBA Macro Cost Factors - if required
+ baseIssueKey = getAppSpecificApplicationName & "_" & CSTR_ISSUE_VBA_MACROS & "_" & CSTR_SUBISSUE_PROPERTIES
+
+ 'Num Lines - Costing taken from "Lines in Unique Modules"
+ If aAnalysis.MacroTotalNumLines > 0 Then
+ ret = ret + aAnalysis.MacroTotalNumLines * _
+ getValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, _
+ baseIssueKey & CMACRO_NUM_OF_LINES_FACTOR_KEY, baseIssueKey, _
+ CMACRO_ROW_OFFSET_UNIQUE_LINES_COST, CCOST_COL_OFFSET)
+ End If
+ 'User Forms Count
+ If aAnalysis.MacroNumUserForms > 0 Then
+ ret = ret + aAnalysis.MacroNumUserForms * _
+ getValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, _
+ baseIssueKey & CMACRO_USER_FORMS_COUNT_FACTOR_KEY, baseIssueKey, _
+ CMACRO_ROW_OFFSET_USER_FORMS_COUNT_COST, CCOST_COL_OFFSET)
+ End If
+ 'User Forms Control Count
+ If aAnalysis.MacroNumUserFormControls > 0 Then
+ ret = ret + aAnalysis.MacroNumUserFormControls * _
+ getValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, _
+ baseIssueKey & CMACRO_USER_FORMS_CONTROL_COUNT_FACTOR_KEY, baseIssueKey, _
+ CMACRO_ROW_OFFSET_USER_FORMS_CONTROL_COUNT_COST, CCOST_COL_OFFSET)
+ End If
+ 'User Forms Control Type Count
+ If aAnalysis.MacroNumUserFormControlTypes > 0 Then
+ ret = ret + aAnalysis.MacroNumUserFormControlTypes * getValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, _
+ baseIssueKey & CMACRO_USER_FORMS_CONTROL_TYPE_COUNT_FACTOR_KEY, baseIssueKey, CMACRO_ROW_OFFSET_USER_FORMS_CONTROL_TYPE_COUNT_COST, CCOST_COL_OFFSET)
+ End If
+
+
+FinalExit:
+ getVBAMacroIssueCost = ret
+ Exit Function
+
+HandleErrors:
+ ret = 0
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Function getMacroExtRefIssueCost(logWb As WorkBook, aAnalysis As DocumentAnalysis) As Long
+ Const CMACRO_ROW_OFFSET_NUM_EXTERNAL_REFS_COST = 2
+ Const CMACRO_NUM_EXTERNAL_REFS_FACTOR_KEY = "_ExternalRefs"
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getMacroExtRefIssueCost"
+ Dim baseIssueKey As String
+ Dim ret As Long
+ ret = 0
+
+ If aAnalysis.MacroNumExternalRefs <= 0 Then GoTo FinalExit
+
+ 'Fetch External Ref Cost Factors
+ baseIssueKey = getAppSpecificApplicationName & "_" & CSTR_ISSUE_PORTABILITY & "_" & _
+ CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO
+ ret = ret + aAnalysis.MacroNumExternalRefs * _
+ getValueFromXLSorDict(logWb, aAnalysis, mIssuesCostDict, _
+ baseIssueKey & CMACRO_NUM_EXTERNAL_REFS_FACTOR_KEY, baseIssueKey, _
+ CMACRO_ROW_OFFSET_NUM_EXTERNAL_REFS_COST, CCOST_COL_OFFSET)
+
+FinalExit:
+ getMacroExtRefIssueCost = ret
+ Exit Function
+
+HandleErrors:
+ ret = 0
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Function getIssueValueFromXLSorDict(logWb As WorkBook, aAnalysis As DocumentAnalysis, dict As Scripting.Dictionary, _
+ key As String, row As Long, column As Long) As Long
+ 'Error handling not required
+ getIssueValueFromXLSorDict = getValueFromXLSorDict(logWb, aAnalysis, dict, key, key, row, column)
+End Function
+
+Function getValueFromXLSorDict(logWb As WorkBook, aAnalysis As DocumentAnalysis, dict As Scripting.Dictionary, _
+ dictKey As String, xlsKey As String, row As Long, column As Long) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getValueFromXLSorDict"
+
+ Dim ret As Long
+ ret = 0
+
+ If dict.Exists(dictKey) Then
+ ret = dict.item(dictKey)
+ Else
+ On Error Resume Next
+ ret = logWb.Names(xlsKey).RefersToRange.Cells(row, column).value
+ 'Log as error missing key
+ If Err.Number <> 0 Then
+ WriteDebug currentFunctionName & _
+ " : Issue Cost Key - " & xlsKey & ": label missing from results.xlt Costs sheet, check sheet and add/ check spelling label" & Err.Number & " " & Err.Description & " " & Err.Source
+ WriteDebug currentFunctionName & " : dictKey " & dictKey & " : xlsKey " & xlsKey & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ ret = 0
+ End If
+ On Error GoTo HandleErrors
+ dict.Add dictKey, ret
+ End If
+
+FinalExit:
+ getValueFromXLSorDict = ret
+ Exit Function
+
+HandleErrors:
+ ret = 0
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Function isMacroIssue(myIssue As IssueInfo)
+ 'Error handling not required
+ isMacroIssue = False
+
+ If myIssue.IssueTypeXML = CSTR_ISSUE_VBA_MACROS Or _
+ (myIssue.IssueTypeXML = CSTR_ISSUE_PORTABILITY And _
+ myIssue.SubTypeXML = CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO) Then
+ isMacroIssue = True
+ End If
+End Function
+Sub CountDocIssuesForDoc(issueClass As EnumDocOverallIssueClass, aAnalysis As DocumentAnalysis)
+ 'Error handling not required
+
+ If issueClass = enMinor Then
+ aAnalysis.MinorIssuesCount = aAnalysis.MinorIssuesCount + 1
+ End If
+ ' Macro issues are counted during analysis
+ ' Complex issues is calculated from: mIssues.count - mMinorIssuesCount - mMacroIssuesCount
+End Sub
+Sub SetOverallDocIssueClassification(issueClass As EnumDocOverallIssueClass, aAnalysis As DocumentAnalysis)
+ 'Error handling not required
+
+ If aAnalysis.DocOverallIssueClass = enComplex Then Exit Sub
+
+ If issueClass = enComplex Then
+ aAnalysis.DocOverallIssueClass = enComplex
+ Else
+ aAnalysis.DocOverallIssueClass = enMinor
+ End If
+End Sub
+Function getDocIssueClassification(logWb As WorkBook, myIssue As IssueInfo) As EnumDocOverallIssueClass
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getDocIssueClassification"
+ Dim issueKey As String
+ Dim bRet As Boolean
+ bRet = False
+ getDocIssueClassification = enMinor
+
+ issueKey = getAppSpecificApplicationName & "_" & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML
+ If mIssuesClassificationDict.Exists(issueKey) Then
+ bRet = mIssuesClassificationDict.item(issueKey)
+ Else
+ On Error Resume Next
+ bRet = logWb.Names(issueKey).RefersToRange.Cells(1, 0).value
+ 'Log as error missing key
+ If Err.Number <> 0 Then
+ WriteDebug currentFunctionName & _
+ " : Issue Cost Key - " & issueKey & ": label missing from results.xlt Costs sheet, check sheet and add/ check spelling label" & Err.Number & " " & Err.Description & " " & Err.Source
+ bRet = False
+ End If
+ On Error GoTo HandleErrors
+ mIssuesClassificationDict.Add issueKey, bRet
+ End If
+
+
+FinalExit:
+ If bRet Then
+ getDocIssueClassification = enComplex
+ End If
+ Exit Function
+
+HandleErrors:
+ bRet = False
+ WriteDebug currentFunctionName & " : issueKey " & issueKey & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function getDocOverallIssueClassificationAsString(docIssueClass As EnumDocOverallIssueClass) As String
+ Dim Str As String
+ 'Error handling not required
+
+ Select Case docIssueClass
+ Case enComplex
+ Str = RID_STR_COMMON_ISSUE_CLASS_COMPLEX
+ Case enMinor
+ Str = RID_STR_COMMON_ISSUE_CLASS_MINOR
+ Case Else
+ Str = RID_STR_COMMON_ISSUE_CLASS_NONE
+ End Select
+
+ getDocOverallIssueClassificationAsString = Str
+End Function
+
+Public Function getDocOverallMacroClassAsString(docMacroClass As EnumDocOverallMacroClass) As String
+ Dim Str As String
+ 'Error handling not required
+
+ Select Case docMacroClass
+ Case enMacroComplex
+ Str = RID_STR_COMMON_MACRO_CLASS_COMPLEX
+ Case enMacroMedium
+ Str = RID_STR_COMMON_MACRO_CLASS_MEDIUM
+ Case enMacroSimple
+ Str = RID_STR_COMMON_MACRO_CLASS_SIMPLE
+ Case Else
+ Str = RID_STR_COMMON_MACRO_CLASS_NONE
+ End Select
+
+ getDocOverallMacroClassAsString = Str
+End Function
+
+Function WriteDocRefDetails(wsRefDetails As Worksheet, DetailsRow As Long, _
+ aAnalysis As DocumentAnalysis, fileName As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteDocRefDetails"
+
+ Dim myIssue As IssueInfo
+ Dim rowIndex As Long
+ rowIndex = DetailsRow
+
+ Dim index As Integer
+
+ 'Output References for Docs with Macros
+ If aAnalysis.HasMacros And (aAnalysis.References.count > 0) Then
+ For index = 1 To aAnalysis.References.count
+ Set myIssue = aAnalysis.References(index)
+ OutputReferenceAttributes wsRefDetails, rowIndex, aAnalysis, myIssue, fileName
+ rowIndex = rowIndex + 1
+ Set myIssue = Nothing
+ Next index
+ End If
+
+ WriteDocRefDetails = rowIndex
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : path " & aAnalysis.name & ": " & _
+ " : row " & DetailsRow & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Sub OutputReferenceAttributes(wsIssueDetails As Worksheet, rowIndex As Long, _
+ aAnalysis As DocumentAnalysis, myIssue As IssueInfo, fileName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputReferenceAttributes"
+
+ Dim strAttributes As String
+
+ With myIssue
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETDOCNAME, fileName
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETDOCAPPLICATION, aAnalysis.Application
+
+ strAttributes = .Values(RID_STR_COMMON_ATTRIBUTE_MAJOR) & "." & .Values(RID_STR_COMMON_ATTRIBUTE_MINOR)
+ strAttributes = IIf(strAttributes = "0.0" Or strAttributes = ".", .Values(RID_STR_COMMON_ATTRIBUTE_NAME), _
+ .Values(RID_STR_COMMON_ATTRIBUTE_NAME) & " " & .Values(RID_STR_COMMON_ATTRIBUTE_MAJOR) & _
+ "." & .Values(RID_STR_COMMON_ATTRIBUTE_MINOR))
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETREFERENCE, strAttributes
+
+ If .Values(RID_STR_COMMON_ATTRIBUTE_TYPE) = RID_STR_COMMON_ATTRIBUTE_PROJECT Then
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETDESCRIPTION, RID_STR_COMMON_ATTRIBUTE_PROJECT
+ Else
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETDESCRIPTION, _
+ IIf(.Values(RID_STR_COMMON_ATTRIBUTE_DESCRIPTION) <> "", .Values(RID_STR_COMMON_ATTRIBUTE_DESCRIPTION), RID_STR_COMMON_NA)
+ End If
+
+
+ If .Values(RID_STR_COMMON_ATTRIBUTE_ISBROKEN) <> RID_STR_COMMON_ATTRIBUTE_BROKEN Then
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETLOCATION, _
+ .Values(RID_STR_COMMON_ATTRIBUTE_FILE)
+ Else
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETLOCATION, _
+ RID_STR_COMMON_NA
+ End If
+
+ 'Reference Details
+ strAttributes = RID_STR_COMMON_ATTRIBUTE_TYPE & ": " & .Values(RID_STR_COMMON_ATTRIBUTE_TYPE) & vbLf
+ strAttributes = strAttributes & RID_STR_COMMON_ATTRIBUTE_PROPERTIES & ": " & _
+ .Values(RID_STR_COMMON_ATTRIBUTE_BUILTIN) & " " & .Values(RID_STR_COMMON_ATTRIBUTE_ISBROKEN)
+ strAttributes = IIf(.Values(RID_STR_COMMON_ATTRIBUTE_GUID) <> "", _
+ strAttributes & vbLf & RID_STR_COMMON_ATTRIBUTE_GUID & ": " & .Values(RID_STR_COMMON_ATTRIBUTE_GUID), _
+ strAttributes)
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETATTRIBUTES, strAttributes
+
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CREF_DETNAMEANDPATH, aAnalysis.name
+ End With
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : path " & aAnalysis.name & ": " & _
+ " : rowIndex " & rowIndex & ": " & _
+ " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub OutputCommonIssueAttributes(wsIssueDetails As Worksheet, rowIndex As Long, _
+ myIssue As IssueInfo)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputCommonIssueAttributes"
+
+ Dim index As Integer
+ Dim strAttributes As String
+
+ strAttributes = ""
+ For index = 1 To myIssue.Attributes.count
+ strAttributes = strAttributes & myIssue.Attributes(index) & " - " & _
+ myIssue.Values(index)
+ strAttributes = strAttributes & IIf(index <> myIssue.Attributes.count, vbLf, "")
+
+ Next index
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETATTRIBUTES, strAttributes
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : rowIndex " & rowIndex & ": " & _
+ " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+'Store issue cost and factor costs across all documents
+Sub CollateIssueAndFactorCountsAcrossAllDocs(aAnalysis As DocumentAnalysis, myIssue As IssueInfo, fileName As String)
+ Const CSTR_USER_FORM = "User Form"
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CollateIssueAndFactorCountsAcrossAllDocs"
+
+ 'Don't want to cost ISSUE_INFORMATION issues
+ If myIssue.IssueTypeXML = CSTR_ISSUE_INFORMATION Then Exit Sub
+
+ Dim issueKey As String
+ issueKey = getAppSpecificApplicationName & "_" & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML
+
+ 'Store costing metrics for Issue
+ AddIssueAndOneToDict issueKey
+
+ 'Store prepeared issue for costing metrics
+ If myIssue.Preparable Then
+ AddPreparedIssueAndOneToDict issueKey & "_Prepared"
+ End If
+
+ 'Additional costing Factors output for VB macros
+ If (myIssue.IssueTypeXML = CSTR_ISSUE_VBA_MACROS) And _
+ (myIssue.SubTypeXML <> CSTR_SUBISSUE_MACRO_PASSWORD_PROTECTION) Then
+
+ 'Unique Macro Module and Line count
+ AddMacroModuleHashToMacroDict myIssue
+
+ 'Line count
+ AddIssueAndValToDict issueKey & "_" & CSTR_SUBISSUE_VBA_MACROS_NUMLINES, myIssue, _
+ RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES
+
+ 'User From info
+ If myIssue.SubLocation = CSTR_USER_FORM Then
+ AddIssueAndOneToDict issueKey & "_" & CSTR_SUBISSUE_VBA_MACROS_USERFORMS_COUNT
+
+ AddIssueAndValToDict issueKey & "_" & CSTR_SUBISSUE_VBA_MACROS_USERFORMS_CONTROL_COUNT, myIssue, _
+ RID_STR_COMMON_ATTRIBUTE_CONTROLS
+ End If
+ 'Additional costing Factors output for External References
+ ElseIf (myIssue.IssueTypeXML = CSTR_ISSUE_PORTABILITY And _
+ myIssue.SubTypeXML = CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO) Then
+
+ AddIssueAndValToDict issueKey & "_" & CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO_COUNT, myIssue, _
+ RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : path " & aAnalysis.name & ": " & _
+ " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OutputCommonIssueDetails(wsIssueDetails As Worksheet, rowIndex As Long, _
+ aAnalysis As DocumentAnalysis, myIssue As IssueInfo, fileName As String)
+ Const CSTR_USER_FORM = "User Form"
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputCommonIssueDetails"
+
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETDOCNAME, fileName
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETDOCAPPLICATION, aAnalysis.Application
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETTYPE, myIssue.IssueType
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETSUBTYPE, myIssue.SubType
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETLOCATION, myIssue.Location
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETSUBLOCATION, _
+ IIf(myIssue.SubLocation = "", RID_STR_COMMON_NA, myIssue.SubLocation)
+ SetWorksheetCellValueToVariant wsIssueDetails, rowIndex, CISSUE_DETLINE, _
+ IIf(myIssue.Line = -1, RID_STR_COMMON_NA, myIssue.Line)
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETCOLUMN, _
+ IIf(myIssue.column = "", RID_STR_COMMON_NA, myIssue.column)
+ SetWorksheetCellValueToString wsIssueDetails, rowIndex, CISSUE_DETNAMEANDPATH, aAnalysis.name
+
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : path " & aAnalysis.name & ": " & _
+ " : rowIndex " & rowIndex & ": " & _
+ " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub AddIssueAndBoolValToDict(issueKey As String, issue As IssueInfo, valKey As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddIssueAndBoolValToDict"
+
+ If mIssuesDict.Exists(issueKey) Then
+ mIssuesDict.item(issueKey) = mIssuesDict.item(issueKey) + _
+ IIf(issue.Values(valKey) > 0, 1, 0)
+ Else
+ mIssuesDict.Add issueKey, IIf(issue.Values(valKey) > 0, 1, 0)
+ End If
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : issueKey " & issueKey & ": " & _
+ " : valKey " & valKey & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub AddIssueAndValToDict(issueKey As String, issue As IssueInfo, valKey As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddIssueAndValToDict"
+
+ If mIssuesDict.Exists(issueKey) Then
+ mIssuesDict.item(issueKey) = mIssuesDict.item(issueKey) + issue.Values(valKey)
+ Else
+ mIssuesDict.Add issueKey, issue.Values(valKey)
+ End If
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : issueKey " & issueKey & ": " & _
+ " : valKey " & valKey & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub AddMacroModuleHashToMacroDict(issue As IssueInfo)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ Dim issueKey As String
+ Dim issueVal As String
+ currentFunctionName = "AddMacroModuleHashToMacroDict"
+
+ issueKey = issue.Values(RID_STR_COMMON_ATTRIBUTE_SIGNATURE)
+ If issueKey = RID_STR_COMMON_NA Then Exit Sub
+
+ If Not mMacroDict.Exists(issueKey) Then
+ mMacroDict.Add issueKey, issue.Values(RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES)
+ End If
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : issueKey " & issueKey & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub AddIssueAndOneToDict(key As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddIssueAndOneToDict"
+
+ If mIssuesDict.Exists(key) Then
+ mIssuesDict.item(key) = mIssuesDict.item(key) + 1
+ Else
+ mIssuesDict.Add key, 1
+ End If
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : key " & key & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub AddPreparedIssueAndOneToDict(key As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddPreparedIssueAndOneToDict"
+
+ If mPreparedIssuesDict.Exists(key) Then
+ mPreparedIssuesDict.item(key) = mPreparedIssuesDict.item(key) + 1
+ Else
+ mPreparedIssuesDict.Add key, 1
+ End If
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : key " & key & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function GetExcelInstance() As Excel.Application
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetExcelInstance"
+
+ Dim xl As Excel.Application
+ On Error Resume Next
+ 'Try and get an existing instance
+ Set xl = GetObject(, "Excel.Application")
+ If Err.Number = 429 Then
+ Set xl = CreateObject("Excel.Application")
+ ElseIf Err.Number <> 0 Then
+ Set xl = Nothing
+ MsgBox "Error: " & Err.Description
+ Exit Function
+ End If
+ Set GetExcelInstance = xl
+ Set xl = Nothing
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub WriteOverview(logWb As WorkBook, DocCount As DocumentCount, templateCount As DocumentCount, _
+ macroClasses As DocMacroClassifications, issueClasses As DocIssueClassifications)
+ Const COV_ISSUECLASS_COMPLEX = "MAW_ISSUECLASS_COMPLEX"
+ Const COV_ISSUECLASS_MINOR = "MAW_ISSUECLASS_MINOR"
+ Const COV_ISSUECLASS_NONE = "MAW_ISSUECLASS_NONE"
+
+ Const COV_MACROCLASS_COMPLEX = "MAW_MACROCLASS_COMPLEX"
+ Const COV_MACROCLASS_MEDIUM = "MAW_MACROCLASS_MEDIUM"
+ Const COV_MACROCLASS_SIMPLE = "MAW_MACROCLASS_SIMPLE"
+ Const COV_MACROCLASS_NONE = "MAW_MACROCLASS_NONE"
+
+ Const COV_ISSUECOUNT_COMPLEX = "MAW_ISSUECOUNT_COMPLEX"
+ Const COV_ISSUECOUNT_MINOR = "MAW_ISSUECOUNT_MINOR"
+
+ Const COV_MODDATES_LESS3MONTHS = "MAW_MODDATES_LESS3MONTHS"
+ Const COV_MODDATES_3TO6MONTHS = "MAW_MODDATES_3TO6MONTHS"
+ Const COV_MODDATES_6TO12MONTHS = "MAW_MODDATES_6TO12MONTHS"
+ Const COV_MODDATES_MORE12MONTHS = "MAW_MODDATES_MORE12MONTHS"
+
+ Const COV_DOC_MIGRATION_COSTS = "Document_Migration_Costs"
+ Const COV_DOC_PREPARABLE_COSTS = "Document_Migration_Preparable_Costs"
+ Const COV_MACRO_MIGRATION_COSTS = "Macro_Migration_Costs"
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteOverview"
+
+ Dim appName As String
+ appName = getAppSpecificApplicationName
+
+ 'OV - Title
+ SetWorkbookNameValueToString logWb, COVERVIEW_TITLE_LABEL, GetTitle
+ SetWorkbookNameValueToVariant logWb, "AnalysisDate", Now
+ SetWorkbookNameValueToString logWb, "AnalysisVersion", _
+ RID_STR_COMMON_OV_VERSION_STR & ": " & GetTitle & " " & GetVersion
+
+ 'OV - Number of Documents Analyzed
+ AddLongToWorkbookNameValue logWb, CNUMBERDOC_ALL & getAppSpecificDocExt, DocCount.numDocsAnalyzed
+ AddLongToWorkbookNameValue logWb, CNUMBERDOC_ALL & getAppSpecificTemplateExt, templateCount.numDocsAnalyzed
+
+ 'OV - Documents with Document Migration Issues (excludes macro issues)
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_ISSUECLASS_COMPLEX, issueClasses.complex
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_ISSUECLASS_MINOR, issueClasses.Minor
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_ISSUECLASS_NONE, issueClasses.None
+
+ 'OV - Documents with Macro Migration Issues
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_MACROCLASS_COMPLEX, macroClasses.complex
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_MACROCLASS_MEDIUM, macroClasses.Medium
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_MACROCLASS_SIMPLE, macroClasses.Simple
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_MACROCLASS_NONE, macroClasses.None
+
+ 'OV - Document Modification Dates
+ Dim modDates As DocModificationDates
+ Call GetDocModificationDates(modDates)
+
+ SetWorkbookNameValueToLong logWb, COV_MODDATES_LESS3MONTHS, modDates.lessThanThreemonths
+ SetWorkbookNameValueToLong logWb, COV_MODDATES_3TO6MONTHS, modDates.threeToSixmonths
+ SetWorkbookNameValueToLong logWb, COV_MODDATES_6TO12MONTHS, modDates.sixToTwelvemonths
+ SetWorkbookNameValueToLong logWb, COV_MODDATES_MORE12MONTHS, modDates.greaterThanOneYear
+
+
+ If InDocPreparation Then
+ 'OV - Document Migration Issues(excludes macro issues)
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_ISSUECOUNT_COMPLEX, _
+ DocCount.numComplexIssues + templateCount.numComplexIssues
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_ISSUECOUNT_MINOR, _
+ DocCount.numMinorIssues + templateCount.numMinorIssues
+
+ 'OV - Document Migration Costs
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_DOC_MIGRATION_COSTS, _
+ DocCount.totalDocIssuesCosts + templateCount.totalDocIssuesCosts
+
+ 'OV - Document Migration Preparable Costs
+ AddLongToWorkbookNameValue logWb, COV_DOC_PREPARABLE_COSTS, _
+ DocCount.totalPreparableIssuesCosts + templateCount.totalPreparableIssuesCosts
+
+ 'OV - Macro Migration Costs
+ AddLongToWorkbookNameValue logWb, appName & "_" & COV_MACRO_MIGRATION_COSTS, _
+ DocCount.totalMacroCosts + templateCount.totalMacroCosts
+ End If
+
+ 'OV - Internal Attributes
+ AddLongToWorkbookNameValue logWb, appName & "_" & "TotalDocsAnalysedWithIssues", _
+ DocCount.numDocsAnalyzedWithIssues + templateCount.numDocsAnalyzedWithIssues
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : Problem writing overview: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupDAWResultsSpreadsheet(logWb As WorkBook, fontName As String, fontSize As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupDAWResultsSpreadsheet"
+ Dim bSetupRun As Boolean
+ bSetupRun = CBool(GetWorkbookNameValueAsLong(logWb, COV_DAW_SETUP_SHEETS_RUN_LBL))
+
+ If bSetupRun Then Exit Sub
+
+ 'Setup Text Boxes
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MOD_DATES_COMMENT_TXB, _
+ RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_TITLE, RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_BODY, _
+ CCOMMENTS_FONT_SIZE, fontName
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MOD_DATES_LEGEND_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY, fontSize, fontName
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MACRO_COMMENT_TXB, _
+ RID_STR_COMMON_OV_DOC_MACRO_COMMENT_TITLE, RID_STR_COMMON_OV_DOC_MACRO_COMMENT_BODY, _
+ CCOMMENTS_FONT_SIZE, fontName
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MACRO_LEGEND_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY, fontSize, fontName
+ Dim monthLimit As Long
+ monthLimit = GetIssuesLimitInDays / CNUMDAYS_IN_MONTH
+ SetWorkbookNameValueToString logWb, COV_HIGH_LEVEL_ANALYSIS_LBL, _
+ IIf(monthLimit <> CMAX_LIMIT, _
+ ReplaceTopicTokens(RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_DAW, CR_TOPIC, CStr(monthLimit)), _
+ RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT)
+
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_ANALYSIS_COMMENT_TXB, _
+ RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_TITLE, RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_BODY, _
+ CCOMMENTS_FONT_SIZE, fontName
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_ANALYSIS_LEGEND_DAW_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_ANALYSIS_DAW_LEGEND_BODY, fontSize, fontName
+
+ 'Setup Chart Titles
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MOD_DATES_CHART, _
+ RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MACRO_CHART, _
+ RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_ANALYSIS_CHART, _
+ RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE
+
+ 'Set selection to top cell of Overview
+ logWb.Sheets(RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW).Range("A1").Select
+
+ bSetupRun = True
+ SetWorkbookNameValueToBoolean logWb, COV_DAW_SETUP_SHEETS_RUN_LBL, bSetupRun
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : Problem setting up spreadsheet for DAW: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupPAWResultsSpreadsheet(logWb As WorkBook, fontName As String, fontSize As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupPAWResultsSpreadsheet"
+ Dim bSetupRun As Boolean
+ bSetupRun = CBool(GetWorkbookNameValueAsLong(logWb, COV_PAW_SETUP_SHEETS_RUN_LBL))
+
+ If bSetupRun Then Exit Sub
+
+ 'Costs
+ logWb.Names(COV_COSTS_PREPISSUE_COUNT_COL_LBL).RefersToRange.EntireColumn.Hidden = False
+
+ 'Setup Text Boxes
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MOD_DATES_LEGEND_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY, fontSize, fontName
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MACRO_LEGEND_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY, fontSize, fontName
+ SetWorkbookNameValueToString logWb, COV_HIGH_LEVEL_ANALYSIS_LBL, _
+ RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT
+ SetupSheetTextBox logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_ANALYSIS_LEGEND_PAW_TXB, _
+ RID_STR_COMMON_OV_LEGEND_TITLE, RID_STR_COMMON_OV_DOC_ANALYSIS_PAW_LEGEND_BODY, fontSize, fontName
+
+ 'Setup Chart Titles
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MOD_DATES_CHART, _
+ RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_MACRO_CHART, _
+ RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE
+ SetupSheetChartTitles logWb, RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, COV_DOC_ANALYSIS_CHART, _
+ RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE
+
+ 'Set selection to top cell of Overview
+ logWb.Sheets(RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW).Range("A1").Select
+
+ bSetupRun = True
+ SetWorkbookNameValueToBoolean logWb, COV_PAW_SETUP_SHEETS_RUN_LBL, bSetupRun
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : Problem setting up spreadsheet for PAW: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupPrintRanges(logWb As WorkBook, docPropRow As Long, appIssuesRow As Long, issueDetailsRow As Long, _
+ refDetailsRow As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupPrintRanges"
+
+ 'Set Print Ranges
+ If InDocPreparation Then
+
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP).PageSetup.PrintArea = "$A1:$U" & (docPropRow + mDocPropRowOffset)
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS).PageSetup.PrintArea = "$A1:$J" & issueDetailsRow
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS).PageSetup.PrintArea = "$A1:$G" & refDetailsRow
+ If getAppSpecificApplicationName = CAPPNAME_WORD Then
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD).PageSetup.PrintArea = _
+ "$A1:$N" & appIssuesRow
+ ElseIf getAppSpecificApplicationName = CAPPNAME_EXCEL Then
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL).PageSetup.PrintArea = _
+ "$A1:$M" & appIssuesRow
+ Else
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT).PageSetup.PrintArea = _
+ "$A1:$K" & appIssuesRow
+ End If
+ Else
+ logWb.Worksheets(RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP).PageSetup.PrintArea = "$A1:$U" & (docPropRow + mDocPropRowOffset)
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : Problem setting print ranges: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupSheetChartTitles(logWb As WorkBook, namedWorksheet As String, namedChart As String, _
+ chartTitle As String)
+ Const CCHART_TITLE_FONT_SIZE = 11
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupSheetChartTitles"
+
+ With logWb.Sheets(namedWorksheet).ChartObjects(namedChart).Chart
+ .HasTitle = True
+ .chartTitle.Characters.Text = chartTitle
+ .chartTitle.Font.Size = CCHART_TITLE_FONT_SIZE
+ End With
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " namedWorkSheet: " & namedWorksheet & _
+ " namedChart: " & namedChart & _
+ " chartTitle: " & chartTitle & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupSheetTextBox(logWb As WorkBook, namedWorksheet As String, _
+ textBoxName As String, textBoxTitle As String, textBoxBody As String, _
+ textSize As Long, fontName As String)
+
+ Const CMAX_INSERTABLE_STRING_LEN = 255
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupSheetTextBox"
+
+ Dim strTextBody As String
+ Dim allText As String
+ strTextBody = ReplaceTopic2Tokens(textBoxBody, CR_STR, Chr(10), CR_PRODUCT, RID_STR_COMMON_OV_PRODUCT_STR)
+
+ 'Setup Text Boxes
+ logWb.Sheets(namedWorksheet).Activate
+ logWb.Sheets(namedWorksheet).Shapes(textBoxName).Select
+
+ '*** Workaround Excel bug: 213841 XL: Passed Strings Longer Than 255 Characters Are Truncated
+ Dim I As Long
+ logWb.Application.Selection.Text = ""
+
+ logWb.Application.Selection.Characters.Text = textBoxTitle & Chr(10)
+
+ With logWb.Application.Selection
+ For I = 0 To Int(Len(strTextBody) / CMAX_INSERTABLE_STRING_LEN)
+ .Characters(.Characters.count + 1).Text = Mid(strTextBody, _
+ (I * CMAX_INSERTABLE_STRING_LEN) + 1, CMAX_INSERTABLE_STRING_LEN)
+ Next
+ End With
+
+ 'Highlight title only
+ With logWb.Application.Selection.Characters(start:=1, Length:=Len(textBoxTitle)).Font
+ .name = fontName
+ .FontStyle = "Bold"
+ .Size = textSize
+ End With
+ With logWb.Application.Selection.Characters(start:=Len(textBoxTitle) + 1, _
+ Length:=Len(strTextBody) + 1).Font
+ .name = fontName
+ .FontStyle = "Regular"
+ .Size = textSize
+ End With
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " namedWorkSheet: " & namedWorksheet & _
+ " textBoxName: " & textBoxName & _
+ " textBoxTitle: " & textBoxTitle & _
+ " textBoxBody: " & textBoxBody & _
+ " textSize: " & textSize & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Function GetWorkbookNameValueAsLong(logWb As WorkBook, name As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetWorkbookNameValueAsLong"
+
+ GetWorkbookNameValueAsLong = logWb.Names(name).RefersToRange.Cells(1, 1).value
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ GetWorkbookNameValueAsLong = 0
+ WriteDebug currentFunctionName & " : name " & name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetWorksheetCellValueAsLong(logWs As Worksheet, row As Long, col As Long) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetWorksheetCellValueAsLong"
+
+ GetWorksheetCellValueAsLong = logWs.Cells(row, col).value
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetWorksheetCellValueAsString(logWs As Worksheet, row As Long, col As Long) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetWorksheetCellValueToString"
+
+ GetWorksheetCellValueAsString = logWs.Cells(row, col).value
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ GetWorksheetCellValueAsString = ""
+
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub SetWorksheetCellValueToLong(logWs As Worksheet, row As Long, col As Long, val As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorksheetCellValueToLong"
+
+ logWs.Cells(row, col) = val
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ " : val " & val & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub SetWorksheetCellValueToInteger(logWs As Worksheet, row As Long, col As Long, intVal As Integer)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorksheetCellValueToInteger"
+
+ logWs.Cells(row, col) = intVal
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ " : intVal " & intVal & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorksheetCellValueToVariant(logWs As Worksheet, row As Long, col As Long, varVal As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorksheetCellValueToInteger"
+
+ logWs.Cells(row, col) = varVal
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ " : varVal " & varVal & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorksheetCellValueToString(logWs As Worksheet, row As Long, col As Long, strVal As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorksheetCellValueToString"
+
+ logWs.Cells(row, col) = strVal
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : row " & row & _
+ " : col " & col & _
+ " : strVal " & strVal & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorkbookNameValueToBoolean(logWb As WorkBook, name As String, bVal As Boolean)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorkbookNameValueToBoolean"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = bVal
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : boolean value " & bVal & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorkbookNameValueToString(logWb As WorkBook, name As String, val As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorkbookNameValueToString"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = val
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : value " & val & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorkbookNameValueToLong(logWb As WorkBook, name As String, val As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorkbookNameValueToLong"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = val
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : value " & val & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetWorkbookNameValueToVariant(logWb As WorkBook, name As String, val As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetWorkbookNameValueToVariant"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = val
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : value " & val & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub AddLongToWorkbookNameValue(logWb As WorkBook, name As String, val As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddLongToWorkbookNameValue"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = logWb.Names(name).RefersToRange.Cells(1, 1).value + val
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : value " & val & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub AddVariantToWorkbookNameValue(logWb As WorkBook, name As String, varVal As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddVariantToWorkbookNameValue"
+
+ logWb.Names(name).RefersToRange.Cells(1, 1) = logWb.Names(name).RefersToRange.Cells(1, 1).value + varVal
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : name " & name & " : value " & varVal & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SaveAnalysisResultsVariables(logWb As WorkBook, offsetDocIssueDetailsRow As Long, _
+ offsetDocRefDetailsRow As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SaveAnalysisResultsVariables"
+
+ 'OV - Internal Attributes
+ SetWorkbookNameValueToLong logWb, "TotalIssuesAnalysed", offsetDocIssueDetailsRow
+ SetWorkbookNameValueToLong logWb, "TotalRefsAnalysed", offsetDocRefDetailsRow
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : offsetDocIssueDetailsRow " & offsetDocIssueDetailsRow & _
+ " : offsetDocRefDetailsRow " & offsetDocRefDetailsRow & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetupAnalysisResultsVariables(logWb As WorkBook, _
+ offsetDocPropRow As Long, offsetDocIssuesRow As Long, _
+ offsetDocIssueDetailsRow As Long, offsetDocRefDetailsRow As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupAnalysisResultsVariables"
+
+ offsetDocPropRow = GetWorkbookNameValueAsLong(logWb, CTOTAL_DOCS_ANALYZED)
+ offsetDocIssueDetailsRow = GetWorkbookNameValueAsLong(logWb, "TotalIssuesAnalysed")
+ offsetDocRefDetailsRow = GetWorkbookNameValueAsLong(logWb, "TotalRefsAnalysed")
+ offsetDocIssuesRow = GetWorkbookNameValueAsLong(logWb, getAppSpecificApplicationName & "_" & "TotalDocsAnalysedWithIssues")
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : offsetDocPropRow " & offsetDocPropRow & _
+ " : offsetDocIssueDetailsRow " & offsetDocIssueDetailsRow & _
+ " : offsetDocRefDetailsRow " & offsetDocRefDetailsRow & _
+ " : offsetDocIssuesRow " & offsetDocIssuesRow & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteToIni(key As String, value As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteToIni"
+
+ If mIniFilePath = "" Then Exit Sub
+
+ Call WritePrivateProfileString("Analysis", key, value, mIniFilePath)
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : key " & key & " : value " & value & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteToLog(key As String, value As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteToLog"
+
+ If mLogFilePath = "" Then Exit Sub
+
+ Dim sSection As String
+ sSection = getAppSpecificApplicationName
+
+ Call WritePrivateProfileString(sSection, key, value, mLogFilePath)
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : key " & key & " : value " & value & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub WriteDebug(value As String)
+ On Error Resume Next 'Ignore errors in our error writing routines - could get circular dependency otherwise
+ Static ErrCount As Long
+
+ If mLogFilePath = "" Then Exit Sub
+
+ Dim sSection As String
+ sSection = getAppSpecificApplicationName & "Debug"
+
+ If mDebugLevel > 0 Then
+ Call WritePrivateProfileString(sSection, "Doc" & mDocIndex & "_debug" & ErrCount, value, mLogFilePath)
+ ErrCount = ErrCount + 1
+ Else
+ Debug.Print
+ End If
+End Sub
+Sub WriteDebugLevelTwo(value As String)
+ On Error Resume Next 'Ignore errors in our error writing routines - could get circular dependency otherwise
+ Static ErrCountTwo As Long
+
+ If mLogFilePath = "" Then Exit Sub
+
+ Dim sSection As String
+ sSection = getAppSpecificApplicationName & "Debug"
+
+ If mDebugLevel > 1 Then
+ Call WritePrivateProfileString(sSection, "Doc" & mDocIndex & "_debug" & ErrCountTwo, "Level2: " & value, mLogFilePath)
+ ErrCountTwo = ErrCountTwo + 1
+ Else
+ Debug.Print
+ End If
+End Sub
+
+Public Function ProfileLoadDict(dict As Scripting.Dictionary, _
+ lpSectionName As String, _
+ inifile As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "ProfileLoadDict"
+ Dim success As Long
+ Dim c As Long
+ Dim nSize As Long
+ Dim KeyData As String
+ Dim lpKeyName As String
+ Dim ret As String
+
+ ret = Space$(2048)
+ nSize = Len(ret)
+ success = GetPrivateProfileString( _
+ lpSectionName, vbNullString, "", ret, nSize, inifile)
+
+ If success Then
+ ret = Left$(ret, success)
+
+ Do Until ret = ""
+ lpKeyName = StripNulls(ret)
+ KeyData = ProfileGetItem( _
+ lpSectionName, lpKeyName, "", inifile)
+ dict.Add lpKeyName, KeyData
+ Loop
+ End If
+ ProfileLoadDict = dict.count
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : dict.Count " & dict.count & _
+ " : lpSectionName " & lpSectionName & _
+ " : inifile " & inifile & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Private Function StripNulls(startStrg As String) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "StripNulls"
+ Dim pos As Long
+ Dim item As String
+
+ pos = InStr(1, startStrg, Chr$(0))
+
+ If pos Then
+
+ item = Mid$(startStrg, 1, pos - 1)
+ startStrg = Mid$(startStrg, pos + 1, Len(startStrg))
+ StripNulls = item
+
+ End If
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : startStrg " & startStrg & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Function ProfileGetItem(lpSectionName As String, _
+ lpKeyName As String, _
+ defaultValue As String, _
+ inifile As String) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "ProfileGetItem"
+
+ Dim success As Long
+ Dim nSize As Long
+ Dim ret As String
+ ret = Space$(2048)
+ nSize = Len(ret)
+ success = GetPrivateProfileString(lpSectionName, _
+ lpKeyName, _
+ defaultValue, _
+ ret, _
+ nSize, _
+ inifile)
+ If success Then
+ ProfileGetItem = Left$(ret, success)
+ Else
+ ProfileGetItem = defaultValue
+ End If
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : lpSectionName " & lpSectionName & _
+ " : lpKeyName " & lpKeyName & _
+ " : defaultValue " & defaultValue & _
+ " : inifile " & inifile & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Function GetDefaultPassword() As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetDefaultPassword"
+
+ Static myPassword As String
+
+ If myPassword = "" Then
+ myPassword = ProfileGetItem("Analysis", CDEFAULT_PASSWORD, "", mIniFilePath)
+ End If
+
+ GetDefaultPassword = myPassword
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Function GetVersion() As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetVersion"
+
+ Static myVersion As String
+
+ If myVersion = "" Then
+ myVersion = ProfileGetItem("Analysis", CVERSION, "", mIniFilePath)
+ End If
+
+ GetVersion = myVersion
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Public Function GetTitle() As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetTitle"
+
+ Static myTitle As String
+
+ If myTitle = "" Then
+ myTitle = ProfileGetItem("Analysis", CTITLE, RID_STR_COMMON_ANALYSIS_STR, mIniFilePath)
+ End If
+
+ GetTitle = myTitle
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub SetPrepareToNone()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetPrepareToNone"
+
+ Call WritePrivateProfileString("Analysis", CDOPREPARE, CStr(0), mIniFilePath)
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function CheckForAbort() As Boolean
+ Dim currentFunctionName As String
+ Dim bAbort As Boolean
+
+ currentFunctionName = "CheckForAbort"
+ bAbort = False
+
+ On Error GoTo HandleErrors
+
+ bAbort = CBool(ProfileGetItem("Analysis", C_ABORT_ANALYSIS, "false", mIniFilePath))
+
+ 'reset the flag
+ If (bAbort) Then Call WriteToIni(C_ABORT_ANALYSIS, "false")
+
+FinalExit:
+ CheckForAbort = bAbort
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function CheckDoPrepare() As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckDoPrepare"
+
+ Static bDoPrepare As Boolean
+ Static myDoPrepare As String
+
+ If myDoPrepare = "" Then
+ bDoPrepare = CBool(ProfileGetItem("Analysis", _
+ CDOPREPARE, "False", mIniFilePath))
+ myDoPrepare = "OK"
+ End If
+
+ CheckDoPrepare = bDoPrepare
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function GetIssuesLimitInDays() As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+
+ currentFunctionName = "GetIssuesLimitInDays"
+
+ Static issuesLimit As Long
+ Static myDoPrepare As String
+
+ If issuesLimit = 0 Then
+ issuesLimit = CLng(ProfileGetItem("Analysis", _
+ CISSUES_LIMIT, CMAX_LIMIT, mIniFilePath)) * CNUMDAYS_IN_MONTH
+ End If
+
+ GetIssuesLimitInDays = issuesLimit
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Sub AddIssueDetailsNote(myIssue As IssueInfo, noteNum As Long, noteStr As String, _
+ Optional preStr As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AddIssueDetailsNote"
+
+ If IsMissing(preStr) Then
+ preStr = RID_STR_COMMON_NOTE_PRE
+ End If
+ myIssue.Attributes.Add preStr & "[" & noteNum & "]"
+ myIssue.Values.Add noteStr
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : noteNum " & noteNum & " : noteStr " & noteStr & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Public Sub SetupWizardVariables( _
+ fileList As String, storeToDir As String, resultsFile As String, _
+ logFile As String, resultsTemplate As String, bOverwriteFile As Boolean, _
+ bNewResultsFile As Boolean, statFileName As String, debugLevel As Long, _
+ outputType As String, singleFile As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupWizardVariables"
+
+ If mIniFilePath = "" Then
+ mIniFilePath = GetAppDataFolder & "\Sun\AnalysisWizard\" & CWIZARD & ".ini"
+ End If
+
+ statFileName = ProfileGetItem("Analysis", CSTAT_FILE, "", mIniFilePath)
+ fileList = ProfileGetItem("Analysis", CFILE_LIST, "", mIniFilePath)
+ storeToDir = ProfileGetItem("Analysis", COUTPUT_DIR, "", mIniFilePath)
+ resultsFile = ProfileGetItem("Analysis", CRESULTS_FILE, "", mIniFilePath)
+ logFile = ProfileGetItem("Analysis", CLOG_FILE, "", mIniFilePath)
+ resultsTemplate = ProfileGetItem("Analysis", CRESULTS_TEMPLATE, "", mIniFilePath)
+ bOverwriteFile = IIf(ProfileGetItem("Analysis", CRESULTS_EXIST, COVERWRITE_FILE, mIniFilePath) = COVERWRITE_FILE, _
+ True, False)
+ bNewResultsFile = CBool(ProfileGetItem("Analysis", CNEW_RESULTS_FILE, "True", mIniFilePath))
+ debugLevel = CLng(ProfileGetItem("Analysis", CDEBUG_LEVEL, "1", mIniFilePath))
+ outputType = ProfileGetItem("Analysis", COUTPUT_TYPE, COUTPUT_TYPE_XLS, mIniFilePath)
+ singleFile = ProfileGetItem("Analysis", CSINGLE_FILE, "", mIniFilePath)
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ ": mIniFilePath " & mIniFilePath & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Public Sub SetupSearchTypes(searchTypes As Collection)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetupSearchTypes"
+
+ Dim bDocument As Boolean
+ Dim bTemplate As Boolean
+
+ bDocument = CBool(ProfileGetItem("Analysis", LCase("type" & getAppSpecificApplicationName & "doc"), "False", mIniFilePath))
+ bTemplate = CBool(ProfileGetItem("Analysis", LCase("type" & getAppSpecificApplicationName & "dot"), "False", mIniFilePath))
+ If bDocument = True Then searchTypes.Add "*" & getAppSpecificDocExt
+ If bTemplate = True Then searchTypes.Add "*" & getAppSpecificTemplateExt
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": searchTypes.Count " & searchTypes.count & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteXMLHeader(out As TextStream)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLHeader"
+
+ out.WriteLine "<?xml version=""1.0"" encoding=""ISO-8859-1""?>"
+ out.WriteLine "<!DOCTYPE results SYSTEM 'analysis.dtd'>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub WriteXMLResultsStartTag(out As TextStream)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLResultsStartTag"
+
+ out.WriteLine "<results generated-by=""" & IIf(InDocPreparation, "documentanalysis_preparation", "documentanalysis") & """"
+ out.WriteLine " version=""" & GetVersion & """ timestamp=""" & Now & """"
+ out.WriteLine " type=""" & getAppSpecificApplicationName & """ >"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub WriteXMLResultsEndTag(out As TextStream)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLResultsEndTag"
+
+ out.WriteLine "</results>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteXMLDocProperties(out As TextStream, aAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLDocProperties"
+
+ out.WriteLine "<document location=""" & EncodeXML(aAnalysis.name) & """"
+ out.WriteLine " application=""" & aAnalysis.Application & """"
+ out.WriteLine " issues-count=""" & (aAnalysis.IssuesCount) & """"
+ out.WriteLine " pages=""" & aAnalysis.PageCount & """"
+ out.WriteLine " created=""" & CheckDate(aAnalysis.Created) & """"
+ out.WriteLine " modified=""" & CheckDate(aAnalysis.Modified) & """"
+ out.WriteLine " accessed=""" & CheckDate(aAnalysis.Accessed) & """"
+ out.WriteLine " printed=""" & CheckDate(aAnalysis.Printed) & """"
+ out.WriteLine " last-save-by=""" & aAnalysis.SavedBy & """"
+ out.WriteLine " revision=""" & aAnalysis.Revision & """"
+ out.WriteLine " based-on-template=""" & EncodeXML(aAnalysis.Template) & """"
+ out.WriteLine ">"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteXMLDocPropertiesEndTag(out As TextStream)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLDocPropertiesEndTag"
+
+ out.WriteLine "</document>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteXMLDocRefDetails(out As TextStream, aAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLDocRefDetails"
+ Dim myIssue As IssueInfo
+
+ 'Output References for Docs with Macros
+ If aAnalysis.HasMacros And (aAnalysis.References.count > 0) Then
+ out.WriteLine "<references>"
+ For Each myIssue In aAnalysis.References
+ OutputXMLReferenceAttributes out, aAnalysis, myIssue
+ Next myIssue
+ out.WriteLine "</references>"
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OutputXMLReferenceAttributes(out As TextStream, aAnalysis As DocumentAnalysis, myIssue As IssueInfo)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputXMLReferenceAttributes"
+ Dim strAttributes As String
+
+ With myIssue
+ out.WriteLine "<reference"
+
+ strAttributes = .Values("Major") & "." & .Values("Minor")
+ strAttributes = IIf(strAttributes = "0.0" Or strAttributes = ".", .Values("Name"), _
+ .Values("Name") & " " & .Values("Major") & "." & .Values("Minor"))
+ out.WriteLine " name=""" & EncodeXML(strAttributes) & """"
+
+ If .Values("Type") = "Project" Then
+ strAttributes = "Project reference"
+ Else
+ strAttributes = IIf(.Values("Description") <> "", .Values("Description"), RID_STR_COMMON_NA)
+ End If
+ out.WriteLine " description=""" & EncodeXML(strAttributes) & """"
+ If .Values("IsBroken") <> RID_STR_COMMON_ATTRIBUTE_BROKEN Then
+ out.WriteLine " location=""" & .Values("File") & """"
+ End If
+ out.WriteLine " type=""" & .Values("Type") & """"
+ strAttributes = IIf(.Values("GUID") <> "", .Values("GUID"), RID_STR_COMMON_NA)
+ out.WriteLine " GUID=""" & strAttributes & """"
+ out.WriteLine " is-broken=""" & .Values("IsBroken") & """"
+ out.WriteLine " builtin=""" & .Values("BuiltIn") & """"
+
+ out.WriteLine " />"
+ End With
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteXMLDocIssueDetails(out As TextStream, aAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLDocIssueDetails"
+
+ Dim myIssue As IssueInfo
+
+ If aAnalysis.Issues.count = 0 Then Exit Sub
+
+ out.WriteLine "<issues>"
+ For Each myIssue In aAnalysis.Issues
+ OutputXMLCommonIssueDetails out, aAnalysis, myIssue
+ OutputXMLCommonIssueAttributes out, myIssue
+ out.WriteLine "</issue>"
+ Next myIssue
+ out.WriteLine "</issues>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OutputXMLCommonIssueDetails(out As TextStream, aAnalysis As DocumentAnalysis, myIssue As IssueInfo)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputXMLCommonIssueDetails"
+
+ out.WriteLine "<issue category=""" & myIssue.IssueTypeXML & """"
+ out.WriteLine " type=""" & myIssue.SubTypeXML & """"
+
+ 'NOTE: Dropping severity - now stored in results.xlt, do not want to open it to fetch this data
+ 'out.WriteLine " severity=""" & IIf(CheckForMinorIssue(aAnalysis, myIssue), "Minor", "Major") & """"
+ out.WriteLine " prepared=""" & IIf((myIssue.Preparable), "True", "False") & """ >"
+
+ out.WriteLine "<location type=""" & myIssue.locationXML & """ >"
+
+ If myIssue.SubLocation <> "" Then
+ out.WriteLine "<property name=""sublocation"" value=""" & myIssue.SubLocation & """ />"
+ End If
+ If myIssue.Line <> -1 Then
+ out.WriteLine "<property name=""line"" value=""" & myIssue.Line & """ />"
+ End If
+ If myIssue.column <> "" Then
+ out.WriteLine "<property name=""column"" value=""" & myIssue.column & """ />"
+ End If
+ out.WriteLine "</location>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & aAnalysis.name & " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OutputXMLCommonIssueAttributes(out As TextStream, myIssue As IssueInfo)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "OutputXMLCommonIssueAttributes"
+
+ Dim index As Integer
+ Dim valStr As String
+ Dim attStr As String
+
+ If myIssue.Attributes.count = 0 Then Exit Sub
+
+ out.WriteLine "<details>"
+ For index = 1 To myIssue.Attributes.count
+ attStr = myIssue.Attributes(index)
+ If InStr(attStr, RID_STR_COMMON_NOTE_PRE & "[") = 1 Then
+ attStr = Right$(attStr, Len(attStr) - Len(RID_STR_COMMON_NOTE_PRE & "["))
+ attStr = Left$(attStr, Len(attStr) - 1)
+ out.WriteLine "<note index=""" & attStr & """ value=""" & EncodeXML(myIssue.Values(index)) & """ />"
+ Else
+ out.WriteLine "<property name=""" & EncodeXML(myIssue.Attributes(index)) & """ value=""" & EncodeXML(myIssue.Values(index)) & """ />"
+ End If
+ Next index
+
+ out.WriteLine "</details>"
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+
+Sub WriteXMLOutput(storeToDir As String, resultsFile As String, _
+ bOverwriteResultsFile As Boolean, bNewResultsFile As Boolean, AnalysedDocs As Collection, _
+ fso As Scripting.FileSystemObject)
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteXMLOutput"
+
+ Dim xmlOutput As TextStream
+ Dim xmlOrigOutput As TextStream
+ Dim origOutput As String
+ Dim analysis As DocumentAnalysis
+ Dim outFilePath As String
+
+ outFilePath = storeToDir & "\" & fso.GetBaseName(resultsFile) & "_" & _
+ getAppSpecificApplicationName & ".xml"
+
+ Set xmlOutput = fso.CreateTextFile(outFilePath, True)
+ WriteXMLHeader xmlOutput
+
+ 'Set xmlOrigOutput = fso.OpenTextFile(outFilePath, ForReading)
+ 'Set xmlOutput = fso.OpenTextFile(outFilePath, ForWriting)
+
+ WriteXMLResultsStartTag xmlOutput
+ For Each analysis In AnalysedDocs
+ WriteXMLDocProperties xmlOutput, analysis
+ WriteXMLDocRefDetails xmlOutput, analysis
+ WriteXMLDocIssueDetails xmlOutput, analysis
+ WriteXMLDocPropertiesEndTag xmlOutput
+ Next analysis
+ WriteXMLResultsEndTag xmlOutput
+
+FinalExit:
+ xmlOutput.Close
+ Set xmlOutput = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : path " & outFilePath & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Function EncodeUrl(ByVal sUrl As String) As String
+ Const MAX_PATH As Long = 260
+ Const ERROR_SUCCESS As Long = 0
+ Const URL_DONT_SIMPLIFY As Long = &H8000000
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "EncodeUrl"
+
+ Dim sUrlEsc As String
+ Dim dwSize As Long
+ Dim dwFlags As Long
+
+ If Len(sUrl) > 0 Then
+
+ sUrlEsc = Space$(MAX_PATH)
+ dwSize = Len(sUrlEsc)
+ dwFlags = URL_DONT_SIMPLIFY
+
+ If UrlEscape(sUrl, _
+ sUrlEsc, _
+ dwSize, _
+ dwFlags) = ERROR_SUCCESS Then
+
+ EncodeUrl = Left$(sUrlEsc, dwSize)
+
+ End If 'If UrlEscape
+ End If 'If Len(sUrl) > 0
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : sUrl " & sUrl & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Private Function EncodeXML(Str As String) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "EncodeXML"
+
+ Str = Replace(Str, "^", "&#x5E;")
+ Str = Replace(Str, "&", "&amp;")
+ Str = Replace(Str, "`", "&apos;")
+ Str = Replace(Str, "{", "&#x7B;")
+ Str = Replace(Str, "}", "&#x7D;")
+ Str = Replace(Str, "|", "&#x7C;")
+ Str = Replace(Str, "]", "&#x5D;")
+ Str = Replace(Str, "[", "&#x5B;")
+ Str = Replace(Str, """", "&quot;")
+ Str = Replace(Str, "<", "&lt;")
+ Str = Replace(Str, ">", "&gt;")
+
+ 'str = Replace(str, "\", "&#x5C;")
+ 'str = Replace(str, "#", "&#x23;")
+ 'str = Replace(str, "?", "&#x3F;")
+ 'str = Replace(str, "/", "&#x2F;")
+
+ EncodeXML = Str
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : string " & Str & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+
+Function ReplaceTopicTokens(sString As String, _
+ sToken As String, _
+ sReplacement As String) As String
+ On Error Resume Next
+
+ Dim p As Integer
+ Dim sTmp As String
+
+ sTmp = sString
+ Do
+ p = InStr(sTmp, sToken)
+ If p Then
+ sTmp = Left(sTmp, p - 1) + sReplacement + Mid(sTmp, p + Len(sToken))
+ End If
+ Loop While p > 0
+
+
+ ReplaceTopicTokens = sTmp
+
+End Function
+
+Function ReplaceTopic2Tokens(sString As String, _
+ sToken1 As String, _
+ sReplacement1 As String, _
+ sToken2 As String, _
+ sReplacement2 As String) As String
+ On Error Resume Next
+
+ ReplaceTopic2Tokens = _
+ ReplaceTopicTokens(ReplaceTopicTokens(sString, sToken1, sReplacement1), _
+ sToken2, sReplacement2)
+End Function
+
+'Language setting functions
+Function GetResourceDataFileName(thisDir As String) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetResourceDataFileName"
+
+ Dim fso As FileSystemObject
+ Set fso = New FileSystemObject
+
+ 'A debug method - if a file called debug.dat exists load it.
+ If fso.FileExists(fso.GetAbsolutePathName(thisDir & "\debug.dat")) Then
+ GetResourceDataFileName = fso.GetAbsolutePathName(thisDir & "\debug.dat")
+ GoTo FinalExit
+ End If
+
+ Dim isoLangStr As String
+ Dim isoCountryStr As String
+ Dim langDir As String
+
+ langDir = thisDir & "\" & "lang"
+
+ Dim userLCID As Long
+ userLCID = GetUserDefaultLangID()
+ Dim sysLCID As Long
+ sysLCID = GetSystemDefaultLangID()
+
+ isoLangStr = GetUserLocaleInfo(userLCID, LOCALE_SISO639LANGNAME)
+ isoCountryStr = GetUserLocaleInfo(userLCID, LOCALE_SISO3166CTRYNAME)
+
+ 'check for locale data in following order:
+ ' user language
+ ' isoLangStr & "_" & isoCountryStr & ".dat"
+ ' isoLangStr & ".dat"
+ ' system language
+ ' isoLangStr & "_" & isoCountryStr & ".dat"
+ ' isoLangStr & ".dat"
+ ' "en_US" & ".dat"
+
+ If fso.FileExists(fso.GetAbsolutePathName(langDir & "\" & isoLangStr & "-" & isoCountryStr & ".dat")) Then
+ GetResourceDataFileName = fso.GetAbsolutePathName(langDir & "\" & isoLangStr & "-" & isoCountryStr & ".dat")
+ ElseIf fso.FileExists(fso.GetAbsolutePathName(langDir & "\" & isoLangStr & ".dat")) Then
+ GetResourceDataFileName = fso.GetAbsolutePathName(langDir & "\" & isoLangStr & ".dat")
+ Else
+ isoLangStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO639LANGNAME)
+ isoCountryStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO3166CTRYNAME)
+
+ If fso.FileExists(fso.GetAbsolutePathName(langDir & "\" & isoLangStr & "-" & isoCountryStr & ".dat")) Then
+ GetResourceDataFileName = fso.GetAbsolutePathName(langDir & "\" & isoLangStr & "-" & isoCountryStr & ".dat")
+ ElseIf fso.FileExists(fso.GetAbsolutePathName(langDir & "\" & isoLangStr & ".dat")) Then
+ GetResourceDataFileName = fso.GetAbsolutePathName(langDir & "\" & isoLangStr & ".dat")
+ Else
+ GetResourceDataFileName = fso.GetAbsolutePathName(langDir & "\" & "en-US.dat")
+ End If
+ End If
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Function GetUserLocaleInfo(ByVal dwLocaleID As Long, ByVal dwLCType As Long) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetUserLocaleInfo"
+ Dim sReturn As String
+ Dim r As Long
+
+ 'call the function passing the Locale type
+ 'variable to retrieve the required size of
+ 'the string buffer needed
+ r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
+
+ 'if successful..
+ If r Then
+ 'pad the buffer with spaces
+ sReturn = Space$(r)
+
+ 'and call again passing the buffer
+ r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
+
+ 'if successful (r > 0)
+ If r Then
+ 'r holds the size of the string
+ 'including the terminating null
+ GetUserLocaleInfo = Left$(sReturn, r - 1)
+ End If
+ End If
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+' This function returns the Application Data Folder Path
+Function GetAppDataFolder() As String
+ Dim idlstr As Long
+ Dim sPath As String
+ Dim IDL As ITEMIDLIST
+ Const NOERROR = 0
+ Const MAX_LENGTH = 260
+ Const CSIDL_APPDATA = &H1A
+
+ On Error GoTo Err_GetFolder
+
+ ' Fill the idl structure with the specified folder item.
+ idlstr = SHGetSpecialFolderLocation(0, CSIDL_APPDATA, IDL)
+
+ If idlstr = NOERROR Then
+ ' Get the path from the idl list, and return
+ ' the folder with a slash at the end.
+ sPath = Space$(MAX_LENGTH)
+ idlstr = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal sPath)
+ If idlstr Then
+ GetAppDataFolder = Left$(sPath, InStr(sPath, Chr$(0)) - 1)
+ End If
+ End If
+
+Exit_GetFolder:
+ Exit Function
+
+Err_GetFolder:
+ MsgBox "An Error was Encountered" & Chr(13) & Err.Description, _
+ vbCritical Or vbOKOnly
+ Resume Exit_GetFolder
+
+End Function
+
+Sub WriteToStatFile(statFileName As String, statValue As Integer, _
+ currDocument As String, fso As Scripting.FileSystemObject)
+
+ On Error Resume Next
+
+ Dim fileCont As TextStream
+
+ Set fileCont = fso.OpenTextFile(statFileName, ForWriting, True, TristateTrue)
+ If (statValue = C_STAT_STARTING) Then
+ fileCont.WriteLine ("analysing=" & currDocument)
+ ElseIf (statValue = C_STAT_DONE) Then
+ fileCont.WriteLine ("analysed=" & currDocument)
+ ElseIf (statValue = C_STAT_FINISHED) Then
+ fileCont.WriteLine ("finished")
+ End If
+
+ fileCont.Close
+End Sub
+
+' The function FindIndex looks for a document in the given document list
+' starting at the position lastIndex in that list. If the document could
+' not be found, the function starts searching from the beginning
+
+Function FindIndex(myDocument As String, _
+ myDocList As Collection, _
+ lastIndex As Long) As Long
+
+ Dim lastEntry As Long
+ Dim curIndex As Long
+ Dim curEntry As String
+ Dim entryFound As Boolean
+
+ entryFound = False
+ lastEntry = myDocList.count
+
+ If (lastIndex > lastEntry) Then lastIndex = lastEntry
+
+ If (lastIndex > 1) Then
+ curIndex = lastIndex
+ Else
+ curIndex = 1
+ End If
+
+ While Not entryFound And curIndex <= lastEntry
+ curEntry = myDocList.item(curIndex)
+ If (curEntry = myDocument) Then
+ entryFound = True
+ Else
+ curIndex = curIndex + 1
+ End If
+ Wend
+
+ If (Not entryFound) Then
+ curIndex = 1
+ While Not entryFound And curIndex < lastIndex
+ curEntry = myDocList.item(curIndex)
+ If (curEntry = myDocument) Then
+ entryFound = True
+ Else
+ curIndex = curIndex + 1
+ End If
+ Wend
+ End If
+
+ If entryFound Then
+ FindIndex = curIndex
+ Else
+ FindIndex = 0
+ End If
+
+End Function
+
+' The sub GetIndexValues calulates the start index of the analysis and the index
+' of the file after which the next intermediate reult will be written
+Function GetIndexValues(startIndex As Long, nextCheck As Long, _
+ myFiles As Collection) As Boolean
+
+ Dim lastCheckpoint As String
+ Dim nextFile As String
+ Dim newResultsFile As Boolean
+
+ lastCheckpoint = ProfileGetItem(C_ANALYSIS, C_LAST_CHECKPOINT, "", mIniFilePath)
+ nextFile = ProfileGetItem(C_ANALYSIS, C_NEXT_FILE, "", mIniFilePath)
+ newResultsFile = True
+
+ If (nextFile = "") Then
+ ' No Analysis done yet
+ startIndex = 1
+ nextCheck = C_MAX_CHECK
+ Else
+ If (lastCheckpoint = "") Then
+ startIndex = 1
+ Else
+ startIndex = FindIndex(lastCheckpoint, myFiles, 1) + 1
+ If (startIndex > 0) Then newResultsFile = False
+ End If
+
+ nextCheck = FindIndex(nextFile, myFiles, startIndex - 1)
+
+ If (nextCheck = 0) Then ' Next file not in file list, restarting
+ startIndex = 1
+ nextCheck = C_MAX_CHECK
+ newResultsFile = True
+ ElseIf (nextCheck < startIndex) Then 'we are done?
+ nextCheck = startIndex + C_MAX_CHECK
+ ElseIf (nextCheck = startIndex) Then 'skip this one
+ WriteToLog C_ERROR_HANDLING_DOC & nextCheck, nextFile
+ startIndex = startIndex + 1
+ nextCheck = startIndex + C_MAX_CHECK
+ Else 'last time an error occured with that file, write before analysing
+ nextCheck = nextCheck - 1
+ End If
+ End If
+ GetIndexValues = newResultsFile
+End Function
+
+Private Sub GetDocModificationDates(docCounts As DocModificationDates)
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetDocModificationDates"
+
+ docCounts.lessThanThreemonths = CLng(ProfileGetItem("Analysis", C_DOCS_LESS_3_MONTH, "0", mIniFilePath))
+ docCounts.threeToSixmonths = CLng(ProfileGetItem("Analysis", C_DOCS_LESS_6_MONTH, "0", mIniFilePath))
+ docCounts.sixToTwelvemonths = CLng(ProfileGetItem("Analysis", C_DOCS_LESS_12_MONTH, "0", mIniFilePath))
+ docCounts.greaterThanOneYear = CLng(ProfileGetItem("Analysis", C_DOCS_MORE_12_MONTH, "0", mIniFilePath))
+
+FinalExit:
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/CollectedFiles.cls b/migrationanalysis/src/driver_docs/sources/CollectedFiles.cls
new file mode 100644
index 000000000000..6871b34c1471
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/CollectedFiles.cls
@@ -0,0 +1,380 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "CollectedFiles"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: CollectedFiles.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Private Const vbDot = 46
+Private Const MAX_PATH = 260
+Private Const INVALID_HANDLE_VALUE = -1
+Private Const vbBackslash = "\"
+Private Const ALL_FILES = "*.*"
+
+Private Type FILETIME
+ dwLowDateTime As Long
+ dwHighDateTime As Long
+End Type
+
+Private Type WIN32_FIND_DATA
+ dwFileAttributes As Long
+ ftCreationTime As FILETIME
+ ftLastAccessTime As FILETIME
+ ftLastWriteTime As FILETIME
+ nFileSizeHigh As Long
+ nFileSizeLow As Long
+ dwReserved0 As Long
+ dwReserved1 As Long
+ cFileName As String * MAX_PATH
+ cAlternate As String * 14
+End Type
+
+Private Type FILE_PARAMS
+ bRecurse As Boolean
+ nSearched As Long
+ sFileNameExt As String
+ sFileRoot As String
+End Type
+
+Private Declare Function FindClose Lib "kernel32" _
+ (ByVal hFindFile As Long) As Long
+
+Private Declare Function FindFirstFile Lib "kernel32" _
+ Alias "FindFirstFileA" _
+ (ByVal lpFileName As String, _
+ lpFindFileData As WIN32_FIND_DATA) As Long
+
+Private Declare Function FindNextFile Lib "kernel32" _
+ Alias "FindNextFileA" _
+ (ByVal hFindFile As Long, _
+ lpFindFileData As WIN32_FIND_DATA) As Long
+
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+
+Private Declare Function lstrlen Lib "kernel32" _
+ Alias "lstrlenW" (ByVal lpString As Long) As Long
+
+Private Declare Function PathMatchSpec Lib "shlwapi" _
+ Alias "PathMatchSpecW" _
+ (ByVal pszFileParam As Long, _
+ ByVal pszSpec As Long) As Long
+
+Private fp As FILE_PARAMS 'holds search parameters
+
+Private mWordFilesCol As Collection
+Private mExcelFilesCol As Collection
+Private mPPFilesCol As Collection
+
+Private mDocCount As Long
+Private mDotCount As Long
+Private mXlsCount As Long
+Private mXltCount As Long
+Private mPptCount As Long
+Private mPotCount As Long
+Private mbDocSearch As Boolean
+Private mbDotSearch As Boolean
+Private mbXlsSearch As Boolean
+Private mbXltSearch As Boolean
+Private mbPptSearch As Boolean
+Private mbPotSearch As Boolean
+
+Private mBannedList As Collection
+
+Private Sub Class_Initialize()
+ Set mWordFilesCol = New Collection
+ Set mExcelFilesCol = New Collection
+ Set mPPFilesCol = New Collection
+ Set mBannedList = New Collection
+End Sub
+Private Sub Class_Terminate()
+ Set mWordFilesCol = Nothing
+ Set mExcelFilesCol = Nothing
+ Set mPPFilesCol = Nothing
+ Set mBannedList = Nothing
+End Sub
+
+Public Property Get BannedList() As Collection
+ Set BannedList = mBannedList
+End Property
+Public Property Let BannedList(ByVal theList As Collection)
+ Set mBannedList = theList
+End Property
+
+Public Property Get DocCount() As Long
+ DocCount = mDocCount
+End Property
+Public Property Get DotCount() As Long
+ DotCount = mDotCount
+End Property
+Public Property Get XlsCount() As Long
+ XlsCount = mXlsCount
+End Property
+Public Property Get XltCount() As Long
+ XltCount = mXltCount
+End Property
+Public Property Get PptCount() As Long
+ PptCount = mPptCount
+End Property
+Public Property Get PotCount() As Long
+ PotCount = mPotCount
+End Property
+
+Public Property Get WordFiles() As Collection
+ Set WordFiles = mWordFilesCol
+End Property
+Public Property Get ExcelFiles() As Collection
+ Set ExcelFiles = mExcelFilesCol
+End Property
+Public Property Get PowerPointFiles() As Collection
+ Set PowerPointFiles = mPPFilesCol
+End Property
+
+Public Function count() As Long
+ count = mWordFilesCol.count + mExcelFilesCol.count + mPPFilesCol.count
+End Function
+
+
+Public Function Search(rootDir As String, _
+ FileSpecs As Collection, IncludeSubdirs As Boolean)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Search"
+
+ Dim tstart As Single 'timer var for this routine only
+ Dim tend As Single 'timer var for this routine only
+ Dim spec As Variant
+ Dim allSpecs As String
+ Dim fso As New FileSystemObject
+
+ If FileSpecs.count = 0 Then Exit Function
+
+ If FileSpecs.count > 1 Then
+ For Each spec In FileSpecs
+ allSpecs = allSpecs & "; " & spec
+ SetSearchBoolean CStr(spec)
+ Next
+ Else
+ allSpecs = FileSpecs(1)
+ SetSearchBoolean CStr(FileSpecs(1))
+ End If
+
+ With fp
+ .sFileRoot = QualifyPath(rootDir)
+ .sFileNameExt = allSpecs
+ .bRecurse = IncludeSubdirs
+ .nSearched = 0
+ End With
+
+ tstart = GetTickCount()
+ Call SearchForFiles(fp.sFileRoot)
+ tend = GetTickCount()
+
+ 'Debug:
+ 'MsgBox "Specs " & allSpecs & vbLf & _
+ ' Format$(fp.nSearched, "###,###,###,##0") & vbLf & _
+ ' Format$(count, "###,###,###,##0") & vbLf & _
+ ' FormatNumber((tend - tstart) / 1000, 2) & " seconds"
+
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Function isBannedFile(thePath As String) As Boolean
+
+ Dim aPath As Variant
+ Dim theResult As Boolean
+ theResult = False
+ For Each aPath In mBannedList
+ If aPath = thePath Then
+ theResult = True
+ GoTo FinalExit
+ End If
+ Next
+
+FinalExit:
+ isBannedFile = theResult
+End Function
+Sub SetSearchBoolean(spec As String)
+
+ If spec = "*.doc" Then
+ mbDocSearch = True
+ End If
+ If spec = "*.dot" Then
+ mbDotSearch = True
+ End If
+ If spec = "*.xls" Then
+ mbXlsSearch = True
+ End If
+ If spec = "*.xlt" Then
+ mbXltSearch = True
+ End If
+ If spec = "*.ppt" Then
+ mbPptSearch = True
+ End If
+ If spec = "*.pot" Then
+ mbPotSearch = True
+ End If
+
+End Sub
+
+Private Sub SearchForFiles(sRoot As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SearchForFiles"
+
+ Dim WFD As WIN32_FIND_DATA
+ Dim hFile As Long
+ Dim path As String
+ Dim WordDriverPathTemp As String
+ Dim ExcelDriverPathTemp As String
+ Dim PPDriverPathTemp As String
+
+ hFile = FindFirstFile(sRoot & ALL_FILES, WFD)
+
+ If hFile = INVALID_HANDLE_VALUE Then GoTo FinalExit
+
+ Do
+ 'if a folder, and recurse specified, call
+ 'method again
+ If (WFD.dwFileAttributes And vbDirectory) Then
+ If Asc(WFD.cFileName) <> vbDot Then
+ If fp.bRecurse Then
+ SearchForFiles sRoot & TrimNull(WFD.cFileName) & vbBackslash
+ End If
+ End If
+ Else
+ 'must be a file..
+ If mbDocSearch Then
+ If MatchSpec(WFD.cFileName, "*.doc") Then
+ path = sRoot & TrimNull(WFD.cFileName)
+ 'If StrComp(path, mWordDriverPath, vbTextCompare) <> 0 Then
+ If Not isBannedFile(path) Then
+ mDocCount = mDocCount + 1
+ mWordFilesCol.Add path
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ End If
+ If mbDotSearch Then
+ If MatchSpec(WFD.cFileName, "*.dot") Then
+ mDotCount = mDotCount + 1
+ mWordFilesCol.Add sRoot & TrimNull(WFD.cFileName)
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbXlsSearch Then
+ If MatchSpec(WFD.cFileName, "*.xls") Then
+ path = sRoot & TrimNull(WFD.cFileName)
+ 'If StrComp(TrimNull(WFD.cFileName), CEXCEL_DRIVER_FILE, vbTextCompare) <> 0 Then
+ If Not isBannedFile(path) Then
+ mXlsCount = mXlsCount + 1
+ mExcelFilesCol.Add sRoot & TrimNull(WFD.cFileName)
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ End If
+ If mbXltSearch Then
+ If MatchSpec(WFD.cFileName, "*.xlt") Then
+ mXltCount = mXltCount + 1
+ mExcelFilesCol.Add sRoot & TrimNull(WFD.cFileName)
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbPptSearch Then
+ If MatchSpec(WFD.cFileName, "*.ppt") Then
+ path = sRoot & TrimNull(WFD.cFileName)
+ 'If StrComp(path, mPPDriverPath, vbTextCompare) <> 0 Then
+ If Not isBannedFile(path) Then
+ mPptCount = mPptCount + 1
+ mPPFilesCol.Add path
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ End If
+ If mbPotSearch Then
+ If MatchSpec(WFD.cFileName, "*.pot") Then
+ mPotCount = mPotCount + 1
+ mPPFilesCol.Add sRoot & TrimNull(WFD.cFileName)
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+
+ End If 'If WFD.dwFileAttributes
+
+CONTINUE_LOOP:
+ fp.nSearched = fp.nSearched + 1
+
+ Loop While FindNextFile(hFile, WFD)
+
+FinalExit:
+ Call FindClose(hFile)
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+
+Private Function QualifyPath(sPath As String) As String
+
+ If Right$(sPath, 1) <> vbBackslash Then
+ QualifyPath = sPath & vbBackslash
+ Else: QualifyPath = sPath
+ End If
+
+End Function
+
+
+Private Function TrimNull(startstr As String) As String
+
+ TrimNull = Left$(startstr, lstrlen(StrPtr(startstr)))
+
+End Function
+
+
+Private Function MatchSpec(sFile As String, sSpec As String) As Boolean
+
+ MatchSpec = PathMatchSpec(StrPtr(sFile), StrPtr(sSpec))
+
+End Function
+
+
+
+
diff --git a/migrationanalysis/src/driver_docs/sources/CommonMigrationAnalyser.bas b/migrationanalysis/src/driver_docs/sources/CommonMigrationAnalyser.bas
new file mode 100644
index 000000000000..d165054fa7b0
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/CommonMigrationAnalyser.bas
@@ -0,0 +1,1121 @@
+Attribute VB_Name = "CommonMigrationAnalyser"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: CommonMigrationAnalyser.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+
+'***********************************************
+'**** APPLICATION COMMON ANALYSIS FUNCTIONS ****
+'***********************************************
+
+'** Common - XML Issue and SubIssue strings
+'For preparation - need access to some Word/ Excel or PP consts
+Public Const CSTR_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES = "ObjectsGraphicsAndFrames"
+Public Const CSTR_SUBISSUE_OBJECT_IN_HEADER_FOOTER = "ObjectInHeaderFooter"
+
+Public Const CSTR_ISSUE_INFORMATION = "Information"
+Public Const CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES = "ContentAndDocumentProperties"
+Public Const CSTR_ISSUE_FORMAT = "Format"
+Public Const CSTR_ISSUE_PORTABILITY = "Portability"
+Public Const CSTR_ISSUE_VBA_MACROS = "VBAMacros"
+
+Public Const CSTR_SUBISSUE_DOCUMENT_PARTS_PROTECTION = "DocumentPartsProtection"
+Public Const CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO = "ExternalReferencesInMacro"
+Public Const CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO_COUNT = "ExternalReferencesInMacroCount"
+Public Const CSTR_SUBISSUE_GRADIENT = "Gradient"
+Public Const CSTR_SUBISSUE_INVALID_PASSWORD_ENTERED = "InvalidPasswordEntered"
+Public Const CSTR_SUBISSUE_LINE = "Line"
+Public Const CSTR_SUBISSUE_MACRO_PASSWORD_PROTECTION = "PasswordProtected"
+Public Const CSTR_SUBISSUE_OLD_WORKBOOK_VERSION = "OldWorkbookVersion"
+Public Const CSTR_SUBISSUE_OLE_EMBEDDED = "EmbeddedOLEObject"
+Public Const CSTR_SUBISSUE_OLE_LINKED = "LinkedOLEObject"
+Public Const CSTR_SUBISSUE_OLE_CONTROL = "OLEControl"
+Public Const CSTR_SUBISSUE_OLE_FIELD_LINK = "OLEFieldLink"
+Public Const CSTR_SUBISSUE_OLE_UNKNOWN = "UnknownType"
+Public Const CSTR_SUBISSUE_PASSWORDS_PROTECTION = "PasswordProtection"
+Public Const CSTR_SUBISSUE_PROPERTIES = "Properties"
+Public Const CSTR_SUBISSUE_REFERENCES = "References"
+Public Const CSTR_SUBISSUE_TRANSPARENCY = "Transparency"
+Public Const CSTR_SUBISSUE_VBA_MACROS_NUMLINES = "NumberOfLines"
+Public Const CSTR_SUBISSUE_VBA_MACROS_USERFORMS_COUNT = "UserFormsCount"
+Public Const CSTR_SUBISSUE_VBA_MACROS_USERFORMS_CONTROL_COUNT = "UserFormsControlCount"
+Public Const CSTR_SUBISSUE_VBA_MACROS_USERFORMS_CONTROLTYPE_COUNT = "UserFormsControlTypeCount"
+Public Const CSTR_SUBISSUE_VBA_MACROS_UNIQUE_MODULE_COUNT = "UniqueModuleCount"
+Public Const CSTR_SUBISSUE_VBA_MACROS_UNIQUE_LINE_COUNT = "UniqueLineCount"
+'** END Common - XML Issue and SubIssue strings
+
+'Macro classification bounds
+Public Const CMACRO_LINECOUNT_MEDIUM_LBOUND = 50
+
+'Don't localize folder name
+Public Const CSTR_COMMON_PREPARATION_FOLDER = "prepared"
+
+
+Public Enum EnumDocOverallMacroClass
+ enMacroNone = 0
+ enMacroSimple = 1
+ enMacroMedium = 2
+ enMacroComplex = 3
+End Enum
+Public Enum EnumDocOverallIssueClass
+ enNone = 0
+ enMinor = 1
+ enComplex = 2
+End Enum
+
+Sub EmptyCollection(docAnalysis As DocumentAnalysis, coll As Collection)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "EmptyCollection"
+ Dim Num As Long
+ For Num = 1 To coll.count ' Remove name from the collection.
+ coll.Remove 1 ' Default collection numeric indexes
+ Next ' begin at 1.
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Public Function Analyze_Macros(docAnalysis As DocumentAnalysis, _
+ userFormTypesDict As Scripting.Dictionary, _
+ currDoc As Object)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Macros"
+ Dim macroDetails As String
+ Dim cmpDetails As String
+ Dim myProject As VBProject
+ Dim myComponent As VBComponent
+ Dim numLines As Long
+ Dim myIssue As IssueInfo
+ Dim wrd As Object
+ Dim bUserFormWithEmptyCodeModule As Boolean
+
+ On Error Resume Next
+ Set myProject = getAppSpecificVBProject(currDoc)
+ If Err.Number <> 0 Then
+ ' Failed to get access to VBProject
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & _
+ RID_STR_COMMON_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT & ":" & _
+ RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE
+
+ GoTo FinalExit
+ End If
+
+ On Error GoTo HandleErrors
+ If myProject.Protection = vbext_pp_locked Then
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_VBA_MACROS
+ .IssueType = RID_STR_COMMON_ISSUE_VBA_MACROS
+ .SubType = RID_STR_COMMON_SUBISSUE_MACRO_PASSWORD_PROTECTION
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_VBA_MACROS
+ .SubTypeXML = CSTR_SUBISSUE_MACRO_PASSWORD_PROTECTION
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_VBPROJECT_PASSWORD
+ .Values.Add RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE
+ End With
+ docAnalysis.IssuesCountArray(CID_VBA_MACROS) = _
+ docAnalysis.IssuesCountArray(CID_VBA_MACROS) + 1
+ docAnalysis.Issues.Add myIssue
+ docAnalysis.MacroIssuesCount = docAnalysis.MacroIssuesCount + 1
+
+ docAnalysis.HasMacros = True
+ GoTo FinalExit
+ End If
+
+ Dim myContolDict As Scripting.Dictionary
+ For Each myComponent In myProject.VBComponents
+
+ bUserFormWithEmptyCodeModule = False
+ If CheckEmptyProject(docAnalysis, myProject, myComponent) Then
+ If myComponent.Type <> vbext_ct_MSForm Then
+ GoTo FOREACH_CONTINUE
+ Else
+ bUserFormWithEmptyCodeModule = True
+ End If
+ End If
+
+ Analyze_MacrosForPortabilityIssues docAnalysis, myProject, myComponent
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_VBA_MACROS
+ .IssueType = RID_STR_COMMON_ISSUE_VBA_MACROS
+ .SubType = RID_STR_COMMON_SUBISSUE_PROPERTIES
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_VBA_MACROS
+ .SubTypeXML = CSTR_SUBISSUE_PROPERTIES
+ .locationXML = .CXMLLocationDocument
+
+ .SubLocation = VBComponentType(myComponent)
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_PROJECT
+ .Values.Add myProject.name
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_COMPONENT
+ .Values.Add myComponent.name
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_PROCEDURES
+ .Values.Add VBNumFuncs(docAnalysis, myComponent.CodeModule), RID_STR_COMMON_ATTRIBUTE_PROCEDURES
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES
+ numLines = VBNumLines(docAnalysis, myComponent.CodeModule)
+ .Values.Add numLines, RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES
+
+ If bUserFormWithEmptyCodeModule Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SIGNATURE
+ .Values.Add RID_STR_COMMON_NA, RID_STR_COMMON_ATTRIBUTE_SIGNATURE
+ Else
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SIGNATURE
+ .Values.Add MD5HashString( _
+ myComponent.CodeModule.Lines(1, myComponent.CodeModule.CountOfLines)), _
+ RID_STR_COMMON_ATTRIBUTE_SIGNATURE
+ End If
+
+ docAnalysis.MacroTotalNumLines = numLines + docAnalysis.MacroTotalNumLines
+ End With
+
+ ' User Forms - control details
+ If (myComponent.Type = vbext_ct_MSForm) And Not bUserFormWithEmptyCodeModule Then
+ myIssue.Attributes.Add RID_STR_COMMON_ATTRIBUTE_CONTROLS
+ myIssue.Values.Add myComponent.Designer.Controls.count, RID_STR_COMMON_ATTRIBUTE_CONTROLS
+ docAnalysis.MacroNumUserForms = 1 + docAnalysis.MacroNumUserForms
+ docAnalysis.MacroNumUserFormControls = myComponent.Designer.Controls.count + docAnalysis.MacroNumUserFormControls
+
+ Dim myControl As Control
+ Dim controlTypes As String
+ Dim myType As String
+
+ Set myContolDict = New Scripting.Dictionary
+
+ For Each myControl In myComponent.Designer.Controls
+ myType = TypeName(myControl)
+ If myContolDict.Exists(myType) Then
+ myContolDict.item(myType) = myContolDict.item(myType) + 1
+ Else
+ myContolDict.Add myType, 1
+ End If
+ If userFormTypesDict.Exists(myType) Then
+ userFormTypesDict.item(myType) = userFormTypesDict.item(myType) + 1
+ Else
+ userFormTypesDict.Add myType, 1
+ End If
+ Next
+
+ If myComponent.Designer.Controls.count > 0 Then
+ Dim count As Long
+ Dim vKeyArray As Variant
+ Dim vItemArray As Variant
+
+ vKeyArray = myContolDict.Keys
+ vItemArray = myContolDict.Items
+
+ controlTypes = ""
+ For count = 0 To myContolDict.count - 1
+ controlTypes = controlTypes & vKeyArray(count) & " " & CInt(vItemArray(count)) & " "
+ Next count
+ myIssue.Attributes.Add RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE
+ myIssue.Values.Add controlTypes, RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE
+
+ myIssue.Attributes.Add RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT
+ myIssue.Values.Add myContolDict.count, RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT
+
+ docAnalysis.MacroNumUserFormControlTypes = myContolDict.count + docAnalysis.MacroNumUserFormControlTypes
+ End If
+ Set myContolDict = Nothing
+ End If
+
+ 'Check for occurence of " Me " in Form and Class Modules
+ If myComponent.Type = vbext_ct_MSForm Or _
+ myComponent.Type = vbext_ct_ClassModule Then
+
+ Dim strFind As String
+ strFind = ""
+ count = 0
+ strFind = VBFindLines(docAnalysis, myComponent.CodeModule, "Me", count, bWholeWord:=True)
+' If (strFind <> "") Then MsgBox strFind
+
+ If count > 0 Then
+ myIssue.Attributes.Add RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT
+ myIssue.Values.Add count, RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT
+ End If
+ End If
+
+ docAnalysis.IssuesCountArray(CID_VBA_MACROS) = _
+ docAnalysis.IssuesCountArray(CID_VBA_MACROS) + 1
+ docAnalysis.Issues.Add myIssue
+ docAnalysis.MacroIssuesCount = docAnalysis.MacroIssuesCount + 1
+
+ Set myIssue = Nothing
+
+FOREACH_CONTINUE:
+ 'No equiv to C continue in VB
+ Next myComponent 'End - For Each myComponent
+
+ If docAnalysis.IssuesCountArray(CID_VBA_MACROS) > 0 Then
+ Analyze_VBEReferences docAnalysis, currDoc
+ docAnalysis.HasMacros = True
+ End If
+
+FinalExit:
+ docAnalysis.MacroOverallClass = ClassifyDocOverallMacroClass(docAnalysis)
+
+ Set myProject = Nothing
+ Set myIssue = Nothing
+ Set myContolDict = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function CheckOnlyEmptyProject(docAnalysis As DocumentAnalysis, currDoc As Object) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckOnlyEmptyProject"
+ Dim myProject As VBProject
+ Set myProject = getAppSpecificVBProject(currDoc)
+ Dim myVBComponent As VBComponent
+
+ For Each myVBComponent In myProject.VBComponents
+ If Not CheckEmptyProject(docAnalysis, myProject, myVBComponent) Then
+ CheckOnlyEmptyProject = False
+ GoTo FinalExit
+ End If
+ Next myVBComponent
+
+ CheckOnlyEmptyProject = True
+
+FinalExit:
+ Set myProject = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub Analyze_VBEReferences(docAnalysis As DocumentAnalysis, currDoc As Object)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_VBEReferences"
+ 'References
+ Dim Ref As Reference
+ Dim fso As Scripting.FileSystemObject
+ Dim myVBProject As VBProject
+ Dim myVBComponent As VBComponent
+
+ Set fso = New Scripting.FileSystemObject
+
+ If CheckOnlyEmptyProject(docAnalysis, currDoc) Then
+ Exit Sub
+ End If
+ Set myVBProject = getAppSpecificVBProject(currDoc)
+
+ For Each Ref In myVBProject.References
+ Analyze_VBEReferenceSingle docAnalysis, Ref, fso
+ Next Ref
+
+FinalExit:
+ Set myVBProject = Nothing
+ Set fso = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_VBEReferenceSingle(docAnalysis As DocumentAnalysis, Ref As Reference, fso As Scripting.FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_VBEReferenceSingle"
+ 'References
+ Dim myIssue As IssueInfo
+ Dim bBadRef As Boolean
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_INFORMATION_REFS
+ .IssueType = RID_STR_COMMON_ISSUE_INFORMATION
+ .SubType = RID_STR_COMMON_SUBISSUE_REFERENCES
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_INFORMATION
+ .SubTypeXML = CSTR_SUBISSUE_REFERENCES
+ .locationXML = .CXMLLocationDocument
+
+ If Ref.GUID = "" Then
+ bBadRef = True
+ Else
+ bBadRef = False
+ End If
+ If Not bBadRef Then
+ .SubLocation = LCase(fso.GetFileName(Ref.FullPath))
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add Ref.name, RID_STR_COMMON_ATTRIBUTE_NAME
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_DESCRIPTION
+ .Values.Add Ref.Description, RID_STR_COMMON_ATTRIBUTE_DESCRIPTION
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_FILE
+ .Values.Add LCase(fso.GetFileName(Ref.FullPath)), RID_STR_COMMON_ATTRIBUTE_FILE
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_PATH
+ .Values.Add LCase(Ref.FullPath), RID_STR_COMMON_ATTRIBUTE_PATH
+ Else
+ .SubLocation = RID_STR_COMMON_NA
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add RID_STR_COMMON_ATTRIBUTE_MISSING, RID_STR_COMMON_ATTRIBUTE_NAME
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_DESCRIPTION
+ .Values.Add RID_STR_COMMON_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES, RID_STR_COMMON_ATTRIBUTE_DESCRIPTION
+ End If
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_MAJOR
+ .Values.Add IIf(Not bBadRef, Ref.Major, ""), RID_STR_COMMON_ATTRIBUTE_MAJOR
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_MINOR
+ .Values.Add IIf(Not bBadRef, Ref.Minor, ""), RID_STR_COMMON_ATTRIBUTE_MINOR
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_TYPE
+ .Values.Add IIf(Ref.Type = vbext_rk_Project, RID_STR_COMMON_ATTRIBUTE_PROJECT, RID_STR_COMMON_ATTRIBUTE_TYPELIB), RID_STR_COMMON_ATTRIBUTE_TYPE
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_BUILTIN
+ .Values.Add IIf(Ref.BuiltIn, RID_STR_COMMON_ATTRIBUTE_BUILTIN, RID_STR_COMMON_ATTRIBUTE_CUSTOM), RID_STR_COMMON_ATTRIBUTE_BUILTIN
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_ISBROKEN
+ .Values.Add IIf(bBadRef, RID_STR_COMMON_ATTRIBUTE_BROKEN, RID_STR_COMMON_ATTRIBUTE_INTACT), RID_STR_COMMON_ATTRIBUTE_ISBROKEN
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_GUID
+ .Values.Add IIf(Ref.Type = vbext_rk_TypeLib, Ref.GUID, ""), RID_STR_COMMON_ATTRIBUTE_GUID
+ End With
+
+ docAnalysis.References.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebugLevelTwo currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_MacrosForPortabilityIssues(docAnalysis As DocumentAnalysis, myProject As VBProject, myComponent As VBComponent)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_MacrosForPortabilityIssues"
+ Dim myIssue As IssueInfo
+ Dim count As Long
+
+ ' Code Modules
+ Dim strFind As String
+ strFind = VBFindLines(docAnalysis, myComponent.CodeModule, "CreateObject", count, bWholeWord:=True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "GetObject", count, bWholeWord:=True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "ADODB.", count, True, True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "Word.", count, True, True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "Excel.", count, True, True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "PowerPoint.", count, True, True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "Access.", count, True, True) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "Declare Function ", count, False) & _
+ VBFindLines(docAnalysis, myComponent.CodeModule, "Declare Sub ", count, False)
+
+
+ If (strFind <> "") And (myComponent.Type <> vbext_ct_Document) Then
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_PORTABILITY
+ .IssueType = RID_STR_COMMON_ISSUE_PORTABILITY
+ .SubType = RID_STR_COMMON_SUBISSUE_EXTERNAL_REFERENCES_IN_MACROS
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_PORTABILITY
+ .SubTypeXML = CSTR_SUBISSUE_EXTERNAL_REFERENCES_IN_MACRO
+ .locationXML = .CXMLLocationDocument
+
+ .SubLocation = VBComponentType(myComponent)
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_PROJECT
+ .Values.Add myProject.name
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_COMPONENT
+ .Values.Add myComponent.name
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES
+ .Values.Add RID_STR_COMMON_ATTRIBUTE_INCLUDING & vbLf & Left(strFind, Len(strFind) - 1)
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT
+ .Values.Add count, RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT
+ End With
+ docAnalysis.IssuesCountArray(CID_PORTABILITY) = _
+ docAnalysis.IssuesCountArray(CID_PORTABILITY) + 1
+ docAnalysis.Issues.Add myIssue
+ docAnalysis.MacroNumExternalRefs = count + docAnalysis.MacroNumExternalRefs
+ docAnalysis.MacroIssuesCount = docAnalysis.MacroIssuesCount + 1
+ End If
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+Resume FinalExit
+End Sub
+
+'Find Lines in code module containing strFind and return list of them
+Function VBFindLines(docAnalysis As DocumentAnalysis, vbcm As CodeModule, strFind As String, _
+ count As Long, _
+ Optional bInProcedure As Boolean = True, _
+ Optional bUsingNew As Boolean = False, _
+ Optional bWholeWord As Boolean = False, _
+ Optional bMatchCase As Boolean = False) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "VBFindLines"
+ Dim lngStartLine As Long
+ Dim lngStartCol As Long
+ Dim lngEndLine As Long
+ Dim lngEndCol As Long
+ Dim strLine As String
+ lngStartLine = 1
+ lngStartCol = 1
+ lngEndLine = vbcm.CountOfLines
+ Dim tmpString As String
+ If (vbcm.CountOfLines = 0) Then
+ Exit Function
+ End If
+ tmpString = vbcm.Lines(vbcm.CountOfLines, 1)
+ lngEndCol = Len(vbcm.Lines(vbcm.CountOfLines, 1))
+ Dim lngType As Long
+ Dim strProc As String
+ Dim retStr As String
+
+ ' Search
+ Do While vbcm.Find(strFind, lngStartLine, _
+ lngStartCol, lngEndLine, lngEndCol, bWholeWord, bMatchCase)
+
+ 'Ignore any lines using this func
+ If InStr(1, vbcm.Lines(lngStartLine, 1), "VBFindLines") <> 0 Then
+ GoTo CONTINUE_LOOP
+ End If
+
+ If bInProcedure Then
+ If bUsingNew Then
+ If InStr(1, vbcm.Lines(lngStartLine, 1), "New") <> 0 Then
+ strProc = vbcm.ProcOfLine(lngStartLine, lngType)
+ Else
+ strProc = ""
+ End If
+ Else
+ strProc = vbcm.ProcOfLine(lngStartLine, lngType)
+ End If
+ If strProc = "" Then GoTo CONTINUE_LOOP
+
+ VBFindLines = VBFindLines & "[" & strProc & " ( ) - " & lngStartLine & " ]" & _
+ vbLf & vbcm.Lines(lngStartLine, 1) & vbLf
+ Else
+ strProc = vbcm.Lines(lngStartLine, 1)
+ If strProc = "" Then GoTo CONTINUE_LOOP
+
+ 'Can be External refs, Const, Type or variable declarations
+ If InStr(1, vbcm.Lines(lngStartLine, 1), "Declare Function") <> 0 Then
+ VBFindLines = VBFindLines & "[" & RID_STR_COMMON_DEC_TO_EXTERNAL_LIBRARY & " - " & lngStartLine & " ]" & _
+ vbLf & strProc & vbLf
+ Else
+ VBFindLines = VBFindLines & "[" & RID_STR_COMMON_VB_COMPONENT_MODULE & " " & strFind & _
+ " - " & lngStartLine & " ]" & vbLf
+ End If
+ End If
+ count = count + 1
+
+CONTINUE_LOOP:
+ 'Reset Params to search for next hit
+ lngStartLine = lngEndLine + 1
+ lngStartCol = 1
+ lngEndLine = vbcm.CountOfLines
+ lngEndCol = Len(vbcm.Lines(vbcm.CountOfLines, 1))
+
+ If lngStartLine >= lngEndLine Then Exit Function
+
+ Loop 'End - Do While vbcm.Find
+ VBFindLines = VBFindLines
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Function VBNumLines(docAnalysis As DocumentAnalysis, vbcm As CodeModule) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "VBNumLines"
+ Dim cLines As Long
+ Dim lngType As Long
+ Dim strProc As String
+
+ 'Issue: Just give line count in module to be in sync with Macro Analysis and Migration Wizard
+ VBNumLines = vbcm.CountOfLines
+
+ 'For cLines = 1 To vbcm.CountOfLines
+ ' strProc = vbcm.ProcOfLine(cLines, lngType)
+ ' If strProc <> "" Then
+ ' VBNumLines = VBNumLines - _
+ ' (vbcm.ProcBodyLine(strProc, lngType) - vbcm.ProcStartLine(strProc, lngType))
+ ' cLines = cLines + vbcm.ProcCountLines(strProc, lngType) - 1
+ ' End If
+ 'Next
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Function VBNumFuncs(docAnalysis As DocumentAnalysis, vbcm As CodeModule) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "VBNumFuncs"
+ Dim cLines As Long
+ Dim lngType As Long
+ Dim strProc As String
+
+ For cLines = 1 To vbcm.CountOfLines
+ strProc = vbcm.ProcOfLine(cLines, lngType)
+ If strProc <> "" Then
+ VBNumFuncs = VBNumFuncs + 1
+ cLines = cLines + vbcm.ProcCountLines(strProc, lngType) - 1
+ End If
+ Next
+ Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Function VBComponentType(vbc As VBComponent) As String
+ Select Case vbc.Type
+ Case vbext_ct_StdModule
+ VBComponentType = RID_STR_COMMON_VB_COMPONENT_STANDARD
+ Case vbext_ct_ClassModule
+ VBComponentType = RID_STR_COMMON_VB_COMPONENT_CLASS
+ Case vbext_ct_MSForm
+ VBComponentType = RID_STR_COMMON_VB_COMPONENT_USER_FORM
+ Case vbext_ct_Document
+ VBComponentType = RID_STR_COMMON_VB_COMPONENT_DOCUMENT
+ Case 11 'vbext_ct_ActiveX Designer
+ VBComponentType = RID_STR_COMMON_VB_COMPONENT_ACTIVEX_DESIGNER
+ Case Else
+ VBComponentType = RID_STR_COMMON_UNKNOWN
+ End Select
+End Function
+
+Function CheckEmptyProject(docAnalysis As DocumentAnalysis, myProject As VBProject, myComponent As VBComponent) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckEmptyProject"
+ Dim bEmptyProject As Boolean
+
+ 'Bug: Can have empty project with different name from default, would be picked up
+ ' as not empty.
+ 'bEmptyProject = _
+ ' (StrComp(myProject.name, CTOPLEVEL_PROJECT) = 0) And _
+ ' (VBNumFuncs(docAnalysis, myComponent.CodeModule) = 0) And _
+ ' (VBNumLines(docAnalysis, myComponent.CodeModule) < 3)
+
+ ' Code Modules
+ Dim strFind As String
+ Dim count As Long
+ 'Check for:
+ 'Public Const myFoo ....
+ 'Public Declare Function ....
+ 'Public myVar As ...
+ strFind = VBFindLines(docAnalysis, myComponent.CodeModule, "Public", _
+ count, bInProcedure:=False, bWholeWord:=True, bMatchCase:=True)
+
+ bEmptyProject = _
+ (VBNumFuncs(docAnalysis, myComponent.CodeModule) = 0) And _
+ (VBNumLines(docAnalysis, myComponent.CodeModule) < 3) And _
+ (strFind = "")
+
+ CheckEmptyProject = IIf(bEmptyProject, True, False)
+ Exit Function
+
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Function getCustomDocPropTypeAsString(propType As MsoDocProperties)
+ Dim Str As String
+
+ Select Case propType
+ Case msoPropertyTypeBoolean
+ Str = RID_STR_COMMON_YES_OR_NO
+ Case msoPropertyTypeDate
+ Str = RID_STR_COMMON_DATE
+ Case msoPropertyTypeFloat
+ Str = RID_STR_COMMON_NUMBER
+ Case msoPropertyTypeNumber
+ Str = RID_STR_COMMON_NUMBER
+ Case msoPropertyTypeString
+ Str = RID_STR_COMMON_TEXT
+ Case Else
+ Str = "Unknown"
+ End Select
+
+ getCustomDocPropTypeAsString = Str
+End Function
+
+Sub HandleProtectedDocInvalidPassword(docAnalysis As DocumentAnalysis, strError As String, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "HandleProtectedDocInvalidPassword"
+ Dim f As File
+ Set f = fso.GetFile(docAnalysis.name)
+
+ docAnalysis.Application = RID_STR_COMMON_PASSWORD_SKIPDOC
+
+ On Error Resume Next
+ docAnalysis.PageCount = 0
+ docAnalysis.Created = f.DateCreated
+ docAnalysis.Modified = f.DateLastModified
+ docAnalysis.Accessed = f.DateLastAccessed
+ docAnalysis.Printed = DateValue("01/01/1900")
+ docAnalysis.SavedBy = RID_STR_COMMON_NA
+ docAnalysis.Revision = 0
+ docAnalysis.Template = RID_STR_COMMON_NA
+ On Error GoTo HandleErrors
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_COMMON_SUBISSUE_INVALID_PASSWORD_ENTERED
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_INVALID_PASSWORD_ENTERED
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_PASSWORD
+ .Values.Add strError
+
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ docAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Set f = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_OLEEmbeddedSingleShape(docAnalysis As DocumentAnalysis, aShape As Shape, mySubLocation As Variant)
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_OLEEmbeddedSingleShape"
+ Dim myIssue As IssueInfo
+ Dim bOleObject As Boolean
+ Dim TypeAsString As String
+ Dim XMLTypeAsString As String
+ Dim objName As String
+
+ bOleObject = (aShape.Type = msoEmbeddedOLEObject) Or _
+ (aShape.Type = msoLinkedOLEObject) Or _
+ (aShape.Type = msoOLEControlObject)
+
+ If Not bOleObject Then Exit Sub
+
+ aShape.Select
+ Select Case aShape.Type
+ Case msoEmbeddedOLEObject
+ TypeAsString = RID_STR_COMMON_OLE_EMBEDDED
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_EMBEDDED
+ Case msoLinkedOLEObject
+ TypeAsString = RID_STR_COMMON_OLE_LINKED
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_LINKED
+ Case msoOLEControlObject
+ TypeAsString = RID_STR_COMMON_OLE_CONTROL
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_CONTROL
+ Case Else
+ TypeAsString = RID_STR_COMMON_OLE_UNKNOWN
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_UNKNOWN
+ End Select
+
+ Dim appStr As String
+ appStr = getAppSpecificApplicationName
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_PORTABILITY
+ .IssueType = RID_STR_COMMON_ISSUE_PORTABILITY
+ .SubType = TypeAsString
+ .Location = .CLocationPage
+ .SubLocation = mySubLocation
+
+ .IssueTypeXML = CSTR_ISSUE_PORTABILITY
+ .SubTypeXML = XMLTypeAsString
+ .locationXML = .CXMLLocationPage
+
+ .Line = aShape.top
+ .column = aShape.Left
+
+ If aShape.name <> "" Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add aShape.name
+ End If
+
+ If aShape.Type = msoEmbeddedOLEObject Or _
+ aShape.Type = msoOLEControlObject Then
+ Dim objType As String
+ On Error Resume Next
+
+ objType = getAppSpecificOLEClassType(aShape)
+
+ If objType = "" Then GoTo FinalExit
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE
+ .Values.Add objType
+
+ If aShape.Type = msoOLEControlObject Then
+ docAnalysis.MacroNumOLEControls = 1 + docAnalysis.MacroNumOLEControls
+ End If
+
+ If appStr = CAPPNAME_POWERPOINT Then
+ '#114127: Too many open windows
+ 'Checking for OLEFormat.Object is Nothing or IsEmpty still causes problem
+ If objType <> "Equation.3" Then
+ objName = aShape.OLEFormat.Object.name
+ If Err.Number = 0 Then
+ If aShape.name <> objName Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME
+ .Values.Add objName
+ End If
+ End If
+ End If
+ Else
+ If Not (aShape.OLEFormat.Object) Is Nothing Then
+ objName = aShape.OLEFormat.Object.name
+ If Err.Number = 0 Then
+ If aShape.name <> objName Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME
+ .Values.Add objName
+ End If
+ End If
+ End If
+ End If
+
+ On Error GoTo HandleErrors
+ End If
+
+ If aShape.Type = msoLinkedOLEObject Then
+ If appStr <> CAPPNAME_WORD Then
+ On Error Resume Next
+ Dim path As String
+ path = aShape.OLEFormat.Object.SourceFullName
+ If Err.Number = 0 Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SOURCE
+ .Values.Add path
+ End If
+ On Error GoTo HandleErrors
+ Else
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SOURCE
+ .Values.Add aShape.LinkFormat.SourceFullName
+ End If
+ End If
+
+ docAnalysis.IssuesCountArray(CID_PORTABILITY) = _
+ docAnalysis.IssuesCountArray(CID_PORTABILITY) + 1
+ End With
+ docAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebugLevelTwo currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Lines(docAnalysis As DocumentAnalysis, myShape As Shape, mySubLocation As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Lines"
+
+ If myShape.Line.Style = msoLineSingle Or _
+ myShape.Line.Style = msoLineStyleMixed Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_LineStyle
+ .Location = .CLocationPage
+ .SubLocation = mySubLocation
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_LINE
+ .locationXML = .CXMLLocationPage
+
+ .Line = myShape.top
+ .column = myShape.Left
+
+ If myShape.name <> "" Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+ End If
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_SUBISSUE_LINE_NOTE
+
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ docAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Transparency(docAnalysis As DocumentAnalysis, myShape As Shape, mySubLocation As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Transparency"
+
+ If Not myShape.Type = msoPicture Then Exit Sub
+
+ Dim bHasTransparentBkg
+ bHasTransparentBkg = False
+
+ On Error Resume Next
+ If myShape.PictureFormat.TransparentBackground = msoTrue Then
+ If Error.Number = 0 Then
+ bHasTransparentBkg = True
+ End If
+ End If
+
+ On Error GoTo HandleErrors
+ If Not bHasTransparentBkg Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Transparent
+ .Location = .CLocationSlide
+ .SubLocation = mySubLocation
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_TRANSPARENCY
+ .locationXML = .CXMLLocationPage
+
+ .Line = myShape.top
+ .column = myShape.Left
+
+ If myShape.name <> "" Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+ End If
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_SUBISSUE_TRANSPARENCY_NOTE
+
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ docAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Gradients(docAnalysis As DocumentAnalysis, myShape As Shape, mySubLocation As Variant)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Gradients"
+
+ If myShape.Fill.Type <> msoFillGradient Then Exit Sub
+
+ Dim bUsesPresetGradient, bUsesFromCorner, bUsesFromCenter
+ bUsesPresetGradient = False
+ bUsesFromCorner = False
+ bUsesFromCenter = False
+
+ On Error Resume Next
+ If myShape.Fill.PresetGradientType <> msoPresetGradientMixed Then
+ If Error.Number = 0 Then
+ bUsesPresetGradient = True
+ End If
+ End If
+ If myShape.Fill.GradientStyle <> msoGradientFromCorner Then
+ If Error.Number = 0 Then
+ bUsesFromCorner = True
+ End If
+ End If
+ If myShape.Fill.GradientStyle <> msoGradientFromCenter Then
+ If Error.Number = 0 Then
+ bUsesFromCenter = True
+ End If
+ End If
+
+ On Error GoTo HandleErrors
+ If Not bUsesPresetGradient And Not bUsesFromCorner _
+ And Not bUsesFromCenter Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_GradientStyle
+ .Location = .CLocationSlide
+ .SubLocation = mySubLocation
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_GRADIENT
+ .locationXML = .CXMLLocationSlide
+
+ .Line = myShape.top
+ .column = myShape.Left
+
+ If myShape.name <> "" Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+ End If
+
+ If bUsesPresetGradient Then
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_SUBISSUE_GRADIENT_PRESET_NOTE
+ ElseIf bUsesFromCorner Then
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_SUBISSUE_GRADIENT_CORNER_NOTE
+ Else
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_SUBISSUE_GRADIENT_CENTER_NOTE
+ End If
+
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ docAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ docAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Function CreateFullPath(newPath As String, fso As FileSystemObject)
+ 'We don't want to create 'c:\'
+ If (Len(newPath) < 4) Then
+ Exit Function
+ End If
+
+ 'Create parent folder first
+ If (Not fso.FolderExists(fso.GetParentFolderName(newPath))) Then
+ CreateFullPath fso.GetParentFolderName(newPath), fso
+ End If
+
+ If (Not fso.FolderExists(newPath)) Then
+ fso.CreateFolder (newPath)
+ End If
+End Function
+
+Function GetPreparedFullPath(sourceDocPath As String, startDir As String, storeToDir As String, _
+ fso As FileSystemObject) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetPreparedFullPath"
+ GetPreparedFullPath = ""
+
+ Dim preparedPath As String
+
+ preparedPath = Right(sourceDocPath, Len(sourceDocPath) - Len(startDir))
+ If Left(preparedPath, 1) = "\" Then
+ preparedPath = Right(preparedPath, Len(preparedPath) - 1)
+ End If
+
+ 'Allow for root folder C:\
+ If Right(storeToDir, 1) <> "\" Then
+ preparedPath = storeToDir & "\" & CSTR_COMMON_PREPARATION_FOLDER & "\" & preparedPath
+ Else
+ preparedPath = storeToDir & CSTR_COMMON_PREPARATION_FOLDER & "\" & preparedPath
+ End If
+
+ 'Debug: MsgBox "Preppath: " & preparedPath
+ CreateFullPath fso.GetParentFolderName(preparedPath), fso
+
+ 'Only set if folder to save to exists or has been created, otherwise return ""
+ GetPreparedFullPath = preparedPath
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebugLevelTwo currentFunctionName & " : " & sourceDocPath & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function ClassifyDocOverallMacroClass(docAnalysis As DocumentAnalysis) As EnumDocOverallMacroClass
+ ClassifyDocOverallMacroClass = enMacroNone
+
+ If Not docAnalysis.HasMacros Then Exit Function
+
+ If (docAnalysis.MacroTotalNumLines >= CMACRO_LINECOUNT_MEDIUM_LBOUND) Then
+ If (docAnalysis.MacroNumExternalRefs > 0) Or _
+ (docAnalysis.MacroNumOLEControls > 0 Or docAnalysis.MacroNumFieldsUsingMacros > 0) Or _
+ docAnalysis.MacroNumUserForms > 0 Then
+ ClassifyDocOverallMacroClass = enMacroComplex
+ Else
+ ClassifyDocOverallMacroClass = enMacroMedium
+ End If
+ Else
+ ClassifyDocOverallMacroClass = enMacroSimple
+ End If
+
+End Function
+
diff --git a/migrationanalysis/src/driver_docs/sources/CommonPreparation.bas b/migrationanalysis/src/driver_docs/sources/CommonPreparation.bas
new file mode 100644
index 000000000000..2d0e04f80e4a
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/CommonPreparation.bas
@@ -0,0 +1,228 @@
+Attribute VB_Name = "CommonPreparation"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: CommonPreparation.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+Private Declare Function CryptAcquireContext Lib "advapi32.dll" _
+ Alias "CryptAcquireContextA" (ByRef phProv As Long, _
+ ByVal pszContainer As String, ByVal pszProvider As String, _
+ ByVal dwProvType As Long, ByVal dwFlags As Long) As Long
+
+Private Declare Function CryptReleaseContext Lib "advapi32.dll" ( _
+ ByVal hProv As Long, ByVal dwFlags As Long) As Long
+
+Private Declare Function CryptCreateHash Lib "advapi32.dll" ( _
+ ByVal hProv As Long, ByVal Algid As Long, ByVal hKey As Long, _
+ ByVal dwFlags As Long, ByRef phHash As Long) As Long
+
+Private Declare Function CryptDestroyHash Lib "advapi32.dll" (ByVal hHash As Long) As Long
+
+Private Declare Function CryptHashData Lib "advapi32.dll" (ByVal hHash As Long, _
+ pbData As Any, ByVal dwDataLen As Long, ByVal dwFlags As Long) As Long
+
+Private Declare Function CryptGetHashParam Lib "advapi32.dll" ( _
+ ByVal hHash As Long, ByVal dwParam As Long, pbData As Any, _
+ pdwDataLen As Long, ByVal dwFlags As Long) As Long
+
+Private Const ALG_CLASS_ANY As Long = 0
+Private Const ALG_TYPE_ANY As Long = 0
+Private Const ALG_CLASS_HASH As Long = 32768
+Private Const ALG_SID_MD5 As Long = 3
+' Hash algorithms
+Private Const MD5_ALGORITHM As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD5
+' CryptSetProvParam
+Private Const PROV_RSA_FULL As Long = 1
+' used when acquiring the provider
+Private Const CRYPT_VERIFYCONTEXT As Long = &HF0000000
+' Microsoft provider data
+Private Const MS_DEFAULT_PROVIDER As String = _
+ "Microsoft Base Cryptographic Provider v1.0"
+
+Function DoPreparation(docAnalysis As DocumentAnalysis, myIssue As IssueInfo, preparationNote As String, _
+ var As Variant, currDoc As Object) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "DoPreparation"
+
+ DoPreparation = False
+
+ 'Log as Preparable
+ AddIssueDetailsNote myIssue, 0, preparationNote, RID_STR_COMMON_PREPARATION_NOTE
+ myIssue.Preparable = True
+ docAnalysis.PreparableIssuesCount = docAnalysis.PreparableIssuesCount + 1
+
+ If Not CheckDoPrepare Then Exit Function
+
+ 'Do Prepare
+
+ If myIssue.IssueTypeXML = CSTR_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES And _
+ myIssue.SubTypeXML = CSTR_SUBISSUE_OBJECT_IN_HEADER_FOOTER Then
+ DoPreparation = Prepare_HeaderFooter_GraphicFrames(docAnalysis, myIssue, var, currDoc)
+
+ ElseIf myIssue.IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES And _
+ myIssue.SubTypeXML = CSTR_SUBISSUE_OLD_WORKBOOK_VERSION Then
+ DoPreparation = Prepare_WorkbookVersion()
+
+ End If
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & _
+ " : path " & docAnalysis.name & ": " & _
+ " : myIssue " & myIssue.IssueTypeXML & "_" & myIssue.SubTypeXML & ": " & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function InDocPreparation() As Boolean
+ InDocPreparation = True
+End Function
+
+Function Prepare_DocumentCustomProperties(docAnalysis As DocumentAnalysis, myIssue As IssueInfo, _
+ var As Variant, currDoc As Object) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Prepare_DocumentCustomProperties"
+
+ Dim aProp As DocumentProperty
+ Dim myCustomDocumentProperties As DocumentProperties
+ Dim commentProp As DocumentProperty
+ Prepare_DocumentCustomProperties = False
+
+ Set myCustomDocumentProperties = getAppSpecificCustomDocProperties(currDoc)
+ Set commentProp = getAppSpecificCommentBuiltInDocProperty(currDoc)
+ Set aProp = var 'Safe as we know that a DocumentProperty is being passed in
+
+ If commentProp.value <> "" Then commentProp.value = commentProp.value & vbLf
+
+ commentProp.value = commentProp.value & _
+ RID_STR_COMMON_SUBISSUE_DOCUMENT_CUSTOM_PROPERTY & ": " & vbLf
+
+ commentProp.value = commentProp.value & _
+ RID_STR_COMMON_ATTRIBUTE_NAME & " - " & aProp.name & ", " & _
+ RID_STR_COMMON_ATTRIBUTE_TYPE & " - " & getCustomDocPropTypeAsString(aProp.Type) & ", " & _
+ RID_STR_COMMON_ATTRIBUTE_VALUE & " - " & aProp.value
+
+ myCustomDocumentProperties.item(aProp.name).Delete
+
+ Prepare_DocumentCustomProperties = True
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Private Function GetProvider(hCtx As Long) As Boolean
+ Const NTE_BAD_KEYSET = &H80090016
+ Const NTE_EXISTS = &H8009000F
+ Const NTE_KEYSET_NOT_DEF = &H80090019
+ Dim currentFunctionName As String
+ currentFunctionName = "GetProvider"
+
+ Dim strTemp As String
+ Dim strProvider As String
+ Dim strErrorMsg As String
+ Dim errStr As String
+
+ GetProvider = False
+
+ On Error Resume Next
+ strTemp = vbNullChar
+ strProvider = MS_DEFAULT_PROVIDER & vbNullChar
+ If CBool(CryptAcquireContext(hCtx, ByVal strTemp, _
+ ByVal strProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) Then
+ GetProvider = True
+ Exit Function
+ End If
+
+ Select Case Err.LastDllError
+ Case NTE_BAD_KEYSET
+ errStr = "Key container does not exist or You do not have access to the key container."
+ Case NTE_EXISTS
+ errStr = "The key container already exists, but you are attempting to create it"
+ Case NTE_KEYSET_NOT_DEF
+ errStr = "The Crypto Service Provider (CSP) may not be set up correctly"
+ End Select
+ WriteDebug currentFunctionName & "Problems acquiring Crypto Provider: " & MS_DEFAULT_PROVIDER & ": " & errStr
+End Function
+
+
+
+Function MD5HashString(ByVal Str As String) As String
+ Const HP_HASHVAL = 2
+ Const HP_HASHSIZE = 4
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "MD5HashString"
+
+ Dim hCtx As Long
+ Dim hHash As Long
+ Dim ret As Long
+ Dim lLen As Long
+ Dim lIdx As Long
+ Dim abData() As Byte
+
+ If Not GetProvider(hCtx) Then Err.Raise Err.LastDllError
+
+ ret = CryptCreateHash(hCtx, MD5_ALGORITHM, 0, 0, hHash)
+ If ret = 0 Then Err.Raise Err.LastDllError
+
+ ret = CryptHashData(hHash, ByVal Str, Len(Str), 0)
+ If ret = 0 Then Err.Raise Err.LastDllError
+
+ ret = CryptGetHashParam(hHash, HP_HASHSIZE, lLen, 4, 0)
+ If ret = 0 Then Err.Raise Err.LastDllError
+
+
+ ReDim abData(0 To lLen - 1)
+ ret = CryptGetHashParam(hHash, HP_HASHVAL, abData(0), lLen, 0)
+ If ret = 0 Then Err.Raise Err.LastDllError
+
+ For lIdx = 0 To UBound(abData)
+ MD5HashString = MD5HashString & Right$("0" & Hex$(abData(lIdx)), 2)
+ Next
+ CryptDestroyHash hHash
+
+ CryptReleaseContext hCtx, 0
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ MD5HashString = ""
+ WriteDebug currentFunctionName & _
+ Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
diff --git a/migrationanalysis/src/driver_docs/sources/DocumentAnalysis.cls b/migrationanalysis/src/driver_docs/sources/DocumentAnalysis.cls
new file mode 100644
index 000000000000..cc974e3a2c79
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/DocumentAnalysis.cls
@@ -0,0 +1,344 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "DocumentAnalysis"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: DocumentAnalysis.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Const CMAX_NUM_ISSUETYPES = 100
+
+Private mName As String
+Private mApplication As String
+Private mPageCount As Long
+Private mCreated As Date
+Private mModified As Date
+Private mAccessed As Date
+Private mPrinted As Date
+Private mSavedBy As String
+Private mRevision As Long
+Private mTemplate As String
+Private mHasMacros As Boolean
+
+Private mDocIssuesCosts As Long
+Private mPreparableIssuesCosts As Long
+Private mMacroCosts As Long
+
+Private mReferences As Collection
+Private mIssues As Collection
+Private mIssuesCountArray(1 To CMAX_NUM_ISSUETYPES) As Long
+Private mTotalIssueTypes As Long
+Private mMinorIssuesCount As Long
+Private mMacroIssuesCount As Long
+Private mPreparableIssuesCount As Long
+
+Private mDocOverallIssueClass As EnumDocOverallIssueClass
+
+Private mMacroTotalNumLines As Long
+Private mMacroNumUserForms As Long
+Private mMacroNumUserFormControls As Long
+Private mMacroNumUserFormControlTypes As Long
+Private mMacroNumOLEControls As Long
+Private mMacroNumFieldsUsingMacros As Long
+Private mMacroNumExternalRefs As Long
+Private mMacroOverallClass As EnumDocOverallMacroClass
+Private mbBelowIssuesLimit As Boolean
+
+Public Property Get BelowIssuesLimit() As Boolean
+ BelowIssuesLimit = mbBelowIssuesLimit
+End Property
+Public Property Let BelowIssuesLimit(vNewValue As Boolean)
+ mbBelowIssuesLimit = vNewValue
+End Property
+
+Public Property Get MacroOverallClass() As EnumDocOverallMacroClass
+ MacroOverallClass = mMacroOverallClass
+End Property
+Public Property Let MacroOverallClass(vNewValue As EnumDocOverallMacroClass)
+ mMacroOverallClass = vNewValue
+End Property
+
+Public Property Get MacroNumExternalRefs() As Long
+ MacroNumExternalRefs = mMacroNumExternalRefs
+End Property
+Public Property Let MacroNumExternalRefs(vNewValue As Long)
+ mMacroNumExternalRefs = vNewValue
+End Property
+
+Public Property Get MacroNumFieldsUsingMacros() As Long
+ MacroNumFieldsUsingMacros = mMacroNumFieldsUsingMacros
+End Property
+Public Property Let MacroNumFieldsUsingMacros(vNewValue As Long)
+ mMacroNumFieldsUsingMacros = vNewValue
+End Property
+
+Public Property Get MacroNumOLEControls() As Long
+ MacroNumOLEControls = mMacroNumOLEControls
+End Property
+Public Property Let MacroNumOLEControls(vNewValue As Long)
+ mMacroNumOLEControls = vNewValue
+End Property
+
+Public Property Get MacroNumUserFormControlTypes() As Long
+ MacroNumUserFormControlTypes = mMacroNumUserFormControlTypes
+End Property
+Public Property Let MacroNumUserFormControlTypes(vNewValue As Long)
+ mMacroNumUserFormControlTypes = vNewValue
+End Property
+
+Public Property Get MacroNumUserFormControls() As Long
+ MacroNumUserFormControls = mMacroNumUserFormControls
+End Property
+Public Property Let MacroNumUserFormControls(vNewValue As Long)
+ mMacroNumUserFormControls = vNewValue
+End Property
+
+Public Property Get MacroNumUserForms() As Long
+ MacroNumUserForms = mMacroNumUserForms
+End Property
+Public Property Let MacroNumUserForms(vNewValue As Long)
+ mMacroNumUserForms = vNewValue
+End Property
+
+Public Property Get MacroTotalNumLines() As Long
+ MacroTotalNumLines = mMacroTotalNumLines
+End Property
+Public Property Let MacroTotalNumLines(vNewValue As Long)
+ mMacroTotalNumLines = vNewValue
+End Property
+
+Public Property Get MacroCosts() As Long
+ MacroCosts = mMacroCosts
+End Property
+Public Property Let MacroCosts(vNewValue As Long)
+ mMacroCosts = vNewValue
+End Property
+
+Public Property Get DocIssuesCosts() As Long
+ DocIssuesCosts = mDocIssuesCosts
+End Property
+Public Property Let DocIssuesCosts(vNewValue As Long)
+ mDocIssuesCosts = vNewValue
+End Property
+
+Public Property Get PreparableIssuesCosts() As Long
+ PreparableIssuesCosts = mPreparableIssuesCosts
+End Property
+Public Property Let PreparableIssuesCosts(vNewValue As Long)
+ mPreparableIssuesCosts = vNewValue
+End Property
+
+Public Property Get DocOverallIssueClass() As EnumDocOverallIssueClass
+ DocOverallIssueClass = mDocOverallIssueClass
+End Property
+
+Public Property Let DocOverallIssueClass(ByVal vNewValue As EnumDocOverallIssueClass)
+ mDocOverallIssueClass = vNewValue
+End Property
+
+Public Property Get TotalIssueTypes() As Long
+ TotalIssueTypes = mTotalIssueTypes
+End Property
+
+Public Property Let TotalIssueTypes(ByVal vNewValue As Long)
+ mTotalIssueTypes = vNewValue
+End Property
+Public Property Get name() As String
+ name = mName
+End Property
+
+Public Property Let name(ByVal vNewValue As String)
+ mName = vNewValue
+End Property
+
+Public Property Get Application() As String
+ Application = mApplication
+End Property
+
+Public Property Let Application(ByVal vNewValue As String)
+ mApplication = vNewValue
+End Property
+Public Property Get PageCount() As Long
+ PageCount = mPageCount
+End Property
+
+Public Property Let PageCount(ByVal vNewValue As Long)
+ mPageCount = vNewValue
+End Property
+
+Public Property Get Created() As Date
+ Created = mCreated
+End Property
+
+Public Property Let Created(ByVal vNewValue As Date)
+ mCreated = vNewValue
+End Property
+
+Public Property Get Modified() As Date
+ Modified = mModified
+End Property
+
+Public Property Let Modified(ByVal vNewValue As Date)
+ mModified = vNewValue
+End Property
+
+Public Property Get Accessed() As Date
+ Accessed = mAccessed
+End Property
+
+Public Property Let Accessed(ByVal vNewValue As Date)
+ mAccessed = vNewValue
+End Property
+Public Property Get Printed() As Date
+ Printed = mPrinted
+End Property
+
+Public Property Let Printed(ByVal vNewValue As Date)
+ mPrinted = vNewValue
+End Property
+
+Public Property Get SavedBy() As String
+ SavedBy = mSavedBy
+End Property
+
+Public Property Let SavedBy(ByVal vNewValue As String)
+ mSavedBy = vNewValue
+End Property
+
+Public Property Get Revision() As Long
+ Revision = mRevision
+End Property
+
+Public Property Let Revision(ByVal vNewValue As Long)
+ mRevision = vNewValue
+End Property
+
+Public Property Get Template() As String
+ Template = mTemplate
+End Property
+
+Public Property Let Template(ByVal vNewValue As String)
+ mTemplate = vNewValue
+End Property
+Public Property Get HasMacros() As Boolean
+ HasMacros = mHasMacros
+End Property
+
+Public Property Let HasMacros(ByVal vNewValue As Boolean)
+ mHasMacros = vNewValue
+End Property
+
+Public Property Get References() As Collection
+ Set References = mReferences
+End Property
+
+Public Property Let References(ByVal vNewValue As Collection)
+ Set mReferences = vNewValue
+End Property
+
+Public Property Get Issues() As Collection
+ Set Issues = mIssues
+End Property
+
+Public Property Let Issues(ByVal vNewValue As Collection)
+ Set mIssues = vNewValue
+End Property
+
+Public Property Get IssuesCountArray(ByVal index As Integer) As Long
+ If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
+ IssuesCountArray = mIssuesCountArray(index)
+ Else
+ IssuesCountArray = Null
+ End If
+End Property
+
+Public Property Let IssuesCountArray(ByVal index As Integer, ByVal vNewValue As Long)
+ If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
+ mIssuesCountArray(index) = vNewValue
+ End If
+End Property
+
+Public Property Get IssuesCount() As Long
+ IssuesCount = mIssues.count
+End Property
+
+Public Property Get ComplexIssuesCount() As Long
+ Dim complexCount As Long
+ complexCount = mIssues.count - mMinorIssuesCount - mMacroIssuesCount
+ ComplexIssuesCount = IIf(complexCount > 0, complexCount, 0)
+End Property
+
+Public Property Get MacroIssuesCount() As Long
+ MacroIssuesCount = mMacroIssuesCount
+End Property
+
+Public Property Let MacroIssuesCount(ByVal vNewValue As Long)
+ mMacroIssuesCount = vNewValue
+End Property
+
+Public Property Get MinorIssuesCount() As Long
+ MinorIssuesCount = mMinorIssuesCount
+End Property
+
+Public Property Let MinorIssuesCount(ByVal vNewValue As Long)
+ mMinorIssuesCount = vNewValue
+End Property
+
+Public Property Get PreparableIssuesCount() As Long
+ PreparableIssuesCount = mPreparableIssuesCount
+End Property
+
+Public Property Let PreparableIssuesCount(ByVal vNewValue As Long)
+ mPreparableIssuesCount = vNewValue
+End Property
+
+Private Sub Class_Initialize()
+ mApplication = ""
+ mTotalIssueTypes = 0
+ mHasMacros = False
+ Set mIssues = New Collection
+ Set mReferences = New Collection
+ mPreparableIssuesCount = 0
+ mMacroOverallClass = enNone
+ mDocOverallIssueClass = enNone
+ mDocIssuesCosts = 0
+ mPreparableIssuesCosts = 0
+ mMacroCosts = 0
+ mbBelowIssuesLimit = False
+End Sub
+Private Sub Class_Terminate()
+ Set mIssues = Nothing
+ Set mReferences = Nothing
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/FileTypeAssociation.cls b/migrationanalysis/src/driver_docs/sources/FileTypeAssociation.cls
new file mode 100644
index 000000000000..6a578f43c01b
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/FileTypeAssociation.cls
@@ -0,0 +1,58 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "FileTypeAssociation"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: FileTypeAssociation.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Private mFileSpec As String
+Private mXLKey As String
+
+
+Public Property Get filespec() As String
+ filespec = mFileSpec
+End Property
+
+Public Property Let filespec(ByVal vNewValue As String)
+ mFileSpec = vNewValue
+End Property
+
+Public Property Get key() As String
+ key = mXLKey
+End Property
+
+Public Property Let key(ByVal vNewValue As String)
+ mXLKey = vNewValue
+End Property
diff --git a/migrationanalysis/src/driver_docs/sources/IssueInfo.cls b/migrationanalysis/src/driver_docs/sources/IssueInfo.cls
new file mode 100644
index 000000000000..23c95c8fa7d0
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/IssueInfo.cls
@@ -0,0 +1,208 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "IssueInfo"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: IssueInfo.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+Private mIssueID As Integer
+Private mIssueType As String
+Private mSubType As String
+Private mIssueTypeXML As String
+Private mSubTypeXML As String
+Private mLocationXML As String
+Private mLocation As String
+Private mSubLocation As Variant
+Private mLine As Long
+Private mColumn As Variant
+Private mAttributes As Collection
+Private mValues As Collection
+Private mPreparable As Boolean
+
+'General Constants
+Public Property Get CLocationDocument() As String
+ CLocationDocument = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT
+End Property
+Public Property Get CLocationPage() As String
+ CLocationPage = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PAGE
+End Property
+Public Property Get CLocationWorkBook() As String
+ CLocationWorkBook = RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK
+End Property
+Public Property Get CLocationSheet() As String
+ CLocationSheet = RID_STR_COMMON_RESULTS_LOCATION_TYPE_SHEET
+End Property
+Public Property Get CLocationPresentation() As String
+ CLocationPresentation = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION
+End Property
+Public Property Get CLocationSlide() As String
+ CLocationSlide = RID_STR_COMMON_RESULTS_LOCATION_TYPE_SLIDE
+End Property
+
+'General XML Constants - NOT localised
+Public Property Get CXMLLocationDocument() As String
+ CXMLLocationDocument = "Document"
+End Property
+Public Property Get CXMLLocationPage() As String
+ CXMLLocationPage = "Page"
+End Property
+Public Property Get CXMLLocationWorkBook() As String
+ CXMLLocationWorkBook = "Workbook"
+End Property
+Public Property Get CXMLLocationSheet() As String
+ CXMLLocationSheet = "Sheet"
+End Property
+Public Property Get CXMLLocationPresentation() As String
+ CXMLLocationPresentation = "Presentation"
+End Property
+Public Property Get CXMLLocationSlide() As String
+ CXMLLocationSlide = "Slide"
+End Property
+
+'Settable Properties
+Public Property Get IssueID() As Integer
+ IssueID = mIssueID
+End Property
+
+Public Property Let IssueID(ByVal vNewValue As Integer)
+ mIssueID = vNewValue
+End Property
+Public Property Get IssueType() As String
+ IssueType = mIssueType
+End Property
+
+Public Property Let IssueType(ByVal vNewValue As String)
+ mIssueType = vNewValue
+End Property
+Public Property Get IssueTypeXML() As String
+ IssueTypeXML = mIssueTypeXML
+End Property
+
+Public Property Let IssueTypeXML(ByVal vNewValue As String)
+ mIssueTypeXML = vNewValue
+End Property
+Public Property Get SubType() As String
+ SubType = mSubType
+End Property
+
+Public Property Let SubType(ByVal vNewValue As String)
+ mSubType = vNewValue
+End Property
+Public Property Get SubTypeXML() As String
+ SubTypeXML = mSubTypeXML
+End Property
+
+Public Property Let SubTypeXML(ByVal vNewValue As String)
+ mSubTypeXML = vNewValue
+End Property
+
+Public Property Get Location() As String
+ Location = mLocation
+End Property
+
+Public Property Let Location(ByVal vNewValue As String)
+ mLocation = vNewValue
+End Property
+Public Property Get locationXML() As String
+ locationXML = mLocationXML
+End Property
+
+Public Property Let locationXML(ByVal vNewValue As String)
+ mLocationXML = vNewValue
+End Property
+
+Public Property Get SubLocation() As Variant
+ SubLocation = mSubLocation
+End Property
+
+Public Property Let SubLocation(ByVal vNewValue As Variant)
+ mSubLocation = vNewValue
+End Property
+
+Public Property Get Line() As Long
+ Line = mLine
+End Property
+
+Public Property Let Line(ByVal vNewValue As Long)
+ mLine = vNewValue
+End Property
+Public Property Get column() As Variant
+ column = mColumn
+End Property
+
+Public Property Let column(ByVal vNewValue As Variant)
+ mColumn = vNewValue
+End Property
+
+Public Property Get Attributes() As Collection
+ Set Attributes = mAttributes
+End Property
+
+Public Property Let Attributes(ByVal vNewValue As Collection)
+ Set mAttributes = vNewValue
+End Property
+Public Property Get Values() As Collection
+ Set Values = mValues
+End Property
+
+Public Property Let Values(ByVal vNewValue As Collection)
+ Set mValues = vNewValue
+End Property
+
+Public Property Get Preparable() As Boolean
+ Preparable = mPreparable
+End Property
+
+Public Property Let Preparable(ByVal vNewValue As Boolean)
+ mPreparable = vNewValue
+End Property
+
+
+
+Private Sub Class_Initialize()
+ Set mAttributes = New Collection
+ Set mValues = New Collection
+ mIssueID = -1
+ mLine = -1
+ mColumn = ""
+ mSubLocation = ""
+ mPreparable = False
+End Sub
+Private Sub Class_Terminate()
+ Set mAttributes = Nothing
+ Set mValues = Nothing
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/LocalizeResults.bas b/migrationanalysis/src/driver_docs/sources/LocalizeResults.bas
new file mode 100644
index 000000000000..604071625764
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/LocalizeResults.bas
@@ -0,0 +1,308 @@
+Attribute VB_Name = "LocalizeResults"
+Sub Localize_WorkBook(aWorkBook As WorkBook)
+ On Error Resume Next
+ aWorkBook.Names("RID_RESXLS_COST_Action_Settings").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Action_Settings
+ aWorkBook.Names("RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field
+ aWorkBook.Names("RID_RESXLS_COST_Additional_Weighting_Factors").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Additional_Weighting_Factors
+ aWorkBook.Names("RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook
+ aWorkBook.Names("RID_RESXLS_COST_Appearance").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Appearance
+ aWorkBook.Names("RID_RESXLS_COST_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Application
+ aWorkBook.Names("RID_RESXLS_COST_Border_Styles").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Border_Styles
+ aWorkBook.Names("RID_RESXLS_COST_Cell_Attributes").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cell_Attributes
+ aWorkBook.Names("RID_RESXLS_COST_CELL_SPAN_WORKAROUND").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_CELL_SPAN_WORKAROUND
+ aWorkBook.Names("RID_RESXLS_COST_Cell_Spanning_Page").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cell_Spanning_Page
+ aWorkBook.Names("RID_RESXLS_COST_ChangesAndReviewing").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_ChangesAndReviewing
+ aWorkBook.Names("RID_RESXLS_COST_Charts_And_Tables").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Charts_And_Tables
+ aWorkBook.Names("RID_RESXLS_COST_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Content_And_Document_Properties").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Content_And_Document_Properties
+ aWorkBook.Names("RID_RESXLS_COST_ContentAndDocumentProperties").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_ContentAndDocumentProperties
+ aWorkBook.Names("RID_RESXLS_COST_Controls").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Controls
+ aWorkBook.Names("RID_RESXLS_COST_Cost").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cost
+ aWorkBook.Names("RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min
+ aWorkBook.Names("RID_RESXLS_COST_COST_0").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_0
+ aWorkBook.Names("RID_RESXLS_COST_COST_EMBED_CHART").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_EMBED_CHART
+ aWorkBook.Names("RID_RESXLS_COST_COST_ERROR_TYPE").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_ERROR_TYPE
+ aWorkBook.Names("RID_RESXLS_COST_COST_INFO").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_INFO
+ aWorkBook.Names("RID_RESXLS_COST_COST_INVAL_PASS").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_INVAL_PASS
+ aWorkBook.Names("RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME
+ aWorkBook.Names("RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on
+ aWorkBook.Names("RID_RESXLS_COST_Cost_per_Issue_or_Factor__min").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cost_per_Issue_or_Factor__min
+ aWorkBook.Names("RID_RESXLS_COST_COST_PIVOT").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_PIVOT
+ aWorkBook.Names("RID_RESXLS_COST_COST_SHEET_CHART").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_SHEET_CHART
+ aWorkBook.Names("RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls
+ aWorkBook.Names("RID_RESXLS_COST_COST_VBA_CONT_TYPE").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_VBA_CONT_TYPE
+ aWorkBook.Names("RID_RESXLS_COST_COST_VBA_CONTROLS").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_VBA_CONTROLS
+ aWorkBook.Names("RID_RESXLS_COST_COST_VBA_FORMS").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_VBA_FORMS
+ aWorkBook.Names("RID_RESXLS_COST_COST_VBA_LOC").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_VBA_LOC
+ aWorkBook.Names("RID_RESXLS_COST_COST_VBA_PROPS").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_COST_VBA_PROPS
+ aWorkBook.Names("RID_RESXLS_COST_Costs__min").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Costs__min
+ aWorkBook.Names("RID_RESXLS_COST_Custom_Bullet_List").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Custom_Bullet_List
+ aWorkBook.Names("RID_RESXLS_COST_Document_Custom_Properties").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Document_Custom_Properties
+ aWorkBook.Names("RID_RESXLS_COST_Document_Parts_Protection").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Document_Parts_Protection
+ aWorkBook.Names("RID_RESXLS_COST_Embedded_Chart").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Embedded_Chart
+ aWorkBook.Names("RID_RESXLS_COST_embedded_objects").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_embedded_objects
+ aWorkBook.Names("RID_RESXLS_COST_Embedded_OLE_Object").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Embedded_OLE_Object
+ aWorkBook.Names("RID_RESXLS_COST_Excel").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Excel
+ aWorkBook.Names("RID_RESXLS_COST_Excel_Totals").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Excel_Totals
+ aWorkBook.Names("RID_RESXLS_COST_External").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_External
+ aWorkBook.Names("RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm
+ aWorkBook.Names("RID_RESXLS_COST_Factor_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Factor_Count
+ aWorkBook.Names("RID_RESXLS_COST_Fields").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Fields
+ aWorkBook.Names("RID_RESXLS_COST_Filters").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Filters
+ aWorkBook.Names("RID_RESXLS_COST_Fixed_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Fixed_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Form_Field").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Form_Field
+ aWorkBook.Names("RID_RESXLS_COST_Format").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Format
+ aWorkBook.Names("RID_RESXLS_COST_Functions").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Functions
+ aWorkBook.Names("RID_RESXLS_COST_HEADERFOOTER_WORKAROUND").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_HEADERFOOTER_WORKAROUND
+ aWorkBook.Names("RID_RESXLS_COST_Hours_Per_MD").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Hours_Per_MD
+ aWorkBook.Names("RID_RESXLS_COST_Indexes_And_References").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Indexes_And_References
+ aWorkBook.Names("RID_RESXLS_COST_Invalid_Password_Entered").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Invalid_Password_Entered
+ aWorkBook.Names("RID_RESXLS_COST_Invalid_Worksheet_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Invalid_Worksheet_Name
+ aWorkBook.Names("RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly
+ aWorkBook.Names("RID_RESXLS_COST_Issue__256_sheet_limit_exceeded").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__256_sheet_limit_exceeded
+ aWorkBook.Names("RID_RESXLS_COST_Issue__32000_row_limit_exceeded").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__32000_row_limit_exceeded
+ aWorkBook.Names("RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO
+ aWorkBook.Names("RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__External_references_are_windows_specific").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__External_references_are_windows_specific
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Incorrect_password_entered").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Incorrect_password_entered
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Print_wide_pages_not_supported").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Print_wide_pages_not_supported
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Unsupported_formatting_set").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Unsupported_formatting_set
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Unsupported_function_type").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Unsupported_function_type
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic
+ aWorkBook.Names("RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported
+ aWorkBook.Names("RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page
+ aWorkBook.Names("RID_RESXLS_COST_Issue_Category").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue_Category
+ aWorkBook.Names("RID_RESXLS_COST_Issue_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue_Count
+ aWorkBook.Names("RID_RESXLS_COST_Issue_Type").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Issue_Type
+ aWorkBook.Names("RID_RESXLS_COST_Linked_OLE_Object").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Linked_OLE_Object
+ aWorkBook.Names("RID_RESXLS_COST_Mail_Merge_Datasource").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Mail_Merge_Datasource
+ aWorkBook.Names("RID_RESXLS_COST_Mail_Merge_Field").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Mail_Merge_Field
+ aWorkBook.Names("RID_RESXLS_COST_Major_Issue").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Major_Issue
+ aWorkBook.Names("RID_RESXLS_COST_MAX_SHEETS_WORKAROUND").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_MAX_SHEETS_WORKAROUND
+ aWorkBook.Names("RID_RESXLS_COST_Maximum_Rows_Exceeded").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Maximum_Rows_Exceeded
+ aWorkBook.Names("RID_RESXLS_COST_Maximum_Sheets_Exceeded").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Maximum_Sheets_Exceeded
+ aWorkBook.Names("RID_RESXLS_COST_Migration_Issues_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Migration_Issues_Costs
+ aWorkBook.Names("RID_RESXLS_COST_Movie").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Movie
+ aWorkBook.Names("RID_RESXLS_COST_NESTED_TABLE_WORKAROUND").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_NESTED_TABLE_WORKAROUND
+ aWorkBook.Names("RID_RESXLS_COST_Nested_Tables").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Nested_Tables
+ aWorkBook.Names("RID_RESXLS_COST_Not_Planned").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Not_Planned
+ aWorkBook.Names("RID_RESXLS_COST_Notes_And_Handouts").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Notes_And_Handouts
+ aWorkBook.Names("RID_RESXLS_COST_Number_Of_External_References").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Number_Of_External_References
+ aWorkBook.Names("RID_RESXLS_COST_Number_Of_Lines").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Number_Of_Lines
+ aWorkBook.Names("RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules
+ aWorkBook.Names("RID_RESXLS_COST_Number_of_Modules").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Number_of_Modules
+ aWorkBook.Names("RID_RESXLS_COST_Number_of_Unique_Modules").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Number_of_Unique_Modules
+ aWorkBook.Names("RID_RESXLS_COST_Numbering_Reference").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Numbering_Reference
+ aWorkBook.Names("RID_RESXLS_COST_Numbering_Reference_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Numbering_Reference_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Object_In_Header_Footer").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Object_In_Header_Footer
+ aWorkBook.Names("RID_RESXLS_COST_Objects_And_Graphics").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Objects_And_Graphics
+ aWorkBook.Names("RID_RESXLS_COST_Objects_Graphics_And_Frames").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Objects_Graphics_And_Frames
+ aWorkBook.Names("RID_RESXLS_COST_Objects_Graphics_And_Textboxes").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Objects_Graphics_And_Textboxes
+ aWorkBook.Names("RID_RESXLS_COST_Old_Workbook_Version").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Old_Workbook_Version
+ aWorkBook.Names("RID_RESXLS_COST_OLE_Control").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_OLE_Control
+ aWorkBook.Names("RID_RESXLS_COST_OLECONTR_COST").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_OLECONTR_COST
+ aWorkBook.Names("RID_RESXLS_COST_Page_Setup").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Page_Setup
+ aWorkBook.Names("RID_RESXLS_COST_Password_Protected").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Password_Protected
+ aWorkBook.Names("RID_RESXLS_COST_Password_Protection").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Password_Protection
+ aWorkBook.Names("RID_RESXLS_COST_Pivot").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Pivot
+ aWorkBook.Names("RID_RESXLS_COST_Planned_SO8").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Planned_SO8
+ aWorkBook.Names("RID_RESXLS_COST_Portability").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Portability
+ aWorkBook.Names("RID_RESXLS_COST_PowerPoint").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_PowerPoint
+ aWorkBook.Names("RID_RESXLS_COST_PowerPoint_Totals").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_PowerPoint_Totals
+ aWorkBook.Names("RID_RESXLS_COST_Prepared_Issue_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Prepared_Issue_Count
+ aWorkBook.Names("RID_RESXLS_COST_Prepared_Savings__min").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Prepared_Savings__min
+ aWorkBook.Names("RID_RESXLS_COST_Properties___Module__Class_or_UserForm").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Properties___Module__Class_or_UserForm
+ aWorkBook.Names("RID_RESXLS_COST_Remove_password_to_open").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Remove_password_to_open
+ aWorkBook.Names("RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name
+ aWorkBook.Names("RID_RESXLS_COST_Rerun_analysis_with_correct_password").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Rerun_analysis_with_correct_password
+ aWorkBook.Names("RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7
+ aWorkBook.Names("RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows
+ aWorkBook.Names("RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version
+ aWorkBook.Names("RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource
+ aWorkBook.Names("RID_RESXLS_COST_Sheet_Chart").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Sheet_Chart
+ aWorkBook.Names("RID_RESXLS_COST_Status").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Status
+ aWorkBook.Names("RID_RESXLS_COST_Table_Of_Authorities").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Table_Of_Authorities
+ aWorkBook.Names("RID_RESXLS_COST_Table_Of_Authorities_Field").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Table_Of_Authorities_Field
+ aWorkBook.Names("RID_RESXLS_COST_Table_Of_Contents").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Table_Of_Contents
+ aWorkBook.Names("RID_RESXLS_COST_Tables").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Tables
+ aWorkBook.Names("RID_RESXLS_COST_TOC_ISSUE_WORKAROUND").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_TOC_ISSUE_WORKAROUND
+ aWorkBook.Names("RID_RESXLS_COST_Total_Cost___MD").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Total_Cost___MD
+ aWorkBook.Names("RID_RESXLS_COST_User_Error").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_User_Error
+ aWorkBook.Names("RID_RESXLS_COST_User_Forms_Control_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_User_Forms_Control_Count
+ aWorkBook.Names("RID_RESXLS_COST_User_Forms_Control_Type_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_User_Forms_Control_Type_Count
+ aWorkBook.Names("RID_RESXLS_COST_User_Forms_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_User_Forms_Count
+ aWorkBook.Names("RID_RESXLS_COST_VBA_Macros").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_VBA_Macros
+ aWorkBook.Names("RID_RESXLS_COST_Word").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Word
+ aWorkBook.Names("RID_RESXLS_COST_Word_Totals").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Word_Totals
+ aWorkBook.Names("RID_RESXLS_COST_Work_Around").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Work_Around
+ aWorkBook.Names("RID_RESXLS_COST_Workaround_Remove_protection_before_importing").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Workaround_Remove_protection_before_importing
+ aWorkBook.Names("RID_RESXLS_COST_WorkbookProtection").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_WorkbookProtection
+ aWorkBook.Names("RID_RESXLS_DP_Accessed").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Accessed
+ aWorkBook.Names("RID_RESXLS_DP_All_Analysed_Documents___Properties").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_All_Analysed_Documents___Properties
+ aWorkBook.Names("RID_RESXLS_DP_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Application
+ aWorkBook.Names("RID_RESXLS_DP_Based_on_Template").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Based_on_Template
+ aWorkBook.Names("RID_RESXLS_DP_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Costs
+ aWorkBook.Names("RID_RESXLS_DP_Created").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Created
+ aWorkBook.Names("RID_RESXLS_DP_Document_Details").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Document_Details
+ aWorkBook.Names("RID_RESXLS_DP_Document_Issue_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Document_Issue_Costs
+ aWorkBook.Names("RID_RESXLS_DP_Document_Migration_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Document_Migration_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Document_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Document_Name
+ aWorkBook.Names("RID_RESXLS_DP_Document_Name_and_Path").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Document_Name_and_Path
+ aWorkBook.Names("RID_RESXLS_DP_Issues_Complex_count").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Issues_Complex_count
+ aWorkBook.Names("RID_RESXLS_DP_Last_Saved_By").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Last_Saved_By
+ aWorkBook.Names("RID_RESXLS_DP_Lines_of_Macro_Code").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Lines_of_Macro_Code
+ aWorkBook.Names("RID_RESXLS_DP_Macro_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Macro_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Macro_Migration_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Macro_Migration_Costs
+ aWorkBook.Names("RID_RESXLS_DP_Macro_Migration_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Macro_Migration_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Migration_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Migration_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Minor_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Minor_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Modified").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Modified
+ aWorkBook.Names("RID_RESXLS_DP_Pages_Sheets_Slides").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Pages_Sheets_Slides
+ aWorkBook.Names("RID_RESXLS_DP_Prepareable_Issues_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Prepareable_Issues_Costs
+ aWorkBook.Names("RID_RESXLS_DP_Prepared_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Prepared_Issues
+ aWorkBook.Names("RID_RESXLS_DP_Printed").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Printed
+ aWorkBook.Names("RID_RESXLS_DP_Revision").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_Revision
+ aWorkBook.Names("RID_RESXLS_DP_User_Form_Count").RefersToRange.Cells(1, 1) = RID_RESXLS_DP_User_Form_Count
+ aWorkBook.Names("RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details
+ aWorkBook.Names("RID_RESXLS_ID_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Application
+ aWorkBook.Names("RID_RESXLS_ID_Column__Left").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Column__Left
+ aWorkBook.Names("RID_RESXLS_ID_Document_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Document_Name
+ aWorkBook.Names("RID_RESXLS_ID_Document_Name_and_Path").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Document_Name_and_Path
+ aWorkBook.Names("RID_RESXLS_ID_Issue_Category").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Issue_Category
+ aWorkBook.Names("RID_RESXLS_ID_Issue_Details").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Issue_Details
+ aWorkBook.Names("RID_RESXLS_ID_Issue_Type").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Issue_Type
+ aWorkBook.Names("RID_RESXLS_ID_Line__Row__Top").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Line__Row__Top
+ aWorkBook.Names("RID_RESXLS_ID_Location").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Location
+ aWorkBook.Names("RID_RESXLS_ID_Location_Type").RefersToRange.Cells(1, 1) = RID_RESXLS_ID_Location_Type
+ aWorkBook.Names("RID_RESXLS_OV_3_to_6_months").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_3_to_6_months
+ aWorkBook.Names("RID_RESXLS_OV_6_to_12_months").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_6_to_12_months
+ aWorkBook.Names("RID_RESXLS_OV_Complex").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Complex
+ aWorkBook.Names("RID_RESXLS_OV_Cost_estimates_for_migration").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Cost_estimates_for_migration
+ aWorkBook.Names("RID_RESXLS_OV_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Costs
+ aWorkBook.Names("RID_RESXLS_OV_Docs_with_DocumentMigrationIssues").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Docs_with_DocumentMigrationIssues
+ aWorkBook.Names("RID_RESXLS_OV_Document_Migration_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Document_Migration_Costs
+ aWorkBook.Names("RID_RESXLS_OV_Document_Modification_Dates").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Document_Modification_Dates
+ aWorkBook.Names("RID_RESXLS_OV_Document_Type").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Document_Type
+ aWorkBook.Names("RID_RESXLS_OV_Documents_with_Macro_Migration_Issues").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Documents_with_Macro_Migration_Issues
+ aWorkBook.Names("RID_RESXLS_OV_Excel").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Excel
+ aWorkBook.Names("RID_RESXLS_OV_Excel_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Excel_Costs
+ aWorkBook.Names("RID_RESXLS_OV_Excel_Spreadsheet").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Excel_Spreadsheet
+ aWorkBook.Names("RID_RESXLS_OV_Excel_Template").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Excel_Template
+ aWorkBook.Names("RID_RESXLS_OV_GREATER_THAN_1_year").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_GREATER_THAN_1_year
+ aWorkBook.Names("RID_RESXLS_OV_Last_Modified").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Last_Modified
+ aWorkBook.Names("RID_RESXLS_OV_LESS_3_months").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_LESS_3_months
+ aWorkBook.Names("RID_RESXLS_OV_LESS_THAN3MONTHS").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_LESS_THAN3MONTHS
+ aWorkBook.Names("RID_RESXLS_OV_Macro_Migration_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Macro_Migration_Costs
+ aWorkBook.Names("RID_RESXLS_OV_Medium").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Medium
+ aWorkBook.Names("RID_RESXLS_OV_Minor").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Minor
+ aWorkBook.Names("RID_RESXLS_OV_None").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_None
+ aWorkBook.Names("RID_RESXLS_OV_Number").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Number
+ aWorkBook.Names("RID_RESXLS_OV_Number_of_Documents_Analyzed").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Number_of_Documents_Analyzed
+ aWorkBook.Names("RID_RESXLS_OV_NumberOfDocs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_NumberOfDocs
+ aWorkBook.Names("RID_RESXLS_OV_Potential_savings_macro_conversion").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Potential_savings_macro_conversion
+ aWorkBook.Names("RID_RESXLS_OV_Potential_savings_prepared_docs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Potential_savings_prepared_docs
+ aWorkBook.Names("RID_RESXLS_OV_PowerPoint").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_PowerPoint
+ aWorkBook.Names("RID_RESXLS_OV_PowerPoint_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_PowerPoint_Costs
+ aWorkBook.Names("RID_RESXLS_OV_PowerPoint_Document").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_PowerPoint_Document
+ aWorkBook.Names("RID_RESXLS_OV_PowerPoint_Template").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_PowerPoint_Template
+ aWorkBook.Names("RID_RESXLS_OV_Simple").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Simple
+ aWorkBook.Names("RID_RESXLS_OV_Total").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Total
+ aWorkBook.Names("RID_RESXLS_OV_Totals").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Totals
+ aWorkBook.Names("RID_RESXLS_OV_Word").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Word
+ aWorkBook.Names("RID_RESXLS_OV_Word_Costs").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Word_Costs
+ aWorkBook.Names("RID_RESXLS_OV_Word_Document").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Word_Document
+ aWorkBook.Names("RID_RESXLS_OV_Word_Template").RefersToRange.Cells(1, 1) = RID_RESXLS_OV_Word_Template
+ aWorkBook.Names("RID_RESXLS_PP_Action_Settings").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Action_Settings
+ aWorkBook.Names("RID_RESXLS_PP_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Application
+ aWorkBook.Names("RID_RESXLS_PP_Content___Document_Properties").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Content___Document_Properties
+ aWorkBook.Names("RID_RESXLS_PP_Document_Name_and_Path").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Document_Name_and_Path
+ aWorkBook.Names("RID_RESXLS_PP_Fields").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Fields
+ aWorkBook.Names("RID_RESXLS_PP_Format").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Format
+ aWorkBook.Names("RID_RESXLS_PP_Notes___Handouts").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Notes___Handouts
+ aWorkBook.Names("RID_RESXLS_PP_Objects__Graphics___Textboxes").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Objects__Graphics___Textboxes
+ aWorkBook.Names("RID_RESXLS_PP_Portability").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_Portability
+ aWorkBook.Names("RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary
+ aWorkBook.Names("RID_RESXLS_PP_PowerPoint_Presentation_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_PowerPoint_Presentation_Name
+ aWorkBook.Names("RID_RESXLS_PP_VBA_Macros").RefersToRange.Cells(1, 1) = RID_RESXLS_PP_VBA_Macros
+ aWorkBook.Names("RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details
+ aWorkBook.Names("RID_RESXLS_RD_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Application
+ aWorkBook.Names("RID_RESXLS_RD_Description").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Description
+ aWorkBook.Names("RID_RESXLS_RD_Document_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Document_Name
+ aWorkBook.Names("RID_RESXLS_RD_Document_Name_and_Path").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Document_Name_and_Path
+ aWorkBook.Names("RID_RESXLS_RD_Location").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Location
+ aWorkBook.Names("RID_RESXLS_RD_Reference").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Reference
+ aWorkBook.Names("RID_RESXLS_RD_Reference_Details").RefersToRange.Cells(1, 1) = RID_RESXLS_RD_Reference_Details
+ aWorkBook.Names("RID_RESXLS_WI_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Application
+ aWorkBook.Names("RID_RESXLS_WI_Changes_and_Reviewing").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Changes_and_Reviewing
+ aWorkBook.Names("RID_RESXLS_WI_Content___Document_Properties").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Content___Document_Properties
+ aWorkBook.Names("RID_RESXLS_WI_Controls").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Controls
+ aWorkBook.Names("RID_RESXLS_WI_Document_Name_and_Path").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Document_Name_and_Path
+ aWorkBook.Names("RID_RESXLS_WI_Fields").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Fields
+ aWorkBook.Names("RID_RESXLS_WI_Format").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Format
+ aWorkBook.Names("RID_RESXLS_WI_Index_and_References").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Index_and_References
+ aWorkBook.Names("RID_RESXLS_WI_Objects__Graphics____Frames").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Objects__Graphics____Frames
+ aWorkBook.Names("RID_RESXLS_WI_Portability").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Portability
+ aWorkBook.Names("RID_RESXLS_WI_Tables").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Tables
+ aWorkBook.Names("RID_RESXLS_WI_VBA_Macros").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_VBA_Macros
+ aWorkBook.Names("RID_RESXLS_WI_Word_Document_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Word_Document_Name
+ aWorkBook.Names("RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary").RefersToRange.Cells(1, 1) = RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary
+ aWorkBook.Names("RID_RESXLS_XL_Application").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Application
+ aWorkBook.Names("RID_RESXLS_XL_Changes___Reviewing").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Changes___Reviewing
+ aWorkBook.Names("RID_RESXLS_XL_Charts___Tables").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Charts___Tables
+ aWorkBook.Names("RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary
+ aWorkBook.Names("RID_RESXLS_XL_Excel_Spreadsheet_Name").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Excel_Spreadsheet_Name
+ aWorkBook.Names("RID_RESXLS_XL_Format").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Format
+ aWorkBook.Names("RID_RESXLS_XL_Functions").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Functions
+ aWorkBook.Names("RID_RESXLS_XL_Objects___Graphics").RefersToRange.Cells(1, 1) = RID_RESXLS_XL_Objects___Graphics
+
+ aWorkBook.Names("RID_RESXLS_COST_DB_Query").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_DB_Query
+ aWorkBook.Names("RID_RESXLS_COST_DB_Query_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_DB_Query_Comment
+ aWorkBook.Names("RID_RESXLS_COST_LineStyle").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_LineStyle
+ aWorkBook.Names("RID_RESXLS_COST_LineStyle_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_LineStyle_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Numbering").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Numbering
+ aWorkBook.Names("RID_RESXLS_COST_Numbering_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Numbering_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Template").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Template
+ aWorkBook.Names("RID_RESXLS_COST_Template_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Template_Comment
+ aWorkBook.Names("RID_RESXLS_COST_DATEDIF_Note").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_DATEDIF_Note
+ aWorkBook.Names("RID_RESXLS_COST_Tabstop").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Tabstop
+ aWorkBook.Names("RID_RESXLS_COST_Tabstop_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Tabstop_Comment
+ aWorkBook.Names("RID_RESXLS_COST_GradientStyle").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_GradientStyle
+ aWorkBook.Names("RID_RESXLS_COST_GradientStyle_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_GradientStyle_Comment
+ aWorkBook.Names("RID_RESXLS_COST_GradientStyle_Note").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_GradientStyle_Note
+ aWorkBook.Names("RID_RESXLS_COST_Hyperlink").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Hyperlink
+ aWorkBook.Names("RID_RESXLS_COST_Hyperlink_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Hyperlink_Comment
+ aWorkBook.Names("RID_RESXLS_COST_HyperlinkSplit").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_HyperlinkSplit
+ aWorkBook.Names("RID_RESXLS_COST_HyperlinkSplit_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_HyperlinkSplit_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Background").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Background
+ aWorkBook.Names("RID_RESXLS_COST_Background_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Background_Comment
+ aWorkBook.Names("RID_RESXLS_COST_Transparent").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Transparent
+ aWorkBook.Names("RID_RESXLS_COST_Transparent_Comment").RefersToRange.Cells(1, 1) = RID_RESXLS_COST_Transparent_Comment
+
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/PrepareInfo.cls b/migrationanalysis/src/driver_docs/sources/PrepareInfo.cls
new file mode 100644
index 000000000000..71eacb640562
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/PrepareInfo.cls
@@ -0,0 +1,44 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "PrepareInfo"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = True
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: PrepareInfo.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+'H&F Info
+Public HF_OnPage As Long
+Public HF_inheader As Boolean
+Public HF_extendLength As Single
+Public HF_Shapes As Collection
+Public HF_Frames As Collection
diff --git a/migrationanalysis/src/driver_docs/sources/StringDataManager.cls b/migrationanalysis/src/driver_docs/sources/StringDataManager.cls
new file mode 100644
index 000000000000..6bea8530bf95
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/StringDataManager.cls
@@ -0,0 +1,133 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "StringDataManager"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = True
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: StringDataManager.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+Private langDict As Scripting.Dictionary
+Private mFileName As String
+
+Const C_PRODUCTNAME = "<PRODUCTNAME>"
+Const C_PRODUCTVERSION = "<PRODUCTVERSION>"
+Const C_NEXTPRODUCTVERSION = "<NEXTPRODUCTVERSION>"
+Const C_NEWLINE = "<CR>"
+
+' Load strings from the data file (in the form "id=string") into
+' dictionary object.
+Function InitStringData(fileName As String) As Boolean
+ On Error GoTo HandleErrors
+ Dim stringFile As TextStream
+ Dim aLine As String
+ Dim valueOffset As Long
+ Dim id, Str As String
+ Dim fso As FileSystemObject
+
+ 'Make sure the string data file exists before opening.
+ Set fso = New Scripting.FileSystemObject
+ If Not fso.FileExists(fileName) Then
+ InitStringData = False
+ Exit Function
+ End If
+ Set stringFile = fso.OpenTextFile(fileName, ForReading, False, TristateTrue)
+ If IsEmpty(stringFile) Then
+ 'WriteDebug
+ End If
+ mFileName = fileName
+
+ 'Read each line and parse the id and string, then put into dictionary
+ Do While Not stringFile.AtEndOfStream
+ aLine = stringFile.ReadLine
+ valueOffset = InStr(aLine, "=")
+ id = Left(aLine, valueOffset - 1)
+ Str = Right(aLine, Len(aLine) - valueOffset)
+ langDict.Add id, Str
+ Loop
+ stringFile.Close
+
+ Dim aProductName As String
+ Dim aProductVersion As String
+ Dim aNextProductVersion As String
+ Dim aKey As Variant
+ Dim aItem As String
+ Dim aOldItem As String
+
+ aProductName = langDict.item("RID_STR_COMMON_PRODUCTNAME")
+ aProductVersion = langDict.item("RID_STR_COMMON_PRODUCTVERSION")
+ aNextProductVersion = langDict.item("RID_STR_COMMON_NEXTPRODUCTVERSION")
+
+ For Each aKey In langDict
+ aOldItem = langDict.item(aKey)
+ aItem = ReplaceTopicTokens(aOldItem, C_PRODUCTNAME, aProductName)
+ aItem = ReplaceTopicTokens(aItem, C_PRODUCTVERSION, aProductVersion)
+ aItem = ReplaceTopicTokens(aItem, C_NEXTPRODUCTVERSION, aNextProductVersion)
+ aItem = ReplaceTopicTokens(aItem, C_NEWLINE, vbLF)
+ If (Not (aOldItem = aItem)) Then
+ langDict.item(aKey) = aItem
+ End If
+ Next
+
+ InitStringData = True
+
+FinalExit:
+ Exit Function
+HandleErrors:
+ WriteDebug "InitStringData : " & Err.Number & " " & Err.Description & " " & Err.Source
+ InitStringData = False
+End Function
+
+'Set String Data from an existing dictionary
+Public Property Set StringData(data As Scripting.Dictionary)
+ Set langDict = data
+End Property
+
+'Get String Data dictionary
+Public Property Get StringData() As Scripting.Dictionary
+ Set StringData = langDict
+End Property
+
+'Initialize a given string variable by id
+Function InitString(ByRef resRef As String, resName As String)
+ resRef = langDict.item(resName)
+End Function
+
+Private Sub Class_Initialize()
+ Set langDict = New Scripting.Dictionary 'Allocate the string dictonary
+End Sub
+
+Private Sub Class_Terminate()
+ langDict.RemoveAll
+ Set langDict = Nothing 'Empty the dictionary and remove the instance
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisExcelDriver.xls b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisExcelDriver.xls
new file mode 100644
index 000000000000..8b749cf29ec3
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisExcelDriver.xls
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisPPTDriver.ppt b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisPPTDriver.ppt
new file mode 100644
index 000000000000..005f9030efbc
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisPPTDriver.ppt
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisWordDriver.doc b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisWordDriver.doc
new file mode 100644
index 000000000000..8ec7afdd4d71
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/Stripped_OOoDocAnalysisWordDriver.doc
Binary files differ
diff --git a/migrationanalysis/src/driver_docs/sources/common_res.bas b/migrationanalysis/src/driver_docs/sources/common_res.bas
new file mode 100644
index 000000000000..5a3a048261d0
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/common_res.bas
@@ -0,0 +1,286 @@
+Attribute VB_Name = "common_res"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: common_res.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_COSTS As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS As String
+Public RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP As String
+Public RID_STR_COMMON_ANALYSIS_STR As String
+Public RID_STR_COMMON_NOTE_PRE As String
+Public RID_STR_COMMON_NOTE_POST As String
+Public RID_STR_COMMON_OLE_EMBEDDED As String
+Public RID_STR_COMMON_OLE_LINKED As String
+Public RID_STR_COMMON_OLE_CONTROL As String
+Public RID_STR_COMMON_OLE_FIELD_LINK As String
+Public RID_STR_COMMON_OLE_UNKNOWN As String
+Public RID_STR_COMMON_VB_COMPONENT_MODULE As String
+Public RID_STR_COMMON_VB_COMPONENT_STANDARD As String
+Public RID_STR_COMMON_VB_COMPONENT_CLASS As String
+Public RID_STR_COMMON_VB_COMPONENT_USER_FORM As String
+Public RID_STR_COMMON_VB_COMPONENT_DOCUMENT As String
+Public RID_STR_COMMON_VB_COMPONENT_ACTIVEX_DESIGNER As String
+Public RID_STR_COMMON_VB_COMPONENT_UNKNOWN As String
+Public RID_STR_COMMON_YES_OR_NO As String
+Public RID_STR_COMMON_DATE As String
+Public RID_STR_COMMON_NUMBER As String
+Public RID_STR_COMMON_TEXT As String
+Public RID_STR_COMMON_UNKNOWN As String
+Public RID_STR_COMMON_DEC_TO_EXTERNAL_LIBRARY As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_PAGE As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_SHEET As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION As String
+Public RID_STR_COMMON_RESULTS_LOCATION_TYPE_SLIDE As String
+Public RID_STR_COMMON_INVALID_PASSWORD As String
+Public RID_STR_COMMON_PASSWORD_SKIPDOC As String
+Public RID_STR_COMMON_NA As String
+Public RID_STR_COMMON_ATTRIBUTE_BROKEN As String
+Public RID_STR_COMMON_ATTRIBUTE_BUILTIN As String
+Public RID_STR_COMMON_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES As String
+Public RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT As String
+Public RID_STR_COMMON_ATTRIBUTE_COMPONENT As String
+Public RID_STR_COMMON_ATTRIBUTE_CONTROLS As String
+Public RID_STR_COMMON_ATTRIBUTE_CUSTOM As String
+Public RID_STR_COMMON_ATTRIBUTE_DESCRIPTION As String
+Public RID_STR_COMMON_ATTRIBUTE_GUID As String
+Public RID_STR_COMMON_ATTRIBUTE_FILE As String
+Public RID_STR_COMMON_ATTRIBUTE_PROPERTIES As String
+Public RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE As String
+Public RID_STR_COMMON_ATTRIBUTE_INCLUDING As String
+Public RID_STR_COMMON_ATTRIBUTE_INTACT As String
+Public RID_STR_COMMON_ATTRIBUTE_ISBROKEN As String
+Public RID_STR_COMMON_ATTRIBUTE_MAJOR As String
+Public RID_STR_COMMON_ATTRIBUTE_MINOR As String
+Public RID_STR_COMMON_ATTRIBUTE_MISSING As String
+Public RID_STR_COMMON_ATTRIBUTE_NAME As String
+Public RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES As String
+Public RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT As String
+Public RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES As String
+Public RID_STR_COMMON_ATTRIBUTE_SIGNATURE As String
+Public RID_STR_COMMON_ATTRIBUTE_PASSWORD As String
+Public RID_STR_COMMON_ATTRIBUTE_PATH As String
+Public RID_STR_COMMON_ATTRIBUTE_PROCEDURES As String
+Public RID_STR_COMMON_ATTRIBUTE_PROJECT As String
+Public RID_STR_COMMON_ATTRIBUTE_TYPE As String
+Public RID_STR_COMMON_ATTRIBUTE_TYPELIB As String
+Public RID_STR_COMMON_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT As String
+Public RID_STR_COMMON_ATTRIBUTE_UNKNOWN As String
+Public RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE As String
+Public RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT As String
+Public RID_STR_COMMON_ATTRIBUTE_VALUE As String
+Public RID_STR_COMMON_ATTRIBUTE_VBPROJECT_PASSWORD As String
+Public RID_STR_COMMON_ISSUE_INFORMATION As String
+Public RID_STR_COMMON_ISSUE_FORMAT As String
+Public RID_STR_COMMON_ISSUE_PORTABILITY As String
+Public RID_STR_COMMON_ISSUE_VBA_MACROS As String
+Public RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES As String
+Public RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST As String
+Public RID_STR_COMMON_SUBISSUE_PROPERTIES As String
+Public RID_STR_COMMON_SUBISSUE_REFERENCES As String
+Public RID_STR_COMMON_SUBISSUE_EXTERNAL_REFERENCES_IN_MACROS As String
+Public RID_STR_COMMON_SUBISSUE_INVALID_PASSWORD_ENTERED As String
+Public RID_STR_COMMON_SUBISSUE_SKIP_PASSWORD_DOCUMENTS As String
+Public RID_STR_COMMON_SUBISSUE_DOCUMENT_PARTS_PROTECTION As String
+Public RID_STR_COMMON_SUBISSUE_MACRO_PASSWORD_PROTECTION As String
+Public RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION As String
+Public RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME As String
+Public RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE As String
+Public RID_STR_COMMON_ATTRIBUTE_SOURCE As String
+Public RID_STR_COMMON_NOTE_HF_PREPARABLE As String
+Public RID_STR_COMMON_PREPARATION_FOLDER As String
+Public RID_STR_COMMON_SUBISSUE_DOCUMENT_CUSTOM_PROPERTY As String
+Public RID_STR_COMMON_MACRO_CLASS_COMPLEX As String
+Public RID_STR_COMMON_MACRO_CLASS_MEDIUM As String
+Public RID_STR_COMMON_MACRO_CLASS_SIMPLE As String
+Public RID_STR_COMMON_MACRO_CLASS_NONE As String
+Public RID_STR_COMMON_ISSUE_CLASS_COMPLEX As String
+Public RID_STR_COMMON_ISSUE_CLASS_MINOR As String
+Public RID_STR_COMMON_ISSUE_CLASS_NONE As String
+Public RID_STR_COMMON_OV_VERSION_STR As String
+Public RID_STR_COMMON_OV_PRODUCT_STR As String
+Public RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_TITLE As String
+Public RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_BODY As String
+Public RID_STR_COMMON_OV_LEGEND_TITLE As String
+Public RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY As String
+Public RID_STR_COMMON_OV_DOC_MACRO_COMMENT_TITLE As String
+Public RID_STR_COMMON_OV_DOC_MACRO_COMMENT_BODY As String
+Public RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY As String
+Public RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_DAW As String
+Public RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT As String
+Public RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_TITLE As String
+Public RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_BODY As String
+Public RID_STR_COMMON_OV_DOC_ANALYSIS_DAW_LEGEND_BODY As String
+Public RID_STR_COMMON_OV_DOC_ANALYSIS_PAW_LEGEND_BODY As String
+Public RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE As String
+Public RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE As String
+Public RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE As String
+Public RID_STR_COMMON_PREPARATION_NOTE As String
+Public RID_STR_COMMON_CANNOT_OPEN As String
+Public RID_STR_COMMON_SUBISSUE_LINE_NOTE As String
+Public RID_STR_COMMON_SUBISSUE_TRANSPARENCY_NOTE As String
+Public RID_STR_COMMON_SUBISSUE_GRADIENT_PRESET_NOTE As String
+Public RID_STR_COMMON_SUBISSUE_GRADIENT_CORNER_NOTE As String
+Public RID_STR_COMMON_SUBISSUE_GRADIENT_CENTER_NOTE As String
+
+Public Sub LoadCommonStrings(sdm As StringDataManager)
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW, "RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW"
+ ' The dutch excel 2000 doesn't like the name 'Overzicht' so we always append a space to the name
+ RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW = RID_STR_COMMON_RESULTS_SHEET_NAME_OVERVIEW & " "
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_COSTS, "RID_STR_COMMON_RESULTS_SHEET_NAME_COSTS"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_WORD"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_EXCEL"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUES_POWERPOINT"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCISSUE_DETAILS"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCREF_DETAILS"
+ sdm.InitString RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP, "RID_STR_COMMON_RESULTS_SHEET_NAME_DOCPROP"
+ sdm.InitString RID_STR_COMMON_ANALYSIS_STR, "RID_STR_COMMON_ANALYSIS_STR"
+ sdm.InitString RID_STR_COMMON_NOTE_PRE, "RID_STR_COMMON_NOTE_PRE"
+ sdm.InitString RID_STR_COMMON_NOTE_POST, "RID_STR_COMMON_NOTE_POST"
+ sdm.InitString RID_STR_COMMON_OLE_EMBEDDED, "RID_STR_COMMON_OLE_EMBEDDED"
+ sdm.InitString RID_STR_COMMON_OLE_LINKED, "RID_STR_COMMON_OLE_LINKED"
+ sdm.InitString RID_STR_COMMON_OLE_CONTROL, "RID_STR_COMMON_OLE_CONTROL"
+ sdm.InitString RID_STR_COMMON_OLE_FIELD_LINK, "RID_STR_COMMON_OLE_FIELD_LINK"
+ sdm.InitString RID_STR_COMMON_OLE_UNKNOWN, "RID_STR_COMMON_OLE_UNKNOWN"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_MODULE, "RID_STR_COMMON_VB_COMPONENT_MODULE"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_STANDARD, "RID_STR_COMMON_VB_COMPONENT_STANDARD"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_CLASS, "RID_STR_COMMON_VB_COMPONENT_CLASS"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_USER_FORM, "RID_STR_COMMON_VB_COMPONENT_USER_FORM"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_DOCUMENT, "RID_STR_COMMON_VB_COMPONENT_DOCUMENT"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_ACTIVEX_DESIGNER, "RID_STR_COMMON_VB_COMPONENT_ACTIVEX_DESIGNER"
+ sdm.InitString RID_STR_COMMON_VB_COMPONENT_UNKNOWN, "RID_STR_COMMON_VB_COMPONENT_UNKNOWN"
+ sdm.InitString RID_STR_COMMON_YES_OR_NO, "RID_STR_COMMON_YES_OR_NO"
+ sdm.InitString RID_STR_COMMON_DATE, "RID_STR_COMMON_DATE"
+ sdm.InitString RID_STR_COMMON_NUMBER, "RID_STR_COMMON_NUMBER"
+ sdm.InitString RID_STR_COMMON_TEXT, "RID_STR_COMMON_TEXT"
+ sdm.InitString RID_STR_COMMON_UNKNOWN, "RID_STR_COMMON_UNKNOWN"
+ sdm.InitString RID_STR_COMMON_DEC_TO_EXTERNAL_LIBRARY, "RID_STR_COMMON_DEC_TO_EXTERNAL_LIBRARY"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_PAGE, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_PAGE"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_SHEET, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_SHEET"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION"
+ sdm.InitString RID_STR_COMMON_RESULTS_LOCATION_TYPE_SLIDE, "RID_STR_COMMON_RESULTS_LOCATION_TYPE_SLIDE"
+ sdm.InitString RID_STR_COMMON_INVALID_PASSWORD, "RID_STR_COMMON_INVALID_PASSWORD"
+ sdm.InitString RID_STR_COMMON_PASSWORD_SKIPDOC, "RID_STR_COMMON_PASSWORD_SKIPDOC"
+ sdm.InitString RID_STR_COMMON_NA, "RID_STR_COMMON_NA"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_BROKEN, "RID_STR_COMMON_ATTRIBUTE_BROKEN"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_BUILTIN, "RID_STR_COMMON_ATTRIBUTE_BUILTIN"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES, "RID_STR_COMMON_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT, "RID_STR_COMMON_ATTRIBUTE_CLASS_ME_COUNT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_COMPONENT, "RID_STR_COMMON_ATTRIBUTE_COMPONENT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_CONTROLS, "RID_STR_COMMON_ATTRIBUTE_CONTROLS"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_CUSTOM, "RID_STR_COMMON_ATTRIBUTE_CUSTOM"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_DESCRIPTION, "RID_STR_COMMON_ATTRIBUTE_DESCRIPTION"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_GUID, "RID_STR_COMMON_ATTRIBUTE_GUID"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_FILE, "RID_STR_COMMON_ATTRIBUTE_FILE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_PROPERTIES, "RID_STR_COMMON_ATTRIBUTE_PROPERTIES"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE, "RID_STR_COMMON_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_INCLUDING, "RID_STR_COMMON_ATTRIBUTE_INCLUDING"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_INTACT, "RID_STR_COMMON_ATTRIBUTE_INTACT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_ISBROKEN, "RID_STR_COMMON_ATTRIBUTE_ISBROKEN"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_MAJOR, "RID_STR_COMMON_ATTRIBUTE_MAJOR"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_MINOR, "RID_STR_COMMON_ATTRIBUTE_MINOR"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_MISSING, "RID_STR_COMMON_ATTRIBUTE_MISSING"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_NAME, "RID_STR_COMMON_ATTRIBUTE_NAME"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES, "RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT, "RID_STR_COMMON_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES_COUNT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES, "RID_STR_COMMON_ATTRIBUTE_NUMBER_OF_LINES"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_SIGNATURE, "RID_STR_COMMON_ATTRIBUTE_SIGNATURE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_PASSWORD, "RID_STR_COMMON_ATTRIBUTE_PASSWORD"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_PATH, "RID_STR_COMMON_ATTRIBUTE_PATH"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_PROCEDURES, "RID_STR_COMMON_ATTRIBUTE_PROCEDURES"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_PROJECT, "RID_STR_COMMON_ATTRIBUTE_PROJECT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_TYPE, "RID_STR_COMMON_ATTRIBUTE_TYPE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_TYPELIB, "RID_STR_COMMON_ATTRIBUTE_TYPELIB"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT, "RID_STR_COMMON_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_UNKNOWN, "RID_STR_COMMON_ATTRIBUTE_UNKNOWN"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE, "RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT, "RID_STR_COMMON_ATTRIBUTE_USERFORM_TYPES_COUNT"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_VALUE, "RID_STR_COMMON_ATTRIBUTE_VALUE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_VBPROJECT_PASSWORD, "RID_STR_COMMON_ATTRIBUTE_VBPROJECT_PASSWORD"
+ sdm.InitString RID_STR_COMMON_ISSUE_INFORMATION, "RID_STR_COMMON_ISSUE_INFORMATION"
+ sdm.InitString RID_STR_COMMON_ISSUE_FORMAT, "RID_STR_COMMON_ISSUE_FORMAT"
+ sdm.InitString RID_STR_COMMON_ISSUE_PORTABILITY, "RID_STR_COMMON_ISSUE_PORTABILITY"
+ sdm.InitString RID_STR_COMMON_ISSUE_VBA_MACROS, "RID_STR_COMMON_ISSUE_VBA_MACROS"
+ sdm.InitString RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES, "RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES"
+ sdm.InitString RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST, "RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_PROPERTIES, "RID_STR_COMMON_SUBISSUE_PROPERTIES"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_REFERENCES, "RID_STR_COMMON_SUBISSUE_REFERENCES"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_EXTERNAL_REFERENCES_IN_MACROS, "RID_STR_COMMON_SUBISSUE_EXTERNAL_REFERENCES_IN_MACROS"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_INVALID_PASSWORD_ENTERED, "RID_STR_COMMON_SUBISSUE_INVALID_PASSWORD_ENTERED"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_SKIP_PASSWORD_DOCUMENTS, "RID_STR_COMMON_SUBISSUE_SKIP_PASSWORD_DOCUMENTS"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_DOCUMENT_PARTS_PROTECTION, "RID_STR_COMMON_SUBISSUE_DOCUMENT_PARTS_PROTECTION"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_MACRO_PASSWORD_PROTECTION, "RID_STR_COMMON_SUBISSUE_MACRO_PASSWORD_PROTECTION"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION, "RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME, "RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE, "RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE"
+ sdm.InitString RID_STR_COMMON_ATTRIBUTE_SOURCE, "RID_STR_COMMON_ATTRIBUTE_SOURCE"
+ sdm.InitString RID_STR_COMMON_NOTE_HF_PREPARABLE, "RID_STR_COMMON_NOTE_HF_PREPARABLE"
+ sdm.InitString RID_STR_COMMON_PREPARATION_FOLDER, "RID_STR_COMMON_PREPARATION_FOLDER"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_DOCUMENT_CUSTOM_PROPERTY, "RID_STR_COMMON_SUBISSUE_DOCUMENT_CUSTOM_PROPERTY"
+ sdm.InitString RID_STR_COMMON_MACRO_CLASS_COMPLEX, "RID_STR_COMMON_MACRO_CLASS_COMPLEX"
+ sdm.InitString RID_STR_COMMON_MACRO_CLASS_MEDIUM, "RID_STR_COMMON_MACRO_CLASS_MEDIUM"
+ sdm.InitString RID_STR_COMMON_MACRO_CLASS_SIMPLE, "RID_STR_COMMON_MACRO_CLASS_SIMPLE"
+ sdm.InitString RID_STR_COMMON_MACRO_CLASS_NONE, "RID_STR_COMMON_MACRO_CLASS_NONE"
+ sdm.InitString RID_STR_COMMON_ISSUE_CLASS_COMPLEX, "RID_STR_COMMON_ISSUE_CLASS_COMPLEX"
+ sdm.InitString RID_STR_COMMON_ISSUE_CLASS_MINOR, "RID_STR_COMMON_ISSUE_CLASS_MINOR"
+ sdm.InitString RID_STR_COMMON_ISSUE_CLASS_NONE, "RID_STR_COMMON_ISSUE_CLASS_NONE"
+ sdm.InitString RID_STR_COMMON_OV_VERSION_STR, "RID_STR_COMMON_OV_VERSION_STR"
+ sdm.InitString RID_STR_COMMON_OV_PRODUCT_STR, "RID_STR_COMMON_OV_PRODUCT_STR"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_TITLE, "RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_BODY, "RID_STR_COMMON_OV_DOC_MOD_DATES_COMMENT_BODY"
+ sdm.InitString RID_STR_COMMON_OV_LEGEND_TITLE, "RID_STR_COMMON_OV_LEGEND_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY, "RID_STR_COMMON_OV_DOC_MOD_DATES_LEGEND_BODY"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MACRO_COMMENT_TITLE, "RID_STR_COMMON_OV_DOC_MACRO_COMMENT_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MACRO_COMMENT_BODY, "RID_STR_COMMON_OV_DOC_MACRO_COMMENT_BODY"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY, "RID_STR_COMMON_OV_DOC_MACRO_LEGEND_BODY"
+ sdm.InitString RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_DAW, "RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_DAW"
+ sdm.InitString RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT, "RID_STR_COMMON_OV_HIGH_LEVEL_ANALYSIS_PAW_NO_LIMIT"
+ sdm.InitString RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_TITLE, "RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_BODY, "RID_STR_COMMON_OV_DOC_ANALYSIS_COMMENT_BODY"
+ sdm.InitString RID_STR_COMMON_OV_DOC_ANALYSIS_DAW_LEGEND_BODY, "RID_STR_COMMON_OV_DOC_ANALYSIS_DAW_LEGEND_BODY"
+ sdm.InitString RID_STR_COMMON_OV_DOC_ANALYSIS_PAW_LEGEND_BODY, "RID_STR_COMMON_OV_DOC_ANALYSIS_PAW_LEGEND_BODY"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE, "RID_STR_COMMON_OV_DOC_MOD_DATES_CHART_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE, "RID_STR_COMMON_OV_DOC_MACRO_CHART_TITLE"
+ sdm.InitString RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE, "RID_STR_COMMON_OV_DOC_ANALYSIS_CHART_TITLE"
+ sdm.InitString RID_STR_COMMON_PREPARATION_NOTE, "RID_STR_COMMON_PREPARATION_NOTE"
+ sdm.InitString RID_STR_COMMON_CANNOT_OPEN, "RID_STR_COMMON_CANNOT_OPEN"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_LINE_NOTE, "RID_STR_COMMON_SUBISSUE_LINE_NOTE"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_TRANSPARENCY_NOTE, "RID_STR_COMMON_SUBISSUE_TRANSPARENCY_NOTE"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_GRADIENT_PRESET_NOTE, "RID_STR_COMMON_SUBISSUE_GRADIENT_PRESET_NOTE"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_GRADIENT_CORNER_NOTE, "RID_STR_COMMON_SUBISSUE_GRADIENT_CORNER_NOTE"
+ sdm.InitString RID_STR_COMMON_SUBISSUE_GRADIENT_CENTER_NOTE, "RID_STR_COMMON_SUBISSUE_GRADIENT_CENTER_NOTE"
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/ApplicationSpecific.bas b/migrationanalysis/src/driver_docs/sources/excel/ApplicationSpecific.bas
new file mode 100644
index 000000000000..d74f29baa0b2
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/ApplicationSpecific.bas
@@ -0,0 +1,166 @@
+Attribute VB_Name = "ApplicationSpecific"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: ApplicationSpecific.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+'** Issue Categories
+Public Const CID_INFORMATION_REFS = 0
+Public Const CID_CHANGES_AND_REVIEWING = 1
+Public Const CID_CHARTS_TABLES = 2
+Public Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 3
+Public Const CID_CONTROLS = 4
+Public Const CID_FILTERS = 5
+Public Const CID_FORMAT = 6
+Public Const CID_FUNCTIONS = 7
+Public Const CID_OBJECTS_GRAPHICS = 8
+Public Const CID_PORTABILITY = 9
+Public Const CID_VBA_MACROS = 10
+Public Const CTOTAL_CATEGORIES = 10
+
+'** Excel - XML Issue and SubIssue strings
+Public Const CSTR_ISSUE_CHANGES_AND_REVIEWING = "ChangesAndReviewing"
+Public Const CSTR_ISSUE_CHARTS_TABLES = "ChartsAndTables"
+Public Const CSTR_ISSUE_CONTROLS = "Controls"
+Public Const CSTR_ISSUE_FUNCTIONS = "Functions"
+Public Const CSTR_ISSUE_OBJECTS_GRAPHICS = "ObjectsAndGraphics"
+
+Public Const CSTR_SUBISSUE_ATTRIBUTES = "CellAttributes"
+Public Const CSTR_SUBISSUE_DATEDIF = "DATEDIF"
+Public Const CSTR_SUBISSUE_EMBEDDED_CHART = "EmbeddedChart"
+Public Const CSTR_SUBISSUE_ERROR_TYPE = "ERROR.TYPE"
+Public Const CSTR_SUBISSUE_EXTERNAL = "External"
+Public Const CSTR_SUBISSUE_INFO = "INFO"
+Public Const CSTR_SUBISSUE_MAX_ROWS_EXCEEDED = "MaximumRowsExceeded"
+Public Const CSTR_SUBISSUE_MAX_SHEETS_EXCEEDED = "MaximumSheetsExceeded"
+Public Const CSTR_SUBISSUE_PAGE_SETUP = "PageSetup"
+Public Const CSTR_SUBISSUE_PASSWORD_PROTECTION = "PasswordProtection"
+Public Const CSTR_SUBISSUE_PHONETIC = "PHONETIC"
+Public Const CSTR_SUBISSUE_SHEET_CHART = "SheetChart"
+Public Const CSTR_SUBISSUE_WORKBOOK_PROTECTION = "WorkbookProtection"
+Public Const CSTR_SUBISSUE_ZOOM = "Zoom"
+
+Public Const CSTR_SUBISSUE_CHART_COMPLEX = "ChartIssuesComplex"
+Public Const CSTR_SUBISSUE_CHART_MINOR = "ChartIssuesMinor"
+Public Const CSTR_SUBISSUE_CHART_PIVOT = "Pivot"
+Public Const CSTR_SUBISSUE_INVALID_WORKSHEET_NAME = "InvalidWorksheetName"
+Public Const CSTR_SUBISSUE_DB_QUERY = "DBQuery"
+
+'** END Excel - XML Issue and SubIssue strings
+
+
+Public Const CAPPNAME_WORD = "Word"
+'Public Const CAPPNAME_WORD_DOC = ".doc"
+'Public Const CAPPNAME_WORD_DOT = ".dot"
+
+Public Const CAPPNAME_EXCEL = "Excel"
+Public Const CAPPNAME_EXCEL_DOC = ".xls"
+Public Const CAPPNAME_EXCEL_DOT = ".xlt"
+
+Public Const CAPPNAME_POWERPOINT = "PowerPoint"
+'Public Const CAPPNAME_PP_DOC = ".ppt"
+'Public Const CAPPNAME_PP_DOT = ".pot"
+
+'Public Const CAPP_DOCPROP_LOCATION = "Document"
+Public CAPP_DOCPROP_LOCATION As String
+'Public Const CAPP_DOCPROP_LOCATION = "Presentation"
+
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Document"
+Public Const CAPP_XMLDOCPROP_LOCATION = "Workbook"
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Presentation"
+
+Public Const CTHIS_DOCUMENT = "ThisWorkbook"
+Public Const CTOPLEVEL_PROJECT = "VBAProject"
+
+Public Function getAppSpecificDocExt() As String
+ getAppSpecificDocExt = CAPPNAME_EXCEL_DOC
+End Function
+Public Function getAppSpecificTemplateExt() As String
+ getAppSpecificTemplateExt = CAPPNAME_EXCEL_DOT
+End Function
+
+Public Function getAppSpecificPath() As String
+ getAppSpecificPath = ActiveWorkbook.path
+End Function
+Public Function getAppSpecificApplicationName() As String
+ getAppSpecificApplicationName = CAPPNAME_EXCEL
+End Function
+
+Public Function getAppSpecificCustomDocProperties(currDoc As Workbook) As DocumentProperties
+ Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties
+End Function
+Public Function getAppSpecificCommentBuiltInDocProperty(currDoc As Workbook) As DocumentProperty
+ Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltinDocumentProperties("Comments")
+End Function
+
+Public Function getAppSpecificVBProject(currDoc As Workbook) As VBProject
+ Set getAppSpecificVBProject = currDoc.VBProject
+End Function
+
+Public Function getAppSpecificOLEClassType(aShape As Shape) As String
+ Dim objType As String
+
+ If aShape.OLEFormat.ProgID = "" Then
+ objType = aShape.OLEFormat.ClassType
+ Else
+ objType = aShape.OLEFormat.ProgID
+ End If
+
+ getAppSpecificOLEClassType = objType
+End Function
+
+Public Sub SetAppToMinimized()
+ Application.WindowState = xlMinimized
+ Application.Visible = False
+End Sub
+
+Public Sub LocalizeResources()
+ Dim xlStrings As StringDataManager
+ Set xlStrings = New StringDataManager
+
+ xlStrings.InitStringData (GetResourceDataFileName(ThisWorkbook.path))
+ LoadCommonStrings xlStrings
+ LoadExcelStrings xlStrings
+ LoadResultsStrings xlStrings
+ Set xlStrings = Nothing
+
+ SetWBDriverText
+End Sub
+
+Public Sub SetWBDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT
+ ThisWorkbook.Names("RID_STR_DVR_XL_EXCEL_DRIVER").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_EXCEL_DRIVER
+ ThisWorkbook.Names("RID_STR_DVR_XL_ISSUES").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_ISSUES
+ ThisWorkbook.Names("RID_STR_DVR_XL_PURPOSE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_PURPOSE
+ ThisWorkbook.Names("RID_STR_DVR_XL_READ_README").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_READ_README
+ ThisWorkbook.Names("RID_STR_DVR_XL_THE_MACROS").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THE_MACROS
+ ThisWorkbook.Names("RID_STR_DVR_XL_THIS_DOC").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THIS_DOC
+ ThisWorkbook.Names("RID_STR_DVR_XL_TITLE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_TITLE
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/MigrationAnalyser.cls b/migrationanalysis/src/driver_docs/sources/excel/MigrationAnalyser.cls
new file mode 100644
index 000000000000..66f48ed7faaa
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/MigrationAnalyser.cls
@@ -0,0 +1,2321 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "MigrationAnalyser"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: MigrationAnalyser.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Const CWORKBOOK_SHEETS_LIMIT = 256
+
+'Class variables
+Private Enum HFIssueType
+ hfInline
+ hfShape
+ hfFrame
+End Enum
+
+Private Enum HFIssueLocation
+ hfHeader
+ hfFooter
+End Enum
+
+Private Type CellAtrributes
+ LineStyle As Integer
+ FillPattern As Integer
+End Type
+
+Private Type BadSheetNameChar
+ BadChar As String
+ Position As Integer
+End Type
+
+Private mAnalysis As DocumentAnalysis
+Private mFileName As String
+
+Const RID_STR_EXCEL_SUBISSUE_ERROR_TYPE = "ERROR.TYPE"
+Const RID_STR_EXCEL_SUBISSUE_INFO = "INFO"
+Const RID_STR_EXCEL_SUBISSUE_DATEDIF = "DATEDIF"
+Const RID_STR_EXCEL_SUBISSUE_PHONETIC = "PHONETIC"
+Const FontError = 94
+Const CR_BADCHAR = "<TOKEN1>"
+Const CR_BADCHARNUM = "<TOKEN2>"
+Const DATA_SOURCE_EXCEL = 0
+Const DATA_SOURCE_EXTERNAL = 1
+Const DATA_SOURCE_MULTIPLE = 2
+Const DATA_SOURCE_EXTERNAL_FILE = 3
+Const C_MAX_CELL_RANGE_COUNT = 10000
+
+Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
+
+'***ADDING-ISSUE: Use Following Skeleton as Guideline for Adding Issue
+' For complete list of all RID_STR_... for Issues (IssueType), SubIssues (SubType) and Attributes refer to:
+' excel_res.bas and common_res.bas
+'
+' For complete list of all CID_... for Issue Categories(IssueID) and
+' CSTR_... for XML Issues (IssueTypeXML) and XML SubIssues (SubTypeXML) refer to:
+' ApplicationSpecific.bas and CommonMigrationAnalyser.bas
+'
+' You should not have to add any new Issue Categories or matching IssueTypes, only new SubIssues
+Sub Analyze_SKELETON()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SKELETON"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_VBA_MACROS 'Issue Category
+ .IssueType = RID_STR_COMMON_ISSUE_VBA_MACROS 'Issue String
+ .SubType = RID_STR_COMMON_SUBISSUE_PROPERTIES 'SubIssue String
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_VBA_MACROS 'Non localised XML Issue String
+ .SubTypeXML = CSTR_SUBISSUE_PROPERTIES 'Non localised XML SubIssue String
+ .locationXML = .CXMLLocationDocument 'Non localised XML location
+
+ .SubLocation = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .Line = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .column = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+
+ ' Add as many Attribute Value pairs as needed
+ ' Note: following must always be true - Attributes.Count = Values.Count
+ .Attributes.Add "AAA"
+ .Values.Add "foobar"
+
+ ' Use AddIssueDetailsNote to add notes to the Issue Details if required
+ ' Public Sub AddIssueDetailsNote(myIssue As IssueInfo, noteNum As Long, noteStr As String, _
+ ' Optional preStr As String = RID_STR_COMMON_NOTE_PRE)
+ ' Where preStr is prepended to the output, with "Note" as the default
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST
+
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) = _
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub DoAnalyse(fileName As String, userFormTypesDict As Scripting.Dictionary, _
+ startDir As String, storeToDir As String, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "DoAnalyse"
+ 'Dim secAutomation As MsoAutomationSecurity
+ 'secAutomation = Application.AutomationSecurity
+
+ mAnalysis.name = fileName
+ Dim aWB As Workbook
+ mAnalysis.TotalIssueTypes = CTOTAL_CATEGORIES
+
+ 'Make Excel run as non interactively as possible
+ Application.EnableEvents = False
+ Application.DisplayAlerts = False
+ Application.Interactive = False
+ Application.AskToUpdateLinks = False
+ Application.EnableAnimations = False
+ Application.EnableSound = False
+
+ 'Only supported in Office XP and above
+ 'Application.AutomationSecurity = msoAutomationSecurityForceDisable
+ 'mFileName = fso.GetFileName(fileName)
+ 'WriteToLog "TmpDebug1", mFileName
+
+ Dim myPassword As String
+
+ myPassword = GetDefaultPassword
+
+ If myPassword = "" Then
+ myPassword = "xoxoxoxoxo"
+ End If
+
+ Set aWB = Workbooks.Open(fileName:=fileName, _
+ Password:=myPassword, _
+ WriteResPassword:=myPassword, _
+ UpdateLinks:=0)
+
+ 'Application.AutomationSecurity = secAutomation
+
+ 'Do Analysis
+ Analyze_Password_Protection aWB
+ Analyze_Workbook_Protection aWB
+
+ 'Set Doc Properties
+ SetDocProperties mAnalysis, aWB, fso
+
+ Analyze_SheetLimits aWB
+ Analyze_SheetDisplay aWB
+ Analyze_SheetIssues aWB
+ Analyze_SheetCharts aWB
+ Analyze_WorkbookVersion aWB
+ Analyze_Macros mAnalysis, userFormTypesDict, aWB
+
+ ' Doc Preparation only
+ ' Save document with any fixed issues under <storeToDir>\prepared\<source doc name>
+ If mAnalysis.PreparableIssuesCount > 0 And CheckDoPrepare Then
+ Dim preparedFullPath As String
+ preparedFullPath = GetPreparedFullPath(mAnalysis.name, startDir, storeToDir, fso)
+ If preparedFullPath <> "" Then
+ If fso.FileExists(preparedFullPath) Then
+ fso.DeleteFile preparedFullPath, True
+ End If
+ If fso.FolderExists(fso.GetParentFolderName(preparedFullPath)) Then
+ If IsOldVersion(aWB.FileFormat) Then
+ aWB.SaveAs fileName:=preparedFullPath, FileFormat:=xlExcel9795
+ Else
+ aWB.SaveAs preparedFullPath
+ End If
+ End If
+ End If
+ End If
+
+FinalExit:
+ If Not aWB Is Nothing Then
+ aWB.Close (False)
+ End If
+
+ Set aWB = Nothing
+
+ Application.EnableEvents = True
+ Application.DisplayAlerts = True
+ Application.Interactive = True
+ Application.AskToUpdateLinks = True
+ Application.EnableAnimations = True
+ Application.EnableSound = True
+
+ 'Debug - Call Sleep(5000)
+ Exit Sub
+
+HandleErrors:
+ ' MsgBox currentFunctionName & " : " & fileName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ ' Handle Password error on Doc Open, Modify and Cancel
+ If Err.Number = 1004 Then
+ WriteDebug currentFunctionName & " : " & fileName & ": " & _
+ "User entered Invalid Document Password - " & Err.Number & " " & Err.Description & " " & Err.Source
+ HandleProtectedDocInvalidPassword mAnalysis, _
+ "User entered Invalid Document Password, further analysis not possible", fso
+ Resume FinalExit
+ End If
+ mAnalysis.Application = RID_STR_COMMON_CANNOT_OPEN
+ WriteDebug currentFunctionName & " : " & fileName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_SheetCharts(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SheetCharts"
+
+ Dim myChartSheet As Chart
+
+ For Each myChartSheet In aWB.Charts
+ SetChartIssueMinor myChartSheet, myChartSheet.name, False
+ SetChartIssueComplex myChartSheet, myChartSheet.name
+ Next myChartSheet
+
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_EmbeddedCharts(mySheet As Worksheet)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_EmbeddedCharts"
+ Dim BorderIssue As Boolean
+
+ Dim index As Integer
+ BorderIssue = False
+ Dim chartcount As Integer
+ Dim myChart As Chart
+
+ chartcount = mySheet.ChartObjects.count
+
+ For index = 1 To chartcount
+ BorderIssue = False
+ With mySheet.ChartObjects(index)
+ If .Border.LineStyle <> xlLineStyleNone Then
+ BorderIssue = True
+ End If
+ SetChartIssueMinor .Chart, mySheet.name, BorderIssue
+ 'If Not ((.ChartType = xlSurface) _
+ ' And (.ChartType = xlSurfaceTopViewWireframe) _
+ ' And (.ChartType = xlSurfaceTopView)) Then
+ SetChartIssueComplex .Chart, mySheet.name
+ 'End If
+ End With
+ Next index
+
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Private Function getType(o As Variant) As Integer
+ If (VarType(o) = vbString) Then
+ Dim aDataSource As String
+ aDataSource = o
+ getType = DATA_SOURCE_EXCEL
+ If (Len(aDataSource) > 0) Then
+ Dim nBackslashPos As Long
+ nBackslashPos = InStr(Trim(aDataSource), "\")
+ If (nBackslashPos > 0 And nBackslashPos < 4) Then
+ getType = DATA_SOURCE_EXTERNAL_FILE
+ End If
+ End If
+ ElseIf (IsArray(o)) Then
+ If (hasSecondDimension(o)) Then
+ getType = DATA_SOURCE_MULTIPLE
+ Else
+ getType = DATA_SOURCE_EXTERNAL
+ End If
+ End If
+End Function
+
+Private Function hasSecondDimension(o2 As Variant) As Boolean
+ On Error GoTo njet
+ Dim temp As Integer
+ temp = UBound(o2, 2)
+ hasSecondDimension = True
+ Exit Function
+njet:
+ hasSecondDimension = False
+End Function
+
+Private Sub Analyze_PivotTable(myIssue As IssueInfo, myPivotTable As PivotTable)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyse_PivotTable"
+
+ Dim aPivotField As PivotField
+ Dim aNoteCount As Long
+ Dim bManualSort As Boolean
+ Dim bCalculatedValues As Boolean
+ Dim aSorting As XlSortOrder
+ Dim nCount As Integer
+ Dim nDataSource As Integer
+
+ bManualSort = False
+ bCalculatedValues = False
+
+ For Each aPivotField In myPivotTable.PivotFields
+ aSorting = xlAscending
+
+ On Error Resume Next 'some fields don't have any property at all
+ aSorting = aPivotField.AutoSortOrder
+ On Error GoTo HandleErrors
+
+ If (aSorting = xlManual) Then
+ bManualSort = True
+ End If
+
+ nCount = 0
+
+ On Error Resume Next 'some fields don't have any property at all
+ nCount = aPivotField.CalculatedItems.count
+ On Error GoTo HandleErrors
+
+ If (nCount > 0) Then
+ bCalculatedValues = True
+ End If
+ Next
+
+ nCount = 0
+
+ On Error Resume Next 'some fields don't have any property at all
+ nCount = myPivotTable.CalculatedFields.count
+ On Error GoTo HandleErrors
+
+ If (nCount > 0) Then
+ bCalculatedValues = True
+ End If
+
+ nDataSource = getType(myPivotTable.SourceData)
+
+ aNoteCount = 0
+
+ If (bManualSort) Then
+ AddIssueDetailsNote myIssue, aNoteCount, RID_RESXLT_COST_PIVOT_ManSort_Comment
+ aNoteCount = aNoteCount + 1
+ End If
+
+ If (nDataSource = DATA_SOURCE_EXTERNAL) Then
+ AddIssueDetailsNote myIssue, aNoteCount, RID_RESXLT_COST_PIVOT_ExternData_Comment
+ aNoteCount = aNoteCount + 1
+ ElseIf (nDataSource = DATA_SOURCE_MULTIPLE) Then
+ AddIssueDetailsNote myIssue, aNoteCount, RID_RESXLT_COST_PIVOT_MultConsRanges_Comment
+ aNoteCount = aNoteCount + 1
+ ElseIf (nDataSource = DATA_SOURCE_EXTERNAL_FILE) Then
+ Dim noteString As String
+ noteString = RID_RESXLT_COST_PIVOT_ExternData_Comment & "[" & _
+ myPivotTable.SourceData & "]"
+ AddIssueDetailsNote myIssue, aNoteCount, noteString
+ aNoteCount = aNoteCount + 1
+ End If
+
+ If (bCalculatedValues) Then
+ AddIssueDetailsNote myIssue, aNoteCount, RID_RESXLT_COST_PIVOT_CalcVal_Comment
+ aNoteCount = aNoteCount + 1
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Sub SetChartIssueComplex(myChart As Chart, myName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetChartIssueComplex"
+
+ Dim myIssue As IssueInfo
+ Dim bSeriesChartTypeChanged As Boolean
+ Dim bDatasourceNotLinkedtoCell As Boolean
+ Dim bDatasourceOnDifferentSheet As Boolean
+ Dim bCategoryandValue As Boolean
+ Dim bCLabelMorethanOneCell As Boolean
+ Dim bOneColumnRow As Boolean
+ Dim bDataTable As Boolean
+ Dim bXAxes As Boolean
+ Dim bseries As Boolean
+ Dim bformat As Boolean
+ Dim bpivot As Boolean
+
+
+ Set myIssue = New IssueInfo
+ bSeriesChartTypeChanged = False
+ bDatasourceNotLinkedtoCell = False
+ bDatasourceOnDifferentSheet = False
+ bCategoryandValue = False
+ bCLabelMorethanOneCell = False
+ bOneColumnRow = False
+ bDataTable = False
+ bXAxes = False
+
+ bformat = FormatIssueComplex(myChart, bDataTable, bXAxes)
+ bseries = SeriesIssue(myChart, bSeriesChartTypeChanged, bDatasourceNotLinkedtoCell, bDatasourceOnDifferentSheet, bCategoryandValue, bCLabelMorethanOneCell, bOneColumnRow)
+ bpivot = Not (myChart.PivotLayout Is Nothing)
+
+ If (Not (bseries Or bformat Or bpivot)) Then
+ GoTo FinalExit
+ ElseIf bpivot Then
+ With myIssue
+ .IssueID = CID_CHARTS_TABLES
+ .IssueType = RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES
+ .SubType = RID_STR_EXCEL_SUBISSUE_PIVOT
+ .Location = .CLocationSheet
+ .SubLocation = myName
+
+ .IssueTypeXML = CSTR_ISSUE_CHARTS_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_CHART_PIVOT
+ .locationXML = .CXMLLocationSheet
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME
+ .Values.Add myChart.PivotLayout.PivotTable.name
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE
+ .Values.Add myChart.HasPivotFields
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM
+ .Values.Add myChart.PivotLayout.PivotTable.PivotFields.count
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TYPE
+ .Values.Add getChartTypeAsString(myChart.ChartType)
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_CHARTNAME
+ .Values.Add myChart.name
+ End With
+
+ AddIssueDetailsNote myIssue, 0, RID_RESXLT_COST_PIVOT_PivotChart_Comment
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) + 1
+ mAnalysis.Issues.Add myIssue
+
+ GoTo FinalExit
+ Else
+ With myIssue
+ Dim NoteIndex As Long
+ NoteIndex = 0
+
+ .IssueID = CID_CHARTS_TABLES
+ .IssueType = RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES
+ .SubType = RID_STR_EXCEL_SUBISSUE_CHART_COMPLEX
+ .Location = .CLocationSheet
+ .SubLocation = myName
+
+ .IssueTypeXML = CSTR_ISSUE_CHARTS_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_CHART_COMPLEX
+ .locationXML = .CXMLLocationSheet
+
+ If bDataTable Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_DATATABLE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_DATATABLE
+ NoteIndex = NoteIndex + 1
+ End If
+ If bXAxes Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_XAXISCATEGORY
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_TIMESCALE
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_XAXISCATEGORY
+ NoteIndex = NoteIndex + 1
+ End If
+ If bSeriesChartTypeChanged Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_SERIESCHARTTYPE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_CHANGED
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_SERIESCHARTTYPE
+ NoteIndex = NoteIndex + 1
+ End If
+ If bDatasourceNotLinkedtoCell Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_DATASOURCE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_DATASOURCENOTLINKEDTOCELL
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_DATASOURCENOTLINKEDTOCELL
+ NoteIndex = NoteIndex + 1
+ End If
+ If bDatasourceOnDifferentSheet Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_DATASOURCE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_DATASOURCEONDIFFERENTSHEET
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_DATASOURCEONDIFFERENTSHEET
+ NoteIndex = NoteIndex + 1
+ End If
+ If bCategoryandValue Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_CATEGORYANDDATA
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SEPARATE
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_CATEGORYANDDATA
+ NoteIndex = NoteIndex + 1
+ End If
+ If bCLabelMorethanOneCell Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABEL
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABELMORETHANONECELL
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_CATEGORYLABELMORETHANONECELL
+ NoteIndex = NoteIndex + 1
+ End If
+ If bOneColumnRow Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_COLUMNBAR
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_ONECOLUMNROW
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_COLUMNBAR
+ NoteIndex = NoteIndex + 1
+ End If
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TYPE
+ .Values.Add getChartTypeAsString(myChart.ChartType)
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_CHARTNAME
+ .Values.Add myChart.name
+ End With
+
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) + 1
+ mAnalysis.Issues.Add myIssue
+ End If
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Sub SetChartIssueMinor(myChart As Chart, myName As String, BorderIssue As Boolean)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetChartIssueMinor"
+
+ Dim myIssue As IssueInfo
+ Dim bUnsupportedType As Boolean
+ Dim bTrendline As Boolean
+ Dim bDatalabelWithLegend As Boolean
+ Dim bLegendPosition As Boolean
+ Dim bTitleFont As Boolean
+ Dim bPiechartDirection As Boolean
+ Dim bAxisInterval As Boolean
+
+
+ Set myIssue = New IssueInfo
+ bUnsupportedType = False
+ bTrendline = False
+ bDatalabelWithLegend = False
+ bLegendPosition = False
+ bTitleFont = False
+ bPiechartDirection = False
+ bAxisInterval = False
+
+
+ If (Not FormatissueMinor(myChart, bUnsupportedType, bTrendline, bDatalabelWithLegend, bLegendPosition, bTitleFont, bPiechartDirection, bAxisInterval)) And (Not BorderIssue) Then
+ GoTo FinalExit
+ Else
+ With myIssue
+ Dim NoteIndex As Long
+ NoteIndex = 0
+
+ .IssueID = CID_CHARTS_TABLES
+ .IssueType = RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES
+
+ .SubType = RID_STR_EXCEL_SUBISSUE_CHART_MINOR
+ .Location = .CLocationSheet
+ .SubLocation = myName
+
+ .IssueTypeXML = CSTR_ISSUE_CHARTS_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_CHART_PIVOT
+ .locationXML = .CXMLLocationSheet
+
+ If bUnsupportedType Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_UNSUPPORTEDTYPE
+ .Values.Add getChartTypeAsString(myChart.ChartType)
+ ' bubble chart
+ If (myChart.ChartType = xlBubble Or myChart.ChartType = xlBubble3DEffect) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_Bubble_Comment
+ ' bar of pie and pie of pie chart
+ ElseIf (myChart.ChartType = xlPieOfPie Or myChart.ChartType = xlBarOfPie) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_BarOfPie_Comment
+ ' Scatter chart
+ ElseIf (myChart.ChartType = xlXYScatter Or myChart.ChartType = xlXYScatterLines _
+ Or myChart.ChartType = xlXYScatterLinesNoMarkers _
+ Or myChart.ChartType = xlXYScatterSmooth _
+ Or myChart.ChartType = xlXYScatterSmoothNoMarkers) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_Scattered_Comment
+ ' radar chart
+ ElseIf (myChart.ChartType = xlRadarMarkers Or myChart.ChartType = xlRadar) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_Radar_Comment
+ ' radar filled chart
+ ElseIf (myChart.ChartType = xlRadarFilled) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_FilledRadar_Comment
+ ' surface chart
+ ElseIf (myChart.ChartType = xlSurface Or myChart.ChartType = xlSurfaceTopView _
+ Or myChart.ChartType = xlSurfaceTopViewWireframe _
+ Or myChart.ChartType = xlSurfaceWireframe) Then
+ AddIssueDetailsNote myIssue, NoteIndex, RID_RESXLT_COST_CHART_Surface_Comment
+ Else
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE1
+ NoteIndex = NoteIndex + 1
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE2
+ End If
+ NoteIndex = NoteIndex + 1
+ End If
+ If bTrendline Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TRENDLINE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_TRENDLINE
+ NoteIndex = NoteIndex + 1
+ End If
+ If bDatalabelWithLegend Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_DATALABELWITHLEGEND
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_DATALABELWITHLEGEND
+ NoteIndex = NoteIndex + 1
+ End If
+ If bLegendPosition Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_LEGENDPOSITION
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_NOTRIGHT
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_LEGENDPOSITION
+ NoteIndex = NoteIndex + 1
+ End If
+ If bTitleFont Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TITLEFONT
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_DIFFERENT
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_TITLEFONT
+ NoteIndex = NoteIndex + 1
+ End If
+ If bPiechartDirection Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION
+ End If
+ If BorderIssue Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_BORDER
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_BORDER
+ NoteIndex = NoteIndex + 1
+ End If
+ If bAxisInterval Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_AXISINTERVAL
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_AUTO
+ AddIssueDetailsNote myIssue, NoteIndex, RID_STR_EXCEL_NOTE_AXISINTERVAL
+ NoteIndex = NoteIndex + 1
+ End If
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_CHARTNAME
+ .Values.Add myChart.name
+ End With
+
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) + 1
+ mAnalysis.Issues.Add myIssue
+ End If
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetChartIssue(myChart As Chart, myName As String, strSubType As String, _
+ strXMLSubType As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetChartIssue"
+ Dim myIssue As IssueInfo
+ Dim bUnsupportedPosition As Boolean
+
+ Set myIssue = New IssueInfo
+
+ ' Common Settings
+ With myIssue
+ .IssueID = CID_CHARTS_TABLES
+ .IssueType = RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES
+ .SubType = strSubType
+ .Location = .CLocationSheet
+ .SubLocation = myName
+
+ .IssueTypeXML = CSTR_ISSUE_CHARTS_TABLES
+ .SubTypeXML = strXMLSubType
+ .locationXML = .CXMLLocationSheet
+
+
+ If myChart.HasTitle Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TITLE
+ .Values.Add myChart.chartTitle.Text
+ End If
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_TYPE
+ .Values.Add myChart.ChartType 'TBD - getChartTypeAsString() convert to String
+
+ 'Pie Chart
+ If (myChart.ChartType = xlPie) Or _
+ (myChart.ChartType = xlPieExploded) Or _
+ (myChart.ChartType = xlPieOfPie) Or _
+ (myChart.ChartType = xl3DPie) Or _
+ (myChart.ChartType = xl3DPieExploded) Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION
+ End If
+
+ If Not myChart.PivotLayout Is Nothing Then
+ 'Pivot Chart
+ .SubType = RID_STR_EXCEL_SUBISSUE_PIVOT & " " & strSubType
+
+ 'Pivot Chart details
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME
+ .Values.Add myChart.PivotLayout.PivotTable.name
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE
+ .Values.Add myChart.HasPivotFields
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM
+ .Values.Add myChart.PivotLayout.PivotTable.PivotFields.count
+ End If
+ End With
+
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) + 1
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function getLineStyleAsString(myLineStyle As XlLineStyle) As String
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getLineStyleAsString"
+
+ Dim strVal As String
+
+ Select Case myLineStyle
+ Case xlContinuous
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_CONTINUOUS
+ Case xlDash
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASH
+ Case xlDashDot
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASHDOT
+ Case xlDot
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOT
+ Case xlDouble
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOUBLE
+ Case xlSlantDashDot
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_SLANTDASHDOT
+ Case xlLineStyleNone
+ strVal = RID_STR_EXCEL_ENUMERATION_LINE_STYLE_LINESTYLENONE
+ Case Else
+ strVal = RID_STR_EXCEL_ENUMERATION_UNKNOWN
+ End Select
+
+
+ getLineStyleAsString = strVal
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Function getChartTypeAsString(myChartType As XlChartType) As String
+ '*********************************************************
+ '**** Localisation: ON HOLD ******************************
+ '*********************************************************
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getChartTypeAsString"
+
+ Dim strVal As String
+
+ Select Case myChartType
+ Case xl3DArea
+ strVal = "3DArea"
+ Case xl3DAreaStacked
+ strVal = "3DAreaStacked"
+ Case xl3DAreaStacked100
+ strVal = "3DAreaStacked100"
+ Case xl3DBarClustered
+ strVal = "3DBarClustered"
+ Case xl3DBarStacked
+ strVal = "xl3DBarStacked"
+ Case xl3DBarStacked100
+ strVal = "xl3DBarStacked100"
+ Case xl3DColumn
+ strVal = "3DColumn"
+ Case xl3DColumnClustered
+ strVal = "xl3DColumnClustered"
+ Case xl3DColumnStacked
+ strVal = "xl3DColumnStacked"
+ Case xl3DColumnStacked100
+ strVal = "xl3DColumnStacked100"
+ Case xl3DLine
+ strVal = "3DLine"
+ Case xl3DPie
+ strVal = "3DPie"
+ Case xl3DPieExploded
+ strVal = "3DPieExploded"
+ Case xlArea
+ strVal = "Area"
+ Case xlAreaStacked
+ strVal = "AreaStacked"
+ Case xlAreaStacked100
+ strVal = "AreaStacked100"
+ Case xlBarClustered
+ strVal = "BarClustered"
+ Case xlBarOfPie
+ strVal = "BarOfPie"
+ Case xlBarStacked
+ strVal = "BarStacked"
+ Case xlBarStacked100
+ strVal = "BarStacked100"
+ Case xlBubble
+ strVal = "Bubble"
+ Case xlBubble3DEffect
+ strVal = "Bubble3DEffect"
+ Case xlColumnClustered
+ strVal = "ColumnClustered"
+ Case xlColumnStacked
+ strVal = "ColumnStacked"
+ Case xlColumnStacked100
+ strVal = "ColumnStacked100"
+ Case xlConeBarClustered
+ strVal = "ConeBarClustered"
+ Case xlConeBarStacked
+ strVal = "ConeBarStacked"
+ Case xlConeBarStacked100
+ strVal = "ConeBarStacked100"
+ Case xlConeCol
+ strVal = "ConeCol"
+ Case xlConeColClustered
+ strVal = "ConeColClustered"
+ Case xlConeColStacked
+ strVal = "ConeColStacked"
+ Case xlConeColStacked100
+ strVal = "ConeColStacked100"
+ Case xlCylinderBarClustered
+ strVal = "CylinderBarClustered"
+ Case xlCylinderBarStacked
+ strVal = "CylinderBarStacked"
+ Case xlCylinderBarStacked100
+ strVal = "CylinderBarStacked100"
+ Case xlCylinderCol
+ strVal = "CylinderCol"
+ Case xlCylinderColClustered
+ strVal = "CylinderColClustered"
+ Case xlCylinderColStacked
+ strVal = "CylinderColStacked"
+ Case xlCylinderColStacked100
+ strVal = "CylinderColStacked100"
+ Case xlDoughnut
+ strVal = "Doughnut"
+ Case xlLine
+ strVal = "Line"
+ Case xlLineMarkers
+ strVal = "LineMarkers"
+ Case xlLineMarkersStacked
+ strVal = "LineMarkersStacked"
+ Case xlLineMarkersStacked100
+ strVal = "LineMarkersStacked100"
+ Case xlLineStacked
+ strVal = "LineStacked"
+ Case xlLineStacked100
+ strVal = "LineStacked100"
+ Case xlPie
+ strVal = "Pie"
+ Case xlPieExploded
+ strVal = "PieExploded"
+ Case xlPieOfPie
+ strVal = "PieOfPie"
+ Case xlPyramidBarClustered
+ strVal = "PyramidBarClustered"
+ Case xlPyramidBarStacked
+ strVal = "PyramidBarStacked"
+ Case xlPyramidBarStacked100
+ strVal = "PyramidBarStacked100"
+ Case xlPyramidCol
+ strVal = "PyramidCol"
+ Case xlPyramidColClustered
+ strVal = "PyramidColClustered"
+ Case xlPyramidColStacked
+ strVal = "PyramidColStacked"
+ Case xlPyramidColStacked100
+ strVal = "PyramidColStacked100"
+ Case xlRadar
+ strVal = "Radar"
+ Case xlRadarFilled
+ strVal = "RadarFilled"
+ Case xlRadarMarkers
+ strVal = "RadarMarkers"
+ Case xlStockHLC
+ strVal = "StockHLC"
+ Case xlStockOHLC
+ strVal = "StockOHLC"
+ Case xlStockVHLC
+ strVal = "StockVHLC"
+ Case xlStockVOHLC
+ strVal = "StockVOHLC"
+ Case xlSurface
+ strVal = "Surface"
+ Case xlSurfaceTopView
+ strVal = "SurfaceTopView"
+ Case xlSurfaceTopViewWireframe
+ strVal = "SurfaceTopViewWireframe"
+ Case xlSurfaceWireframe
+ strVal = "SurfaceWireframe"
+ Case xlXYScatter
+ strVal = "XYScatter"
+ Case xlXYScatterLines
+ strVal = "XYScatterLines"
+ Case xlXYScatterLinesNoMarkers
+ strVal = "XYScatterLinesNoMarkers"
+ Case xlXYScatterSmooth
+ strVal = "XYScatterSmooth"
+ Case xlXYScatterSmoothNoMarkers
+ strVal = "XYScatterSmoothNoMarkers"
+ Case Else
+ strVal = RID_STR_EXCEL_ENUMERATION_UNKNOWN
+ End Select
+
+ getChartTypeAsString = strVal
+
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Sub HandleZoomIssue(currentSheet)
+ Dim myIssue As IssueInfo
+ Dim currentFunctionName As String
+ currentFunctionName = "HandleZoomIssue"
+
+ On Error GoTo HandleErrors
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_FORMAT
+ .IssueType = RID_STR_EXCEL_ISSUE_FORMAT
+ .SubType = RID_STR_EXCEL_SUBISSUE_ZOOM
+ .Location = .CLocationSheet
+ .SubLocation = currentSheet.name
+
+ .IssueTypeXML = CSTR_ISSUE_FORMAT
+ .SubTypeXML = CSTR_SUBISSUE_ZOOM
+ .locationXML = .CXMLLocationSheet
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_ZOOM
+ End With
+
+ mAnalysis.IssuesCountArray(CID_FORMAT) = _
+ mAnalysis.IssuesCountArray(CID_FORMAT) + 1
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_SheetDisplay(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SheetDisplay"
+
+ If aWB.Sheets.count = 1 Then Exit Sub
+
+ Dim lastZoomVal As Integer
+ Dim bInitZoom As Boolean
+ Dim bZoomChanged As Boolean
+ Dim ws As Object
+
+ bInitZoom = True
+ bZoomChanged = False
+
+ For Each ws In aWB.Sheets
+ ws.Activate
+
+ On Error GoTo HandleErrors
+
+ If bInitZoom Then
+ lastZoomVal = ActiveWindow.Zoom
+ bInitZoom = False
+ ElseIf Not bZoomChanged Then
+ If ActiveWindow.Zoom <> lastZoomVal Then
+ bZoomChanged = True
+ HandleZoomIssue ws
+ End If
+ End If
+ If bZoomChanged Then Exit For
+ Next ws
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_SheetLimits(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SheetLimits"
+ Dim myIssue As IssueInfo
+
+ If aWB.Sheets.count < CWORKBOOK_SHEETS_LIMIT + 1 Then Exit Sub
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_EXCEL_SUBISSUE_MAX_SHEETS_EXCEEDED
+ .Location = .CLocationWorkBook
+ .SubLocation = aWB.name
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_MAX_SHEETS_EXCEEDED
+ .locationXML = .CXMLLocationWorkBook
+
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_SHEETS
+ .Values.Add aWB.Sheets.count
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_SHEET_LIMITS_1 & CWORKBOOK_SHEETS_LIMIT
+ AddIssueDetailsNote myIssue, 1, RID_STR_EXCEL_NOTE_SHEET_LIMITS_2 & CWORKBOOK_SHEETS_LIMIT
+ End With
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_SheetIssues(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SheetIssues"
+
+ Dim myWrkSheet As Worksheet
+
+ For Each myWrkSheet In aWB.Worksheets
+ Analyze_OLEEmbedded myWrkSheet
+ Analyze_CellInSheetIssues myWrkSheet
+ Analyze_EmbeddedCharts myWrkSheet
+ Analyze_SheetName myWrkSheet
+ Analyze_QueryTables myWrkSheet
+ Next myWrkSheet
+
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_SheetName(mySheet As Worksheet)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SheetName"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ Dim invalidCharacters As String
+ invalidCharacters = InvalidSheetNameCharacters(mySheet.name)
+ If Len(invalidCharacters) <> 0 Then
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_EXCEL_SUBISSUE_INVALID_WORKSHEET_NAME
+ .Location = .CLocationSheet
+ .SubLocation = mySheet.name
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_INVALID_WORKSHEET_NAME
+ .locationXML = .CXMLLocationSheet
+
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_INVALIDCHARACTER
+ .Values.Add invalidCharacters
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_INVALIDWORKSHEETNAME
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ End If
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function InvalidSheetNameCharacters(aName As String) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "InvalidSheetNameCharacters"
+
+ Dim I As Integer
+ Dim NameCount As Integer
+ Dim newBadCharLine As String
+ Dim invalidCharacterDetails As String
+ Dim BadCharPosition As String
+ Dim theBadChars As BadSheetNameChar
+ NameCount = Len(aName)
+ invalidCharacterDetails = ""
+ For I = 1 To NameCount
+ theBadChars.BadChar = Mid(aName, I, 1)
+ theBadChars.Position = I
+ BadCharPosition = CStr(theBadChars.Position)
+ Select Case theBadChars.BadChar
+ Case "[", "]", "{", "}", ".", "!", "%", "$", "^", ".", "&", "(", ")", _
+ "-", "=", "+", "~", "#", "@", "'", ";", "<", ">", ",", "|", "`"
+ newBadCharLine = ReplaceTopic2Tokens(RID_STR_EXCEL_ATTRIBUTE_BADCHARACTER, CR_BADCHAR, _
+ theBadChars.BadChar, CR_BADCHARNUM, BadCharPosition)
+ invalidCharacterDetails = invalidCharacterDetails + newBadCharLine + ", "
+ Case Else
+ End Select
+ Next I
+ If Len(invalidCharacterDetails) > 0 Then
+ InvalidSheetNameCharacters = Left(invalidCharacterDetails, (Len(invalidCharacterDetails) - 2))
+ Else
+ InvalidSheetNameCharacters = ""
+ End If
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+
+End Function
+
+Sub Analyze_QueryTables(mySheet As Worksheet)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_QueryTables"
+
+ Dim aTable As QueryTable
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ For Each aTable In mySheet.QueryTables
+ If (aTable.QueryType = xlADORecordset) Or _
+ (aTable.QueryType = xlDAORecordSet) Or _
+ (aTable.QueryType = xlODBCQuery) Or _
+ (aTable.QueryType = xlOLEDBQuery) Then
+
+ With myIssue
+ .IssueID = CID_CHARTS_TABLES
+ .IssueType = RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES
+ .SubType = RID_RESXLS_COST_DB_Query
+ .Location = .CLocationSheet
+ .SubLocation = mySheet.name
+
+ .IssueTypeXML = CSTR_ISSUE_CHARTS_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_DB_QUERY
+ .locationXML = .CXMLLocationSheet
+
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_DB_QUERY
+ .Values.Add aTable.Connection
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_DB_QUERY
+
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_CHARTS_TABLES) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ End If
+ Next aTable
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_WorkbookVersion(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_WorkbookVersion"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ Dim aProp As Variant
+
+ If IsOldVersion(aWB.FileFormat) Then
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_EXCEL_SUBISSUE_OLD_WORKBOOK_VERSION
+ .Location = .CLocationWorkBook
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_OLD_WORKBOOK_VERSION
+ .locationXML = .CXMLLocationWorkBook
+
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_WORKBOOK_VERSION
+ .Values.Add aWB.FileFormat
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_OLDWORKBOOKVERSION
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+ Call DoPreparation(mAnalysis, myIssue, RID_STR_EXCEL_NOTE_OLD_OLDWORKBOOKVERSION_PREPARABLE, aProp, aWB)
+
+ mAnalysis.Issues.Add myIssue
+ End If
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function getRange(myRange As Range) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getRange"
+ getRange = ""
+
+ On Error Resume Next
+ getRange = myRange.Address(RowAbsolute:=False, ColumnAbsolute:=False, ReferenceStyle:=xlA1)
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : myRange.name " & myRange.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub Analyze_CellInSheetIssues(mySheet As Worksheet)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_CellInSheetIssues"
+ Dim myCellRng As Range
+
+ Set myCellRng = mySheet.UsedRange
+ Call CheckAllCellFormatting(myCellRng, mySheet.name)
+ Call CheckAllCellFunctions(myCellRng, mySheet.name)
+
+FinalExit:
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub CheckAllCellFormatting(CurrRange As Range, myName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckAllCellFormatting"
+
+ Dim myCell As Range
+ Dim myCellAttri As CellAtrributes
+ Dim bCellIssue As Boolean
+ Dim bCellIssueAll As Boolean
+ Dim startTime As Single
+
+ bCellIssue = False
+ bCellIssueAll = False
+ startTime = Timer
+
+ For Each myCell In CurrRange
+ bCellIssue = CheckCellFormatting(myCell, myCellAttri)
+ bCellIssueAll = bCellIssueAll Or bCellIssue
+ If (Timer - gExcelMaxRangeProcessTime > startTime) Then
+ WriteDebug currentFunctionName & " : [" & myName & _
+ "]Too much time needed, abortet cell formatting check."
+ Exit For
+ End If
+ Next
+
+FinalExit:
+ If bCellIssueAll Then
+ ReportCellFormattingIssue myName, myCellAttri
+ End If
+
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Function CheckLineFormatIssue(myRange As Range, edge As XlBordersIndex) As Boolean
+ CheckLineFormatIssue = (myRange.Borders(edge).LineStyle <> xlContinuous) And _
+ (myRange.Borders(edge).LineStyle <> xlDouble) And _
+ (myRange.Borders(edge).LineStyle <> xlLineStyleNone)
+End Function
+
+Private Function CheckCellFormatting(myCell As Range, myCellAttri As CellAtrributes) As Boolean
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckCellFormatting"
+
+ On Error GoTo HandleErrors
+
+ Dim bCellLineFormatIssue As Boolean
+
+ CheckCellFormatting = False
+
+ bCellLineFormatIssue = CheckLineFormatIssue(myCell, xlEdgeBottom) Or _
+ CheckLineFormatIssue(myCell, xlEdgeLeft) Or _
+ CheckLineFormatIssue(myCell, xlEdgeRight) Or _
+ CheckLineFormatIssue(myCell, xlEdgeTop)
+
+ CheckCellFormatting = bCellLineFormatIssue Or _
+ (myCell.Interior.Pattern <> xlPatternSolid And myCell.Interior.Pattern <> xlPatternNone)
+
+ If Not CheckCellFormatting Then Exit Function
+
+ If bCellLineFormatIssue Then
+ myCellAttri.LineStyle = myCellAttri.LineStyle + 1
+ End If
+ If (myCell.Interior.Pattern <> xlPatternSolid And myCell.Interior.Pattern <> xlPatternNone) Then
+ myCellAttri.FillPattern = myCellAttri.FillPattern + 1
+ End If
+
+ Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Private Sub ReportCellFormattingIssue(myName As String, myCellAttri As CellAtrributes)
+ Dim currentFunctionName As String
+ currentFunctionName = "ReportCellFormattingIssue"
+
+ On Error GoTo HandleErrors
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_FORMAT
+ .IssueType = RID_STR_EXCEL_ISSUE_FORMAT
+ .SubType = RID_STR_EXCEL_SUBISSUE_ATTRIBUTES
+ .Location = .CLocationSheet
+
+ .IssueTypeXML = CSTR_ISSUE_FORMAT
+ .SubTypeXML = CSTR_SUBISSUE_ATTRIBUTES
+ .locationXML = .CXMLLocationSheet
+
+ .SubLocation = myName
+ '.Line = myCell.row
+ '.column = Chr(myCell.column + 65 - 1)
+
+ Dim noteCount As Long
+ noteCount = 0
+
+ If myCellAttri.LineStyle > 0 Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_LINE_STYLE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_DASHED_DOT
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS
+ .Values.Add myCellAttri.LineStyle
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_3
+ noteCount = noteCount + 1
+ End If
+ If myCellAttri.FillPattern > 0 Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FILL_PATTERN
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_PATTERNED
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS
+ .Values.Add myCellAttri.FillPattern
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_4
+ noteCount = noteCount + 1
+ End If
+
+
+ mAnalysis.IssuesCountArray(CID_FORMAT) = _
+ mAnalysis.IssuesCountArray(CID_FORMAT) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub CheckAllCellFunctions(CurrRange As Range, myName As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckAllCellFunctions"
+
+ Dim myCell As Range
+ Dim startTime As Single
+
+ startTime = Timer
+
+ For Each myCell In CurrRange
+ Call CheckCellFunction(myCell, myName)
+ If (Timer - gExcelMaxRangeProcessTime > startTime) Then
+ WriteDebug currentFunctionName & " : [" & myName & _
+ "]Too much time needed, abortet cell functions check (xlCellTypeFormulas)."
+ Exit For
+ End If
+ Next
+
+FinalExit:
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub CheckCellFunction(myCell As Range, myName As String)
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckCellFunction"
+
+ On Error GoTo HandleErrors
+ Dim bCellFunctionIssue As Boolean
+ Dim bCellINFOFunctionIssue As Boolean
+ Dim bCellERROR_TYPEFunctionIssue As Boolean
+ Dim bCellExternalFunctionIssue As Boolean
+ Dim bHasDateDifFunction As Boolean
+ Dim bHasPhoneticFunction As Boolean
+ Dim aFormularStr As String
+
+ aFormularStr = myCell.FormulaR1C1
+
+ If (aFormularStr = Null) Then Exit Sub
+ If (aFormularStr = "") Then Exit Sub
+
+ bCellINFOFunctionIssue = (InStr(aFormularStr, "INFO(") <> 0)
+ bCellERROR_TYPEFunctionIssue = (InStr(aFormularStr, "ERROR.TYPE(") <> 0)
+ bCellExternalFunctionIssue = (InStr(aFormularStr, ".xls!") <> 0)
+ bHasDateDifFunction = (InStr(aFormularStr, "DATEDIF(") <> 0)
+ bHasPhoneticFunction = (InStr(aFormularStr, "PHONETIC(") <> 0)
+
+ bCellFunctionIssue = bCellINFOFunctionIssue Or bCellERROR_TYPEFunctionIssue _
+ Or bCellExternalFunctionIssue Or bHasDateDifFunction Or bHasPhoneticFunction
+
+ If Not bCellFunctionIssue Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_FUNCTIONS
+ .IssueType = RID_STR_EXCEL_ISSUE_FUNCTIONS
+ .Location = .CLocationSheet
+
+ .IssueTypeXML = CSTR_ISSUE_FUNCTIONS
+ .locationXML = .CXMLLocationSheet
+
+ .SubLocation = myName
+ .Line = myCell.row
+ .column = Chr(myCell.column + 65 - 1)
+
+ Dim noteCount As Long
+ noteCount = 0
+ If bCellINFOFunctionIssue Then
+ .SubTypeXML = CSTR_SUBISSUE_INFO
+ .SubType = RID_STR_EXCEL_SUBISSUE_INFO
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING
+ .Values.Add myCell.FormulaR1C1
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_1
+ noteCount = noteCount + 1
+ End If
+ If bCellERROR_TYPEFunctionIssue Then
+ .SubTypeXML = CSTR_SUBISSUE_ERROR_TYPE
+ .SubType = RID_STR_EXCEL_SUBISSUE_ERROR_TYPE
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING
+ .Values.Add myCell.FormulaR1C1
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_2
+ noteCount = noteCount + 1
+ End If
+ If bCellExternalFunctionIssue Then
+ .SubTypeXML = CSTR_SUBISSUE_EXTERNAL
+ .SubType = RID_STR_EXCEL_SUBISSUE_EXTERNAL
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING
+ .Values.Add myCell.FormulaR1C1
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_3
+ noteCount = noteCount + 1
+ End If
+ If bHasDateDifFunction Then
+ .SubTypeXML = CSTR_SUBISSUE_DATEDIF
+ .SubType = RID_STR_EXCEL_SUBISSUE_DATEDIF
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING
+ .Values.Add myCell.FormulaR1C1
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_DATEDIF
+ noteCount = noteCount + 1
+ End If
+ If bHasPhoneticFunction Then
+ .SubTypeXML = CSTR_SUBISSUE_PHONETIC
+ .SubType = RID_STR_EXCEL_SUBISSUE_PHONETIC
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING
+ .Values.Add myCell.FormulaR1C1
+ AddIssueDetailsNote myIssue, noteCount, RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_PHONETIC
+ noteCount = noteCount + 1
+ End If
+
+ mAnalysis.IssuesCountArray(CID_FUNCTIONS) = _
+ mAnalysis.IssuesCountArray(CID_FUNCTIONS) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_Password_Protection(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Password_Protection"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ If aWB.HasPassword Or aWB.WriteReserved Then
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_PASSWORD_PROTECTION
+ .locationXML = .CLocationWorkBook
+
+ .Location = .CLocationWorkBook
+
+ If aWB.HasPassword Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_OPEN
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ End If
+ If aWB.WriteReserved Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_MODIFY
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ End If
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ End If
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub SetDocProperties(docAnalysis As DocumentAnalysis, wb As Workbook, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetProperties"
+ Dim f As File
+ Set f = fso.GetFile(docAnalysis.name)
+
+ Const appPropertyAppName = 9
+ Const appPropertyLastAuthor = 7
+ Const appPropertyRevision = 8
+ Const appPropertyTemplate = 6
+ Const appPropertyTimeCreated = 11
+ Const appPropertyTimeLastSaved = 12
+
+ On Error Resume Next
+ docAnalysis.PageCount = wb.Sheets.count
+ docAnalysis.Created = f.DateCreated
+ docAnalysis.Modified = f.DateLastModified
+ docAnalysis.Accessed = f.DateLastAccessed
+ docAnalysis.Printed = DateValue("01/01/1900")
+ On Error GoTo HandleErrors
+
+ On Error Resume Next 'Some apps may not support all props
+ docAnalysis.Application = getAppSpecificApplicationName & " " & Application.Version
+ 'docAnalysis.Application = wb.BuiltinDocumentProperties(appPropertyAppName)
+ 'If InStr(docAnalysis.Application, "Microsoft") = 1 Then
+ ' docAnalysis.Application = Mid(docAnalysis.Application, Len("Microsoft") + 2)
+ 'End If
+ 'If InStr(Len(docAnalysis.Application) - 2, docAnalysis.Application, ".") = 0 Then
+ ' docAnalysis.Application = docAnalysis.Application & " " & Application.Version
+ 'End If
+
+ docAnalysis.SavedBy = _
+ wb.BuiltinDocumentProperties(appPropertyLastAuthor)
+ docAnalysis.Revision = _
+ val(wb.BuiltinDocumentProperties(appPropertyRevision))
+ docAnalysis.Template = _
+ fso.GetFileName(wb.BuiltinDocumentProperties(appPropertyTemplate))
+ docAnalysis.Modified = _
+ wb.BuiltinDocumentProperties(appPropertyTimeLastSaved)
+
+FinalExit:
+ Set f = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_OLEEmbedded(wrkSheet As Worksheet)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_OLEEmbedded"
+
+ ' Handle Shapes
+ Dim aShape As Shape
+ For Each aShape In wrkSheet.Shapes
+ Analyze_OLEEmbeddedSingleShape mAnalysis, aShape, wrkSheet.name
+ Analyze_Lines mAnalysis, aShape, wrkSheet.name
+ Analyze_Transparency mAnalysis, aShape, wrkSheet.name
+ Analyze_Gradients mAnalysis, aShape, wrkSheet.name
+ Next aShape
+
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_Workbook_Protection(aWB As Workbook)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Workbook_Protection"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ Dim bProtectSharing As Boolean
+ Dim bProtectStructure As Boolean
+ Dim bProtectWindows As Boolean
+
+ bProtectSharing = False
+ bProtectStructure = False
+ bProtectWindows = False
+
+ If Not WorkbookProtectTest(aWB, bProtectSharing, bProtectStructure, bProtectWindows) Then
+ GoTo FinalExit
+ End If
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_EXCEL_SUBISSUE_WORKBOOK_PROTECTION
+ .Location = .CLocationWorkBook
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_WORKBOOK_PROTECTION
+ .locationXML = .CXMLLocationWorkBook
+
+ If bProtectSharing Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_SHARING
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ End If
+ If bProtectStructure Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_STRUCTURE
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ End If
+ If bProtectWindows Then
+ .Attributes.Add RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_WINDOWS
+ .Values.Add RID_STR_EXCEL_ATTRIBUTE_SET
+ End If
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_EXCEL_NOTE_PASSWORD_TO_OPEN
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+
+End Sub
+
+Private Function WorkbookProtectTest(aWB As Workbook, bProtectSharing As Boolean, _
+ bProtectStructure As Boolean, bProtectWindows As Boolean) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WorkbookProtectTest"
+
+ WorkbookProtectTest = False
+
+ On Error Resume Next 'Simulate Try Catch
+ aWB.UnprotectSharing sharingPassword:=" "
+ If Err.Number = 1004 Then
+ bProtectSharing = True
+ ElseIf Err.Number <> 0 Then
+ Resume HandleErrors
+ End If
+ On Error GoTo HandleErrors
+
+ On Error Resume Next 'Simulate Try Catch
+ aWB.Unprotect Password:=""
+ If Err.Number = 1004 Then
+ If aWB.ProtectStructure = True Then
+ bProtectStructure = True
+ End If
+ If aWB.ProtectWindows = True Then
+ bProtectWindows = True
+ End If
+ End If
+
+ If bProtectSharing Or bProtectStructure Or bProtectWindows Then
+ WorkbookProtectTest = True
+ End If
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+
+End Function
+
+Private Sub Class_Initialize()
+ Set mAnalysis = New DocumentAnalysis
+End Sub
+Private Sub Class_Terminate()
+ Set mAnalysis = Nothing
+End Sub
+
+Public Property Get Results() As DocumentAnalysis
+ Set Results = mAnalysis
+End Property
+Private Function FormatIssueComplex(myChart As Chart, bDataTable As Boolean, bXAxes As Boolean) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "FormatIssueComplex"
+
+ bXAxes = False
+
+ If myChart.HasDataTable Then
+ bDataTable = True
+ End If
+ If Not (IsPie(myChart) Or myChart.ChartType = xlDoughnut Or myChart.ChartType = xlBubble3DEffect) Then
+ If myChart.HasAxis(1) Then
+ If myChart.Axes(1).CategoryType = xlTimeScale Or myChart.Axes(1).CategoryType = xlAutomaticScale Then
+ bXAxes = True
+ End If
+ End If
+ End If
+ If bDataTable Or bXAxes Then
+ FormatIssueComplex = True
+ End If
+ Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Private Function IsAreaChart(myChart As Chart) As Boolean
+
+ If (myChart.ChartType = xlArea Or myChart.ChartType = xl3DArea Or _
+ myChart.ChartType = xlAreaStacked Or _
+ myChart.ChartType = xl3DAreaStacked Or _
+ myChart.ChartType = xlAreaStacked100 Or _
+ myChart.ChartType = xl3DAreaStacked100) _
+ Then
+ IsAreaChart = True
+ Else
+ IsAreaChart = False
+ End If
+
+End Function
+
+Private Function FormatissueMinor(myChart As Chart, bUnsupportedType As Boolean, bTrendline As Boolean, bDatalabelWithLegend As Boolean, bLegendPosition As Boolean, bTitleFont As Boolean, bPiechartDirection As Boolean, bAxisInterval As Boolean) As Boolean
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "FormatissueMinor"
+
+Dim ctype As Integer
+Dim fsize As Integer
+Dim se As Series
+Dim dl As DataLabel
+
+ FormatissueMinor = False
+ ctype = myChart.ChartType
+
+ If (ctype = xlBubble Or ctype = xlPieOfPie Or ctype = xl3DPieExploded _
+ Or ctype = xlRadarFilled Or ctype = xlBubble3DEffect _
+ Or ctype = xlRadarMarkers Or ctype = xlRadar Or ctype = xlBarOfPie _
+ Or ctype = xlXYScatter Or ctype = xlXYScatterLines Or ctype = xlXYScatterLinesNoMarkers _
+ Or ctype = xlXYScatterSmooth Or ctype = xlXYScatterSmoothNoMarkers _
+ Or ctype = xlSurface Or ctype = xlSurfaceTopView Or ctype = xlSurfaceTopViewWireframe _
+ Or ctype = xlSurfaceWireframe) Then
+ bUnsupportedType = True
+ End If
+
+ For Each se In myChart.SeriesCollection
+ On Error Resume Next ' may not have trendlines property
+ If se.Trendlines.count <> 0 Then
+ If Err.Number = 0 Then
+ bTrendline = True
+ End If
+ End If
+ If se.HasDataLabels Then
+ If Err.Number = 0 Then
+ If (IsAreaChart(myChart)) Then
+ For Each dl In se.DataLabels
+ If dl.ShowLegendKey = True Then
+ bDatalabelWithLegend = True
+ Exit For
+ End If
+ Next dl
+ Else
+ Dim pt As Point
+ For Each pt In se.Points
+ If pt.HasDataLabel Then
+ If pt.DataLabel.ShowLegendKey Then
+ bDatalabelWithLegend = True
+ Exit For
+ End If
+ End If
+ Next pt
+ End If
+ End If
+ End If
+ On Error GoTo HandleErrors
+ If bTrendline And bDatalabelWithLegend Then
+ Exit For
+ End If
+ Next se
+
+ If myChart.HasLegend Then
+ Dim legPos As Long
+ On Error Resume Next 'If legend moved accessing position will fail
+ legPos = myChart.Legend.Position
+
+ If (Err.Number <> 0) Or (legPos <> xlLegendPositionRight) Then
+ bLegendPosition = True
+ End If
+ On Error GoTo HandleErrors
+ End If
+
+ If IsPie(myChart) Then
+ bPiechartDirection = True
+ ElseIf myChart.ChartType <> xlDoughnut And myChart.ChartType <> xlBubble3DEffect Then
+ If myChart.HasAxis(xlValue, xlPrimary) Then
+ With myChart.Axes(xlValue, xlPrimary)
+ If .MajorUnitIsAuto And .MaximumScaleIsAuto And .MinimumScaleIsAuto And .MinorUnitIsAuto Then
+ bAxisInterval = True
+ End If
+ End With
+ End If
+ End If
+
+ On Error Resume Next 'If title has mixed font size accessing Font.Size will fail - Title mixed font issue
+ If myChart.HasTitle Then
+ fsize = myChart.chartTitle.Font.Size
+ If Err.Number = FontError Then
+ bTitleFont = True
+ End If
+ End If
+
+ On Error GoTo HandleErrors
+ If bUnsupportedType Or bTrendline Or bDatalabelWithLegend Or bLegendPosition Or bTitleFont Or bPiechartDirection Or bAxisInterval Then
+ FormatissueMinor = True
+ End If
+
+FinalExit:
+
+ Set se = Nothing
+ Set dl = Nothing
+ Exit Function
+
+HandleErrors:
+
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+
+End Function
+
+Private Function SeriesIssue(myChart As Chart, bSeriesChartTypeChanged As Boolean, bDatasourceNotLinkedtoCell As Boolean, bDatasourceOnDifferentSheet As Boolean, bCategoryandValue As Boolean, bCLabelMorethanOneCell As Boolean, bOneColumnRow As Boolean) As Boolean
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "SeriesIssue"
+SeriesIssue = False
+
+Dim Num As Integer
+Dim I As Integer
+Dim i2 As Integer
+Dim formula As String
+Dim p1 As Integer, p2 As Integer
+Dim b1 As Integer, b2 As Integer
+Dim comma1 As Integer, comma2 As Integer
+Dim starty As Integer
+Dim ctype As Integer
+Dim temp As Integer
+Dim myarray() As String
+Dim Values(3), sh
+Dim chartseries As Series
+Dim b As Boolean
+Dim bmorecolumns As Boolean
+Dim c As Boolean
+
+bmorecolumns = False
+Num = myChart.SeriesCollection.count
+
+If (Num = 0) Then Exit Function
+
+ctype = myChart.SeriesCollection(1).ChartType
+I = 0
+sh = ""
+
+ReDim Preserve myarray(Num, 3)
+
+If IsPie(myChart) And Num > 1 Then 'if pie chart has more than one series,set series number to 1
+ bmorecolumns = True
+ Num = 1
+End If
+For Each chartseries In myChart.SeriesCollection
+ On Error Resume Next
+ formula = chartseries.formula
+ If Err.Number <> 0 Then
+ GoTo FinalExit
+ End If
+ If Not bSeriesChartTypeChanged Then 'check if the chart type changed
+ temp = chartseries.ChartType
+ If temp <> ctype Then
+ bSeriesChartTypeChanged = True
+ End If
+ End If
+
+ 'get each part of the formula, if it is a single range, set the value to the array
+ p1 = InStr(1, formula, "(")
+ comma1 = InStr(1, formula, ",")
+ Values(0) = Mid(formula, p1 + 1, comma1 - p1 - 1)
+
+ If Mid(formula, comma1 + 1, 1) = "(" Then
+' Multiple ranges
+ bDatasourceNotLinkedtoCell = True
+ GoTo FinalExit
+ Else
+ If Mid(formula, comma1 + 1, 1) = "{" Then
+' Literal Array
+ bDatasourceNotLinkedtoCell = True
+ GoTo FinalExit
+ Else
+' A single range
+ comma2 = InStr(comma1 + 1, formula, ",")
+ Values(1) = Mid(formula, comma1 + 1, comma2 - comma1 - 1)
+ starty = comma2
+ End If
+ End If
+
+ If Mid(formula, starty + 1, 1) = "(" Then
+' Multiple ranges
+ bDatasourceNotLinkedtoCell = True
+ GoTo FinalExit
+ Else
+ If Mid(formula, starty + 1, 1) = "{" Then
+' Literal Array
+ bDatasourceNotLinkedtoCell = True
+ GoTo FinalExit
+ Else
+' A single range
+ comma1 = starty
+ comma2 = InStr(comma1 + 1, formula, ",")
+ Values(2) = Mid(formula, comma1 + 1, comma2 - comma1 - 1)
+ End If
+ End If
+
+ If SheetCheck(sh, Values) Then 'check if data from different sheet
+ bDatasourceOnDifferentSheet = True
+ GoTo FinalExit
+ End If
+
+ For i2 = 0 To 2 'set data to myarray, if it is range, assign the range address, else null
+ If IsRange(Values(i2)) Then
+ myarray(I, i2) = Range(Values(i2)).Address
+ 'ElseIf (Not IsRange(values(i2))) And values(i2) <> "" Then
+ ' bDatasourceNotLinkedtoCell = True
+ ' myarray(i, i2) = ""
+ Else
+ bDatasourceNotLinkedtoCell = True
+ myarray(I, i2) = ""
+ End If
+ Next i2
+
+ I = I + 1
+ If bmorecolumns Then 'if it is pie chart, exit
+ Exit For
+ End If
+Next chartseries
+
+
+c = DataCheck(myarray, Num, bCategoryandValue, bCLabelMorethanOneCell, bOneColumnRow) 'check data values and category of the chart
+
+FinalExit:
+If bSeriesChartTypeChanged Or bDatasourceNotLinkedtoCell Or bDatasourceOnDifferentSheet Or bCategoryandValue Or bCLabelMorethanOneCell Or bOneColumnRow Then
+ SeriesIssue = True
+End If
+
+Last:
+ Set chartseries = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume Last
+End Function
+
+Private Function DataCheck(myarray() As String, Num As Integer, bCategoryandValue As Boolean, bCLabelMorethanOneCell As Boolean, bOneColumnRow As Boolean)
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "DataCheck"
+
+Dim s1() As String
+Dim v1() As String
+Dim v2() As String
+Dim c1() As String
+Dim c2() As String
+Dim bs1isrange As Boolean
+Dim bc1isrange As Boolean
+Dim bc2isrange As Boolean
+Dim j As Integer
+Dim I As Integer
+Dim btemp1 As Boolean
+Dim btemp2 As Boolean
+
+
+bs1isrange = True
+bc1isrange = True
+bc2isrange = True
+
+If myarray(0, 1) = "" Then
+ bs1isrange = False
+Else
+ s1 = SplitRange(myarray(0, 1))
+ If UBound(s1) < 4 Then
+ bOneColumnRow = True
+ GoTo FinalExit
+ End If
+ If (Asclong(s1(0)) <> Asclong(s1(2))) And (Asclong(s1(1)) <> Asclong(s1(3))) Then
+ bCLabelMorethanOneCell = True
+ GoTo FinalExit
+ End If
+
+End If
+
+If myarray(0, 0) = "" Then
+ ReDim c1(2)
+ bc1isrange = False
+ c1(0) = ""
+ c1(1) = ""
+Else
+ If InStr(1, myarray(0, 0), ":") <> 0 Then
+ bCLabelMorethanOneCell = True
+ GoTo FinalExit
+ End If
+ c1 = SplitRange(myarray(0, 0))
+End If
+v1 = SplitRange(myarray(0, 2))
+
+If bs1isrange Then
+ btemp1 = s1(0) = s1(2) And s1(1) = v1(1) And s1(3) = v1(3) And Asclong(v1(0)) >= Asclong(s1(0)) + 1 'category beside first column
+ btemp2 = s1(1) = s1(3) And s1(0) = v1(0) And s1(2) = v1(2) And Asclong(v1(1)) >= Asclong(s1(1)) + 1 'category beside first row
+ If (Not btemp1) And (Not btemp2) Then
+ bCategoryandValue = True
+ GoTo FinalExit
+ End If
+End If
+If bc1isrange Then
+ btemp1 = v1(0) = v1(2) And c1(0) = v1(0) And Asclong(c1(1)) <= Asclong(v1(1)) - 1 'data label beside row
+ btemp2 = v1(1) = v1(3) And c1(1) = v1(1) And Asclong(c1(0)) <= Asclong(v1(0)) - 1 'data label beside column
+ If (Not btemp1) And (Not btemp2) Then
+ bCategoryandValue = True
+ GoTo FinalExit
+ End If
+End If
+For I = 1 To Num - 1
+ If myarray(I, 0) = "" Then
+ ReDim c2(2)
+ c2(0) = ""
+ c2(1) = ""
+ bc2isrange = False
+ Else
+ If InStr(1, myarray(0, 1), ":") = 0 Then
+ bCLabelMorethanOneCell = True
+ GoTo FinalExit
+ End If
+ c2 = SplitRange(myarray(I, 0))
+ End If
+ v2 = SplitRange(myarray(I, 2))
+ If bc2isrange Then
+ btemp1 = v1(0) = v1(2) And c2(0) = v2(0) And Asclong(c2(1)) <= Asclong(v2(1)) - 1 'data label beside row
+ btemp2 = v2(1) = v2(3) And c2(1) = v2(1) And Asclong(c2(0)) <= Asclong(v2(0)) - 1 'data label beside column
+ If (Not btemp1) And (Not btemp2) Then
+ bCategoryandValue = True
+ GoTo FinalExit
+ 'break
+ End If
+ End If
+ If bc1isrange And bc2isrange Then
+ 'series data beside last series data in column and data label beside last series data label
+ btemp1 = v2(0) = v2(2) And Asclong(c2(0)) = Asclong(c1(0)) + 1 And c2(1) = c1(1) And Asclong(v2(0)) = Asclong(v1(0)) + 1 And v1(1) = v2(1) And v1(3) = v2(3)
+ 'series data beside last series data in row and data label beside laast series data label
+ btemp2 = v2(1) = v2(3) And c1(0) = c2(0) And Asclong(c2(1)) = Asclong(c1(1)) + 1 And Asclong(v2(1)) = Asclong(v1(1)) + 1 And v1(0) = v2(0) And v1(2) = v2(2)
+ If (Not btemp1) And (Not btemp2) Then
+ bCategoryandValue = True
+ GoTo FinalExit
+ End If
+ ElseIf Not bc2isrange Then
+ btemp1 = v2(0) = v2(2) And Asclong(v2(0)) = Asclong(v1(0)) + 1 And v1(1) = v2(1) And v1(3) = v2(3) 'series data beside last series data in column
+ btemp2 = v2(1) = v2(3) And Asclong(v2(1)) = Asclong(v1(1)) + 1 And v1(0) = v2(0) And v1(2) = v2(2) 'series data beside last series data in row
+ If (Not btemp1) And (Not btemp2) Then
+ bCategoryandValue = True
+ GoTo FinalExit
+ End If
+ End If
+ For j = 0 To 1
+ c1(j) = c2(j)
+ Next j
+ For j = 0 To 3
+ v1(j) = v2(j)
+ Next j
+ bc1isrange = bc2isrange
+ bc2isrange = True
+
+Next I
+FinalExit:
+Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Private Function SplitRange(a As String) As String()
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "SplitRange"
+
+Dim c1 As Integer, c2 As Integer, c3 As Integer
+Dim start As Integer
+Dim l As Integer
+Dim rearray() As String
+
+start = 2
+If a <> "" Then
+ l = InStr(1, a, ":")
+ If l = 0 Then
+ ReDim rearray(2)
+ c1 = InStr(start, a, "$")
+ rearray(0) = Mid(a, start, c1 - start)
+ rearray(1) = Mid(a, c1 + 1, Len(a) - c1)
+ Else
+ ReDim rearray(4)
+ c1 = InStr(start, a, "$")
+ rearray(0) = Mid(a, start, c1 - start)
+ c2 = InStr(c1 + 1, a, "$")
+ rearray(1) = Mid(a, c1 + 1, c2 - c1 - 2)
+ c3 = InStr(c2 + 1, a, "$")
+ rearray(2) = Mid(a, c2 + 1, c3 - c2 - 1)
+ rearray(3) = Mid(a, c3 + 1, Len(a) - c3)
+ End If
+Else
+ ReDim rearray(4)
+ rearray(0) = ""
+ rearray(1) = ""
+ rearray(2) = ""
+ rearray(3) = ""
+End If
+SplitRange = rearray
+
+Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Private Function Asclong(s As String) As Integer
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "Asclong"
+Asclong = 0
+
+Dim l As Integer
+Dim I As Integer
+Dim m As String
+
+l = Len(s)
+
+For I = 1 To l
+ m = Mid(s, I, 1)
+ Asclong = Asclong + Asc(m)
+Next I
+Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Private Function SheetCheck(sh As Variant, Values() As Variant) As Boolean
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "SheetCheck"
+SheetCheck = False
+
+Dim c1 As Integer
+Dim I As Integer
+
+Dim temp
+
+For I = 0 To 2
+ If IsRange(Values(I)) Then
+ c1 = InStr(1, Values(I), "!")
+ If sh = "" Then
+ sh = Mid(Values(I), 1, c1 - 1)
+ temp = Mid(Values(I), 1, c1 - 1)
+ Else
+ temp = Mid(Values(I), 1, c1 - 1)
+ End If
+ If temp <> sh Then
+ SheetCheck = True
+ Exit Function
+ End If
+ End If
+Next I
+Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Private Function IsRange(Ref) As Boolean
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "IsRange"
+
+Dim x As Range
+
+On Error Resume Next
+Set x = Range(Ref)
+If Err = 0 Then
+ IsRange = True
+Else
+ IsRange = False
+End If
+FinalExit:
+ Set x = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Private Function IsPie(myChart As Chart) As Boolean
+On Error GoTo HandleErrors
+Dim currentFunctionName As String
+currentFunctionName = "IsPie"
+Dim ctype As Integer
+ IsPie = False
+
+ ctype = myChart.ChartType
+ If (ctype = xlPie) Or _
+ (ctype = xlPieExploded) Or _
+ (ctype = xlPieOfPie) Or _
+ (ctype = xl3DPie) Or _
+ (ctype = xl3DPieExploded) Then
+
+ IsPie = True
+ End If
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Private Function IsOldVersion(aFormat As XlFileFormat) As Boolean
+ Dim theResult As Boolean
+ Dim currentFunctionName As String
+ currentFunctionName = "IsOldVersion"
+
+ Select Case aFormat
+ Case xlExcel2, xlExcel2FarEast, xlExcel3, xlExcel4, xlExcel4Workbook, xlExcel5, xlExcel7
+ theResult = True
+ Case xlExcel9795, xlWorkbookNormal
+ theResult = False
+ Case Else
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": The version of this spreadsheet is not recognised"
+ End Select
+
+ IsOldVersion = theResult
+End Function
+
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/Preparation.bas b/migrationanalysis/src/driver_docs/sources/excel/Preparation.bas
new file mode 100644
index 000000000000..d2d4ed82ee68
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/Preparation.bas
@@ -0,0 +1,53 @@
+Attribute VB_Name = "Preparation"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Preparation.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+'Stub for Word Prepare H&F
+Function Prepare_HeaderFooter_GraphicFrames(docAnalysis As DocumentAnalysis, myIssue As IssueInfo, _
+ var As Variant, currDoc As Workbook) As Boolean
+ Prepare_HeaderFooter_GraphicFrames = False
+End Function
+
+Function Prepare_WorkbookVersion() As Boolean
+
+ ' **************************************************************************
+ ' Because the workbook version is changed when the workbook is being saved,
+ ' the actual preparation for this issue is done in the sub DoAnalyze of
+ ' the class module MigrationAnalyser when the prepared workbook is saved.
+ ' The reason for having this function is more for documentation/structural
+ ' purposes rather than actually needing the function.
+ ' **************************************************************************
+
+ Prepare_WorkbookVersion = True
+
+End Function
+
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/SetTextBoxFont.bas b/migrationanalysis/src/driver_docs/sources/excel/SetTextBoxFont.bas
new file mode 100644
index 000000000000..16c4194e1ccb
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/SetTextBoxFont.bas
@@ -0,0 +1,52 @@
+Attribute VB_Name = "SetTextBoxFont"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: SetTextBoxFont.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+' We change the font used for text box shapes here for the japanese
+' version, because office 2000 sometimes displays squares instead of
+' chars
+Public Sub SetTextBoxFont()
+ Dim aSheet As Worksheet
+ Dim myShape As Shape
+ Set aSheet = Sheets(1)
+
+ For Each myShape In aSheet.Shapes
+ If myShape.Type = msoTextBox Then
+ myShape.Select
+ With Selection.Characters.Font
+ .Name = "MS PGothic"
+ .Size = 10
+ End With
+ End If
+ Next myShape
+ Range("A1").Select
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/ThisWorkbook.cls b/migrationanalysis/src/driver_docs/sources/excel/ThisWorkbook.cls
new file mode 100644
index 000000000000..bff0f7bcd4f9
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/ThisWorkbook.cls
@@ -0,0 +1,55 @@
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: ThisWorkbook.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Public xlStrings As StringDataManager
+
+Private Sub Workbook_Open()
+ Set xlStrings = New StringDataManager
+
+ xlStrings.InitStringData (GetResourceDataFileName(ThisWorkbook.Path))
+ LoadCommonStrings xlStrings
+ LoadExcelStrings xlStrings
+ LoadResultsStrings xlStrings
+ Set xlStrings = Nothing
+
+ SetWBDriverText
+End Sub
+
+Public Sub SetWBDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT
+ ThisWorkbook.Names("RID_STR_DVR_XL_EXCEL_DRIVER").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_EXCEL_DRIVER
+ ThisWorkbook.Names("RID_STR_DVR_XL_ISSUES").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_ISSUES
+ ThisWorkbook.Names("RID_STR_DVR_XL_PURPOSE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_PURPOSE
+ ThisWorkbook.Names("RID_STR_DVR_XL_READ_README").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_READ_README
+ ThisWorkbook.Names("RID_STR_DVR_XL_THE_MACROS").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THE_MACROS
+ ThisWorkbook.Names("RID_STR_DVR_XL_THIS_DOC").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THIS_DOC
+ ThisWorkbook.Names("RID_STR_DVR_XL_TITLE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_TITLE
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/excel/excel_res.bas b/migrationanalysis/src/driver_docs/sources/excel/excel_res.bas
new file mode 100644
index 000000000000..55b7dc01b3a1
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/excel/excel_res.bas
@@ -0,0 +1,377 @@
+Attribute VB_Name = "excel_res"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: excel_res.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Public RID_RESXLT_COST_CHART_BarOfPie_Comment As String
+Public RID_RESXLT_COST_CHART_Bubble_Comment As String
+Public RID_RESXLT_COST_CHART_FilledRadar_Comment As String
+Public RID_RESXLT_COST_CHART_Radar_Comment As String
+Public RID_RESXLT_COST_CHART_Scattered_Comment As String
+Public RID_RESXLT_COST_CHART_Surface_Comment As String
+Public RID_RESXLT_COST_PIVOT_CalcVal_Comment As String
+Public RID_RESXLT_COST_PIVOT_ExternData_Comment As String
+Public RID_RESXLT_COST_PIVOT_ManSort_Comment As String
+Public RID_RESXLT_COST_PIVOT_MultConsRanges_Comment As String
+Public RID_RESXLT_COST_PIVOT_PivotChart_Comment As String
+Public RID_STR_EXCEL_ATTRIBUTE_AUTO As String
+Public RID_STR_EXCEL_ATTRIBUTE_AXISINTERVAL As String
+Public RID_STR_EXCEL_ATTRIBUTE_BADCHARACTER As String
+Public RID_STR_EXCEL_ATTRIBUTE_BORDER As String
+Public RID_STR_EXCEL_ATTRIBUTE_BROKEN As String
+Public RID_STR_EXCEL_ATTRIBUTE_BUILT_IN As String
+Public RID_STR_EXCEL_ATTRIBUTE_CATEGORYANDDATA As String
+Public RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABEL As String
+Public RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABELMORETHANONECELL As String
+Public RID_STR_EXCEL_ATTRIBUTE_CHANGED As String
+Public RID_STR_EXCEL_ATTRIBUTE_CHARTNAME As String
+Public RID_STR_EXCEL_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES As String
+Public RID_STR_EXCEL_ATTRIBUTE_COLUMNBAR As String
+Public RID_STR_EXCEL_ATTRIBUTE_COMPONENT As String
+Public RID_STR_EXCEL_ATTRIBUTE_CONTROLS As String
+Public RID_STR_EXCEL_ATTRIBUTE_CUSTOM As String
+Public RID_STR_EXCEL_ATTRIBUTE_CUSTOM_FORMULA As String
+Public RID_STR_EXCEL_ATTRIBUTE_DASHED_DOT As String
+Public RID_STR_EXCEL_ATTRIBUTE_DATALABELWITHLEGEND As String
+Public RID_STR_EXCEL_ATTRIBUTE_DATASOURCE As String
+Public RID_STR_EXCEL_ATTRIBUTE_DATASOURCENOTLINKEDTOCELL As String
+Public RID_STR_EXCEL_ATTRIBUTE_DATASOURCEONDIFFERENTSHEET As String
+Public RID_STR_EXCEL_ATTRIBUTE_DATATABLE As String
+Public RID_STR_EXCEL_ATTRIBUTE_DESCRIPTION As String
+Public RID_STR_EXCEL_ATTRIBUTE_DIFFERENT As String
+Public RID_STR_EXCEL_ATTRIBUTE_DISPLAY_ZOOM As String
+Public RID_STR_EXCEL_ATTRIBUTE_FILE As String
+Public RID_STR_EXCEL_ATTRIBUTE_FILL_PATTERN As String
+Public RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING As String
+Public RID_STR_EXCEL_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE As String
+Public RID_STR_EXCEL_ATTRIBUTE_GUID As String
+Public RID_STR_EXCEL_ATTRIBUTE_INCLUDING As String
+Public RID_STR_EXCEL_ATTRIBUTE_INTACT As String
+Public RID_STR_EXCEL_ATTRIBUTE_INVALIDCHARACTER As String
+Public RID_STR_EXCEL_ATTRIBUTE_IS_BROKEN As String
+Public RID_STR_EXCEL_ATTRIBUTE_LEGEND_NAME As String
+Public RID_STR_EXCEL_ATTRIBUTE_LEGENDPOSITION As String
+Public RID_STR_EXCEL_ATTRIBUTE_LINE_STYLE As String
+Public RID_STR_EXCEL_ATTRIBUTE_LIST_SOURCE As String
+Public RID_STR_EXCEL_ATTRIBUTE_MAJOR As String
+Public RID_STR_EXCEL_ATTRIBUTE_MINOR As String
+Public RID_STR_EXCEL_ATTRIBUTE_MISSING As String
+Public RID_STR_EXCEL_ATTRIBUTE_NAME As String
+Public RID_STR_EXCEL_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES As String
+Public RID_STR_EXCEL_ATTRIBUTE_NOTRIGHT As String
+Public RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS As String
+Public RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LEGEND_ENTRIES As String
+Public RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LINES As String
+Public RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_PIVOTFIELDS As String
+Public RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_SHEETS As String
+Public RID_STR_EXCEL_ATTRIBUTE_OBJECT_NAME As String
+Public RID_STR_EXCEL_ATTRIBUTE_OBJECT_TYPE As String
+Public RID_STR_EXCEL_ATTRIBUTE_ONECOLUMNROW As String
+Public RID_STR_EXCEL_ATTRIBUTE_PASSWORD As String
+Public RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_MODIFY As String
+Public RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_OPEN As String
+Public RID_STR_EXCEL_ATTRIBUTE_PATH As String
+Public RID_STR_EXCEL_ATTRIBUTE_PATTERNED As String
+Public RID_STR_EXCEL_ATTRIBUTE_PIE As String
+Public RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM As String
+Public RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE As String
+Public RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME As String
+Public RID_STR_EXCEL_ATTRIBUTE_PRINT_RANGE As String
+Public RID_STR_EXCEL_ATTRIBUTE_PROCEDURES As String
+Public RID_STR_EXCEL_ATTRIBUTE_PROJECT As String
+Public RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_SHARING As String
+Public RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_STRUCTURE As String
+Public RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_WINDOWS As String
+Public RID_STR_EXCEL_ATTRIBUTE_SEPARATE As String
+Public RID_STR_EXCEL_ATTRIBUTE_SERIESCHARTTYPE As String
+Public RID_STR_EXCEL_ATTRIBUTE_SET As String
+Public RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION As String
+Public RID_STR_EXCEL_ATTRIBUTE_SOURCE As String
+Public RID_STR_EXCEL_ATTRIBUTE_TIMESCALE As String
+Public RID_STR_EXCEL_ATTRIBUTE_TITLE As String
+Public RID_STR_EXCEL_ATTRIBUTE_TITLEFONT As String
+Public RID_STR_EXCEL_ATTRIBUTE_TRENDLINE As String
+Public RID_STR_EXCEL_ATTRIBUTE_TYPE As String
+Public RID_STR_EXCEL_ATTRIBUTE_TYPELIB As String
+Public RID_STR_EXCEL_ATTRIBUTE_TYPES As String
+Public RID_STR_EXCEL_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT As String
+Public RID_STR_EXCEL_ATTRIBUTE_UNSUPPORTEDTYPE As String
+Public RID_STR_EXCEL_ATTRIBUTE_VALUE As String
+Public RID_STR_EXCEL_ATTRIBUTE_VBPROJECT_PASSWORD_SET As String
+Public RID_STR_EXCEL_ATTRIBUTE_DB_QUERY As String
+Public RID_STR_EXCEL_ATTRIBUTE_WORKBOOK_VERSION As String
+Public RID_STR_EXCEL_ATTRIBUTE_XAXISCATEGORY As String
+Public RID_STR_EXCEL_ENUMERATION_CUSTOM As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_CONTINUOUS As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASH As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASHDOT As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOT As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOUBLE As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_LINESTYLENONE As String
+Public RID_STR_EXCEL_ENUMERATION_LINE_STYLE_SLANTDASHDOT As String
+Public RID_STR_EXCEL_ENUMERATION_LIST As String
+Public RID_STR_EXCEL_ENUMERATION_UNKNOWN As String
+Public RID_STR_EXCEL_FALSE As String
+Public RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES As String
+Public RID_STR_EXCEL_ISSUE_FORMAT As String
+Public RID_STR_EXCEL_ISSUE_FUNCTIONS As String
+Public RID_STR_EXCEL_ISSUE_INFORMATION As String
+Public RID_STR_EXCEL_ISSUE_PORTABILITY As String
+Public RID_STR_EXCEL_ISSUE_VBA_MACROS As String
+Public RID_STR_EXCEL_NOTE_AXISINTERVAL As String
+Public RID_STR_EXCEL_NOTE_BORDER As String
+Public RID_STR_EXCEL_NOTE_CATEGORYANDDATA As String
+Public RID_STR_EXCEL_NOTE_CATEGORYLABELMORETHANONECELL As String
+Public RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_3 As String
+Public RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_4 As String
+Public RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_1 As String
+Public RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_2 As String
+Public RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_3 As String
+Public RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_DATEDIF As String
+Public RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_PHONETIC As String
+Public RID_STR_EXCEL_NOTE_COLUMNBAR As String
+Public RID_STR_EXCEL_NOTE_DATALABELWITHLEGEND As String
+Public RID_STR_EXCEL_NOTE_DATASOURCENOTLINKEDTOCELL As String
+Public RID_STR_EXCEL_NOTE_DATASOURCEONDIFFERENTSHEET As String
+Public RID_STR_EXCEL_NOTE_DATATABLE As String
+Public RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_1 As String
+Public RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_2 As String
+Public RID_STR_EXCEL_NOTE_INVALIDWORKSHEETNAME As String
+Public RID_STR_EXCEL_NOTE_LEGENDPOSITION As String
+Public RID_STR_EXCEL_NOTE_OLD_OLDWORKBOOKVERSION_PREPARABLE As String
+Public RID_STR_EXCEL_NOTE_OLDWORKBOOKVERSION As String
+Public RID_STR_EXCEL_NOTE_PASSWORD_TO_OPEN As String
+Public RID_STR_EXCEL_NOTE_SERIESCHARTTYPE As String
+Public RID_STR_EXCEL_NOTE_SHEET_LIMITS_1 As String
+Public RID_STR_EXCEL_NOTE_SHEET_LIMITS_2 As String
+Public RID_STR_EXCEL_NOTE_TITLEFONT As String
+Public RID_STR_EXCEL_NOTE_TRENDLINE As String
+Public RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE1 As String
+Public RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE2 As String
+Public RID_STR_EXCEL_NOTE_XAXISCATEGORY As String
+Public RID_STR_EXCEL_NOTE_DB_QUERY As String
+Public RID_STR_EXCEL_NOTE_ZOOM As String
+Public RID_STR_EXCEL_SUBISSUE_ATTRIBUTES As String
+Public RID_STR_EXCEL_SUBISSUE_CHART_COMPLEX As String
+Public RID_STR_EXCEL_SUBISSUE_CHART_MINOR As String
+Public RID_STR_EXCEL_SUBISSUE_EMBEDDED_CHART As String
+Public RID_STR_EXCEL_SUBISSUE_EXTERNAL As String
+Public RID_STR_EXCEL_SUBISSUE_INVALID_WORKSHEET_NAME As String
+Public RID_STR_EXCEL_SUBISSUE_MAX_SHEETS_EXCEEDED As String
+Public RID_STR_EXCEL_SUBISSUE_OLD_WORKBOOK_VERSION As String
+Public RID_STR_EXCEL_SUBISSUE_PIVOT As String
+Public RID_STR_EXCEL_SUBISSUE_SHEET_CHART As String
+Public RID_STR_EXCEL_SUBISSUE_WORKBOOK_PROTECTION As String
+Public RID_STR_EXCEL_SUBISSUE_ZOOM As String
+Public RID_STR_EXCEL_SUBLOCATION_NA As String
+Public RID_STR_EXCEL_TRUE As String
+
+'Excel Driver Strings
+Public RID_STR_DVR_XL_EXCEL_DRIVER As String
+Public RID_STR_DVR_XL_ISSUES As String
+Public RID_STR_DVR_XL_PURPOSE As String
+Public RID_STR_DVR_XL_READ_README As String
+Public RID_STR_DVR_XL_THE_MACROS As String
+Public RID_STR_DVR_XL_THIS_DOC As String
+Public RID_STR_DVR_XL_TITLE As String
+
+Public Sub LoadExcelStrings(sdm As StringDataManager)
+ 'Excel Strings
+ sdm.InitString RID_RESXLT_COST_CHART_BarOfPie_Comment, "RID_RESXLT_COST_CHART_BarOfPie_Comment"
+ sdm.InitString RID_RESXLT_COST_CHART_Bubble_Comment, "RID_RESXLT_COST_CHART_Bubble_Comment"
+ sdm.InitString RID_RESXLT_COST_CHART_FilledRadar_Comment, "RID_RESXLT_COST_CHART_FilledRadar_Comment"
+ sdm.InitString RID_RESXLT_COST_CHART_Radar_Comment, "RID_RESXLT_COST_CHART_Radar_Comment"
+ sdm.InitString RID_RESXLT_COST_CHART_Scattered_Comment, "RID_RESXLT_COST_CHART_Scattered_Comment"
+ sdm.InitString RID_RESXLT_COST_CHART_Surface_Comment, "RID_RESXLT_COST_CHART_Surface_Comment"
+ sdm.InitString RID_RESXLT_COST_PIVOT_CalcVal_Comment, "RID_RESXLT_COST_PIVOT_CalcVal_Comment"
+ sdm.InitString RID_RESXLT_COST_PIVOT_ExternData_Comment, "RID_RESXLT_COST_PIVOT_ExternData_Comment"
+ sdm.InitString RID_RESXLT_COST_PIVOT_ManSort_Comment, "RID_RESXLT_COST_PIVOT_ManSort_Comment"
+ sdm.InitString RID_RESXLT_COST_PIVOT_MultConsRanges_Comment, "RID_RESXLT_COST_PIVOT_MultConsRanges_Comment"
+ sdm.InitString RID_RESXLT_COST_PIVOT_PivotChart_Comment, "RID_RESXLT_COST_PIVOT_PivotChart_Comment"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_AUTO, "RID_STR_EXCEL_ATTRIBUTE_AUTO"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_AXISINTERVAL, "RID_STR_EXCEL_ATTRIBUTE_AXISINTERVAL"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_BADCHARACTER, "RID_STR_EXCEL_ATTRIBUTE_BADCHARACTER"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_BORDER, "RID_STR_EXCEL_ATTRIBUTE_BORDER"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_BROKEN, "RID_STR_EXCEL_ATTRIBUTE_BROKEN"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_BUILT_IN, "RID_STR_EXCEL_ATTRIBUTE_BUILT_IN"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CATEGORYANDDATA, "RID_STR_EXCEL_ATTRIBUTE_CATEGORYANDDATA"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABEL, "RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABEL"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABELMORETHANONECELL, "RID_STR_EXCEL_ATTRIBUTE_CATEGORYLABELMORETHANONECELL"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CHANGED, "RID_STR_EXCEL_ATTRIBUTE_CHANGED"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CHARTNAME, "RID_STR_EXCEL_ATTRIBUTE_CHARTNAME"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES, "RID_STR_EXCEL_ATTRIBUTE_CHECK_DOCUMENT_REFERENCES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_COLUMNBAR, "RID_STR_EXCEL_ATTRIBUTE_COLUMNBAR"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_COMPONENT, "RID_STR_EXCEL_ATTRIBUTE_COMPONENT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CONTROLS, "RID_STR_EXCEL_ATTRIBUTE_CONTROLS"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CUSTOM, "RID_STR_EXCEL_ATTRIBUTE_CUSTOM"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_CUSTOM_FORMULA, "RID_STR_EXCEL_ATTRIBUTE_CUSTOM_FORMULA"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DASHED_DOT, "RID_STR_EXCEL_ATTRIBUTE_DASHED_DOT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DATALABELWITHLEGEND, "RID_STR_EXCEL_ATTRIBUTE_DATALABELWITHLEGEND"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DATASOURCE, "RID_STR_EXCEL_ATTRIBUTE_DATASOURCE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DATASOURCENOTLINKEDTOCELL, "RID_STR_EXCEL_ATTRIBUTE_DATASOURCENOTLINKEDTOCELL"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DATASOURCEONDIFFERENTSHEET, "RID_STR_EXCEL_ATTRIBUTE_DATASOURCEONDIFFERENTSHEET"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DATATABLE, "RID_STR_EXCEL_ATTRIBUTE_DATATABLE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DESCRIPTION, "RID_STR_EXCEL_ATTRIBUTE_DESCRIPTION"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DIFFERENT, "RID_STR_EXCEL_ATTRIBUTE_DIFFERENT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DISPLAY_ZOOM, "RID_STR_EXCEL_ATTRIBUTE_DISPLAY_ZOOM"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_FILE, "RID_STR_EXCEL_ATTRIBUTE_FILE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_FILL_PATTERN, "RID_STR_EXCEL_ATTRIBUTE_FILL_PATTERN"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING, "RID_STR_EXCEL_ATTRIBUTE_FUNCTION_STRING"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE, "RID_STR_EXCEL_ATTRIBUTE_FURTHER_MACRO_ANALYSIS_NOT_POSSIBLE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_GUID, "RID_STR_EXCEL_ATTRIBUTE_GUID"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_INCLUDING, "RID_STR_EXCEL_ATTRIBUTE_INCLUDING"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_INTACT, "RID_STR_EXCEL_ATTRIBUTE_INTACT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_INVALIDCHARACTER, "RID_STR_EXCEL_ATTRIBUTE_INVALIDCHARACTER"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_IS_BROKEN, "RID_STR_EXCEL_ATTRIBUTE_IS_BROKEN"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_LEGEND_NAME, "RID_STR_EXCEL_ATTRIBUTE_LEGEND_NAME"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_LEGENDPOSITION, "RID_STR_EXCEL_ATTRIBUTE_LEGENDPOSITION"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_LINE_STYLE, "RID_STR_EXCEL_ATTRIBUTE_LINE_STYLE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_LIST_SOURCE, "RID_STR_EXCEL_ATTRIBUTE_LIST_SOURCE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_MAJOR, "RID_STR_EXCEL_ATTRIBUTE_MAJOR"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_MINOR, "RID_STR_EXCEL_ATTRIBUTE_MINOR"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_MISSING, "RID_STR_EXCEL_ATTRIBUTE_MISSING"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NAME, "RID_STR_EXCEL_ATTRIBUTE_NAME"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES, "RID_STR_EXCEL_ATTRIBUTE_NON_PORTABLE_EXTERNAL_REFERENCES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NOTRIGHT, "RID_STR_EXCEL_ATTRIBUTE_NOTRIGHT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS, "RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_CELLS"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LEGEND_ENTRIES, "RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LEGEND_ENTRIES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LINES, "RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_LINES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_PIVOTFIELDS, "RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_PIVOTFIELDS"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_SHEETS, "RID_STR_EXCEL_ATTRIBUTE_NUMBER_OF_SHEETS"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_OBJECT_NAME, "RID_STR_EXCEL_ATTRIBUTE_OBJECT_NAME"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_OBJECT_TYPE, "RID_STR_EXCEL_ATTRIBUTE_OBJECT_TYPE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_ONECOLUMNROW, "RID_STR_EXCEL_ATTRIBUTE_ONECOLUMNROW"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PASSWORD, "RID_STR_EXCEL_ATTRIBUTE_PASSWORD"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_MODIFY, "RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_MODIFY"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_OPEN, "RID_STR_EXCEL_ATTRIBUTE_PASSWORD_TO_OPEN"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PATH, "RID_STR_EXCEL_ATTRIBUTE_PATH"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PATTERNED, "RID_STR_EXCEL_ATTRIBUTE_PATTERNED"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PIE, "RID_STR_EXCEL_ATTRIBUTE_PIE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM, "RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_NUM"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE, "RID_STR_EXCEL_ATTRIBUTE_PIVOT_FIELDS_VISIBLE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME, "RID_STR_EXCEL_ATTRIBUTE_PIVOT_TABLE_NAME"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PRINT_RANGE, "RID_STR_EXCEL_ATTRIBUTE_PRINT_RANGE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PROCEDURES, "RID_STR_EXCEL_ATTRIBUTE_PROCEDURES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PROJECT, "RID_STR_EXCEL_ATTRIBUTE_PROJECT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_SHARING, "RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_SHARING"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_STRUCTURE, "RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_STRUCTURE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_WINDOWS, "RID_STR_EXCEL_ATTRIBUTE_PROTECT_TYPE_WINDOWS"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_SEPARATE, "RID_STR_EXCEL_ATTRIBUTE_SEPARATE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_SERIESCHARTTYPE, "RID_STR_EXCEL_ATTRIBUTE_SERIESCHARTTYPE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_SET, "RID_STR_EXCEL_ATTRIBUTE_SET"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION, "RID_STR_EXCEL_ATTRIBUTE_SLICES_IN_DIFFERENT_DIRECTION"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_SOURCE, "RID_STR_EXCEL_ATTRIBUTE_SOURCE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TIMESCALE, "RID_STR_EXCEL_ATTRIBUTE_TIMESCALE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TITLE, "RID_STR_EXCEL_ATTRIBUTE_TITLE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TITLEFONT, "RID_STR_EXCEL_ATTRIBUTE_TITLEFONT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TRENDLINE, "RID_STR_EXCEL_ATTRIBUTE_TRENDLINE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TYPE, "RID_STR_EXCEL_ATTRIBUTE_TYPE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TYPELIB, "RID_STR_EXCEL_ATTRIBUTE_TYPELIB"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_TYPES, "RID_STR_EXCEL_ATTRIBUTE_TYPES"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT, "RID_STR_EXCEL_ATTRIBUTE_UNABLE_TO_ACCESS_VBPROJECT"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_UNSUPPORTEDTYPE, "RID_STR_EXCEL_ATTRIBUTE_UNSUPPORTEDTYPE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_VALUE, "RID_STR_EXCEL_ATTRIBUTE_VALUE"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_VBPROJECT_PASSWORD_SET, "RID_STR_EXCEL_ATTRIBUTE_VBPROJECT_PASSWORD_SET"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_DB_QUERY, "RID_STR_EXCEL_ATTRIBUTE_DB_QUERY"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_WORKBOOK_VERSION, "RID_STR_EXCEL_ATTRIBUTE_WORKBOOK_VERSION"
+ sdm.InitString RID_STR_EXCEL_ATTRIBUTE_XAXISCATEGORY, "RID_STR_EXCEL_ATTRIBUTE_XAXISCATEGORY"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_CUSTOM, "RID_STR_EXCEL_ENUMERATION_CUSTOM"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_CONTINUOUS, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_CONTINUOUS"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASH, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASH"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASHDOT, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DASHDOT"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOT, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOT"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOUBLE, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_DOUBLE"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_LINESTYLENONE, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_LINESTYLENONE"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LINE_STYLE_SLANTDASHDOT, "RID_STR_EXCEL_ENUMERATION_LINE_STYLE_SLANTDASHDOT"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_LIST, "RID_STR_EXCEL_ENUMERATION_LIST"
+ sdm.InitString RID_STR_EXCEL_ENUMERATION_UNKNOWN, "RID_STR_EXCEL_ENUMERATION_UNKNOWN"
+ sdm.InitString RID_STR_EXCEL_FALSE, "RID_STR_EXCEL_FALSE"
+ sdm.InitString RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES, "RID_STR_EXCEL_ISSUE_CHARTS_AND_TABLES"
+ sdm.InitString RID_STR_EXCEL_ISSUE_FORMAT, "RID_STR_EXCEL_ISSUE_FORMAT"
+ sdm.InitString RID_STR_EXCEL_ISSUE_FUNCTIONS, "RID_STR_EXCEL_ISSUE_FUNCTIONS"
+ sdm.InitString RID_STR_EXCEL_ISSUE_INFORMATION, "RID_STR_EXCEL_ISSUE_INFORMATION"
+ sdm.InitString RID_STR_EXCEL_ISSUE_PORTABILITY, "RID_STR_EXCEL_ISSUE_PORTABILITY"
+ sdm.InitString RID_STR_EXCEL_ISSUE_VBA_MACROS, "RID_STR_EXCEL_ISSUE_VBA_MACROS"
+ sdm.InitString RID_STR_EXCEL_NOTE_AXISINTERVAL, "RID_STR_EXCEL_NOTE_AXISINTERVAL"
+ sdm.InitString RID_STR_EXCEL_NOTE_BORDER, "RID_STR_EXCEL_NOTE_BORDER"
+ sdm.InitString RID_STR_EXCEL_NOTE_CATEGORYANDDATA, "RID_STR_EXCEL_NOTE_CATEGORYANDDATA"
+ sdm.InitString RID_STR_EXCEL_NOTE_CATEGORYLABELMORETHANONECELL, "RID_STR_EXCEL_NOTE_CATEGORYLABELMORETHANONECELL"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_3, "RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_3"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_4, "RID_STR_EXCEL_NOTE_CELL_ATTRIBUTES_4"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_1, "RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_1"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_2, "RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_2"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_3, "RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_3"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_DATEDIF, "RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_DATEDIF"
+ sdm.InitString RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_PHONETIC, "RID_STR_EXCEL_NOTE_CELL_FUNCTIONS_PHONETIC"
+ sdm.InitString RID_STR_EXCEL_NOTE_COLUMNBAR, "RID_STR_EXCEL_NOTE_COLUMNBAR"
+ sdm.InitString RID_STR_EXCEL_NOTE_DATALABELWITHLEGEND, "RID_STR_EXCEL_NOTE_DATALABELWITHLEGEND"
+ sdm.InitString RID_STR_EXCEL_NOTE_DATASOURCENOTLINKEDTOCELL, "RID_STR_EXCEL_NOTE_DATASOURCENOTLINKEDTOCELL"
+ sdm.InitString RID_STR_EXCEL_NOTE_DATASOURCEONDIFFERENTSHEET, "RID_STR_EXCEL_NOTE_DATASOURCEONDIFFERENTSHEET"
+ sdm.InitString RID_STR_EXCEL_NOTE_DATATABLE, "RID_STR_EXCEL_NOTE_DATATABLE"
+ sdm.InitString RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_1, "RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_1"
+ sdm.InitString RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_2, "RID_STR_EXCEL_NOTE_DOCUMENT_PROPERTIES_2"
+ sdm.InitString RID_STR_EXCEL_NOTE_INVALIDWORKSHEETNAME, "RID_STR_EXCEL_NOTE_INVALIDWORKSHEETNAME"
+ sdm.InitString RID_STR_EXCEL_NOTE_LEGENDPOSITION, "RID_STR_EXCEL_NOTE_LEGENDPOSITION"
+ sdm.InitString RID_STR_EXCEL_NOTE_OLD_OLDWORKBOOKVERSION_PREPARABLE, "RID_STR_EXCEL_NOTE_OLD_OLDWORKBOOKVERSION_PREPARABLE"
+ sdm.InitString RID_STR_EXCEL_NOTE_OLDWORKBOOKVERSION, "RID_STR_EXCEL_NOTE_OLDWORKBOOKVERSION"
+ sdm.InitString RID_STR_EXCEL_NOTE_PASSWORD_TO_OPEN, "RID_STR_EXCEL_NOTE_PASSWORD_TO_OPEN"
+ sdm.InitString RID_STR_EXCEL_NOTE_SERIESCHARTTYPE, "RID_STR_EXCEL_NOTE_SERIESCHARTTYPE"
+ sdm.InitString RID_STR_EXCEL_NOTE_SHEET_LIMITS_1, "RID_STR_EXCEL_NOTE_SHEET_LIMITS_1"
+ sdm.InitString RID_STR_EXCEL_NOTE_SHEET_LIMITS_2, "RID_STR_EXCEL_NOTE_SHEET_LIMITS_2"
+ sdm.InitString RID_STR_EXCEL_NOTE_TITLEFONT, "RID_STR_EXCEL_NOTE_TITLEFONT"
+ sdm.InitString RID_STR_EXCEL_NOTE_TRENDLINE, "RID_STR_EXCEL_NOTE_TRENDLINE"
+ sdm.InitString RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE1, "RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE1"
+ sdm.InitString RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE2, "RID_STR_EXCEL_NOTE_UNSUPPORTEDTYPE2"
+ sdm.InitString RID_STR_EXCEL_NOTE_XAXISCATEGORY, "RID_STR_EXCEL_NOTE_XAXISCATEGORY"
+ sdm.InitString RID_STR_EXCEL_NOTE_DB_QUERY, "RID_STR_EXCEL_NOTE_DB_QUERY"
+ sdm.InitString RID_STR_EXCEL_NOTE_ZOOM, "RID_STR_EXCEL_NOTE_ZOOM"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_ATTRIBUTES, "RID_STR_EXCEL_SUBISSUE_ATTRIBUTES"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_CHART_COMPLEX, "RID_STR_EXCEL_SUBISSUE_CHART_COMPLEX"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_CHART_MINOR, "RID_STR_EXCEL_SUBISSUE_CHART_MINOR"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_EMBEDDED_CHART, "RID_STR_EXCEL_SUBISSUE_EMBEDDED_CHART"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_EXTERNAL, "RID_STR_EXCEL_SUBISSUE_EXTERNAL"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_INVALID_WORKSHEET_NAME, "RID_STR_EXCEL_SUBISSUE_INVALID_WORKSHEET_NAME"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_MAX_SHEETS_EXCEEDED, "RID_STR_EXCEL_SUBISSUE_MAX_SHEETS_EXCEEDED"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_OLD_WORKBOOK_VERSION, "RID_STR_EXCEL_SUBISSUE_OLD_WORKBOOK_VERSION"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_PIVOT, "RID_STR_EXCEL_SUBISSUE_PIVOT"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_SHEET_CHART, "RID_STR_EXCEL_SUBISSUE_SHEET_CHART"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_WORKBOOK_PROTECTION, "RID_STR_EXCEL_SUBISSUE_WORKBOOK_PROTECTION"
+ sdm.InitString RID_STR_EXCEL_SUBISSUE_ZOOM, "RID_STR_EXCEL_SUBISSUE_ZOOM"
+ sdm.InitString RID_STR_EXCEL_SUBLOCATION_NA, "RID_STR_EXCEL_SUBLOCATION_NA"
+ sdm.InitString RID_STR_EXCEL_TRUE, "RID_STR_EXCEL_TRUE"
+
+ 'Excel Driver Strings
+ sdm.InitString RID_STR_DVR_XL_EXCEL_DRIVER, "RID_STR_DVR_XL_EXCEL_DRIVER"
+ sdm.InitString RID_STR_DVR_XL_ISSUES, "RID_STR_DVR_XL_ISSUES"
+ sdm.InitString RID_STR_DVR_XL_PURPOSE, "RID_STR_DVR_XL_PURPOSE"
+ sdm.InitString RID_STR_DVR_XL_READ_README, "RID_STR_DVR_XL_READ_README"
+ sdm.InitString RID_STR_DVR_XL_THE_MACROS, "RID_STR_DVR_XL_THE_MACROS"
+ sdm.InitString RID_STR_DVR_XL_THIS_DOC, "RID_STR_DVR_XL_THIS_DOC"
+ sdm.InitString RID_STR_DVR_XL_TITLE, "RID_STR_DVR_XL_TITLE"
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas b/migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas
new file mode 100644
index 000000000000..0d18d13cbae5
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas
@@ -0,0 +1,178 @@
+Attribute VB_Name = "ApplicationSpecific"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: ApplicationSpecific.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+'*** Do NOT add any new categories - use those listed below or else the results spreadsheet and
+'*** issues list will be out of sync
+Public Const GlbPowerPoint = True
+
+'** Issue Categories
+Public Const CID_INFORMATION_REFS = 0
+Public Const CID_ACTION_SETTINGS = 1
+Public Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 2
+Public Const CID_FIELDS = 3
+Public Const CID_FORMAT = 4
+Public Const CID_NOTES_AND_HANDOUTS = 5
+Public Const CID_OBJECTS_GRAPHICS_TEXTBOXES = 6
+Public Const CID_PORTABILITY = 7
+Public Const CID_VBA_MACROS = 8
+Public Const CTOTAL_CATEGORIES = 8
+
+'** PP - XML Issue and SubIssue strings
+Public Const CSTR_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES = "ObjectsGraphicsAndTextboxes"
+
+Public Const CSTR_SUBISSUE_COMMENT = "Comment"
+Public Const CSTR_SUBISSUE_MOVIE = "Movie"
+Public Const CSTR_SUBISSUE_BACKGROUND = "Background"
+Public Const CSTR_SUBISSUE_NUMBERING = "Numbering"
+Public Const CSTR_SUBISSUE_HYPERLINK = "Hyperlink"
+Public Const CSTR_SUBISSUE_HYPERLINK_SPLIT = "HyperlinkSplit"
+Public Const CSTR_SUBISSUE_TEMPLATE = "Template"
+Public Const CSTR_SUBISSUE_TABSTOP = "Tabstop"
+Public Const CSTR_SUBISSUE_FONTS = "Fonts"
+
+'** END PP - XML Issue and SubIssue strings
+
+Public Const CAPPNAME_WORD = "Word"
+'Public Const CAPPNAME_WORD_DOC = ".doc"
+'Public Const CAPPNAME_WORD_DOT = ".dot"
+
+Public Const CAPPNAME_EXCEL = "Excel"
+'Public Const CAPPNAME_EXCEL_DOC = ".xls"
+'Public Const CAPPNAME_EXCEL_DOT = ".xlt"
+
+Public Const CAPPNAME_POWERPOINT = "PowerPoint"
+Public Const CAPPNAME_PP_DOC = ".ppt"
+Public Const CAPPNAME_PP_DOT = ".pot"
+
+'Public Const CAPP_DOCPROP_LOCATION = "Document"
+'Public Const CAPP_DOCPROP_LOCATION = "Workbook"
+Public CAPP_DOCPROP_LOCATION As String
+
+
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Document"
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Workbook"
+Public Const CAPP_XMLDOCPROP_LOCATION = "Presentation"
+
+Public Const CTHIS_DOCUMENT = "ThisDocument"
+Public Const CTOPLEVEL_PROJECT = "Project"
+
+Const CSTART_DIR = 1
+Const CSTORE_TO_DIR = 2
+Const CRESULTS_FILE = 3
+Const CRESULTS_TEMPALTE = 4
+Const COVERWRITE_FILE = 5
+Const CNEW_RESULTS_FILE = 6
+Const CDOCUMENT = 7
+Const CTEMPLATE = 8
+Const CINCLUDE_SUBDIRS = 9
+Const CLOG_FILE = 10
+Const CDEBUG_LEVEL = 11
+
+Public Function getAppSpecificDocExt() As String
+ getAppSpecificDocExt = CAPPNAME_PP_DOC
+End Function
+Public Function getAppSpecificTemplateExt() As String
+ getAppSpecificTemplateExt = CAPPNAME_PP_DOT
+End Function
+
+Public Function getAppSpecificPath() As String
+ getAppSpecificPath = ActivePresentation.path
+End Function
+Public Function getAppSpecificApplicationName() As String
+ getAppSpecificApplicationName = CAPPNAME_POWERPOINT
+End Function
+
+Public Function getAppSpecificCustomDocProperties(currDoc As Presentation) As DocumentProperties
+ Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties
+End Function
+Public Function getAppSpecificCommentBuiltInDocProperty(currDoc As Presentation) As DocumentProperty
+ Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltInDocumentProperties("Comments")
+End Function
+
+Public Function getAppSpecificVBProject(currDoc as Presentation) As VBProject
+ Set getAppSpecificVBProject = currDoc.VBProject
+End Function
+
+Public Function getAppSpecificOLEClassType(aShape As Shape) As String
+ getAppSpecificOLEClassType = aShape.OLEFormat.ProgID
+End Function
+
+' Workaround as it does not seem to be possible to shut down PP
+' from VB app
+Public Sub QuitPowerPoint()
+ Dim I As Integer
+ On Error Resume Next
+ With Application.Presentations
+ For I = .count To 1 Step -1
+ .item(I).Close
+ Next
+ End With
+ Application.Quit
+End Sub
+
+Public Sub SetAppToMinimized()
+ Application.WindowState = ppWindowMinimized
+End Sub
+
+Public Sub LocalizeResources()
+ On Error GoTo ErrorHandler
+ Dim ppStrings As StringDataManager
+ Set ppStrings = New StringDataManager
+ Dim aPres As Presentation
+ Set aPres = Presentations("_OOoDocAnalysisPPTDriver.ppt")
+ ppStrings.InitStringData (GetResourceDataFileName(aPres.path))
+ LoadCommonStrings ppStrings
+ LoadPPStrings ppStrings
+ LoadResultsStrings ppStrings
+ Set ppStrings = Nothing
+
+ SetPPDriverText
+FinalExit:
+ Exit Sub
+ErrorHandler:
+ WriteDebug "Presentation_Open : " & Err.Number & " : " & Err.Description
+ GoTo FinalExit
+End Sub
+
+Sub SetPPDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT2").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT2
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT3").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT3
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT4").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT4
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT5").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT5
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT6").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT6
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT7").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT7
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT8").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT8
+End Sub
+
+
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas b/migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas
new file mode 100644
index 000000000000..2714aa181b4d
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas
@@ -0,0 +1,64 @@
+Attribute VB_Name = "Loader"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Loader.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+Public ppStrings As StringDataManager
+
+Public Sub Presentation_Open()
+ On Error GoTo ErrorHandler
+ Set ppStrings = New StringDataManager
+ Dim aPres As Presentation
+ Set aPres = Presentations("_OOoDocAnalysisPPTDriver.ppt")
+ ppStrings.InitStringData (GetResourceDataFileName(aPres.path))
+ LoadCommonStrings ppStrings
+ LoadPPStrings ppStrings
+ LoadResultsStrings ppStrings
+ Set ppStrings = Nothing
+
+ SetPPDriverText
+FinalExit:
+ Exit Sub
+ErrorHandler:
+ WriteDebug "Presentation_Open : " & Err.Number & " : " & Err.Description
+ GoTo FinalExit
+End Sub
+
+Sub SetPPDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT2").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT2
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT3").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT3
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT4").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT4
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT5").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT5
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT6").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT6
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT7").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT7
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT8").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT8
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls b/migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls
new file mode 100644
index 000000000000..babc26ddf8ed
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls
@@ -0,0 +1,826 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "MigrationAnalyser"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: MigrationAnalyser.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+
+Private mAnalysis As DocumentAnalysis
+
+'***ADDING-ISSUE: Use Following Skeleton as Guideline for Adding Issue
+' For complete list of all RID_STR_... for Issues (IssueType), SubIssues (SubType) and Attributes refer to:
+' powerpoint_res.bas and common_res.bas
+'
+' For complete list of all CID_... for Issue Categories(IssueID) and
+' CSTR_... for XML Issues (IssueTypeXML) and XML SubIssues (SubTypeXML) refer to:
+' ApplicationSpecific.bas and CommonMigrationAnalyser.bas
+'
+' You should not have to add any new Issue Categories or matching IssueTypes, only new SubIssues
+Sub Analyze_SKELETON()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SKELETON"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_VBA_MACROS 'Issue Category
+ .IssueType = RID_STR_COMMON_ISSUE_VBA_MACROS 'Issue String
+ .SubType = RID_STR_COMMON_SUBISSUE_PROPERTIES 'SubIssue String
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_VBA_MACROS 'Non localised XML Issue String
+ .SubTypeXML = CSTR_SUBISSUE_PROPERTIES 'Non localised XML SubIssue String
+ .locationXML = .CXMLLocationDocument 'Non localised XML location
+
+ .SubLocation = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .Line = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .column = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+
+ ' Add as many Attribute Value pairs as needed
+ ' Note: following must always be true - Attributes.Count = Values.Count
+ .Attributes.Add "AAA"
+ .Values.Add "foobar"
+
+ ' Use AddIssueDetailsNote to add notes to the Issue Details if required
+ ' Public Sub AddIssueDetailsNote(myIssue As IssueInfo, noteNum As Long, noteStr As String, _
+ ' Optional preStr As String = RID_STR_COMMON_NOTE_PRE)
+ ' Where preStr is prepended to the output, with "Note" as the default
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST
+
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) = _
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub DoAnalyse(fileName As String, userFormTypesDict As Scripting.Dictionary, _
+ startDir As String, storeToDir As String, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim containsInvalidChar As Boolean
+ containsInvalidChar = False
+ Dim currentFunctionName As String
+ currentFunctionName = "DoAnalyse"
+ mAnalysis.name = fileName
+ Dim aPres As Presentation
+ mAnalysis.TotalIssueTypes = CTOTAL_CATEGORIES
+
+ If InStr(fileName, "[") = 0 And InStr(fileName, "]") = 0 Then 'If fileName does not contain [ AND ]
+ containsInvalidChar = False
+ Else
+ containsInvalidChar = True
+ End If
+
+ 'Cannot Turn off any AutoExce macros before loading the Presentation
+ 'WordBasic.DisableAutoMacros 1
+ 'On Error GoTo HandleErrors
+
+ On Error Resume Next ' Ignore errors on setting
+ If containsInvalidChar = True Then
+ GoTo HandleErrors
+ End If
+ Set aPres = Presentations.Open(fileName:=fileName, ReadOnly:=True)
+ If Err.Number <> 0 Then
+ mAnalysis.Application = RID_STR_COMMON_CANNOT_OPEN
+ GoTo HandleErrors
+ End If
+ On Error GoTo HandleErrors
+
+ 'MsgBox "Window: " & PPViewType(aPres.Windows(1).viewType) & _
+ ' " Pane: " & PPViewType(aPres.Windows(1).ActivePane.viewType)
+
+ 'Set Doc Properties
+ SetDocProperties mAnalysis, aPres, fso
+
+ Analyze_SlideIssues aPres
+ Analyze_Macros mAnalysis, userFormTypesDict, aPres
+
+ ' Doc Preparation only
+ ' Save document with any fixed issues under <storeToDir>\prepared\<source doc name>
+ If mAnalysis.PreparableIssuesCount > 0 And CheckDoPrepare Then
+ Dim preparedFullPath As String
+ preparedFullPath = GetPreparedFullPath(mAnalysis.name, startDir, storeToDir, fso)
+ If preparedFullPath <> "" Then
+ If fso.FileExists(preparedFullPath) Then
+ fso.DeleteFile preparedFullPath, True
+ End If
+ If fso.FolderExists(fso.GetParentFolderName(preparedFullPath)) Then
+ aPres.SaveAs preparedFullPath
+ End If
+ End If
+ End If
+
+FinalExit:
+ If Not aPres Is Nothing Then 'If Not IsEmpty(aDoc) Then
+ aPres.Saved = True
+ aPres.Close
+ End If
+ Set aPres = Nothing
+ Exit Sub
+
+HandleErrors:
+ If containsInvalidChar = False Then
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Else
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": The file name contains the invalid character [ or ]. Please change the file name and run analysis again."
+ End If
+ Resume FinalExit
+End Sub
+
+Sub SetDocProperties(docAnalysis As DocumentAnalysis, pres As Presentation, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetDocProperties"
+ Dim f As File
+ Set f = fso.GetFile(docAnalysis.name)
+
+ Const appPropertyAppName = 9
+ Const appPropertyLastAuthor = 7
+ Const appPropertyRevision = 8
+ Const appPropertyTemplate = 6
+ Const appPropertyTimeCreated = 11
+ Const appPropertyTimeLastSaved = 12
+
+ On Error Resume Next
+ docAnalysis.PageCount = pres.Slides.count
+ docAnalysis.Created = f.DateCreated
+ docAnalysis.Modified = f.DateLastModified
+ docAnalysis.Accessed = f.DateLastAccessed
+ docAnalysis.Printed = DateValue("01/01/1900")
+
+ On Error Resume Next 'Some apps may not support all props
+ DocAnalysis.Application = getAppSpecificApplicationName & " " & Application.Version
+
+ 'docAnalysis.Application = pres.BuiltInDocumentProperties(appPropertyAppName)
+ 'If InStr(docAnalysis.Application, "Microsoft") = 1 Then
+ ' docAnalysis.Application = Mid(docAnalysis.Application, Len("Microsoft") + 2)
+ 'End If
+ 'If InStr(Len(docAnalysis.Application) - 2, docAnalysis.Application, ".") = 0 Then
+ ' docAnalysis.Application = docAnalysis.Application & " " & Application.Version
+ 'End If
+
+ docAnalysis.SavedBy = _
+ pres.BuiltInDocumentProperties(appPropertyLastAuthor)
+ docAnalysis.Revision = _
+ val(pres.BuiltInDocumentProperties(appPropertyRevision))
+ docAnalysis.Template = _
+ fso.GetFileName(pres.BuiltInDocumentProperties(appPropertyTemplate))
+
+FinalExit:
+ Set f = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function PPViewType(viewType As PPViewType) As String
+
+ Select Case viewType
+ Case ppViewHandoutMaster
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_HANDOUT_MASTER
+ Case ppViewNormal
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_NORMAL
+ Case ppViewNotesMaster
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_NOTES_MASTER
+ Case ppViewNotesPage
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_NOTES_PAGE
+ Case ppViewOutline
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_OUTLINE
+ Case ppViewSlide
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_SLIDE
+ Case ppViewSlideMaster
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_SLIDE_MASTER
+ Case ppViewSlideSorter
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_SLIDE_SORTER
+ Case ppViewTitleMaster
+ PPViewType = RID_STR_PP_ENUMERATION_VIEW_TITLE_MASTER
+ Case Else
+ PPViewType = RID_STR_PP_ENUMERATION_UNKNOWN
+ End Select
+End Function
+
+Sub Analyze_SlideIssues(curPresentation As Presentation)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SlideIssues"
+
+ Dim mySlide As Slide
+ Dim SlideNum As Integer
+
+ SlideNum = 1
+ For Each mySlide In curPresentation.Slides
+ ActiveWindow.View.GotoSlide index:=SlideNum
+ Analyze_ShapeIssues mySlide
+ Analyze_Hyperlinks mySlide
+ Analyze_Templates mySlide
+ SlideNum = SlideNum + 1
+ Next mySlide
+
+ Analyze_TabStops curPresentation
+
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_TabStops(curPresentation As Presentation)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_TabStops"
+
+ 'Dim firstSlide As Slide
+ 'Dim firstShape As Shape
+ Dim mySlide As Slide
+ Dim myShape As Shape
+ Dim bInitialized, bHasDifferentDefaults As Boolean
+ Dim curDefault, lastDefault As Single
+
+ bInitialized = False
+ bHasDifferentDefaults = False
+
+ For Each mySlide In curPresentation.Slides
+ For Each myShape In mySlide.Shapes
+ If myShape.HasTextFrame Then
+ If myShape.TextFrame.HasText Then
+ curDefault = myShape.TextFrame.Ruler.TabStops.DefaultSpacing
+ If Not bInitialized Then
+ bInitialized = True
+ lastDefault = curDefault
+ 'Set firstSlide = mySlide
+ 'Set firstShape = myShape
+ End If
+ If curDefault <> lastDefault Then
+ bHasDifferentDefaults = True
+ Exit For
+ End If
+ End If
+ End If
+ Next myShape
+ If bHasDifferentDefaults Then Exit For
+ Next mySlide
+
+ If Not bHasDifferentDefaults Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Tabstop
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_TABSTOP
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_TABSTOP_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Fonts(curPresentation As Presentation)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Fonts"
+
+ Dim myFont As Font
+ Dim bHasEmbeddedFonts As Boolean
+
+ bHasEmbeddedFonts = False
+ For Each myFont In curPresentation.Fonts
+ If myFont.Embedded Then
+ bHasEmbeddedFonts = True
+ Exit For
+ End If
+ Next
+
+ If Not bHasEmbeddedFonts Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_PP_SUBISSUE_FONTS
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_FONTS
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_FONTS_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Templates(mySlide As Slide)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Templates"
+
+ If mySlide.Layout <> ppLayoutTitle Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Template
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_TEMPLATE
+ .locationXML = .CXMLLocationSlide
+ .SubLocation = mySlide.name
+
+ '.Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ '.Values.Add mySlide.name
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_TEMPLATE_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Hyperlinks(mySlide As Slide)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Hyperlinks"
+
+ Dim myIssue As IssueInfo
+ Dim hl As Hyperlink
+ Dim bHasMultipleFonts As Boolean
+ Dim bHasMultipleLines As Boolean
+
+ bHasMultipleFonts = False
+ bHasMultipleLines = False
+
+ For Each hl In mySlide.Hyperlinks
+ If TypeName(hl.Parent.Parent) = "TextRange" Then
+ Dim myTextRange As TextRange
+ Dim currRun As TextRange
+ Dim currLine As TextRange
+ Dim first, last, noteCount As Long
+
+ Set myTextRange = hl.Parent.Parent
+ first = myTextRange.start
+ last = first + myTextRange.Length - 1
+
+ For Each currRun In myTextRange.Runs
+ If (currRun.start > first And currRun.start < last) Then
+ bHasMultipleFonts = True
+ Exit For
+ End If
+ Next
+
+ For Each currLine In myTextRange.Lines
+ Dim lineEnd As Long
+ lineEnd = currLine.start + currLine.Length - 1
+ If (first <= lineEnd And last > lineEnd) Then
+ bHasMultipleLines = True
+ Exit For
+ End If
+ Next
+ End If
+
+ noteCount = 0
+
+ If bHasMultipleFonts Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Hyperlink
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_HYPERLINK
+ .locationXML = .CXMLLocationSlide
+ .SubLocation = mySlide.name
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myTextRange.Text
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_HYPERLINK_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ bHasMultipleFonts = False
+ End If
+ If bHasMultipleLines Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_HyperlinkSplit
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_HYPERLINK_SPLIT
+ .locationXML = .CXMLLocationSlide
+ .SubLocation = mySlide.name
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myTextRange.Text
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_HYPERLINK_SPLIT_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ bHasMultipleLines = False
+ End If
+ Next
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_ShapeIssues(mySlide As Slide)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_ShapeIssues"
+ Dim myShape As Shape
+
+ For Each myShape In mySlide.Shapes
+ 'myShape.Select msoTrue
+ Analyze_Movie mySlide, myShape
+ Analyze_Comments mySlide, myShape
+ Analyze_Background mySlide, myShape
+ Analyze_Numbering mySlide, myShape
+ 'Analyze global issues
+ Analyze_OLEEmbeddedSingleShape mAnalysis, myShape, mySlide.name
+ Analyze_Lines mAnalysis, myShape, mySlide.name
+ Analyze_Transparency mAnalysis, myShape, mySlide.name
+ Analyze_Gradients mAnalysis, myShape, mySlide.name
+ Next myShape
+
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_Numbering(mySlide As Slide, myShape As Shape)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Numbering"
+
+ If Not myShape.HasTextFrame Then Exit Sub
+ If Not myShape.TextFrame.HasText Then Exit Sub
+ Dim shapeText As TextRange
+
+ Set shapeText = myShape.TextFrame.TextRange
+
+ If shapeText.Paragraphs.count < 2 Then Exit Sub
+ If Not (shapeText.ParagraphFormat.Bullet.Type = ppBulletMixed Or _
+ shapeText.ParagraphFormat.Bullet.Type = ppBulletNumbered) Then Exit Sub
+
+ ' OpenOffice has Problems when the numbering does not start with the first
+ ' paragraph or when there are empty paragraphs which do not have a number.
+ ' Because PowerPoint does not give us the length of each paragraph ( .Length
+ ' does not work ), we have to compute the length ourself.
+
+ Dim I As Long
+ Dim lastType As PpBulletType
+ Dim currType As PpBulletType
+ Dim lastStart As Long
+ Dim lastLength As Long
+ Dim currStart As Long
+ Dim bHasNumProblem As Boolean
+ Dim bHasEmptyPar As Boolean
+
+ bHasNumProblem = False
+ bHasEmptyPar = False
+
+ lastType = shapeText.Paragraphs(1, 0).ParagraphFormat.Bullet.Type
+ lastStart = shapeText.Paragraphs(1, 0).start
+
+ For I = 2 To shapeText.Paragraphs.count
+ currType = shapeText.Paragraphs(I, 0).ParagraphFormat.Bullet.Type
+ currStart = shapeText.Paragraphs(I, 0).start
+ lastLength = currStart - lastStart - 1
+
+ If currType <> lastType Then
+ lastType = currType
+ If currType = ppBulletNumbered Then
+ bHasNumProblem = True
+ Exit For
+ End If
+ End If
+ If lastLength = 0 Then
+ bHasEmptyPar = True
+ Else
+ If (bHasEmptyPar) Then
+ bHasNumProblem = True
+ Exit For
+ End If
+ End If
+ lastStart = currStart
+ Next I
+
+ lastLength = shapeText.Length - lastStart
+ If (lastLength <> 0) And bHasEmptyPar Then
+ bHasNumProblem = True
+ End If
+
+ If Not bHasNumProblem Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Numbering
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_NUMBERING
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_NUMBERING_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Background(mySlide As Slide, myShape As Shape)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Background"
+
+ If myShape.Fill.Type <> msoFillBackground Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ Dim strCr As String
+ strCr = "" & vbCr
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_RESXLS_COST_Background
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_BACKGROUND
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_PP_SUBISSUE_BACKGROUND_NOTE
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Comments(mySlide As Slide, myShape As Shape)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Comments"
+
+ If myShape.Type <> msoComment Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ Dim strCr As String
+ strCr = "" & vbCr
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_PP_SUBISSUE_COMMENT
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_COMMENT
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+ .Attributes.Add RID_STR_PP_ATTRIBUTE_CONTENT
+ .Values.Add Replace(myShape.TextFrame.TextRange.Text, strCr, "")
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Sub Analyze_Movie(mySlide As Slide, myShape As Shape)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Movie"
+
+ If myShape.Type <> msoMedia Then Exit Sub
+ If myShape.MediaType <> ppMediaTypeMovie Then Exit Sub
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_OBJECTS_GRAPHICS_TEXTBOXES
+ .IssueType = RID_STR_PP_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES
+ .SubType = RID_STR_PP_SUBISSUE_MOVIE
+ .Location = .CLocationSlide
+
+ .IssueTypeXML = CSTR_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES
+ .SubTypeXML = CSTR_SUBISSUE_MOVIE
+ .locationXML = .CXMLLocationSlide
+
+ .SubLocation = mySlide.name
+ .Line = myShape.top
+ .column = myShape.Left
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add myShape.name
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SOURCE
+ .Values.Add myShape.LinkFormat.SourceFullName
+ .Attributes.Add RID_STR_PP_ATTRIBUTE_PLAYONENTRY
+ .Values.Add IIf(myShape.AnimationSettings.PlaySettings.PlayOnEntry, RID_STR_PP_TRUE, RID_STR_PP_FALSE)
+ .Attributes.Add RID_STR_PP_ATTRIBUTE_LOOP
+ .Values.Add IIf(myShape.AnimationSettings.PlaySettings.LoopUntilStopped, RID_STR_PP_TRUE, RID_STR_PP_FALSE)
+ .Attributes.Add RID_STR_PP_ATTRIBUTE_REWIND
+ .Values.Add IIf(myShape.AnimationSettings.PlaySettings.RewindMovie, RID_STR_PP_TRUE, RID_STR_PP_FALSE)
+
+ mAnalysis.IssuesCountArray(CID_OBJECTS_GRAPHICS_TEXTBOXES) = _
+ mAnalysis.IssuesCountArray(CID_OBJECTS_GRAPHICS_TEXTBOXES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Sub Class_Initialize()
+ Set mAnalysis = New DocumentAnalysis
+End Sub
+Private Sub Class_Terminate()
+ Set mAnalysis = Nothing
+End Sub
+
+Public Property Get Results() As DocumentAnalysis
+ Set Results = mAnalysis
+End Property
+
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas b/migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas
new file mode 100644
index 000000000000..d5fa4a10b260
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas
@@ -0,0 +1,43 @@
+Attribute VB_Name = "Preparation"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Preparation.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+'Stub for Word Prepare H&F
+Function Prepare_HeaderFooter_GraphicFrames(docAnalysis As DocumentAnalysis, myIssue As IssueInfo, _
+ var As Variant, currDoc As Presentation) As Boolean
+ Prepare_HeaderFooter_GraphicFrames = False
+End Function
+
+'Stub for Excel Prepare SheetName
+Function Prepare_WorkbookVersion() As Boolean
+ Prepare_WorkbookVersion = False
+End Function
+
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls b/migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls
new file mode 100644
index 000000000000..4cafcf4afab2
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls
@@ -0,0 +1,56 @@
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Slide1.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+Public ppStrings As StringDataManager
+
+Public Sub Presentation_Open()
+ MsgBox GetResourceDataFileName
+ Set ppStrings = New StringDataManager
+
+ ppStrings.InitStringData (GetResourceDataFileName)
+ LoadCommonStrings ppStrings
+ LoadPPStrings ppStrings
+ Set ppStrings = Nothing
+
+ SetPPDriverText
+End Sub
+
+Sub SetPPDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT2").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT2
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT3").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT3
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT4").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT4
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT5").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT5
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT6").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT6
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT7").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT7
+ ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT8").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT8
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas b/migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas
new file mode 100644
index 000000000000..0aba1c6cf755
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas
@@ -0,0 +1,109 @@
+Attribute VB_Name = "powerpoint_res"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: powerpoint_res.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Public RID_STR_PP_TRUE As String
+Public RID_STR_PP_FALSE As String
+Public RID_STR_PP_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES As String
+Public RID_STR_PP_SUBISSUE_COMMENT As String
+Public RID_STR_PP_SUBISSUE_MOVIE As String
+Public RID_STR_PP_SUBISSUE_BACKGROUND_NOTE As String
+Public RID_STR_PP_SUBISSUE_NUMBERING_NOTE As String
+Public RID_STR_PP_SUBISSUE_HYPERLINK_NOTE As String
+Public RID_STR_PP_SUBISSUE_HYPERLINK_SPLIT_NOTE As String
+Public RID_STR_PP_SUBISSUE_TEMPLATE As String
+Public RID_STR_PP_SUBISSUE_TEMPLATE_NOTE As String
+Public RID_STR_PP_SUBISSUE_TABSTOP_NOTE As String
+Public RID_STR_PP_SUBISSUE_FONTS As String
+Public RID_STR_PP_SUBISSUE_FONTS_NOTE As String
+Public RID_STR_PP_ATTRIBUTE_CONTENT As String
+Public RID_STR_PP_ATTRIBUTE_LOOP As String
+Public RID_STR_PP_ATTRIBUTE_PLAYONENTRY As String
+Public RID_STR_PP_ATTRIBUTE_REWIND As String
+Public RID_STR_PP_ATTRIBUTE_TYPES As String
+Public RID_STR_PP_ENUMERATION_VIEW_HANDOUT_MASTER As String
+Public RID_STR_PP_ENUMERATION_VIEW_NORMAL As String
+Public RID_STR_PP_ENUMERATION_VIEW_NOTES_MASTER As String
+Public RID_STR_PP_ENUMERATION_VIEW_NOTES_PAGE As String
+Public RID_STR_PP_ENUMERATION_VIEW_OUTLINE As String
+Public RID_STR_PP_ENUMERATION_VIEW_SLIDE As String
+Public RID_STR_PP_ENUMERATION_VIEW_SLIDE_MASTER As String
+Public RID_STR_PP_ENUMERATION_VIEW_SLIDE_SORTER As String
+Public RID_STR_PP_ENUMERATION_VIEW_TITLE_MASTER As String
+Public RID_STR_PP_ENUMERATION_UNKNOWN As String
+
+'Driver strings
+Public RID_STR_DVR_PP_TXT2 As String
+Public RID_STR_DVR_PP_TXT3 As String
+Public RID_STR_DVR_PP_TXT4 As String
+Public RID_STR_DVR_PP_TXT5 As String
+Public RID_STR_DVR_PP_TXT6 As String
+Public RID_STR_DVR_PP_TXT7 As String
+Public RID_STR_DVR_PP_TXT8 As String
+
+Public Sub LoadPPStrings(sdm As StringDataManager)
+ sdm.InitString RID_STR_PP_TRUE, "RID_STR_PP_TRUE"
+ sdm.InitString RID_STR_PP_FALSE, "RID_STR_PP_FALSE"
+ sdm.InitString RID_STR_PP_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES, "RID_STR_PP_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES"
+ sdm.InitString RID_STR_PP_SUBISSUE_COMMENT, "RID_STR_PP_SUBISSUE_COMMENT"
+ sdm.InitString RID_STR_PP_SUBISSUE_MOVIE, "RID_STR_PP_SUBISSUE_MOVIE"
+ sdm.InitString RID_STR_PP_SUBISSUE_BACKGROUND_NOTE, "RID_STR_PP_SUBISSUE_BACKGROUND_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_NUMBERING_NOTE, "RID_STR_PP_SUBISSUE_NUMBERING_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_HYPERLINK_NOTE, "RID_STR_PP_SUBISSUE_HYPERLINK_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_HYPERLINK_SPLIT_NOTE, "RID_STR_PP_SUBISSUE_HYPERLINK_SPLIT_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_TEMPLATE, "RID_STR_PP_SUBISSUE_TEMPLATE"
+ sdm.InitString RID_STR_PP_SUBISSUE_TEMPLATE_NOTE, "RID_STR_PP_SUBISSUE_TEMPLATE_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_TABSTOP_NOTE, "RID_STR_PP_SUBISSUE_TABSTOP_NOTE"
+ sdm.InitString RID_STR_PP_SUBISSUE_FONTS, "RID_STR_PP_SUBISSUE_FONTS"
+ sdm.InitString RID_STR_PP_SUBISSUE_FONTS_NOTE, "RID_STR_PP_SUBISSUE_FONTS_NOTE"
+ sdm.InitString RID_STR_PP_ATTRIBUTE_CONTENT, "RID_STR_PP_ATTRIBUTE_CONTENT"
+ sdm.InitString RID_STR_PP_ATTRIBUTE_LOOP, "RID_STR_PP_ATTRIBUTE_LOOP"
+ sdm.InitString RID_STR_PP_ATTRIBUTE_PLAYONENTRY, "RID_STR_PP_ATTRIBUTE_PLAYONENTRY"
+ sdm.InitString RID_STR_PP_ATTRIBUTE_REWIND, "RID_STR_PP_ATTRIBUTE_REWIND"
+ sdm.InitString RID_STR_PP_ATTRIBUTE_TYPES, "RID_STR_PP_ATTRIBUTE_TYPES"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_HANDOUT_MASTER, "RID_STR_PP_ENUMERATION_VIEW_HANDOUT_MASTER"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_NORMAL, "RID_STR_PP_ENUMERATION_VIEW_NORMAL"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_NOTES_MASTER, "RID_STR_PP_ENUMERATION_VIEW_NOTES_MASTER"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_NOTES_PAGE, "RID_STR_PP_ENUMERATION_VIEW_NOTES_PAGE"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_OUTLINE, "RID_STR_PP_ENUMERATION_VIEW_OUTLINE"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_SLIDE, "RID_STR_PP_ENUMERATION_VIEW_SLIDE"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_SLIDE_MASTER, "RID_STR_PP_ENUMERATION_VIEW_SLIDE_MASTER"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_SLIDE_SORTER, "RID_STR_PP_ENUMERATION_VIEW_SLIDE_SORTER"
+ sdm.InitString RID_STR_PP_ENUMERATION_VIEW_TITLE_MASTER, "RID_STR_PP_ENUMERATION_VIEW_TITLE_MASTER"
+ sdm.InitString RID_STR_PP_ENUMERATION_UNKNOWN, "RID_STR_PP_ENUMERATION_UNKNOWN"
+
+ 'Driver strings
+ sdm.InitString RID_STR_DVR_PP_TXT2, "RID_STR_DVR_PP_TXT2"
+ sdm.InitString RID_STR_DVR_PP_TXT3, "RID_STR_DVR_PP_TXT3"
+ sdm.InitString RID_STR_DVR_PP_TXT4, "RID_STR_DVR_PP_TXT4"
+ sdm.InitString RID_STR_DVR_PP_TXT5, "RID_STR_DVR_PP_TXT5"
+ sdm.InitString RID_STR_DVR_PP_TXT6, "RID_STR_DVR_PP_TXT6"
+ sdm.InitString RID_STR_DVR_PP_TXT7, "RID_STR_DVR_PP_TXT7"
+ sdm.InitString RID_STR_DVR_PP_TXT8, "RID_STR_DVR_PP_TXT8"
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/results_res.bas b/migrationanalysis/src/driver_docs/sources/results_res.bas
new file mode 100644
index 000000000000..b8285ff369e8
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/results_res.bas
@@ -0,0 +1,613 @@
+Attribute VB_Name = "results_res"
+Public RID_RESXLS_COST_Action_Settings As String
+Public RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field As String
+Public RID_RESXLS_COST_Additional_Weighting_Factors As String
+Public RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook As String
+Public RID_RESXLS_COST_Appearance As String
+Public RID_RESXLS_COST_Application As String
+Public RID_RESXLS_COST_Border_Styles As String
+Public RID_RESXLS_COST_Cell_Attributes As String
+Public RID_RESXLS_COST_CELL_SPAN_WORKAROUND As String
+Public RID_RESXLS_COST_Cell_Spanning_Page As String
+Public RID_RESXLS_COST_ChangesAndReviewing As String
+Public RID_RESXLS_COST_Charts_And_Tables As String
+Public RID_RESXLS_COST_Comment As String
+Public RID_RESXLS_COST_Content_And_Document_Properties As String
+Public RID_RESXLS_COST_ContentAndDocumentProperties As String
+Public RID_RESXLS_COST_Controls As String
+Public RID_RESXLS_COST_Cost As String
+Public RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min As String
+Public RID_RESXLS_COST_COST_0 As String
+Public RID_RESXLS_COST_COST_EMBED_CHART As String
+Public RID_RESXLS_COST_COST_ERROR_TYPE As String
+Public RID_RESXLS_COST_COST_INFO As String
+Public RID_RESXLS_COST_COST_INVAL_PASS As String
+Public RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME As String
+Public RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on As String
+Public RID_RESXLS_COST_Cost_per_Issue_or_Factor__min As String
+Public RID_RESXLS_COST_COST_PIVOT As String
+Public RID_RESXLS_COST_COST_SHEET_CHART As String
+Public RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls As String
+Public RID_RESXLS_COST_COST_VBA_CONT_TYPE As String
+Public RID_RESXLS_COST_COST_VBA_CONTROLS As String
+Public RID_RESXLS_COST_COST_VBA_FORMS As String
+Public RID_RESXLS_COST_COST_VBA_LOC As String
+Public RID_RESXLS_COST_COST_VBA_PROPS As String
+Public RID_RESXLS_COST_Costs__min As String
+Public RID_RESXLS_COST_Custom_Bullet_List As String
+Public RID_RESXLS_COST_Document_Custom_Properties As String
+Public RID_RESXLS_COST_Document_Parts_Protection As String
+Public RID_RESXLS_COST_Embedded_Chart As String
+Public RID_RESXLS_COST_embedded_objects As String
+Public RID_RESXLS_COST_Embedded_OLE_Object As String
+Public RID_RESXLS_COST_Excel As String
+Public RID_RESXLS_COST_Excel_Totals As String
+Public RID_RESXLS_COST_External As String
+Public RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm As String
+Public RID_RESXLS_COST_Factor_Count As String
+Public RID_RESXLS_COST_Fields As String
+Public RID_RESXLS_COST_Filters As String
+Public RID_RESXLS_COST_Fixed_SO7 As String
+Public RID_RESXLS_COST_Form_Field As String
+Public RID_RESXLS_COST_Format As String
+Public RID_RESXLS_COST_Functions As String
+Public RID_RESXLS_COST_HEADERFOOTER_WORKAROUND As String
+Public RID_RESXLS_COST_Hours_Per_MD As String
+Public RID_RESXLS_COST_Indexes_And_References As String
+Public RID_RESXLS_COST_Invalid_Password_Entered As String
+Public RID_RESXLS_COST_Invalid_Worksheet_Name As String
+Public RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly As String
+Public RID_RESXLS_COST_Issue__256_sheet_limit_exceeded As String
+Public RID_RESXLS_COST_Issue__32000_row_limit_exceeded As String
+Public RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters As String
+Public RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific As String
+Public RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7 As String
+Public RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7 As String
+Public RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration As String
+Public RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO As String
+Public RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7 As String
+Public RID_RESXLS_COST_Issue__External_references_are_windows_specific As String
+Public RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset As String
+Public RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced As String
+Public RID_RESXLS_COST_Issue__Incorrect_password_entered As String
+Public RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration As String
+Public RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis As String
+Public RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent As String
+Public RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7 As String
+Public RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic As String
+Public RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip As String
+Public RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7 As String
+Public RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7 As String
+Public RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost As String
+Public RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7 As String
+Public RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue As String
+Public RID_RESXLS_COST_Issue__Print_wide_pages_not_supported As String
+Public RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word As String
+Public RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent As String
+Public RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7 As String
+Public RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration As String
+Public RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field As String
+Public RID_RESXLS_COST_Issue__Unsupported_formatting_set As String
+Public RID_RESXLS_COST_Issue__Unsupported_function_type As String
+Public RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic As String
+Public RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic As String
+Public RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic As String
+Public RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis As String
+Public RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported As String
+Public RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported As String
+Public RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page As String
+Public RID_RESXLS_COST_Issue_Category As String
+Public RID_RESXLS_COST_Issue_Count As String
+Public RID_RESXLS_COST_Issue_Type As String
+Public RID_RESXLS_COST_Linked_OLE_Object As String
+Public RID_RESXLS_COST_Mail_Merge_Datasource As String
+Public RID_RESXLS_COST_Mail_Merge_Field As String
+Public RID_RESXLS_COST_Major_Issue As String
+Public RID_RESXLS_COST_MAX_SHEETS_WORKAROUND As String
+Public RID_RESXLS_COST_Maximum_Rows_Exceeded As String
+Public RID_RESXLS_COST_Maximum_Sheets_Exceeded As String
+Public RID_RESXLS_COST_Migration_Issues_Costs As String
+Public RID_RESXLS_COST_Movie As String
+Public RID_RESXLS_COST_NESTED_TABLE_WORKAROUND As String
+Public RID_RESXLS_COST_Nested_Tables As String
+Public RID_RESXLS_COST_Not_Planned As String
+Public RID_RESXLS_COST_Notes_And_Handouts As String
+Public RID_RESXLS_COST_Number_Of_External_References As String
+Public RID_RESXLS_COST_Number_Of_Lines As String
+Public RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules As String
+Public RID_RESXLS_COST_Number_of_Modules As String
+Public RID_RESXLS_COST_Number_of_Unique_Modules As String
+Public RID_RESXLS_COST_Numbering_Reference As String
+Public RID_RESXLS_COST_Numbering_Reference_Comment As String
+Public RID_RESXLS_COST_Object_In_Header_Footer As String
+Public RID_RESXLS_COST_Objects_And_Graphics As String
+Public RID_RESXLS_COST_Objects_Graphics_And_Frames As String
+Public RID_RESXLS_COST_Objects_Graphics_And_Textboxes As String
+Public RID_RESXLS_COST_Old_Workbook_Version As String
+Public RID_RESXLS_COST_OLE_Control As String
+Public RID_RESXLS_COST_OLECONTR_COST As String
+Public RID_RESXLS_COST_Page_Setup As String
+Public RID_RESXLS_COST_Password_Protected As String
+Public RID_RESXLS_COST_Password_Protection As String
+Public RID_RESXLS_COST_Pivot As String
+Public RID_RESXLS_COST_Planned_SO8 As String
+Public RID_RESXLS_COST_Portability As String
+Public RID_RESXLS_COST_PowerPoint As String
+Public RID_RESXLS_COST_PowerPoint_Totals As String
+Public RID_RESXLS_COST_Prepared_Issue_Count As String
+Public RID_RESXLS_COST_Prepared_Savings__min As String
+Public RID_RESXLS_COST_Properties___Module__Class_or_UserForm As String
+Public RID_RESXLS_COST_Remove_password_to_open As String
+Public RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name As String
+Public RID_RESXLS_COST_Rerun_analysis_with_correct_password As String
+Public RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7 As String
+Public RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows As String
+Public RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version As String
+Public RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource As String
+Public RID_RESXLS_COST_Sheet_Chart As String
+Public RID_RESXLS_COST_Status As String
+Public RID_RESXLS_COST_Table_Of_Authorities As String
+Public RID_RESXLS_COST_Table_Of_Authorities_Field As String
+Public RID_RESXLS_COST_Table_Of_Contents As String
+Public RID_RESXLS_COST_Tables As String
+Public RID_RESXLS_COST_TOC_ISSUE_WORKAROUND As String
+Public RID_RESXLS_COST_Total_Cost___MD As String
+Public RID_RESXLS_COST_User_Error As String
+Public RID_RESXLS_COST_User_Forms_Control_Count As String
+Public RID_RESXLS_COST_User_Forms_Control_Type_Count As String
+Public RID_RESXLS_COST_User_Forms_Count As String
+Public RID_RESXLS_COST_VBA_Macros As String
+Public RID_RESXLS_COST_Word As String
+Public RID_RESXLS_COST_Word_Totals As String
+Public RID_RESXLS_COST_Work_Around As String
+Public RID_RESXLS_COST_Workaround_Remove_protection_before_importing As String
+Public RID_RESXLS_COST_WorkbookProtection As String
+Public RID_RESXLS_DP_Accessed As String
+Public RID_RESXLS_DP_All_Analysed_Documents___Properties As String
+Public RID_RESXLS_DP_Application As String
+Public RID_RESXLS_DP_Based_on_Template As String
+Public RID_RESXLS_DP_Costs As String
+Public RID_RESXLS_DP_Created As String
+Public RID_RESXLS_DP_Document_Details As String
+Public RID_RESXLS_DP_Document_Issue_Costs As String
+Public RID_RESXLS_DP_Document_Migration_Issues As String
+Public RID_RESXLS_DP_Document_Name As String
+Public RID_RESXLS_DP_Document_Name_and_Path As String
+Public RID_RESXLS_DP_Issues_Complex_count As String
+Public RID_RESXLS_DP_Last_Saved_By As String
+Public RID_RESXLS_DP_Lines_of_Macro_Code As String
+Public RID_RESXLS_DP_Macro_Issues As String
+Public RID_RESXLS_DP_Macro_Migration_Costs As String
+Public RID_RESXLS_DP_Macro_Migration_Issues As String
+Public RID_RESXLS_DP_Migration_Issues As String
+Public RID_RESXLS_DP_Minor_Issues As String
+Public RID_RESXLS_DP_Modified As String
+Public RID_RESXLS_DP_Pages_Sheets_Slides As String
+Public RID_RESXLS_DP_Prepareable_Issues_Costs As String
+Public RID_RESXLS_DP_Prepared_Issues As String
+Public RID_RESXLS_DP_Printed As String
+Public RID_RESXLS_DP_Revision As String
+Public RID_RESXLS_DP_User_Form_Count As String
+Public RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details As String
+Public RID_RESXLS_ID_Application As String
+Public RID_RESXLS_ID_Column__Left As String
+Public RID_RESXLS_ID_Document_Name As String
+Public RID_RESXLS_ID_Document_Name_and_Path As String
+Public RID_RESXLS_ID_Issue_Category As String
+Public RID_RESXLS_ID_Issue_Details As String
+Public RID_RESXLS_ID_Issue_Type As String
+Public RID_RESXLS_ID_Line__Row__Top As String
+Public RID_RESXLS_ID_Location As String
+Public RID_RESXLS_ID_Location_Type As String
+Public RID_RESXLS_OV_3_to_6_months As String
+Public RID_RESXLS_OV_6_to_12_months As String
+Public RID_RESXLS_OV_Complex As String
+Public RID_RESXLS_OV_Cost_estimates_for_migration As String
+Public RID_RESXLS_OV_Costs As String
+Public RID_RESXLS_OV_Docs_with_DocumentMigrationIssues As String
+Public RID_RESXLS_OV_Document_Migration_Costs As String
+Public RID_RESXLS_OV_Document_Modification_Dates As String
+Public RID_RESXLS_OV_Document_Type As String
+Public RID_RESXLS_OV_Documents_with_Macro_Migration_Issues As String
+Public RID_RESXLS_OV_Excel As String
+Public RID_RESXLS_OV_Excel_Costs As String
+Public RID_RESXLS_OV_Excel_Spreadsheet As String
+Public RID_RESXLS_OV_Excel_Template As String
+Public RID_RESXLS_OV_GREATER_THAN_1_year As String
+Public RID_RESXLS_OV_Last_Modified As String
+Public RID_RESXLS_OV_LESS_3_months As String
+Public RID_RESXLS_OV_LESS_THAN3MONTHS As String
+Public RID_RESXLS_OV_Macro_Migration_Costs As String
+Public RID_RESXLS_OV_Medium As String
+Public RID_RESXLS_OV_Minor As String
+Public RID_RESXLS_OV_None As String
+Public RID_RESXLS_OV_Number As String
+Public RID_RESXLS_OV_Number_of_Documents_Analyzed As String
+Public RID_RESXLS_OV_NumberOfDocs As String
+Public RID_RESXLS_OV_Potential_savings_macro_conversion As String
+Public RID_RESXLS_OV_Potential_savings_prepared_docs As String
+Public RID_RESXLS_OV_PowerPoint As String
+Public RID_RESXLS_OV_PowerPoint_Costs As String
+Public RID_RESXLS_OV_PowerPoint_Document As String
+Public RID_RESXLS_OV_PowerPoint_Template As String
+Public RID_RESXLS_OV_Simple As String
+Public RID_RESXLS_OV_Total As String
+Public RID_RESXLS_OV_Totals As String
+Public RID_RESXLS_OV_Word As String
+Public RID_RESXLS_OV_Word_Costs As String
+Public RID_RESXLS_OV_Word_Document As String
+Public RID_RESXLS_OV_Word_Template As String
+Public RID_RESXLS_PP_Action_Settings As String
+Public RID_RESXLS_PP_Application As String
+Public RID_RESXLS_PP_Content___Document_Properties As String
+Public RID_RESXLS_PP_Document_Name_and_Path As String
+Public RID_RESXLS_PP_Fields As String
+Public RID_RESXLS_PP_Format As String
+Public RID_RESXLS_PP_Notes___Handouts As String
+Public RID_RESXLS_PP_Objects__Graphics___Textboxes As String
+Public RID_RESXLS_PP_Portability As String
+Public RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary As String
+Public RID_RESXLS_PP_PowerPoint_Presentation_Name As String
+Public RID_RESXLS_PP_VBA_Macros As String
+Public RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details As String
+Public RID_RESXLS_RD_Application As String
+Public RID_RESXLS_RD_Description As String
+Public RID_RESXLS_RD_Document_Name As String
+Public RID_RESXLS_RD_Document_Name_and_Path As String
+Public RID_RESXLS_RD_Location As String
+Public RID_RESXLS_RD_Reference As String
+Public RID_RESXLS_RD_Reference_Details As String
+Public RID_RESXLS_WI_Application As String
+Public RID_RESXLS_WI_Changes_and_Reviewing As String
+Public RID_RESXLS_WI_Content___Document_Properties As String
+Public RID_RESXLS_WI_Controls As String
+Public RID_RESXLS_WI_Document_Name_and_Path As String
+Public RID_RESXLS_WI_Fields As String
+Public RID_RESXLS_WI_Format As String
+Public RID_RESXLS_WI_Index_and_References As String
+Public RID_RESXLS_WI_Objects__Graphics____Frames As String
+Public RID_RESXLS_WI_Portability As String
+Public RID_RESXLS_WI_Tables As String
+Public RID_RESXLS_WI_VBA_Macros As String
+Public RID_RESXLS_WI_Word_Document_Name As String
+Public RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary As String
+Public RID_RESXLS_XL_Application As String
+Public RID_RESXLS_XL_Changes___Reviewing As String
+Public RID_RESXLS_XL_Charts___Tables As String
+Public RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary As String
+Public RID_RESXLS_XL_Excel_Spreadsheet_Name As String
+Public RID_RESXLS_XL_Format As String
+Public RID_RESXLS_XL_Functions As String
+Public RID_RESXLS_XL_Objects___Graphics As String
+
+Public RID_RESXLS_COST_DB_Query As String
+Public RID_RESXLS_COST_DB_Query_Comment As String
+Public RID_RESXLS_COST_LineStyle As String
+Public RID_RESXLS_COST_LineStyle_Comment As String
+Public RID_RESXLS_COST_Numbering As String
+Public RID_RESXLS_COST_Numbering_Comment As String
+Public RID_RESXLS_COST_Template As String
+Public RID_RESXLS_COST_Template_Comment As String
+Public RID_RESXLS_COST_DATEDIF_Note As String
+Public RID_RESXLS_COST_Tabstop As String
+Public RID_RESXLS_COST_Tabstop_Comment As String
+Public RID_RESXLS_COST_Transparent As String
+Public RID_RESXLS_COST_Transparent_Comment As String
+Public RID_RESXLS_COST_GradientStyle As String
+Public RID_RESXLS_COST_GradientStyle_Comment As String
+Public RID_RESXLS_COST_GradientStyle_Note As String
+Public RID_RESXLS_COST_Hyperlink As String
+Public RID_RESXLS_COST_Hyperlink_Comment As String
+Public RID_RESXLS_COST_HyperlinkSplit As String
+Public RID_RESXLS_COST_HyperlinkSplit_Comment As String
+Public RID_RESXLS_COST_Background As String
+Public RID_RESXLS_COST_Background_Comment As String
+
+Public Sub LoadResultsStrings(sdm As StringDataManager)
+ On Error Resume Next
+
+ sdm.InitString RID_RESXLS_COST_Action_Settings, "RID_RESXLS_COST_Action_Settings"
+ sdm.InitString RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field, "RID_RESXLS_COST_Add_custom_properties_to_document_Properties_Summary_Comments_field"
+ sdm.InitString RID_RESXLS_COST_Additional_Weighting_Factors, "RID_RESXLS_COST_Additional_Weighting_Factors"
+ sdm.InitString RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook, "RID_RESXLS_COST_All_sheets__256_will_need_to_be_moved_to_a_new_workbook"
+ sdm.InitString RID_RESXLS_COST_Appearance, "RID_RESXLS_COST_Appearance"
+ sdm.InitString RID_RESXLS_COST_Application, "RID_RESXLS_COST_Application"
+ sdm.InitString RID_RESXLS_COST_Border_Styles, "RID_RESXLS_COST_Border_Styles"
+ sdm.InitString RID_RESXLS_COST_Cell_Attributes, "RID_RESXLS_COST_Cell_Attributes"
+ sdm.InitString RID_RESXLS_COST_CELL_SPAN_WORKAROUND, "RID_RESXLS_COST_CELL_SPAN_WORKAROUND"
+ sdm.InitString RID_RESXLS_COST_Cell_Spanning_Page, "RID_RESXLS_COST_Cell_Spanning_Page"
+ sdm.InitString RID_RESXLS_COST_ChangesAndReviewing, "RID_RESXLS_COST_ChangesAndReviewing"
+ sdm.InitString RID_RESXLS_COST_Charts_And_Tables, "RID_RESXLS_COST_Charts_And_Tables"
+ sdm.InitString RID_RESXLS_COST_Comment, "RID_STR_WORD_SUBISSUE_COMMENT"
+ sdm.InitString RID_RESXLS_COST_Content_And_Document_Properties, "RID_RESXLS_COST_Content_And_Document_Properties"
+ sdm.InitString RID_RESXLS_COST_ContentAndDocumentProperties, "RID_RESXLS_COST_ContentAndDocumentProperties"
+ sdm.InitString RID_RESXLS_COST_Controls, "RID_RESXLS_COST_Controls"
+ sdm.InitString RID_RESXLS_COST_Cost, "RID_RESXLS_COST_Cost"
+ sdm.InitString RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min, "RID_RESXLS_COST_Cost__In_simple_cases_cut_and_paste_to_new_sheet_3___5_min"
+ sdm.InitString RID_RESXLS_COST_COST_0, "RID_RESXLS_COST_COST_0"
+ sdm.InitString RID_RESXLS_COST_COST_EMBED_CHART, "RID_RESXLS_COST_COST_EMBED_CHART"
+ sdm.InitString RID_RESXLS_COST_COST_ERROR_TYPE, "RID_RESXLS_COST_COST_ERROR_TYPE"
+ sdm.InitString RID_RESXLS_COST_COST_INFO, "RID_RESXLS_COST_COST_INFO"
+ sdm.InitString RID_RESXLS_COST_COST_INVAL_PASS, "RID_RESXLS_COST_COST_INVAL_PASS"
+ sdm.InitString RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME, "RID_RESXLS_COST_COST_INVALID_WORKSHEET_NAME"
+ sdm.InitString RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on, "RID_RESXLS_COST_Cost_of_4_min_per_line__takes_no_account_of_complexity_of_code__number_of_comment_lines_and_so_on"
+ sdm.InitString RID_RESXLS_COST_Cost_per_Issue_or_Factor__min, "RID_RESXLS_COST_Cost_per_Issue_or_Factor__min"
+ sdm.InitString RID_RESXLS_COST_COST_PIVOT, "RID_RESXLS_COST_COST_PIVOT"
+ sdm.InitString RID_RESXLS_COST_COST_SHEET_CHART, "RID_RESXLS_COST_COST_SHEET_CHART"
+ sdm.InitString RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls, "RID_RESXLS_COST_Cost_variations_occur_because_of_the_use_of_macros_with_controls"
+ sdm.InitString RID_RESXLS_COST_COST_VBA_CONT_TYPE, "RID_RESXLS_COST_COST_VBA_CONT_TYPE"
+ sdm.InitString RID_RESXLS_COST_COST_VBA_CONTROLS, "RID_RESXLS_COST_COST_VBA_CONTROLS"
+ sdm.InitString RID_RESXLS_COST_COST_VBA_FORMS, "RID_RESXLS_COST_COST_VBA_FORMS"
+ sdm.InitString RID_RESXLS_COST_COST_VBA_LOC, "RID_RESXLS_COST_COST_VBA_LOC"
+ sdm.InitString RID_RESXLS_COST_COST_VBA_PROPS, "RID_RESXLS_COST_COST_VBA_PROPS"
+ sdm.InitString RID_RESXLS_COST_Costs__min, "RID_RESXLS_COST_Costs__min"
+ sdm.InitString RID_RESXLS_COST_Custom_Bullet_List, "RID_RESXLS_COST_Custom_Bullet_List"
+ sdm.InitString RID_RESXLS_COST_Document_Custom_Properties, "RID_RESXLS_COST_Document_Custom_Properties"
+ sdm.InitString RID_RESXLS_COST_Document_Parts_Protection, "RID_RESXLS_COST_Document_Parts_Protection"
+ sdm.InitString RID_RESXLS_COST_Embedded_Chart, "RID_RESXLS_COST_Embedded_Chart"
+ sdm.InitString RID_RESXLS_COST_embedded_objects, "RID_RESXLS_COST_embedded_objects"
+ sdm.InitString RID_RESXLS_COST_Embedded_OLE_Object, "RID_RESXLS_COST_Embedded_OLE_Object"
+ sdm.InitString RID_RESXLS_COST_Excel, "RID_RESXLS_COST_Excel"
+ sdm.InitString RID_RESXLS_COST_Excel_Totals, "RID_RESXLS_COST_Excel_Totals"
+ sdm.InitString RID_RESXLS_COST_External, "RID_RESXLS_COST_External"
+ sdm.InitString RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm, "RID_RESXLS_COST_External_References_In_Macro___Module__Class_or_UserForm"
+ sdm.InitString RID_RESXLS_COST_Factor_Count, "RID_RESXLS_COST_Factor_Count"
+ sdm.InitString RID_RESXLS_COST_Fields, "RID_RESXLS_COST_Fields"
+ sdm.InitString RID_RESXLS_COST_Filters, "RID_RESXLS_COST_Filters"
+ sdm.InitString RID_RESXLS_COST_Fixed_SO7, "RID_RESXLS_COST_Fixed_SO7"
+ sdm.InitString RID_RESXLS_COST_Form_Field, "RID_RESXLS_COST_Form_Field"
+ sdm.InitString RID_RESXLS_COST_Format, "RID_RESXLS_COST_Format"
+ sdm.InitString RID_RESXLS_COST_Functions, "RID_RESXLS_COST_Functions"
+ sdm.InitString RID_RESXLS_COST_HEADERFOOTER_WORKAROUND, "RID_RESXLS_COST_HEADERFOOTER_WORKAROUND"
+ sdm.InitString RID_RESXLS_COST_Hours_Per_MD, "RID_RESXLS_COST_Hours_Per_MD"
+ sdm.InitString RID_RESXLS_COST_Indexes_And_References, "RID_RESXLS_COST_Indexes_And_References"
+ sdm.InitString RID_RESXLS_COST_Invalid_Password_Entered, "RID_RESXLS_COST_Invalid_Password_Entered"
+ sdm.InitString RID_RESXLS_COST_Invalid_Worksheet_Name, "RID_RESXLS_COST_Invalid_Worksheet_Name"
+ sdm.InitString RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly, "RID_RESXLS_COST_Issue__18_of_the_24_table_border_styles_do_not_display_correctly"
+ sdm.InitString RID_RESXLS_COST_Issue__256_sheet_limit_exceeded, "RID_RESXLS_COST_Issue__256_sheet_limit_exceeded"
+ sdm.InitString RID_RESXLS_COST_Issue__32000_row_limit_exceeded, "RID_RESXLS_COST_Issue__32000_row_limit_exceeded"
+ sdm.InitString RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters, "RID_RESXLS_COST_Issue__A_worksheet_in_the_workbook_has_a_name_with_invalid_characters"
+ sdm.InitString RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific, "RID_RESXLS_COST_Issue__Calls_to_windows_API_functions_are_windows_specific"
+ sdm.InitString RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7, "RID_RESXLS_COST_Issue__Chart_support_is_limited_in_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7, "RID_RESXLS_COST_Issue__Comments_are_lost_on_migration_to_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration, "RID_RESXLS_COST_Issue__Custom_Properties_are_lost_on_migration"
+ sdm.InitString RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO, "RID_RESXLS_COST_Issue__Document_is_password_protected_and_cannot_be_opened_by_SO"
+ sdm.InitString RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7, "RID_RESXLS_COST_Issue__External_functions_not_supported_by_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__External_references_are_windows_specific, "RID_RESXLS_COST_Issue__External_references_are_windows_specific"
+ sdm.InitString RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset, "RID_RESXLS_COST_Issue__Fields_are_imported_but_need_to_have_the_link_to_datasource_reset"
+ sdm.InitString RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced, "RID_RESXLS_COST_Issue__Graphics___frames_in_header_footer_tend_to_be_misplaced"
+ sdm.InitString RID_RESXLS_COST_Issue__Incorrect_password_entered, "RID_RESXLS_COST_Issue__Incorrect_password_entered"
+ sdm.InitString RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration, "RID_RESXLS_COST_Issue__Information_relating_to_the_data_source_is_lost_in_migration"
+ sdm.InitString RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis, "RID_RESXLS_COST_Issue__Invalid_password_entered_Rerun_analysis"
+ sdm.InitString RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent, "RID_RESXLS_COST_Issue__Lost_during_migration_No_StarOffice_equivalent"
+ sdm.InitString RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7, "RID_RESXLS_COST_Issue__Macros_from_old_workbook_versions_do_not_import_into_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic, "RID_RESXLS_COST_Issue__Modules_will_need_porting_to_StarOffice_Basic"
+ sdm.InitString RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip, "RID_RESXLS_COST_Issue__Most_migrate_ok_but_do_not_roundtrip"
+ sdm.InitString RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7, "RID_RESXLS_COST_Issue__Movies_are_not_supported_by_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7, "RID_RESXLS_COST_Issue__Need_to_set_these_to_be_included_in_TOC_in_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost, "RID_RESXLS_COST_Issue__Password_protection_of_comments__tracked_changes_and_forms_is_lost"
+ sdm.InitString RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7, "RID_RESXLS_COST_Issue__Pivot_charts_are_not_supported_by_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue, "RID_RESXLS_COST_Issue__Presents_a_cross_platform_interoperability_issue"
+ sdm.InitString RID_RESXLS_COST_Issue__Print_wide_pages_not_supported, "RID_RESXLS_COST_Issue__Print_wide_pages_not_supported"
+ sdm.InitString RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word, "RID_RESXLS_COST_Issue__Shading_can_be_applied_to_fields_and_to_controls_separately_in_Word"
+ sdm.InitString RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent, "RID_RESXLS_COST_Issue__Table_imported_as_text_as_no_StarOffice_equivalent"
+ sdm.InitString RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7, "RID_RESXLS_COST_Issue__Tables_nested_in_tables_are_not_supported_by_SO7"
+ sdm.InitString RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration, "RID_RESXLS_COST_Issue__Tabs_are_incorrect_after_migration"
+ sdm.InitString RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field, "RID_RESXLS_COST_Issue__Text_form_fields_roundtrip_as_Fill_In_field"
+ sdm.InitString RID_RESXLS_COST_Issue__Unsupported_formatting_set, "RID_RESXLS_COST_Issue__Unsupported_formatting_set"
+ sdm.InitString RID_RESXLS_COST_Issue__Unsupported_function_type, "RID_RESXLS_COST_Issue__Unsupported_function_type"
+ sdm.InitString RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic, "RID_RESXLS_COST_Issue__Userform_controls_will_need_porting_to_StarOffice_Basic"
+ sdm.InitString RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic, "RID_RESXLS_COST_Issue__Userforms_controls_will_need_porting_to_StarOffice_Basic"
+ sdm.InitString RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic, "RID_RESXLS_COST_Issue__Userforms_will_need_porting_to_StarOffice_Basic"
+ sdm.InitString RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis, "RID_RESXLS_COST_Issue__VBProject_is_password_protected_Remove_password__rerun_analysis"
+ sdm.InitString RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported, "RID_RESXLS_COST_Issue__Will_need_refreshing_in_SO7_External_datasources_and_functions_are_not_supported"
+ sdm.InitString RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported, "RID_RESXLS_COST_Issue__Workbook_protection_is_not_supported"
+ sdm.InitString RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page, "RID_RESXLS_COST_Issue__Writer_cannot_correctly_display_cells_spanning_more_than_1_page"
+ sdm.InitString RID_RESXLS_COST_Issue_Category, "RID_RESXLS_COST_Issue_Category"
+ sdm.InitString RID_RESXLS_COST_Issue_Count, "RID_RESXLS_COST_Issue_Count"
+ sdm.InitString RID_RESXLS_COST_Issue_Type, "RID_RESXLS_COST_Issue_Type"
+ sdm.InitString RID_RESXLS_COST_Linked_OLE_Object, "RID_RESXLS_COST_Linked_OLE_Object"
+ sdm.InitString RID_RESXLS_COST_Mail_Merge_Datasource, "RID_RESXLS_COST_Mail_Merge_Datasource"
+ sdm.InitString RID_RESXLS_COST_Mail_Merge_Field, "RID_RESXLS_COST_Mail_Merge_Field"
+ sdm.InitString RID_RESXLS_COST_Major_Issue, "RID_RESXLS_COST_Major_Issue"
+ sdm.InitString RID_RESXLS_COST_MAX_SHEETS_WORKAROUND, "RID_RESXLS_COST_MAX_SHEETS_WORKAROUND"
+ sdm.InitString RID_RESXLS_COST_Maximum_Rows_Exceeded, "RID_RESXLS_COST_Maximum_Rows_Exceeded"
+ sdm.InitString RID_RESXLS_COST_Maximum_Sheets_Exceeded, "RID_RESXLS_COST_Maximum_Sheets_Exceeded"
+ sdm.InitString RID_RESXLS_COST_Migration_Issues_Costs, "RID_RESXLS_COST_Migration_Issues_Costs"
+ sdm.InitString RID_RESXLS_COST_Movie, "RID_RESXLS_COST_Movie"
+ sdm.InitString RID_RESXLS_COST_NESTED_TABLE_WORKAROUND, "RID_RESXLS_COST_NESTED_TABLE_WORKAROUND"
+ sdm.InitString RID_RESXLS_COST_Nested_Tables, "RID_RESXLS_COST_Nested_Tables"
+ sdm.InitString RID_RESXLS_COST_Not_Planned, "RID_RESXLS_COST_Not_Planned"
+ sdm.InitString RID_RESXLS_COST_Notes_And_Handouts, "RID_RESXLS_COST_Notes_And_Handouts"
+ sdm.InitString RID_RESXLS_COST_Number_Of_External_References, "RID_RESXLS_COST_Number_Of_External_References"
+ sdm.InitString RID_RESXLS_COST_Number_Of_Lines, "RID_RESXLS_COST_Number_Of_Lines"
+ sdm.InitString RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules, "RID_RESXLS_COST_Number_of_Lines_in_Unique_Modules"
+ sdm.InitString RID_RESXLS_COST_Number_of_Modules, "RID_RESXLS_COST_Number_of_Modules"
+ sdm.InitString RID_RESXLS_COST_Number_of_Unique_Modules, "RID_RESXLS_COST_Number_of_Unique_Modules"
+ sdm.InitString RID_RESXLS_COST_Numbering_Reference, "RID_RESXLS_COST_Numbering_Reference"
+ sdm.InitString RID_RESXLS_COST_Numbering_Reference_Comment, "RID_RESXLS_COST_Numbering_Reference_Comment"
+ sdm.InitString RID_RESXLS_COST_Object_In_Header_Footer, "RID_RESXLS_COST_Object_In_Header_Footer"
+ sdm.InitString RID_RESXLS_COST_Objects_And_Graphics, "RID_RESXLS_COST_Objects_And_Graphics"
+ sdm.InitString RID_RESXLS_COST_Objects_Graphics_And_Frames, "RID_RESXLS_COST_Objects_Graphics_And_Frames"
+ sdm.InitString RID_RESXLS_COST_Objects_Graphics_And_Textboxes, "RID_RESXLS_COST_Objects_Graphics_And_Textboxes"
+ sdm.InitString RID_RESXLS_COST_Old_Workbook_Version, "RID_RESXLS_COST_Old_Workbook_Version"
+ sdm.InitString RID_RESXLS_COST_OLE_Control, "RID_RESXLS_COST_OLE_Control"
+ sdm.InitString RID_RESXLS_COST_OLECONTR_COST, "RID_RESXLS_COST_OLECONTR_COST"
+ sdm.InitString RID_RESXLS_COST_Page_Setup, "RID_RESXLS_COST_Page_Setup"
+ sdm.InitString RID_RESXLS_COST_Password_Protected, "RID_RESXLS_COST_Password_Protected"
+ sdm.InitString RID_RESXLS_COST_Password_Protection, "RID_RESXLS_COST_Password_Protection"
+ sdm.InitString RID_RESXLS_COST_Pivot, "RID_RESXLS_COST_Pivot"
+ sdm.InitString RID_RESXLS_COST_Planned_SO8, "RID_RESXLS_COST_Planned_SO8"
+ sdm.InitString RID_RESXLS_COST_Portability, "RID_RESXLS_COST_Portability"
+ sdm.InitString RID_RESXLS_COST_PowerPoint, "RID_RESXLS_COST_PowerPoint"
+ sdm.InitString RID_RESXLS_COST_PowerPoint_Totals, "RID_RESXLS_COST_PowerPoint_Totals"
+ sdm.InitString RID_RESXLS_COST_Prepared_Issue_Count, "RID_RESXLS_COST_Prepared_Issue_Count"
+ sdm.InitString RID_RESXLS_COST_Prepared_Savings__min, "RID_RESXLS_COST_Prepared_Savings__min"
+ sdm.InitString RID_RESXLS_COST_Properties___Module__Class_or_UserForm, "RID_RESXLS_COST_Properties___Module__Class_or_UserForm"
+ sdm.InitString RID_RESXLS_COST_Remove_password_to_open, "RID_RESXLS_COST_Remove_password_to_open"
+ sdm.InitString RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name, "RID_RESXLS_COST_Remove_the_invalid_characters_from_the_worksheet_name"
+ sdm.InitString RID_RESXLS_COST_Rerun_analysis_with_correct_password, "RID_RESXLS_COST_Rerun_analysis_with_correct_password"
+ sdm.InitString RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7, "RID_RESXLS_COST_Reset_link_to_Data_Base_having_setup_a_Datasource_in_SO7"
+ sdm.InitString RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows, "RID_RESXLS_COST_set_cost_factor_if_the_macro_has_to_be_ported_off_Windows"
+ sdm.InitString RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version, "RID_RESXLS_COST_Save_workbook_as_a_new_workbook_version"
+ sdm.InitString RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource, "RID_RESXLS_COST_Setup_Datasource_in_SO7_using_Tools__Datasource"
+ sdm.InitString RID_RESXLS_COST_Sheet_Chart, "RID_RESXLS_COST_Sheet_Chart"
+ sdm.InitString RID_RESXLS_COST_Status, "RID_RESXLS_COST_Status"
+ sdm.InitString RID_RESXLS_COST_Table_Of_Authorities, "RID_RESXLS_COST_Table_Of_Authorities"
+ sdm.InitString RID_RESXLS_COST_Table_Of_Authorities_Field, "RID_RESXLS_COST_Table_Of_Authorities_Field"
+ sdm.InitString RID_RESXLS_COST_Table_Of_Contents, "RID_RESXLS_COST_Table_Of_Contents"
+ sdm.InitString RID_RESXLS_COST_Tables, "RID_RESXLS_COST_Tables"
+ sdm.InitString RID_RESXLS_COST_TOC_ISSUE_WORKAROUND, "RID_RESXLS_COST_TOC_ISSUE_WORKAROUND"
+ sdm.InitString RID_RESXLS_COST_Total_Cost___MD, "RID_RESXLS_COST_Total_Cost___MD"
+ sdm.InitString RID_RESXLS_COST_User_Error, "RID_RESXLS_COST_User_Error"
+ sdm.InitString RID_RESXLS_COST_User_Forms_Control_Count, "RID_RESXLS_COST_User_Forms_Control_Count"
+ sdm.InitString RID_RESXLS_COST_User_Forms_Control_Type_Count, "RID_RESXLS_COST_User_Forms_Control_Type_Count"
+ sdm.InitString RID_RESXLS_COST_User_Forms_Count, "RID_RESXLS_COST_User_Forms_Count"
+ sdm.InitString RID_RESXLS_COST_VBA_Macros, "RID_RESXLS_COST_VBA_Macros"
+ sdm.InitString RID_RESXLS_COST_Word, "RID_RESXLS_COST_Word"
+ sdm.InitString RID_RESXLS_COST_Word_Totals, "RID_RESXLS_COST_Word_Totals"
+ sdm.InitString RID_RESXLS_COST_Work_Around, "RID_RESXLS_COST_Work_Around"
+ sdm.InitString RID_RESXLS_COST_Workaround_Remove_protection_before_importing, "RID_RESXLS_COST_Workaround_Remove_protection_before_importing"
+ sdm.InitString RID_RESXLS_COST_WorkbookProtection, "RID_RESXLS_COST_WorkbookProtection"
+ sdm.InitString RID_RESXLS_DP_Accessed, "RID_RESXLS_DP_Accessed"
+ sdm.InitString RID_RESXLS_DP_All_Analysed_Documents___Properties, "RID_RESXLS_DP_All_Analysed_Documents___Properties"
+ sdm.InitString RID_RESXLS_DP_Application, "RID_RESXLS_DP_Application"
+ sdm.InitString RID_RESXLS_DP_Based_on_Template, "RID_RESXLS_DP_Based_on_Template"
+ sdm.InitString RID_RESXLS_DP_Costs, "RID_RESXLS_DP_Costs"
+ sdm.InitString RID_RESXLS_DP_Created, "RID_RESXLS_DP_Created"
+ sdm.InitString RID_RESXLS_DP_Document_Details, "RID_RESXLS_DP_Document_Details"
+ sdm.InitString RID_RESXLS_DP_Document_Issue_Costs, "RID_RESXLS_DP_Document_Issue_Costs"
+ sdm.InitString RID_RESXLS_DP_Document_Migration_Issues, "RID_RESXLS_DP_Document_Migration_Issues"
+ sdm.InitString RID_RESXLS_DP_Document_Name, "RID_RESXLS_DP_Document_Name"
+ sdm.InitString RID_RESXLS_DP_Document_Name_and_Path, "RID_RESXLS_DP_Document_Name_and_Path"
+ sdm.InitString RID_RESXLS_DP_Issues_Complex_count, "RID_RESXLS_DP_Issues_Complex_count"
+ sdm.InitString RID_RESXLS_DP_Last_Saved_By, "RID_RESXLS_DP_Last_Saved_By"
+ sdm.InitString RID_RESXLS_DP_Lines_of_Macro_Code, "RID_RESXLS_DP_Lines_of_Macro_Code"
+ sdm.InitString RID_RESXLS_DP_Macro_Issues, "RID_RESXLS_DP_Macro_Issues"
+ sdm.InitString RID_RESXLS_DP_Macro_Migration_Costs, "RID_RESXLS_DP_Macro_Migration_Costs"
+ sdm.InitString RID_RESXLS_DP_Macro_Migration_Issues, "RID_RESXLS_DP_Macro_Migration_Issues"
+ sdm.InitString RID_RESXLS_DP_Migration_Issues, "RID_RESXLS_DP_Migration_Issues"
+ sdm.InitString RID_RESXLS_DP_Minor_Issues, "RID_RESXLS_DP_Minor_Issues"
+ sdm.InitString RID_RESXLS_DP_Modified, "RID_RESXLS_DP_Modified"
+ sdm.InitString RID_RESXLS_DP_Pages_Sheets_Slides, "RID_RESXLS_DP_Pages_Sheets_Slides"
+ sdm.InitString RID_RESXLS_DP_Prepareable_Issues_Costs, "RID_RESXLS_DP_Prepareable_Issues_Costs"
+ sdm.InitString RID_RESXLS_DP_Prepared_Issues, "RID_RESXLS_DP_Prepared_Issues"
+ sdm.InitString RID_RESXLS_DP_Printed, "RID_RESXLS_DP_Printed"
+ sdm.InitString RID_RESXLS_DP_Revision, "RID_RESXLS_DP_Revision"
+ sdm.InitString RID_RESXLS_DP_User_Form_Count, "RID_RESXLS_DP_User_Form_Count"
+ sdm.InitString RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details, "RID_RESXLS_ID_All_Documents_with_Issues___Issue_Details"
+ sdm.InitString RID_RESXLS_ID_Application, "RID_RESXLS_ID_Application"
+ sdm.InitString RID_RESXLS_ID_Column__Left, "RID_RESXLS_ID_Column__Left"
+ sdm.InitString RID_RESXLS_ID_Document_Name, "RID_RESXLS_ID_Document_Name"
+ sdm.InitString RID_RESXLS_ID_Document_Name_and_Path, "RID_RESXLS_ID_Document_Name_and_Path"
+ sdm.InitString RID_RESXLS_ID_Issue_Category, "RID_RESXLS_ID_Issue_Category"
+ sdm.InitString RID_RESXLS_ID_Issue_Details, "RID_RESXLS_ID_Issue_Details"
+ sdm.InitString RID_RESXLS_ID_Issue_Type, "RID_RESXLS_ID_Issue_Type"
+ sdm.InitString RID_RESXLS_ID_Line__Row__Top, "RID_RESXLS_ID_Line__Row__Top"
+ sdm.InitString RID_RESXLS_ID_Location, "RID_RESXLS_ID_Location"
+ sdm.InitString RID_RESXLS_ID_Location_Type, "RID_RESXLS_ID_Location_Type"
+ sdm.InitString RID_RESXLS_OV_3_to_6_months, "RID_RESXLS_OV_3_to_6_months"
+ sdm.InitString RID_RESXLS_OV_6_to_12_months, "RID_RESXLS_OV_6_to_12_months"
+ sdm.InitString RID_RESXLS_OV_Complex, "RID_RESXLS_OV_Complex"
+ sdm.InitString RID_RESXLS_OV_Cost_estimates_for_migration, "RID_RESXLS_OV_Cost_estimates_for_migration"
+ sdm.InitString RID_RESXLS_OV_Costs, "RID_RESXLS_OV_Costs"
+ sdm.InitString RID_RESXLS_OV_Docs_with_DocumentMigrationIssues, "RID_RESXLS_OV_Docs_with_DocumentMigrationIssues"
+ sdm.InitString RID_RESXLS_OV_Document_Migration_Costs, "RID_RESXLS_OV_Document_Migration_Costs"
+ sdm.InitString RID_RESXLS_OV_Document_Modification_Dates, "RID_RESXLS_OV_Document_Modification_Dates"
+ sdm.InitString RID_RESXLS_OV_Document_Type, "RID_RESXLS_OV_Document_Type"
+ sdm.InitString RID_RESXLS_OV_Documents_with_Macro_Migration_Issues, "RID_RESXLS_OV_Documents_with_Macro_Migration_Issues"
+ sdm.InitString RID_RESXLS_OV_Excel, "RID_RESXLS_OV_Excel"
+ sdm.InitString RID_RESXLS_OV_Excel_Costs, "RID_RESXLS_OV_Excel_Costs"
+ sdm.InitString RID_RESXLS_OV_Excel_Spreadsheet, "RID_RESXLS_OV_Excel_Spreadsheet"
+ sdm.InitString RID_RESXLS_OV_Excel_Template, "RID_RESXLS_OV_Excel_Template"
+ sdm.InitString RID_RESXLS_OV_GREATER_THAN_1_year, "RID_RESXLS_OV_GREATER_THAN_1_year"
+ sdm.InitString RID_RESXLS_OV_Last_Modified, "RID_RESXLS_OV_Last_Modified"
+ sdm.InitString RID_RESXLS_OV_LESS_3_months, "RID_RESXLS_OV_LESS_3_months"
+ sdm.InitString RID_RESXLS_OV_LESS_THAN3MONTHS, "RID_RESXLS_OV_LESS_THAN3MONTHS"
+ sdm.InitString RID_RESXLS_OV_Macro_Migration_Costs, "RID_RESXLS_OV_Macro_Migration_Costs"
+ sdm.InitString RID_RESXLS_OV_Medium, "RID_RESXLS_OV_Medium"
+ sdm.InitString RID_RESXLS_OV_Minor, "RID_RESXLS_OV_Minor"
+ sdm.InitString RID_RESXLS_OV_None, "RID_RESXLS_OV_None"
+ sdm.InitString RID_RESXLS_OV_Number, "RID_RESXLS_OV_Number"
+ sdm.InitString RID_RESXLS_OV_Number_of_Documents_Analyzed, "RID_RESXLS_OV_Number_of_Documents_Analyzed"
+ sdm.InitString RID_RESXLS_OV_NumberOfDocs, "RID_RESXLS_OV_NumberOfDocs"
+ sdm.InitString RID_RESXLS_OV_Potential_savings_macro_conversion, "RID_RESXLS_OV_Potential_savings_macro_conversion"
+ sdm.InitString RID_RESXLS_OV_Potential_savings_prepared_docs, "RID_RESXLS_OV_Potential_savings_prepared_docs"
+ sdm.InitString RID_RESXLS_OV_PowerPoint, "RID_RESXLS_OV_PowerPoint"
+ sdm.InitString RID_RESXLS_OV_PowerPoint_Costs, "RID_RESXLS_OV_PowerPoint_Costs"
+ sdm.InitString RID_RESXLS_OV_PowerPoint_Document, "RID_RESXLS_OV_PowerPoint_Document"
+ sdm.InitString RID_RESXLS_OV_PowerPoint_Template, "RID_RESXLS_OV_PowerPoint_Template"
+ sdm.InitString RID_RESXLS_OV_Simple, "RID_RESXLS_OV_Simple"
+ sdm.InitString RID_RESXLS_OV_Total, "RID_RESXLS_OV_Total"
+ sdm.InitString RID_RESXLS_OV_Totals, "RID_RESXLS_OV_Totals"
+ sdm.InitString RID_RESXLS_OV_Word, "RID_RESXLS_OV_Word"
+ sdm.InitString RID_RESXLS_OV_Word_Costs, "RID_RESXLS_OV_Word_Costs"
+ sdm.InitString RID_RESXLS_OV_Word_Document, "RID_RESXLS_OV_Word_Document"
+ sdm.InitString RID_RESXLS_OV_Word_Template, "RID_RESXLS_OV_Word_Template"
+ sdm.InitString RID_RESXLS_PP_Action_Settings, "RID_RESXLS_PP_Action_Settings"
+ sdm.InitString RID_RESXLS_PP_Application, "RID_RESXLS_PP_Application"
+ sdm.InitString RID_RESXLS_PP_Content___Document_Properties, "RID_RESXLS_PP_Content___Document_Properties"
+ sdm.InitString RID_RESXLS_PP_Document_Name_and_Path, "RID_RESXLS_PP_Document_Name_and_Path"
+ sdm.InitString RID_RESXLS_PP_Fields, "RID_RESXLS_PP_Fields"
+ sdm.InitString RID_RESXLS_PP_Format, "RID_RESXLS_PP_Format"
+ sdm.InitString RID_RESXLS_PP_Notes___Handouts, "RID_RESXLS_PP_Notes___Handouts"
+ sdm.InitString RID_RESXLS_PP_Objects__Graphics___Textboxes, "RID_RESXLS_PP_Objects__Graphics___Textboxes"
+ sdm.InitString RID_RESXLS_PP_Portability, "RID_RESXLS_PP_Portability"
+ sdm.InitString RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary, "RID_RESXLS_PP_PowerPoint_Documents_with_Issues___Issue_Summary"
+ sdm.InitString RID_RESXLS_PP_PowerPoint_Presentation_Name, "RID_RESXLS_PP_PowerPoint_Presentation_Name"
+ sdm.InitString RID_RESXLS_PP_VBA_Macros, "RID_RESXLS_PP_VBA_Macros"
+ sdm.InitString RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details, "RID_RESXLS_RD_All_Documents_with_Macros___Reference_Details"
+ sdm.InitString RID_RESXLS_RD_Application, "RID_RESXLS_RD_Application"
+ sdm.InitString RID_RESXLS_RD_Description, "RID_RESXLS_RD_Description"
+ sdm.InitString RID_RESXLS_RD_Document_Name, "RID_RESXLS_RD_Document_Name"
+ sdm.InitString RID_RESXLS_RD_Document_Name_and_Path, "RID_RESXLS_RD_Document_Name_and_Path"
+ sdm.InitString RID_RESXLS_RD_Location, "RID_RESXLS_RD_Location"
+ sdm.InitString RID_RESXLS_RD_Reference, "RID_RESXLS_RD_Reference"
+ sdm.InitString RID_RESXLS_RD_Reference_Details, "RID_RESXLS_RD_Reference_Details"
+ sdm.InitString RID_RESXLS_WI_Application, "RID_RESXLS_WI_Application"
+ sdm.InitString RID_RESXLS_WI_Changes_and_Reviewing, "RID_RESXLS_WI_Changes_and_Reviewing"
+ sdm.InitString RID_RESXLS_WI_Content___Document_Properties, "RID_RESXLS_WI_Content___Document_Properties"
+ sdm.InitString RID_RESXLS_WI_Controls, "RID_RESXLS_WI_Controls"
+ sdm.InitString RID_RESXLS_WI_Document_Name_and_Path, "RID_RESXLS_WI_Document_Name_and_Path"
+ sdm.InitString RID_RESXLS_WI_Fields, "RID_RESXLS_WI_Fields"
+ sdm.InitString RID_RESXLS_WI_Format, "RID_RESXLS_WI_Format"
+ sdm.InitString RID_RESXLS_WI_Index_and_References, "RID_RESXLS_WI_Index_and_References"
+ sdm.InitString RID_RESXLS_WI_Objects__Graphics____Frames, "RID_RESXLS_WI_Objects__Graphics____Frames"
+ sdm.InitString RID_RESXLS_WI_Portability, "RID_RESXLS_WI_Portability"
+ sdm.InitString RID_RESXLS_WI_Tables, "RID_RESXLS_WI_Tables"
+ sdm.InitString RID_RESXLS_WI_VBA_Macros, "RID_RESXLS_WI_VBA_Macros"
+ sdm.InitString RID_RESXLS_WI_Word_Document_Name, "RID_RESXLS_WI_Word_Document_Name"
+ sdm.InitString RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary, "RID_RESXLS_WI_Word_Documents_with_Issues___Issue_Summary"
+ sdm.InitString RID_RESXLS_XL_Application, "RID_RESXLS_XL_Application"
+ sdm.InitString RID_RESXLS_XL_Changes___Reviewing, "RID_RESXLS_XL_Changes___Reviewing"
+ sdm.InitString RID_RESXLS_XL_Charts___Tables, "RID_RESXLS_XL_Charts___Tables"
+ sdm.InitString RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary, "RID_RESXLS_XL_Excel_Documents_with_Issues___Issue_Summary"
+ sdm.InitString RID_RESXLS_XL_Excel_Spreadsheet_Name, "RID_RESXLS_XL_Excel_Spreadsheet_Name"
+ sdm.InitString RID_RESXLS_XL_Format, "RID_RESXLS_XL_Format"
+ sdm.InitString RID_RESXLS_XL_Functions, "RID_RESXLS_XL_Functions"
+ sdm.InitString RID_RESXLS_XL_Objects___Graphics, "RID_RESXLS_XL_Objects___Graphics"
+
+ sdm.InitString RID_RESXLS_COST_DB_Query, "RID_RESXLS_COST_DB_Query"
+ sdm.InitString RID_RESXLS_COST_DB_Query_Comment, "RID_RESXLS_COST_DB_Query_Comment"
+ sdm.InitString RID_RESXLS_COST_LineStyle, "RID_RESXLS_COST_LineStyle"
+ sdm.InitString RID_RESXLS_COST_LineStyle_Comment, "RID_RESXLS_COST_LineStyle_Comment"
+ sdm.InitString RID_RESXLS_COST_Numbering, "RID_RESXLS_COST_Numbering"
+ sdm.InitString RID_RESXLS_COST_Numbering_Comment, "RID_RESXLS_COST_Numbering_Comment"
+ sdm.InitString RID_RESXLS_COST_Template, "RID_RESXLS_COST_Template"
+ sdm.InitString RID_RESXLS_COST_Template_Comment, "RID_RESXLS_COST_Template_Comment"
+ sdm.InitString RID_RESXLS_COST_DATEDIF_Note, "RID_RESXLS_COST_DATEDIF_Note"
+ sdm.InitString RID_RESXLS_COST_Tabstop, "RID_RESXLS_COST_Tabstop"
+ sdm.InitString RID_RESXLS_COST_Tabstop_Comment, "RID_RESXLS_COST_Tabstop_Comment"
+ sdm.InitString RID_RESXLS_COST_Transparent, "RID_RESXLS_COST_Transparent"
+ sdm.InitString RID_RESXLS_COST_Transparent_Comment, "RID_RESXLS_COST_Transparent_Comment"
+ sdm.InitString RID_RESXLS_COST_GradientStyle, "RID_RESXLS_COST_GradientStyle"
+ sdm.InitString RID_RESXLS_COST_GradientStyle_Comment, "RID_RESXLS_COST_GradientStyle_Comment"
+ sdm.InitString RID_RESXLS_COST_GradientStyle_Note, "RID_RESXLS_COST_GradientStyle_Note"
+ sdm.InitString RID_RESXLS_COST_Hyperlink, "RID_RESXLS_COST_Hyperlink"
+ sdm.InitString RID_RESXLS_COST_Hyperlink_Comment, "RID_RESXLS_COST_Hyperlink_Comment"
+ sdm.InitString RID_RESXLS_COST_HyperlinkSplit, "RID_RESXLS_COST_HyperlinkSplit"
+ sdm.InitString RID_RESXLS_COST_HyperlinkSplit_Comment, "RID_RESXLS_COST_HyperlinkSplit_Comment"
+ sdm.InitString RID_RESXLS_COST_Background, "RID_RESXLS_COST_Background"
+ sdm.InitString RID_RESXLS_COST_Background_Comment, "RID_RESXLS_COST_Background_Comment"
+
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/word/ApplicationSpecific.bas b/migrationanalysis/src/driver_docs/sources/word/ApplicationSpecific.bas
new file mode 100644
index 000000000000..8ab02518c0f8
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/word/ApplicationSpecific.bas
@@ -0,0 +1,158 @@
+Attribute VB_Name = "ApplicationSpecific"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: ApplicationSpecific.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+'** Issue Categories
+Public Const CID_INFORMATION_REFS = 0
+Public Const CID_CHANGES_AND_REVIEWING = 1 'no issue logged
+Public Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 2
+Public Const CID_CONTROLS = 3 'no issue logged
+Public Const CID_FIELDS = 4
+Public Const CID_FORMAT = 5
+Public Const CID_INDEX_AND_REFERENCES = 6
+Public Const CID_OBJECTS_GRAPHICS_FRAMES = 7
+Public Const CID_PORTABILITY = 8
+Public Const CID_TABLES = 9
+Public Const CID_VBA_MACROS = 10
+Public Const CID_WRITING_AIDS = 11
+Public Const CTOTAL_CATEGORIES = 11
+
+'** Word - XML Issue and SubIssue strings
+Public Const CSTR_ISSUE_CHANGES_AND_REVIEWING = "ChangesAndReviewing"
+Public Const CSTR_ISSUE_CONTROLS = "Controls"
+Public Const CSTR_ISSUE_FIELDS = "Fields"
+Public Const CSTR_ISSUE_INDEX_AND_REFERENCES = "IndexesAndReferences"
+Public Const CSTR_ISSUE_TABLES = "Tables"
+
+Public Const CSTR_SUBISSUE_APPEARANCE = "Appearance"
+Public Const CSTR_SUBISSUE_BORDER_STYLES = "BorderStyles"
+Public Const CSTR_SUBISSUE_CELL_SPAN_PAGE = "CellSpanningPage"
+Public Const CSTR_SUBISSUE_COMMENT = "Comment"
+Public Const CSTR_SUBISSUE_CUSTOM_BULLET_LIST = "CustomBulletList"
+Public Const CSTR_SUBISSUE_FORM_FIELD = "FormField"
+Public Const CSTR_SUBISSUE_MAILMERGE_DATASOURCE = "MailMergeDatasource"
+Public Const CSTR_SUBISSUE_MAILMERGE_FIELD = "MailMergeField"
+Public Const CSTR_SUBISSUE_NESTED_TABLES = "NestedTables"
+Public Const CSTR_SUBISSUE_TABLE_OF_AUTHORITIES = "TableOfAuthorities"
+Public Const CSTR_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD = "TableOfAuthoritiesField"
+Public Const CSTR_SUBISSUE_TABLE_OF_CONTENTS = "TableOfContents"
+'** END Word - XML Issue and SubIssue strings
+
+Public Const CAPPNAME_WORD = "Word"
+Public Const CAPPNAME_WORD_DOC = ".doc"
+Public Const CAPPNAME_WORD_DOT = ".dot"
+
+Public Const CAPPNAME_EXCEL = "Excel"
+Public Const CAPPNAME_EXCEL_DOC = ".xls"
+Public Const CAPPNAME_EXCEL_DOT = ".xlt"
+
+Public Const CAPPNAME_POWERPOINT = "PowerPoint"
+Public Const CAPPNAME_PP_DOC = ".ppt"
+Public Const CAPPNAME_PP_DOT = ".pot"
+
+Public CAPP_DOCPROP_LOCATION As String
+'Public Const CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_WORKBOOK
+'Public Const CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION
+
+Public Const CAPP_XMLDOCPROP_LOCATION = "Document"
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Workbook"
+'Public Const CAPP_XMLDOCPROP_LOCATION = "Presentation"
+
+Public Const CTHIS_DOCUMENT = "ThisDocument"
+Public Const CTOPLEVEL_PROJECT = "Project"
+
+Public Function getAppSpecificDocExt() As String
+ getAppSpecificDocExt = CAPPNAME_WORD_DOC
+End Function
+Public Function getAppSpecificTemplateExt() As String
+ getAppSpecificTemplateExt = CAPPNAME_WORD_DOT
+End Function
+Public Function getAppSpecificPath() As String
+ getAppSpecificPath = ActiveDocument.path
+End Function
+Public Function getAppSpecificApplicationName() As String
+ getAppSpecificApplicationName = CAPPNAME_WORD
+End Function
+
+Public Function getAppSpecificCustomDocProperties(currDoc As Document) As DocumentProperties
+ Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties
+End Function
+Public Function getAppSpecificCommentBuiltInDocProperty(currDoc As Document) As DocumentProperty
+ Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltInDocumentProperties(wdPropertyComments)
+End Function
+
+Public Function getAppSpecificVBProject(currDoc As Document) As VBProject
+ Set getAppSpecificVBProject = currDoc.VBProject
+End Function
+
+Public Function getAppSpecificOLEClassType(aShape As Shape) As String
+ Dim objType As String
+
+ If aShape.OLEFormat.ProgID = "" Then
+ objType = aShape.OLEFormat.ClassType
+ Else
+ objType = aShape.OLEFormat.ProgID
+ End If
+
+ getAppSpecificOLEClassType = objType
+End Function
+
+Public Sub SetAppToMinimized()
+ Application.WindowState = wdWindowStateMinimize
+ Application.Visible = False
+End Sub
+
+Public Sub LocalizeResources()
+ Dim wrdStrings As StringDataManager
+ Set wrdStrings = New StringDataManager
+
+ wrdStrings.InitStringData (GetResourceDataFileName(ThisDocument.path))
+ LoadCommonStrings wrdStrings
+ LoadWordStrings wrdStrings
+ LoadResultsStrings wrdStrings
+ Set wrdStrings = Nothing
+
+ 'SetWordDriverText
+End Sub
+
+' Set the loaded string variable into the fields in the document
+Private Sub SetWordDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT
+ ThisDocument.FormFields.item("RID_STR_WDVR_SOANA").Result = RID_STR_WDVR_SOANA
+ ThisDocument.FormFields.item("RID_STR_WDVR_INTRO").Result = RID_STR_WDVR_INTRO
+ ThisDocument.FormFields.item("RID_STR_WDVR_TITLE").Result = RID_STR_WDVR_TITLE
+ ThisDocument.FormFields.item("RID_STR_WDVR_PURPO").Result = RID_STR_WDVR_PURPO
+ ThisDocument.FormFields.item("RID_STR_WDVR_PARA1").Result = RID_STR_WDVR_PARA1
+ ThisDocument.FormFields.item("RID_STR_WDVR_ISSUE").Result = RID_STR_WDVR_ISSUE
+ ThisDocument.FormFields.item("RID_STR_WDVR_PARA2").Result = RID_STR_WDVR_PARA2
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/word/MigrationAnalyser.cls b/migrationanalysis/src/driver_docs/sources/word/MigrationAnalyser.cls
new file mode 100644
index 000000000000..d4093ffeec85
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/word/MigrationAnalyser.cls
@@ -0,0 +1,1524 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+END
+Attribute VB_Name = "MigrationAnalyser"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: MigrationAnalyser.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+'Class variables
+Private Enum HFIssueType
+ hfInline
+ hfShape
+ hfFrame
+End Enum
+
+Private Enum HFIssueLocation
+ hfHeader
+ hffooter
+End Enum
+
+
+Private Type ShapeInfo
+ top As Single
+ Height As Single
+End Type
+
+Private Type FrameInfo
+ Height As Single
+ VerticalPosition As Single
+End Type
+
+Private mAnalysis As DocumentAnalysis
+Private mOdd As Boolean
+Private mbFormFieldErrorLogged As Boolean
+Private mbRefFormFieldErrorLogged As Boolean
+
+'***ADDING-ISSUE: Use Following Skeleton as Guideline for Adding Issue
+' For complete list of all RID_STR_... for Issues (IssueType), SubIssues (SubType) and Attributes refer to:
+' word_res.bas and common_res.bas
+'
+' For complete list of all CID_... for Issue Categories(IssueID) and
+' CSTR_... for XML Issues (IssueTypeXML) and XML SubIssues (SubTypeXML) refer to:
+' ApplicationSpecific.bas and CommonMigrationAnalyser.bas
+'
+' You should not have to add any new Issue Categories or matching IssueTypes, only new SubIssues
+Sub Analyze_SKELETON()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_SKELETON"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_VBA_MACROS 'Issue Category
+ .IssueType = RID_STR_COMMON_ISSUE_VBA_MACROS 'Issue String
+ .SubType = RID_STR_COMMON_SUBISSUE_PROPERTIES 'SubIssue String
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_VBA_MACROS 'Non localised XML Issue String
+ .SubTypeXML = CSTR_SUBISSUE_PROPERTIES 'Non localised XML SubIssue String
+ .locationXML = .CXMLLocationDocument 'Non localised XML location
+
+ .SubLocation = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .Line = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+ .column = 0 'if not set will default to RID_STR_NOT_AVAILABLE_SHORTHAND
+
+ ' Add as many Attribute Value pairs as needed
+ ' Note: following must always be true - Attributes.Count = Values.Count
+ .Attributes.Add "AAA"
+ .Values.Add "foobar"
+
+ ' Use AddIssueDetailsNote to add notes to the Issue Details if required
+ ' Public Sub AddIssueDetailsNote(myIssue As IssueInfo, noteNum As Long, noteStr As String, _
+ ' Optional preStr As String = RID_STR_COMMON_NOTE_PRE)
+ ' Where preStr is prepended to the output, with "Note" as the default
+ AddIssueDetailsNote myIssue, 0, RID_STR_COMMON_NOTE_DOCUMENT_PROPERTIES_LOST
+
+ 'Only put this in if you have a preparation function added for this issue in CommonPreparation
+ 'or Preparation - NUll can be replaced with any variant if you want to pass info to the Prepare fnc
+ Call DoPreparation(mAnalysis, myIssue, "", Null, Null)
+
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) = _
+ mAnalysis.IssuesCountArray(CID_VBA_MACROS) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub DoAnalyse(fileName As String, userFormTypesDict As Scripting.Dictionary, _
+ startDir As String, storeToDir As String, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "DoAnalyse"
+ mAnalysis.name = fileName
+ Dim aDoc As Document
+ Dim bUnprotectError As Boolean
+ mAnalysis.TotalIssueTypes = CTOTAL_CATEGORIES
+ mbFormFieldErrorLogged = False
+ mbRefFormFieldErrorLogged = False
+
+ 'Turn off any AutoExce macros before loading the Word doc
+ On Error Resume Next ' Ignore errors on setting
+ WordBasic.DisableAutoMacros 1
+ On Error GoTo HandleErrors
+
+ Dim myPassword As String
+ myPassword = GetDefaultPassword
+
+ 'Always skip password protected documents
+ 'If IsSkipPasswordDocs() Then
+ Dim aPass As String
+ If myPassword <> "" Then
+ aPass = myPassword
+ Else
+ aPass = "xoxoxoxoxo"
+ End If
+
+ On Error Resume Next
+ Set aDoc = Documents.Open(fileName, False, False, False, _
+ aPass, aPass, False, aPass, aPass, wdOpenFormatAuto, _
+ msoEncodingAutoDetect, False)
+ If Err.Number = 5408 Then
+ ' if password protected, try open readonly next
+ Set aDoc = Documents.Open(fileName, False, True, False, _
+ aPass, aPass, False, aPass, aPass, wdOpenFormatAuto, _
+ msoEncodingAutoDetect, False)
+ End If
+ If Err.Number = 5408 Then
+ HandleProtectedDocInvalidPassword mAnalysis, _
+ "User entered Invalid Document Password, further analysis not possible", fso
+ Analyze_Password_Protection True, False
+ GoTo FinalExit
+ ElseIf (Err.Number <> 0) Then
+ GoTo HandleErrors
+ End If
+
+ On Error GoTo HandleErrors
+
+ If aDoc Is Nothing Then GoTo FinalExit
+
+ 'Do Analysis
+ Analyze_Password_Protection aDoc.HasPassword, aDoc.WriteReserved
+ Analyze_Document_Protection aDoc
+
+ If aDoc.ProtectionType <> wdNoProtection Then
+ If myPassword <> "" Then
+ aDoc.Unprotect (myPassword)
+ Else
+ aDoc.Unprotect
+ End If
+ End If
+
+ 'Set Doc Properties
+ SetDocProperties mAnalysis, aDoc, fso
+
+ContinueFromUnprotectError:
+
+ Analyze_Tables_TablesInTables aDoc
+ Analyze_Tables_Borders aDoc
+ Analyze_TOA aDoc
+ If Not bUnprotectError Then
+ Analyze_FieldAndFormFieldIssues aDoc
+ End If
+ Analyze_OLEEmbedded aDoc
+ Analyze_MailMerge_DataSource aDoc
+ Analyze_Macros mAnalysis, userFormTypesDict, aDoc
+ 'Analyze_Numbering aDoc, mAnalysis
+ 'Analyze_NumberingTabs aDoc, mAnalysis
+
+ ' Doc Preparation only
+ ' Save document with any prepared issues under <storeToDir>\prepared\<source doc name>
+ If mAnalysis.PreparableIssuesCount > 0 And CheckDoPrepare Then
+ Dim preparedFullPath As String
+ preparedFullPath = GetPreparedFullPath(mAnalysis.name, startDir, storeToDir, fso)
+ If preparedFullPath <> "" Then
+ If fso.FileExists(preparedFullPath) Then
+ fso.DeleteFile preparedFullPath, True
+ End If
+ If fso.FolderExists(fso.GetParentFolderName(preparedFullPath)) Then
+ aDoc.SaveAs preparedFullPath
+ End If
+ End If
+ End If
+
+ 'DebugMacroInfo
+
+FinalExit:
+
+ If Not aDoc Is Nothing Then 'If Not IsEmpty(aDoc) Then
+ aDoc.Close (False)
+ End If
+ Set aDoc = Nothing
+
+ Exit Sub
+
+HandleErrors:
+ ' MsgBox currentFunctionName & " : " & fileName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ ' Handle Password error on Doc Open, Modify and Cancel
+ If Err.Number = 5408 Or Err.Number = 4198 Then
+ WriteDebug currentFunctionName & " : " & fileName & ": " & _
+ "User entered Invalid Document Password - " & Err.Number & " " & Err.Description & " " & Err.Source
+ HandleProtectedDocInvalidPassword mAnalysis, _
+ "User entered Invalid Document Password, further analysis not possible", fso
+ Resume FinalExit
+ ElseIf Err.Number = 5485 Then
+ ' Handle Password error on Unprotect Doc
+ WriteDebug currentFunctionName & " : " & fileName & ": " & _
+ "User entered Invalid Document Part Password, Analysis of doc will continue but will skip analysis of:" & _
+ "Forms, Comments, Headers & Footers and Table cell spanning issues - " & Err.Number & " " & Err.Description & " " & Err.Source
+ HandleProtectedDocInvalidPassword mAnalysis, _
+ "User entered Invalid Document Part Password, Analysis of doc will continue but will skip analysis of:" & vbLf & _
+ "Forms, Comments, Headers & Footers and Table cell spanning issues", fso
+ bUnprotectError = True
+ 'wdAllowOnlyComments, wdAllowOnlyFormFields, wdAllowOnlyRevisions
+ Resume ContinueFromUnprotectError
+ End If
+ mAnalysis.Application = RID_STR_COMMON_CANNOT_OPEN
+ WriteDebug currentFunctionName & " : " & fileName & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub DebugMacroInfo()
+ MsgBox "TotalNumLines: " & mAnalysis.MacroTotalNumLines & vbLf & _
+ "NumUserForms: " & mAnalysis.MacroNumUserForms & vbLf & _
+ "NumUserFormControls: " & mAnalysis.MacroNumUserFormControls & vbLf & _
+ "NumUserFormControlTypes: " & mAnalysis.MacroNumUserFormControlTypes & vbLf & _
+ "NumExternalRefs: " & mAnalysis.MacroNumExternalRefs & vbLf & _
+ "MacroNumFieldsUsingMacros: " & mAnalysis.MacroNumFieldsUsingMacros & vbLf & _
+ "NumOLEControls: " & mAnalysis.MacroNumOLEControls & vbLf & _
+ "MacroOverallClass: " & getDocOverallMacroClassAsString(mAnalysis.MacroOverallClass)
+End Sub
+
+Sub SetDocProperties(docAnalysis As DocumentAnalysis, doc As Document, fso As FileSystemObject)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SetProperties"
+ Dim f As File
+ Set f = fso.GetFile(docAnalysis.name)
+
+ docAnalysis.PageCount = doc.ComputeStatistics(wdStatisticPages)
+ docAnalysis.Accessed = f.DateLastAccessed
+
+ On Error Resume Next 'Some apps may not support all props
+ docAnalysis.Application = getAppSpecificApplicationName & " " & Application.Version
+ 'docAnalysis.Application = doc.BuiltinDocumentProperties(wdPropertyAppName)
+ 'If InStr(docAnalysis.Application, "Microsoft") = 1 Then
+ ' docAnalysis.Application = Mid(docAnalysis.Application, Len("Microsoft") + 2)
+ 'End If
+ 'If InStr(Len(docAnalysis.Application) - 2, docAnalysis.Application, ".") = 0 Then
+ ' docAnalysis.Application = docAnalysis.Application & " " & Application.Version
+ 'End If
+
+ docAnalysis.Created = _
+ doc.BuiltInDocumentProperties(wdPropertyTimeCreated)
+ docAnalysis.Modified = _
+ doc.BuiltInDocumentProperties(wdPropertyTimeLastSaved)
+ docAnalysis.Printed = _
+ doc.BuiltInDocumentProperties(wdPropertyTimeLastPrinted)
+ docAnalysis.SavedBy = _
+ doc.BuiltInDocumentProperties(wdPropertyLastAuthor)
+ docAnalysis.Revision = _
+ val(doc.BuiltInDocumentProperties(wdPropertyRevision))
+ docAnalysis.Template = _
+ fso.GetFileName(doc.BuiltInDocumentProperties(wdPropertyTemplate))
+
+FinalExit:
+ Set f = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+'Limitation: Detect first level table in tables, does not detect further nesting
+'Can do so if required
+Sub Analyze_Tables_TablesInTables(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Tables_TablesInTables"
+ Dim myTopTable As Table
+ Dim myInnerTable As Table
+ Dim myIssue As IssueInfo
+
+ For Each myTopTable In currDoc.Tables
+ For Each myInnerTable In myTopTable.Tables
+ Dim logString As String
+ Dim myRng As Range
+ Dim startpage As Long
+ Dim startRow As Long
+ Dim StartColumn As Long
+ Dim details As String
+
+ Set myIssue = New IssueInfo
+ Set myRng = myInnerTable.Range
+ myRng.start = myRng.End
+ startpage = myRng.Information(wdActiveEndPageNumber)
+ startRow = myRng.Information(wdStartOfRangeRowNumber)
+ StartColumn = myRng.Information(wdStartOfRangeColumnNumber)
+
+ With myIssue
+ .IssueID = CID_TABLES
+ .IssueType = RID_STR_WORD_ISSUE_TABLES
+ .SubType = RID_STR_WORD_SUBISSUE_NESTED_TABLES
+ .Location = .CLocationPage
+ .SubLocation = startpage
+
+ .IssueTypeXML = CSTR_ISSUE_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_NESTED_TABLES
+ .locationXML = .CXMLLocationPage
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_OUTER_TABLE
+ .Values.Add myTopTable.Rows.count & "x" & myTopTable.Columns.count
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_INNER_TABLE
+ .Values.Add myInnerTable.Rows.count & "x" & myInnerTable.Columns.count
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_START_ROW
+ .Values.Add startRow
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_START_COL
+ .Values.Add StartColumn
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_NESTED_TABLE_WILL_BE_LOST
+
+ mAnalysis.IssuesCountArray(CID_TABLES) = _
+ mAnalysis.IssuesCountArray(CID_TABLES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ Set myRng = Nothing
+ Next
+ Next
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_Document_Protection(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Document_Protection"
+ If currDoc.ProtectionType = wdNoProtection Then
+ Exit Sub
+ End If
+
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_COMMON_SUBISSUE_DOCUMENT_PARTS_PROTECTION
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_DOCUMENT_PARTS_PROTECTION
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_PROTECTION
+ Select Case currDoc.ProtectionType
+ Case wdAllowOnlyComments
+ .Values.Add RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_COMMENTS
+ Case wdAllowOnlyFormFields
+ .Values.Add RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_FORM_FIELDS
+ Case wdAllowOnlyRevisions
+ .Values.Add RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_REVISIONS
+ Case Else
+ .Values.Add RID_STR_COMMON_ATTRIBUTE_UNKNOWN
+ End Select
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Password_Protection(bHasPassword As Boolean, bWriteReserved As Boolean)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Password_Protection"
+ Dim myIssue As IssueInfo
+
+ If bHasPassword Or bWriteReserved Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_COMMON_SUBISSUE_PASSWORDS_PROTECTION
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_PASSWORDS_PROTECTION
+ .locationXML = .CXMLLocationDocument
+
+ If bHasPassword Then
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_OPEN
+ .Values.Add RID_STR_WORD_ATTRIBUTE_SET
+ End If
+ If bWriteReserved Then
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_MODIFY
+ .Values.Add RID_STR_WORD_ATTRIBUTE_SET
+ End If
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ End If
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_OLEEmbedded(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_OLEEmbedded"
+
+ ' Handle Inline Shapes
+ Dim aILShape As InlineShape
+ For Each aILShape In currDoc.InlineShapes
+ Analyze_OLEEmbeddedSingleInlineShape aILShape
+ Next aILShape
+
+ ' Handle Shapes
+ Dim aShape As Shape
+ For Each aShape In currDoc.Shapes
+ Analyze_OLEEmbeddedSingleShape mAnalysis, aShape, _
+ Selection.Information(wdActiveEndPageNumber)
+ Analyze_Lines mAnalysis, aShape, _
+ Selection.Information(wdActiveEndPageNumber)
+ Analyze_Transparency mAnalysis, aShape, _
+ Selection.Information(wdActiveEndPageNumber)
+ Analyze_Gradients mAnalysis, aShape, _
+ Selection.Information(wdActiveEndPageNumber)
+ Next aShape
+
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+
+'WdInlineShapeType constants:
+'wdInlineShapeEmbeddedOLEObject, wdInlineShapeHorizontalLine, wdInlineShapeLinkedOLEObject,
+'wdInlineShapeLinkedPicture, wdInlineShapeLinkedPictureHorizontalLine, wdInlineShapeOLEControlObject,
+'wdInlineShapeOWSAnchor, wdInlineShapePicture, wdInlineShapePictureBullet,
+'wdInlineShapePictureHorizontalLine, wdInlineShapeScriptAnchor
+
+Sub Analyze_OLEEmbeddedSingleInlineShape(aILShape As InlineShape)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_OLEEmbeddedSingleInlineShape"
+ Dim myIssue As IssueInfo
+ Dim bOleObject As Boolean
+ Dim TypeAsString As String
+ Dim XMLTypeAsString As String
+ Dim objName As String
+
+ bOleObject = (aILShape.Type = wdInlineShapeEmbeddedOLEObject) Or _
+ (aILShape.Type = wdInlineShapeLinkedOLEObject) Or _
+ (aILShape.Type = wdInlineShapeOLEControlObject)
+
+ If Not bOleObject Then Exit Sub
+
+ aILShape.Select
+ Select Case aILShape.Type
+ Case wdInlineShapeOLEControlObject
+ TypeAsString = RID_STR_COMMON_OLE_CONTROL
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_CONTROL
+ Case wdInlineShapeEmbeddedOLEObject
+ TypeAsString = RID_STR_COMMON_OLE_EMBEDDED
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_EMBEDDED
+ Case wdInlineShapeLinkedOLEObject
+ TypeAsString = RID_STR_COMMON_OLE_LINKED
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_LINKED
+ Case Else
+ TypeAsString = RID_STR_COMMON_OLE_UNKNOWN
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_UNKNOWN
+ End Select
+
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_PORTABILITY
+ .IssueType = RID_STR_COMMON_ISSUE_PORTABILITY
+ .SubType = TypeAsString
+ .Location = .CLocationPage
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+
+ .IssueTypeXML = CSTR_ISSUE_PORTABILITY
+ .SubTypeXML = XMLTypeAsString
+ .locationXML = .CXMLLocationPage
+
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+
+ DoEvents
+ If aILShape.Type = wdInlineShapeEmbeddedOLEObject Or _
+ aILShape.Type = wdInlineShapeOLEControlObject Then
+
+ 'If Object is invalid can get automation server hanging
+ Dim tmpStr As String
+ On Error Resume Next
+ tmpStr = aILShape.OLEFormat.Object
+ If Err.Number = 0 Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE
+ .Values.Add aILShape.OLEFormat.ProgID
+ Else
+ Err.Clear
+ tmpStr = aILShape.OLEFormat.ClassType
+ If Err.Number = 0 Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE
+ .Values.Add aILShape.OLEFormat.ClassType
+ Else
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE
+ .Values.Add RID_STR_COMMON_NA
+ End If
+ End If
+
+ If aILShape.Type = wdInlineShapeOLEControlObject Then
+ mAnalysis.MacroNumOLEControls = 1 + mAnalysis.MacroNumOLEControls
+ End If
+
+ objName = aILShape.OLEFormat.Object.name
+ If Err.Number = 0 Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_NAME
+ .Values.Add objName
+ End If
+ On Error GoTo HandleErrors
+ End If
+ If aILShape.Type = wdInlineShapeLinkedOLEObject Then
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_SOURCE
+ .Values.Add aILShape.LinkFormat.SourceFullName
+ End If
+
+ mAnalysis.IssuesCountArray(CID_PORTABILITY) = _
+ mAnalysis.IssuesCountArray(CID_PORTABILITY) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebugLevelTwo currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+'Appears to be picked up by other OLE analysis code - the Shapes are actually field codes
+'So I get double reporting if I use this as well.
+Sub Analyze_OLEFields(myField As Field)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_OLEFields"
+ Dim myIssue As IssueInfo
+ Dim bOleObject As Boolean
+ Dim TypeAsString As String
+ Dim XMLTypeAsString As String
+
+ bOleObject = (myField.Type = wdFieldOCX)
+
+ If Not bOleObject Then Exit Sub
+
+ myField.Select
+ Select Case myField.Type
+ Case wdFieldLink
+ TypeAsString = RID_STR_COMMON_OLE_FIELD_LINK
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_FIELD_LINK
+ Case Else
+ TypeAsString = RID_STR_COMMON_OLE_UNKNOWN
+ XMLTypeAsString = CSTR_SUBISSUE_OLE_UNKNOWN
+ End Select
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_PORTABILITY
+ .IssueType = RID_STR_COMMON_ISSUE_PORTABILITY
+ .SubType = TypeAsString
+ .Location = .CLocationPage
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+
+ .IssueTypeXML = CSTR_ISSUE_PORTABILITY
+ .SubTypeXML = XMLTypeAsString
+ .locationXML = .CXMLLocationPage
+
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_OBJECT_TYPE
+ .Values.Add myField.OLEFormat.ClassType
+
+ If myField.Type = wdFieldLink Then
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_LINK
+ .Values.Add myField.LinkFormat.SourceFullName
+ End If
+ mAnalysis.IssuesCountArray(CID_PORTABILITY) = _
+ mAnalysis.IssuesCountArray(CID_PORTABILITY) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+
+ Set myIssue = Nothing
+
+ Exit Sub
+
+HandleErrors:
+ Set myIssue = Nothing
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Sub Analyze_MailMergeField(myField As Field)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_MailMergeField"
+ Dim myIssue As IssueInfo
+ Dim TypeAsString As String
+ Dim bProblemMailMergeField As Boolean
+
+ bProblemMailMergeField = _
+ (myField.Type = wdFieldFillIn) Or _
+ (myField.Type = wdFieldAsk) Or _
+ (myField.Type = wdFieldMergeRec) Or _
+ (myField.Type = wdFieldMergeField) Or _
+ (myField.Type = wdFieldNext) Or _
+ (myField.Type = wdFieldRevisionNum) Or _
+ (myField.Type = wdFieldSequence) Or _
+ (myField.Type = wdFieldAutoNum) Or _
+ (myField.Type = wdFieldAutoNumOutline) Or _
+ (myField.Type = wdFieldAutoNumLegal)
+
+ If bProblemMailMergeField Then
+ 'Some of the following are numbering fields and need to be broken out into a seperate function. See migration guide.
+
+ Select Case myField.Type
+ Case wdFieldFillIn
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_FILL_IN
+ Case wdFieldAsk
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_ASK
+ Case wdFieldMergeRec
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_RECORDS
+ Case wdFieldMergeField
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_FIELDS
+ Case wdFieldNext
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_NEXT
+ Case wdFieldRevisionNum
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_REVISION_NUMBER
+ Case wdFieldSequence
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_SEQUENCE
+ Case wdFieldAutoNum
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER
+ Case wdFieldAutoNumOutline
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_OUTLINE
+ Case wdFieldAutoNumLegal
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_LEGAL
+ Case Else
+ TypeAsString = RID_STR_WORD_ENUMERATION_MAILMERGE_FIELD_NAME_NOT_KNOWN
+ End Select
+
+ Set myIssue = New IssueInfo
+ myField.Select
+ With myIssue
+ .IssueID = CID_FIELDS
+ .IssueType = RID_STR_WORD_ISSUE_FIELDS
+ .SubType = RID_STR_WORD_SUBISSUE_MAILMERGE_FIELD
+ .Location = .CLocationPage
+
+ .IssueTypeXML = CSTR_ISSUE_FIELDS
+ .SubTypeXML = CSTR_SUBISSUE_MAILMERGE_FIELD
+ .locationXML = .CXMLLocationPage
+
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add TypeAsString
+ If myField.Code.Text <> "" Then
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_TEXT
+ .Values.Add myField.Code.Text
+ End If
+
+ mAnalysis.IssuesCountArray(CID_FIELDS) = _
+ mAnalysis.IssuesCountArray(CID_FIELDS) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+'Get field DS Info
+Sub Analyze_MailMerge_DataSource(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_MailMerge_DataSource"
+ ' There may be no mail merge in the document
+ If (currDoc.MailMerge.DataSource.Type = wdNoMergeInfo) Then
+ Exit Sub
+ End If
+
+ 'Dim issue As SimpleAnalysisInfo
+ If (currDoc.MailMerge.DataSource.Type <> wdNoMergeInfo) Then
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_CONTENT_AND_DOCUMENT_PROPERTIES
+ .IssueType = RID_STR_COMMON_ISSUE_CONTENT_AND_DOCUMENT_PROPERTIES
+ .SubType = RID_STR_WORD_SUBISSUE_MAILMERGE_DATASOURCE
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_CONTENT_DOCUMENT_PROPERTIES
+ .SubTypeXML = CSTR_SUBISSUE_MAILMERGE_DATASOURCE
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_COMMON_ATTRIBUTE_NAME
+ .Values.Add currDoc.MailMerge.DataSource.name
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_DATASOURCE
+ .Values.Add currDoc.MailMerge.DataSource.Type
+
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) = _
+ mAnalysis.IssuesCountArray(CID_CONTENT_AND_DOCUMENT_PROPERTIES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Function getFormFieldTypeAsString(fieldType As WdFieldType)
+ Dim Str As String
+
+ Select Case fieldType
+ Case wdFieldFormCheckBox
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_CHECK_BOX
+ Case wdFieldFormDropDown
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DROP_DOWN
+ Case wdFieldFormTextInput
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_TEXT
+ Case Else
+ Str = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ getFormFieldTypeAsString = Str
+End Function
+Function getTextFormFieldTypeAsString(fieldType As WdTextFormFieldType)
+ Dim Str As String
+
+ Select Case fieldType
+ Case wdCalculationText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_CALCULATION
+ Case wdCurrentDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_DATE
+ Case wdCurrentTimeText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_TIME
+ Case wdDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DATE
+ Case wdNumberText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_NUMBER
+ Case wdRegularText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_REGULAR
+ Case Else
+ Str = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ getTextFormFieldTypeAsString = Str
+End Function
+Function getTextFormFieldDefaultAsString(fieldType As WdTextFormFieldType)
+ Dim Str As String
+
+ Select Case fieldType
+ Case wdCalculationText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_EXPRESSION
+ Case wdCurrentDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE
+ Case wdCurrentTimeText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TIME
+ Case wdDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE
+ Case wdNumberText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_NUMBER
+ Case wdRegularText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TEXT
+ Case Else
+ Str = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ getTextFormFieldDefaultAsString = Str
+End Function
+Function getTextFormFieldFormatAsString(fieldType As WdTextFormFieldType)
+ Dim Str As String
+
+ Select Case fieldType
+ Case wdCalculationText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER
+ Case wdCurrentDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE
+ Case wdCurrentTimeText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TIME
+ Case wdDateText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE
+ Case wdNumberText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER
+ Case wdRegularText
+ Str = RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TEXT
+ Case Else
+ Str = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ getTextFormFieldFormatAsString = Str
+End Function
+
+Sub Analyze_FieldAndFormFieldIssues(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_FormFields"
+ Dim myIssue As IssueInfo
+
+ 'Analysze all Fields in doc
+ Dim myField As Field
+
+ For Each myField In currDoc.Fields
+ 'Analyze Mail Merge Fields
+ Analyze_MailMergeField myField
+
+ 'Analyze TOA Fields
+ Analyze_TOAField myField
+ Next myField
+
+ 'Analyze FormField doc issues
+ If currDoc.FormFields.count = 0 Then GoTo FinalExit
+
+ If (currDoc.FormFields.Shaded) Then
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_FIELDS
+ .IssueType = RID_STR_WORD_ISSUE_FIELDS
+ .SubType = RID_STR_WORD_SUBISSUE_APPEARANCE
+ .Location = .CLocationDocument
+
+ .IssueTypeXML = CSTR_ISSUE_FIELDS
+ .SubTypeXML = CSTR_SUBISSUE_APPEARANCE
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_GREYED
+ .Values.Add RID_STR_WORD_TRUE
+ mAnalysis.IssuesCountArray(CID_FIELDS) = _
+ mAnalysis.IssuesCountArray(CID_FIELDS) + 1
+ End With
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+ 'Analyse all FormFields in doc
+ Dim myFormField As FormField
+
+ For Each myFormField In currDoc.FormFields
+ Analyze_FormFieldIssue myFormField
+ Next myFormField
+
+FinalExit:
+ Set myIssue = Nothing
+ Set myFormField = Nothing
+ Exit Sub
+
+HandleErrors:
+
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_FormFieldIssue(myFormField As FormField)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_FormFieldIssue"
+ Dim myIssue As IssueInfo
+ Dim bCheckBoxIssues As Boolean
+ Dim bFormFieldIssues As Boolean
+
+ bCheckBoxIssues = False
+ If (myFormField.Type = wdFieldFormCheckBox) Then
+ If myFormField.CheckBox.AutoSize Then
+ bCheckBoxIssues = True
+ End If
+ End If
+
+ bFormFieldIssues = bCheckBoxIssues
+
+ If Not bFormFieldIssues Then GoTo FinalExit
+
+ myFormField.Select
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_FIELDS
+ .IssueType = RID_STR_WORD_ISSUE_FIELDS
+ .SubType = RID_STR_WORD_SUBISSUE_FORM_FIELD
+ .Location = .CLocationPage
+
+ .IssueTypeXML = CSTR_ISSUE_FIELDS
+ .SubTypeXML = CSTR_SUBISSUE_FORM_FIELD
+ .locationXML = .CXMLLocationPage
+
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+ myIssue.Attributes.Add RID_STR_COMMON_ATTRIBUTE_TYPE
+ myIssue.Values.Add getFormFieldTypeAsString(myFormField.Type)
+ End With
+
+ 'Checkbox Issues
+ If (myFormField.Type = wdFieldFormCheckBox) Then
+ 'AutoSize CheckBoxes
+ If myFormField.CheckBox.AutoSize Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_AUTOSIZE
+ myIssue.Values.Add RID_STR_WORD_TRUE
+ End If
+ End If
+
+ 'TextInput Issues
+ If myFormField.Type = wdFieldFormTextInput Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_TEXT_FORM_FIELD_TYPE
+ myIssue.Values.Add getTextFormFieldTypeAsString(myFormField.TextInput.Type)
+ Dim bLostType As Boolean
+ bLostType = False
+ If (myFormField.TextInput.Type = wdCalculationText) Or _
+ (myFormField.TextInput.Type = wdCurrentDateText) Or _
+ (myFormField.TextInput.Type = wdCurrentTimeText) Then
+ AddIssueDetailsNote myIssue, 0, getTextFormFieldTypeAsString(myFormField.TextInput.Type) & _
+ " " & RID_STR_WORD_NOTE_FORM_FIELD_TYPE_LOST
+ bLostType = True
+ End If
+
+ If (myFormField.TextInput.Format <> "") Then
+ myIssue.Attributes.Add getTextFormFieldFormatAsString(myFormField.TextInput.Type)
+ myIssue.Values.Add myFormField.TextInput.Format
+ End If
+
+ 'Default text
+ If (myFormField.TextInput.Default <> "") Then
+ myIssue.Attributes.Add getTextFormFieldDefaultAsString(myFormField.TextInput.Type)
+ myIssue.Values.Add myFormField.TextInput.Default
+ End If
+
+ 'Maximum text
+ If (myFormField.TextInput.Width <> 0) Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_MAX_LENGTH
+ myIssue.Values.Add myFormField.TextInput.Width
+ End If
+
+ 'Fill-in disabled
+ If (myFormField.Enabled = False) And (Not bLostType) Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_FILLIN_ENABLED
+ myIssue.Values.Add RID_STR_WORD_FALSE
+ End If
+ End If
+
+ 'Help Key(F1)
+ If (myFormField.OwnHelp And myFormField.HelpText <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_OWN_TEXT
+ myIssue.Values.Add myFormField.HelpText
+ ElseIf ((Not myFormField.OwnHelp) And myFormField.HelpText <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_AUTO_TEXT
+ myIssue.Values.Add myFormField.HelpText
+ End If
+
+ 'StatusHelp
+ If (myFormField.OwnStatus And myFormField.StatusText <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_OWN_TEXT
+ myIssue.Values.Add myFormField.StatusText
+ ElseIf ((Not myFormField.OwnStatus) And myFormField.StatusText <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_AUTO_TEXT
+ myIssue.Values.Add myFormField.StatusText
+ End If
+
+ 'Macros
+ If (myFormField.EntryMacro <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_ENTRY_MACRO
+ myIssue.Values.Add myFormField.EntryMacro
+ End If
+ If (myFormField.ExitMacro <> "") Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_EXIT_MACRO
+ myIssue.Values.Add myFormField.ExitMacro
+ End If
+ If (myFormField.EntryMacro <> "") Or (myFormField.ExitMacro <> "") Then
+ mAnalysis.MacroNumFieldsUsingMacros = 1 + mAnalysis.MacroNumFieldsUsingMacros
+ End If
+
+ 'LockedField
+ If (myFormField.Enabled = False) And (myFormField.Type <> wdFieldFormTextInput) Then
+ myIssue.Attributes.Add RID_STR_WORD_ATTRIBUTE_FORM_FIELD_LOCKED
+ myIssue.Values.Add RID_STR_WORD_TRUE
+ End If
+
+ mAnalysis.IssuesCountArray(CID_FIELDS) = _
+ mAnalysis.IssuesCountArray(CID_FIELDS) + 1
+
+ mAnalysis.Issues.Add myIssue
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ 'Log first occurence for this doc
+ If Not mbFormFieldErrorLogged Then
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ mbFormFieldErrorLogged = True
+ End If
+ Resume FinalExit
+End Sub
+
+
+Sub Analyze_TOA(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_TOA"
+
+ Dim toa As TableOfAuthorities
+ Dim myIssue As IssueInfo
+ Dim myRng As Range
+
+ For Each toa In currDoc.TablesOfAuthorities
+ Set myRng = toa.Range
+ myRng.start = myRng.End
+ Set myIssue = New IssueInfo
+ myRng.Select
+
+ Dim TabLeaderAsString As String
+ Select Case toa.TabLeader
+ Case wdTabLeaderDashes
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_DASHES
+ Case wdTabLeaderDots
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_DOTS
+ Case wdTabLeaderHeavy
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_HEAVY
+ Case wdTabLeaderLines
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_LINES
+ Case wdTabLeaderMiddleDot
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_MIDDLEDOT
+ Case wdTabLeaderSpaces
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_INDEX_LEADER_SPACES
+ Case Else
+ TabLeaderAsString = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ Dim FormatAsString As String
+ Select Case currDoc.TablesOfAuthorities.Format
+ Case wdTOAClassic
+ FormatAsString = RID_STR_WORD_ENUMERATION_INDEX_TABLES_CLASSIC
+ Case wdTOADistinctive
+ FormatAsString = RID_STR_WORD_ENUMERATION_INDEX_TABLES_DISTINCTIVE
+ Case wdTOAFormal
+ FormatAsString = RID_STR_WORD_ENUMERATION_INDEX_TABLES_FORMAL
+ Case wdTOASimple
+ FormatAsString = RID_STR_WORD_ENUMERATION_INDEX_TABLES_SIMPLE
+ Case wdTOATemplate
+ FormatAsString = RID_STR_WORD_ENUMERATION_INDEX_TABLES_FROM_TEMPLATE
+ Case Else
+ FormatAsString = RID_STR_WORD_ENUMERATION_UNKNOWN
+ End Select
+
+ With myIssue
+ .IssueID = CID_INDEX_AND_REFERENCES
+ .IssueType = RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES
+ .SubType = RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES
+ .Location = .CLocationPage
+
+ .IssueTypeXML = CSTR_ISSUE_INDEX_AND_REFERENCES
+ .SubTypeXML = CSTR_SUBISSUE_TABLE_OF_AUTHORITIES
+ .locationXML = .CXMLLocationPage
+
+ .SubLocation = myRng.Information(wdActiveEndPageNumber)
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_LEADER
+ .Values.Add TabLeaderAsString
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_TOA_MIGRATE_AS_PLAIN_TEXT
+
+ mAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) = _
+ mAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ Set myRng = Nothing
+ Next
+FinalExit:
+ Set myIssue = Nothing
+ Set myRng = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_TOAField(myField As Field)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_TOAField"
+
+ Dim toa As TableOfAuthorities
+ Dim myIssue As IssueInfo
+
+ If myField.Type = wdFieldTOAEntry Then
+ Set myIssue = New IssueInfo
+ myField.Select
+
+ With myIssue
+ .IssueID = CID_FIELDS
+ .IssueType = RID_STR_WORD_ISSUE_FIELDS
+ .SubType = RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD
+ .Location = .CLocationPage
+
+ .IssueTypeXML = CSTR_ISSUE_FIELDS
+ .SubTypeXML = CSTR_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD
+ .locationXML = .CXMLLocationPage
+
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_FIELD_TEXT
+ .Values.Add myField.Code.Text
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_TOA_FIELD_LOST_ON_ROUNDTRIP
+
+ mAnalysis.IssuesCountArray(CID_FIELDS) = _
+ mAnalysis.IssuesCountArray(CID_FIELDS) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Tables_Borders(currDoc As Document)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Tables_Borders"
+ Dim myIssue As IssueInfo
+ Set myIssue = New IssueInfo
+ Dim aTable As Table
+ Dim invalidBorders As String
+
+ For Each aTable In currDoc.Tables
+ invalidBorders = GetInvalidBorder(aTable)
+ If invalidBorders <> "" Then
+ aTable.Range.Select
+ Set myIssue = New IssueInfo
+ With myIssue
+ .IssueID = CID_TABLES
+ .IssueType = RID_STR_WORD_ISSUE_TABLES
+ .SubType = RID_STR_WORD_SUBISSUE_BORDER_STYLES
+ .Location = .CLocationPage
+
+ .IssueTypeXML = CSTR_ISSUE_TABLES
+ .SubTypeXML = CSTR_SUBISSUE_BORDER_STYLES
+ .locationXML = .CXMLLocationPage
+
+ .SubLocation = Selection.Information(wdActiveEndPageNumber)
+ .Line = Selection.Information(wdFirstCharacterLineNumber)
+ .column = Selection.Information(wdFirstCharacterColumnNumber)
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_BORDERS_NOT_DISPLAYING
+ .Values.Add invalidBorders
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_TABLE_BORDER
+
+ mAnalysis.IssuesCountArray(CID_TABLES) = mAnalysis.IssuesCountArray(CID_TABLES) + 1
+ End With
+
+ mAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+ Next aTable
+FinalExit:
+ Set myIssue = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+Function GetInvalidBorder(aTable As Table) As String
+
+ Dim theResult As String
+ theResult = ""
+
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderTop).LineStyle) Then
+ theResult = theResult + "Top, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderBottom).LineStyle) Then
+ theResult = theResult + "Bottom, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderDiagonalDown).LineStyle) Then
+ theResult = theResult + "Down Diagonal, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderDiagonalUp).LineStyle) Then
+ theResult = theResult + "Up Diagonal, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderHorizontal).LineStyle) Then
+ theResult = theResult + "Horizontal, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderLeft).LineStyle) Then
+ theResult = theResult + "Left, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderRight).LineStyle) Then
+ theResult = theResult + "Right, "
+ End If
+ If IsInvalidBorderStyle(aTable.Borders(wdBorderVertical).LineStyle) Then
+ theResult = theResult + "Vertical, "
+ End If
+
+ If theResult <> "" Then
+ theResult = Left(theResult, (Len(theResult) - 2)) + "."
+ End If
+
+ GetInvalidBorder = theResult
+End Function
+
+Function IsInvalidBorderStyle(aStyle As WdLineStyle) As Boolean
+
+ Dim IsInvalid As Boolean
+
+ Select Case aStyle
+ Case wdLineStyleDot, wdLineStyleDashSmallGap, wdLineStyleDashLargeGap, wdLineStyleDashDot, _
+ wdLineStyleDashDotDot, wdLineStyleTriple, wdLineStyleThinThickThinSmallGap, wdLineStyleThinThickMedGap, _
+ wdLineStyleThickThinMedGap, wdLineStyleThinThickThinMedGap, wdLineStyleThinThickLargeGap, _
+ wdLineStyleThickThinLargeGap, wdLineStyleThinThickThinLargeGap, wdLineStyleSingleWavy, _
+ wdLineStyleDoubleWavy, wdLineStyleDashDotStroked, wdLineStyleEmboss3D, wdLineStyleEngrave3D
+ IsInvalid = True
+ Case Else
+ IsInvalid = False
+ End Select
+
+ IsInvalidBorderStyle = IsInvalid
+
+End Function
+
+Private Sub Class_Initialize()
+ Set mAnalysis = New DocumentAnalysis
+End Sub
+Private Sub Class_Terminate()
+ Set mAnalysis = Nothing
+End Sub
+
+Public Property Get Results() As DocumentAnalysis
+ Set Results = mAnalysis
+End Property
+
+Sub Analyze_NumberingTabs(currDoc As Document, docAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_NumberingTabs"
+
+ Dim tb As TabStop
+ Dim customTabPos As Single
+ Dim tabs As Integer
+ Dim listLvl As Long
+ Dim tp As Single
+ Dim bHasAlignmentProblem As Boolean
+ Dim bHasTooManyTabs As Boolean
+ Dim myIssue As IssueInfo
+ Dim p As Object
+
+ bHasAlignmentProblem = False
+ bHasTooManyTabs = False
+
+ For Each p In currDoc.ListParagraphs
+ tabs = 0
+ For Each tb In p.TabStops
+ If tb.customTab Then
+ tabs = tabs + 1
+ customTabPos = tb.Position
+ End If
+ Next
+
+ If tabs = 1 Then
+ listLvl = p.Range.ListFormat.ListLevelNumber
+ tp = p.Range.ListFormat.ListTemplate.ListLevels.item(listLvl).TabPosition
+ If (p.Range.ListFormat.ListTemplate.ListLevels.item(listLvl).Alignment <> _
+ wdListLevelAlignLeft) Then
+ ' ERROR: alignment problem
+ bHasAlignmentProblem = True
+ End If
+
+ If tp <> customTabPos Then
+ p.Range.InsertBefore ("XXXXX")
+ End If
+ 'OK - at least heuristically
+ Else
+ 'ERROR: too many tabs
+ bHasTooManyTabs = True
+ End If
+ Next
+
+ If (bHasAlignmentProblem) Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_INDEX_AND_REFERENCES
+ .IssueType = RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES
+ .SubType = RID_STR_WORD_SUBISSUE_NUMBERING_TAB_ALIGNMENT
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_INDEX_AND_REFERENCES
+ .SubTypeXML = CSTR_SUBISSUE_NUMBERING_TAB_ALIGNMENT
+ .locationXML = .CXMLLocationDocument
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_NUMBERING_TAB_ALIGNMENT
+
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) = _
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) + 1
+ End With
+ docAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+ If (bHasTooManyTabs) Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_INDEX_AND_REFERENCES
+ .IssueType = RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES
+ .SubType = RID_STR_WORD_SUBISSUE_NUMBERING_TAB_OVERFLOW
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_INDEX_AND_REFERENCES
+ .SubTypeXML = CSTR_SUBISSUE_NUMBERING_TAB_OVERFLOW
+ .locationXML = .CXMLLocationDocument
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_NUMBERING_TAB_OVERFLOW
+
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) = _
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) + 1
+ End With
+ docAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Set myIssue = Nothing
+ Resume FinalExit
+End Sub
+
+Sub Analyze_Numbering(currDoc As Document, docAnalysis As DocumentAnalysis)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Analyze_Numbering"
+
+ Dim myIssue As IssueInfo
+ Dim nFormatProblems As Integer
+ Dim nAlignmentProblems As Integer
+ nFormatProblems = 0
+ nAlignmentProblems = 0
+
+ Dim lt As ListTemplate
+ Dim lvl As ListLevel
+ Dim I, l_, p1, p2, v1, v2 As Integer
+ Dim display_levels As Integer
+ Dim fmt, prefix, postfix, res As String
+
+ For Each lt In currDoc.ListTemplates
+ l_ = 0
+ For Each lvl In lt.ListLevels
+ l_ = l_ + 1
+ 'Selection.TypeText Text:="List Number Format " + lvl.NumberFormat
+ 'Apply Heuristic
+ fmt = lvl.NumberFormat
+ p1 = InStr(fmt, "%")
+ p2 = InStrRev(fmt, "%")
+ v1 = val(Mid(fmt, p1 + 1, 1))
+ v2 = val(Mid(fmt, p2 + 1, 1))
+ display_levels = v2 - v1 + 1
+ prefix = Mid(fmt, 1, p1 - 1)
+ postfix = Mid(fmt, p2 + 2)
+ 'Check Heuristic
+ res = prefix
+ For I = 2 To display_levels
+ res = "%" + Trim(Str(l_ - I + 1)) + "." + res
+ Next
+ res = res + "%" + Trim(Str(l_)) + postfix
+ If (StrComp(res, fmt) <> 0) Then
+ nFormatProblems = nFormatProblems + 1
+ 'Selection.TypeText Text:="Label Problem: NumberFormat=" + fmt + " Heuristic=" + res
+ End If
+
+ 'check alignment
+ If (lvl.NumberPosition <> wdListLevelAlignLeft) Then
+ nAlignmentProblems = nAlignmentProblems + 1
+ 'Selection.TypeText Text:="Number alignment problem"
+ End If
+ Next
+ Next
+
+ If (nFormatProblems > 0) Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_INDEX_AND_REFERENCES
+ .IssueType = RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES
+ .SubType = RID_STR_WORD_SUBISSUE_NUMBERING_FORMAT
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_INDEX_AND_REFERENCES
+ .SubTypeXML = CSTR_SUBISSUE_NUMBERING_FORMAT
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_COUNT
+ .Values.Add nFormatProblems
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_NUMBERING_FORMAT
+
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) = _
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) + 1
+ End With
+ docAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+ If (nAlignmentProblems > 0) Then
+ Set myIssue = New IssueInfo
+
+ With myIssue
+ .IssueID = CID_INDEX_AND_REFERENCES
+ .IssueType = RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES
+ .SubType = RID_STR_WORD_SUBISSUE_NUMBERING_ALIGNMENT
+ .Location = .CLocationDocument 'Location string
+
+ .IssueTypeXML = CSTR_ISSUE_INDEX_AND_REFERENCES
+ .SubTypeXML = CSTR_SUBISSUE_NUMBERING_ALIGNMENT
+ .locationXML = .CXMLLocationDocument
+
+ .Attributes.Add RID_STR_WORD_ATTRIBUTE_COUNT
+ .Values.Add nAlignmentProblems
+
+ AddIssueDetailsNote myIssue, 0, RID_STR_WORD_NOTE_NUMBERING_ALIGNMENT
+
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) = _
+ docAnalysis.IssuesCountArray(CID_INDEX_AND_REFERENCES) + 1
+ End With
+ docAnalysis.Issues.Add myIssue
+ Set myIssue = Nothing
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & mAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Set myIssue = Nothing
+ Resume FinalExit
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/sources/word/Preparation.bas b/migrationanalysis/src/driver_docs/sources/word/Preparation.bas
new file mode 100644
index 000000000000..e1d6bc944896
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/word/Preparation.bas
@@ -0,0 +1,153 @@
+Attribute VB_Name = "Preparation"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Preparation.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Function Prepare_HeaderFooter_GraphicFrames(docAnalysis As DocumentAnalysis, myIssue As IssueInfo, _
+ var As Variant, currDoc As Document) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Prepare_HeaderFooter_GraphicFrames"
+
+ Dim myPrepInfo As PrepareInfo
+ Set myPrepInfo = var
+
+ Dim smove As Long
+ Dim temp As Single
+ Dim ELength As Single
+ Dim PageHeight As Single
+ Dim Snum As Integer
+ Dim Fnum As Integer
+ Dim I As Integer
+ Dim myshape As Shape
+ Dim shapetop() As Single
+ Dim temptop As Single
+
+ With currDoc.ActiveWindow 'change to printview
+ If .View.SplitSpecial = wdPaneNone Then
+ .ActivePane.View.Type = wdPrintView
+ Else
+ .Panes(2).Close
+ .ActivePane.View.Type = wdPrintView
+ .View.Type = wdPrintView
+ End If
+ End With
+
+ PageHeight = currDoc.PageSetup.PageHeight
+ PageHeight = PageHeight / 2
+
+ Selection.GoTo what:=wdGoToPage, Which:=wdGoToAbsolute, _
+ count:=myPrepInfo.HF_OnPage
+ currDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
+
+ Snum = myPrepInfo.HF_Shapes.count
+ If Snum <> 0 Then
+ ReDim shapetop(Snum)
+ ReDim top(Snum)
+ I = 0
+ For Each myshape In myPrepInfo.HF_Shapes
+ If myshape.Type = msoPicture Then
+ If myshape.RelativeVerticalPosition <> wdRelativeVerticalPositionPage Then
+ shapetop(I) = myshape.top + myshape.Anchor.Information(wdVerticalPositionRelativeToPage)
+ Else
+ shapetop(I) = myshape.top
+ End If
+ ElseIf myshape.Type = msoTextBox Then
+ myshape.TextFrame.TextRange.Select
+
+ shapetop(I) = Selection.Information(wdVerticalPositionRelativeToPage)
+ End If
+ I = I + 1
+ Next myshape
+ End If
+
+ currDoc.Content.Select
+ Selection.GoTo what:=wdGoToPage, Which:=wdGoToAbsolute, _
+ count:=myPrepInfo.HF_OnPage 'set frametop might change the selection position
+
+ If myPrepInfo.HF_inheader Then
+ currDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
+ Selection.MoveStart
+ ELength = 0
+ While ELength < myPrepInfo.HF_extendLength
+ Selection.TypeParagraph
+ ELength = ELength + Selection.Characters.First.Font.Size
+ Wend
+ Else
+ currDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
+ Selection.MoveStart
+ ELength = 0
+ While ELength < myPrepInfo.HF_extendLength
+ Selection.TypeParagraph
+ ELength = ELength + Selection.Characters.First.Font.Size
+ Wend
+ End If
+
+ If Snum <> 0 Then
+ I = 0
+ For Each myshape In myPrepInfo.HF_Shapes
+ If myshape.Type = msoPicture Then
+ If myshape.RelativeVerticalPosition <> wdRelativeVerticalPositionPage Then
+ temptop = myshape.top + myshape.Anchor.Information(wdVerticalPositionRelativeToPage)
+ Else
+ temptop = myshape.top
+ End If
+ ElseIf myshape.Type = msoTextBox Then
+ myshape.TextFrame.TextRange.Select
+
+ temptop = Selection.Information(wdVerticalPositionRelativeToPage)
+ End If
+ Selection.GoTo what:=wdGoToPage, Which:=wdGoToAbsolute, _
+ count:=myPrepInfo.HF_OnPage
+ If myPrepInfo.HF_inheader Then
+ currDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
+ Else
+ currDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
+ End If
+ Selection.HeaderFooter.Shapes(myshape.name).Select
+ Selection.ShapeRange.IncrementTop shapetop(I) - temptop
+ I = I + 1
+ Next myshape
+ End If
+ ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
+ Prepare_HeaderFooter_GraphicFrames = True
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & docAnalysis.name & ": " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+'Stub for Excel Prepare SheetName
+Function Prepare_WorkbookVersion() As Boolean
+ Prepare_WorkbookVersion = False
+End Function
+
+
diff --git a/migrationanalysis/src/driver_docs/sources/word/ThisDocument.cls b/migrationanalysis/src/driver_docs/sources/word/ThisDocument.cls
new file mode 100644
index 000000000000..e1ede6901870
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/word/ThisDocument.cls
@@ -0,0 +1,54 @@
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: ThisDocument.cls,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Public wrdStrings As StringDataManager
+
+Private Sub Document_Open()
+ Set wrdStrings = New stringDataManager
+
+ wrdStrings.InitStringData (GetResourceDataFileName(ThisDocument.Path))
+ LoadCommonStrings wrdStrings
+ LoadWordStrings wrdStrings
+ LoadResultsStrings wrdStrings
+ SetWordDriverText
+ Set wrdString = Nothing
+End Sub
+
+' Set the loaded string variable into the fields in the document
+Private Sub SetWordDriverText()
+ On Error Resume Next
+ CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT
+ ThisDocument.FormFields.item("RID_STR_WDVR_SOANA").Result = RID_STR_WDVR_SOANA
+ ThisDocument.FormFields.item("RID_STR_WDVR_INTRO").Result = RID_STR_WDVR_INTRO
+ ThisDocument.FormFields.item("RID_STR_WDVR_TITLE").Result = RID_STR_WDVR_TITLE
+ ThisDocument.FormFields.item("RID_STR_WDVR_PURPO").Result = RID_STR_WDVR_PURPO
+ ThisDocument.FormFields.item("RID_STR_WDVR_PARA1").Result = RID_STR_WDVR_PARA1
+ ThisDocument.FormFields.item("RID_STR_WDVR_ISSUE").Result = RID_STR_WDVR_ISSUE
+ ThisDocument.FormFields.item("RID_STR_WDVR_PARA2").Result = RID_STR_WDVR_PARA2
+End Sub
diff --git a/migrationanalysis/src/driver_docs/sources/word/word_res.bas b/migrationanalysis/src/driver_docs/sources/word/word_res.bas
new file mode 100644
index 000000000000..95176e9e4612
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/word/word_res.bas
@@ -0,0 +1,291 @@
+Attribute VB_Name = "word_res"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: word_res.bas,v $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+'Word Strings
+
+Public RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_COMMENTS As String
+Public RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_FORM_FIELDS As String
+Public RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_REVISIONS As String
+Public RID_STR_WORD_ATTRIBUTE_AUTHOR As String
+Public RID_STR_WORD_ATTRIBUTE_BORDERS_NOT_DISPLAYING As String
+Public RID_STR_WORD_ATTRIBUTE_DATASOURCE As String
+Public RID_STR_WORD_ATTRIBUTE_FIELD_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_AUTOSIZE As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_ENTRY_MACRO As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_EXIT_MACRO As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_FILLIN_ENABLED As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_GREYED As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_AUTO_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_OWN_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_LOCKED As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_MAX_LENGTH As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_AUTO_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_OWN_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_FORM_FIELD_TEXT_FORM_FIELD_TYPE As String
+Public RID_STR_WORD_ATTRIBUTE_FOOTER As String
+Public RID_STR_WORD_ATTRIBUTE_HEADER As String
+Public RID_STR_WORD_ATTRIBUTE_FRAME As String
+Public RID_STR_WORD_ATTRIBUTE_GRAPHIC As String
+Public RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_H As String
+Public RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_F As String
+Public RID_STR_WORD_ATTRIBUTE_NUM_OF_GRAPHIC As String
+Public RID_STR_WORD_ATTRIBUTE_OBJECT_LOCATED_BELOW_HEADER As String
+Public RID_STR_WORD_ATTRIBUTE_NUM_OF_FRAME As String
+Public RID_STR_WORD_ATTRIBUTE_GRAPHICTYPE As String
+Public RID_STR_WORD_ATTRIBUTE_INLINESHAPE As String
+Public RID_STR_WORD_ATTRIBUTE_INNER_TABLE As String
+Public RID_STR_WORD_ATTRIBUTE_LEADER As String
+Public RID_STR_WORD_ATTRIBUTE_LINK As String
+Public RID_STR_WORD_ATTRIBUTE_LOCATION As String
+Public RID_STR_WORD_ATTRIBUTE_NUMBER_CUSTOM_PARAGRAPHS As String
+Public RID_STR_WORD_ATTRIBUTE_OUTER_TABLE As String
+Public RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_MODIFY As String
+Public RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_OPEN As String
+Public RID_STR_WORD_ATTRIBUTE_PROTECTION As String
+Public RID_STR_WORD_ATTRIBUTE_SET As String
+Public RID_STR_WORD_ATTRIBUTE_START_COL As String
+Public RID_STR_WORD_ATTRIBUTE_START_ROW As String
+Public RID_STR_WORD_ATTRIBUTE_TEXT As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_ISSUE As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_MIGRATE_CLEAN As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_ROUNDTRIP_CLEAN As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_WITH_LEVEL As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_TAB_DOTS As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FORMAL_WITH_LEVEL As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_CLASSIC_WITH_LEVEL As String
+Public RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_DISTINCTIVE_WITH_LEVEL As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_CALCULATION As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_CHECK_BOX As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_DATE As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_TIME As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DATE As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_EXPRESSION As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_NUMBER As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TEXT As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TIME As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_DROP_DOWN As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TEXT As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TIME As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_NUMBER As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_REGULAR As String
+Public RID_STR_WORD_ENUMERATION_FORM_FIELD_TEXT As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_ASK As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_LEGAL As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_OUTLINE As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_FIELD_NAME_NOT_KNOWN As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_FILL_IN As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_RECORDS As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_FIELDS As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_NEXT As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_REVISION_NUMBER As String
+Public RID_STR_WORD_ENUMERATION_MAILMERGE_SEQUENCE As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_CLASSIC As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_DISTINCTIVE As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_FANCY As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_FORMAL As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_MODERN As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_SIMPLE As String
+Public RID_STR_WORD_ENUMERATION_INDEX_TABLES_FROM_TEMPLATE As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_DASHES As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_DOTS As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_HEAVY As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_LINES As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_MIDDLEDOT As String
+Public RID_STR_WORD_ENUMERATION_INDEX_LEADER_SPACES As String
+Public RID_STR_WORD_ENUMERATION_UNKNOWN As String
+Public RID_STR_WORD_FALSE As String
+Public RID_STR_WORD_TRUE As String
+Public RID_STR_WORD_ISSUE_FIELDS As String
+Public RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES As String
+Public RID_STR_WORD_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES As String
+Public RID_STR_WORD_ISSUE_TABLES As String
+Public RID_STR_WORD_NOTE_FORM_FIELD_ATTRIBUTES_LOST As String
+Public RID_STR_WORD_NOTE_FORM_FIELD_TYPE_LOST As String
+Public RID_STR_WORD_NOTE_NESTED_TABLE_WILL_BE_LOST As String
+Public RID_STR_WORD_NOTE_TABLE_BORDER As String
+Public RID_STR_WORD_NOTE_TOA_FIELD_LOST_ON_ROUNDTRIP As String
+Public RID_STR_WORD_NOTE_TOA_MIGRATE_AS_PLAIN_TEXT As String
+Public RID_STR_WORD_SUBISSUE_APPEARANCE As String
+Public RID_STR_WORD_SUBISSUE_BORDER_STYLES As String
+Public RID_STR_WORD_SUBISSUE_COMMENT As String
+Public RID_STR_WORD_SUBISSUE_CUSTOM_BULLET_LIST As String
+Public RID_STR_WORD_SUBISSUE_FORM_FIELD As String
+Public RID_STR_WORD_SUBISSUE_MAILMERGE_DATASOURCE As String
+Public RID_STR_WORD_SUBISSUE_MAILMERGE_FIELD As String
+Public RID_STR_WORD_SUBISSUE_NESTED_TABLES As String
+Public RID_STR_WORD_SUBISSUE_OBJECT_IN_HEADER_FOOTER As String
+Public RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES As String
+Public RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD As String
+Public RID_STR_WORD_ATTRIBUTE_COUNT As String
+
+'Word Driver Strings
+Public RID_STR_WDVR_SOANA As String
+Public RID_STR_WDVR_INTRO As String
+Public RID_STR_WDVR_TITLE As String
+Public RID_STR_WDVR_PURPO As String
+Public RID_STR_WDVR_PARA1 As String
+Public RID_STR_WDVR_ISSUE As String
+Public RID_STR_WDVR_PARA2 As String
+
+Public Sub LoadWordStrings(sdm As StringDataManager)
+ 'Word Specific
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_COMMENTS, "RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_COMMENTS"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_FORM_FIELDS, "RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_FORM_FIELDS"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_REVISIONS, "RID_STR_WORD_ATTRIBUTE_ALLOW_ONLY_REVISIONS"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_AUTHOR, "RID_STR_WORD_ATTRIBUTE_AUTHOR"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_BORDERS_NOT_DISPLAYING, "RID_STR_WORD_ATTRIBUTE_BORDERS_NOT_DISPLAYING"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_DATASOURCE, "RID_STR_WORD_ATTRIBUTE_DATASOURCE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FIELD_TEXT, "RID_STR_WORD_ATTRIBUTE_FIELD_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_AUTOSIZE, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_AUTOSIZE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_ENTRY_MACRO, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_ENTRY_MACRO"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_EXIT_MACRO, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_EXIT_MACRO"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_FILLIN_ENABLED, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_FILLIN_ENABLED"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_GREYED, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_GREYED"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_AUTO_TEXT, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_AUTO_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_OWN_TEXT, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_HELP_KEY_F1_OWN_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_LOCKED, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_LOCKED"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_MAX_LENGTH, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_MAX_LENGTH"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_AUTO_TEXT, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_AUTO_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_OWN_TEXT, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_STATUS_BAR_HELP_OWN_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FORM_FIELD_TEXT_FORM_FIELD_TYPE, "RID_STR_WORD_ATTRIBUTE_FORM_FIELD_TEXT_FORM_FIELD_TYPE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FOOTER, "RID_STR_WORD_ATTRIBUTE_FOOTER"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_HEADER, "RID_STR_WORD_ATTRIBUTE_HEADER"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_FRAME, "RID_STR_WORD_ATTRIBUTE_FRAME"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_GRAPHIC, "RID_STR_WORD_ATTRIBUTE_GRAPHIC"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_H, "RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_H"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_F, "RID_STR_WORD_ATTRIBUTE_OBJECT_HEIGHT_GT_F"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_NUM_OF_GRAPHIC, "RID_STR_WORD_ATTRIBUTE_NUM_OF_GRAPHIC"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_OBJECT_LOCATED_BELOW_HEADER, "RID_STR_WORD_ATTRIBUTE_OBJECT_LOCATED_BELOW_HEADER"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_NUM_OF_FRAME, "RID_STR_WORD_ATTRIBUTE_NUM_OF_FRAME"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_GRAPHICTYPE, "RID_STR_WORD_ATTRIBUTE_GRAPHICTYPE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_INLINESHAPE, "RID_STR_WORD_ATTRIBUTE_INLINESHAPE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_INNER_TABLE, "RID_STR_WORD_ATTRIBUTE_INNER_TABLE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_LEADER, "RID_STR_WORD_ATTRIBUTE_LEADER"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_LINK, "RID_STR_WORD_ATTRIBUTE_LINK"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_LOCATION, "RID_STR_WORD_ATTRIBUTE_LOCATION"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_NUMBER_CUSTOM_PARAGRAPHS, "RID_STR_WORD_ATTRIBUTE_NUMBER_CUSTOM_PARAGRAPHS"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_OUTER_TABLE, "RID_STR_WORD_ATTRIBUTE_OUTER_TABLE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_MODIFY, "RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_MODIFY"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_OPEN, "RID_STR_WORD_ATTRIBUTE_PASSWORD_TO_OPEN"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_PROTECTION, "RID_STR_WORD_ATTRIBUTE_PROTECTION"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_SET, "RID_STR_WORD_ATTRIBUTE_SET"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_START_COL, "RID_STR_WORD_ATTRIBUTE_START_COL"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_START_ROW, "RID_STR_WORD_ATTRIBUTE_START_ROW"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TEXT, "RID_STR_WORD_ATTRIBUTE_TEXT"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_ISSUE, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_ISSUE"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_MIGRATE_CLEAN, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_MIGRATE_CLEAN"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_ROUNDTRIP_CLEAN, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_NOT_ROUNDTRIP_CLEAN"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_WITH_LEVEL, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_WITH_LEVEL"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_TAB_DOTS, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FROM_TEMPLATE_TAB_DOTS"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FORMAL_WITH_LEVEL, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_FORMAL_WITH_LEVEL"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_CLASSIC_WITH_LEVEL, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_CLASSIC_WITH_LEVEL"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_DISTINCTIVE_WITH_LEVEL, "RID_STR_WORD_ATTRIBUTE_TOC_FORMAT_DISTINCTIVE_WITH_LEVEL"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_CALCULATION, "RID_STR_WORD_ENUMERATION_FORM_FIELD_CALCULATION"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_CHECK_BOX, "RID_STR_WORD_ENUMERATION_FORM_FIELD_CHECK_BOX"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_DATE, "RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_DATE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_TIME, "RID_STR_WORD_ENUMERATION_FORM_FIELD_CURRENT_TIME"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DATE, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DATE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_DATE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_EXPRESSION, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_EXPRESSION"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_NUMBER, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_NUMBER"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TEXT, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TEXT"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TIME, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DEFAULT_TIME"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_DROP_DOWN, "RID_STR_WORD_ENUMERATION_FORM_FIELD_DROP_DOWN"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE, "RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_DATE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER, "RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_NUMBER"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TEXT, "RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TEXT"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TIME, "RID_STR_WORD_ENUMERATION_FORM_FIELD_FORMAT_TIME"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_NUMBER, "RID_STR_WORD_ENUMERATION_FORM_FIELD_NUMBER"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_REGULAR, "RID_STR_WORD_ENUMERATION_FORM_FIELD_REGULAR"
+ sdm.InitString RID_STR_WORD_ENUMERATION_FORM_FIELD_TEXT, "RID_STR_WORD_ENUMERATION_FORM_FIELD_TEXT"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_ASK, "RID_STR_WORD_ENUMERATION_MAILMERGE_ASK"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER, "RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_LEGAL, "RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_LEGAL"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_OUTLINE, "RID_STR_WORD_ENUMERATION_MAILMERGE_AUTO_NUMBER_OUTLINE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_FIELD_NAME_NOT_KNOWN, "RID_STR_WORD_ENUMERATION_MAILMERGE_FIELD_NAME_NOT_KNOWN"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_FILL_IN, "RID_STR_WORD_ENUMERATION_MAILMERGE_FILL_IN"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_RECORDS, "RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_RECORDS"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_FIELDS, "RID_STR_WORD_ENUMERATION_MAILMERGE_MERGE_FIELDS"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_NEXT, "RID_STR_WORD_ENUMERATION_MAILMERGE_NEXT"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_REVISION_NUMBER, "RID_STR_WORD_ENUMERATION_MAILMERGE_REVISION_NUMBER"
+ sdm.InitString RID_STR_WORD_ENUMERATION_MAILMERGE_SEQUENCE, "RID_STR_WORD_ENUMERATION_MAILMERGE_SEQUENCE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_CLASSIC, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_CLASSIC"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_DISTINCTIVE, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_DISTINCTIVE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_FANCY, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_FANCY"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_FORMAL, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_FORMAL"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_MODERN, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_MODERN"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_SIMPLE, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_SIMPLE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_TABLES_FROM_TEMPLATE, "RID_STR_WORD_ENUMERATION_INDEX_TABLES_FROM_TEMPLATE"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_DASHES, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_DASHES"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_DOTS, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_DOTS"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_HEAVY, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_HEAVY"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_LINES, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_LINES"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_MIDDLEDOT, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_MIDDLEDOT"
+ sdm.InitString RID_STR_WORD_ENUMERATION_INDEX_LEADER_SPACES, "RID_STR_WORD_ENUMERATION_INDEX_LEADER_SPACES"
+ sdm.InitString RID_STR_WORD_ENUMERATION_UNKNOWN, "RID_STR_WORD_ENUMERATION_UNKNOWN"
+ sdm.InitString RID_STR_WORD_FALSE, "RID_STR_WORD_FALSE"
+ sdm.InitString RID_STR_WORD_TRUE, "RID_STR_WORD_TRUE"
+ sdm.InitString RID_STR_WORD_ISSUE_FIELDS, "RID_STR_WORD_ISSUE_FIELDS"
+ sdm.InitString RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES, "RID_STR_WORD_ISSUE_INDEX_AND_REFERENCES"
+ sdm.InitString RID_STR_WORD_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES, "RID_STR_WORD_ISSUE_OBJECTS_GRAPHICS_AND_FRAMES"
+ sdm.InitString RID_STR_WORD_ISSUE_TABLES, "RID_STR_WORD_ISSUE_TABLES"
+ sdm.InitString RID_STR_WORD_NOTE_FORM_FIELD_ATTRIBUTES_LOST, "RID_STR_WORD_NOTE_FORM_FIELD_ATTRIBUTES_LOST"
+ sdm.InitString RID_STR_WORD_NOTE_FORM_FIELD_TYPE_LOST, "RID_STR_WORD_NOTE_FORM_FIELD_TYPE_LOST"
+ sdm.InitString RID_STR_WORD_NOTE_NESTED_TABLE_WILL_BE_LOST, "RID_STR_WORD_NOTE_NESTED_TABLE_WILL_BE_LOST"
+ sdm.InitString RID_STR_WORD_NOTE_TABLE_BORDER, "RID_STR_WORD_NOTE_TABLE_BORDER"
+ sdm.InitString RID_STR_WORD_NOTE_TOA_FIELD_LOST_ON_ROUNDTRIP, "RID_STR_WORD_NOTE_TOA_FIELD_LOST_ON_ROUNDTRIP"
+ sdm.InitString RID_STR_WORD_NOTE_TOA_MIGRATE_AS_PLAIN_TEXT, "RID_STR_WORD_NOTE_TOA_MIGRATE_AS_PLAIN_TEXT"
+ sdm.InitString RID_STR_WORD_SUBISSUE_APPEARANCE, "RID_STR_WORD_SUBISSUE_APPEARANCE"
+ sdm.InitString RID_STR_WORD_SUBISSUE_BORDER_STYLES, "RID_STR_WORD_SUBISSUE_BORDER_STYLES"
+ sdm.InitString RID_STR_WORD_SUBISSUE_COMMENT, "RID_STR_WORD_SUBISSUE_COMMENT"
+ sdm.InitString RID_STR_WORD_SUBISSUE_CUSTOM_BULLET_LIST, "RID_STR_WORD_SUBISSUE_CUSTOM_BULLET_LIST"
+ sdm.InitString RID_STR_WORD_SUBISSUE_FORM_FIELD, "RID_STR_WORD_SUBISSUE_FORM_FIELD"
+ sdm.InitString RID_STR_WORD_SUBISSUE_MAILMERGE_DATASOURCE, "RID_STR_WORD_SUBISSUE_MAILMERGE_DATASOURCE"
+ sdm.InitString RID_STR_WORD_SUBISSUE_MAILMERGE_FIELD, "RID_STR_WORD_SUBISSUE_MAILMERGE_FIELD"
+ sdm.InitString RID_STR_WORD_SUBISSUE_NESTED_TABLES, "RID_STR_WORD_SUBISSUE_NESTED_TABLES"
+ sdm.InitString RID_STR_WORD_SUBISSUE_OBJECT_IN_HEADER_FOOTER, "RID_STR_WORD_SUBISSUE_OBJECT_IN_HEADER_FOOTER"
+ sdm.InitString RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES, "RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES"
+ sdm.InitString RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD, "RID_STR_WORD_SUBISSUE_TABLE_OF_AUTHORITIES_FIELD"
+ sdm.InitString RID_STR_WORD_ATTRIBUTE_COUNT, "RID_STR_WORD_ATTRIBUTE_COUNT"
+
+ 'Word driver strings
+ sdm.InitString RID_STR_WDVR_SOANA, "RID_STR_WDVR_SOANA"
+ sdm.InitString RID_STR_WDVR_INTRO, "RID_STR_WDVR_INTRO"
+ sdm.InitString RID_STR_WDVR_TITLE, "RID_STR_WDVR_TITLE"
+ sdm.InitString RID_STR_WDVR_PURPO, "RID_STR_WDVR_PURPO"
+ sdm.InitString RID_STR_WDVR_PARA1, "RID_STR_WDVR_PARA1"
+ sdm.InitString RID_STR_WDVR_ISSUE, "RID_STR_WDVR_ISSUE"
+ sdm.InitString RID_STR_WDVR_PARA2, "RID_STR_WDVR_PARA2"
+End Sub
+
diff --git a/migrationanalysis/src/driver_docs/ulf2dat.pl b/migrationanalysis/src/driver_docs/ulf2dat.pl
new file mode 100644
index 000000000000..129bcc9fb319
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/ulf2dat.pl
@@ -0,0 +1,156 @@
+:
+eval 'exec perl -wS $0 ${1+"$@"}'
+ if 0;
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: ulf2dat.pl,v $
+# $Revision: 1.4.108.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#***********************************************************************/
+
+
+#### script id #####
+
+( $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
+
+$id_str = ' $Revision: 1.4.108.1 $ ';
+$id_str =~ /Revision:\s+(\S+)\s+\$/
+ ? ($script_rev = $1) : ($script_rev = "-");
+
+#########################
+# #
+# Globale Variablen #
+# #
+#########################
+
+use Encode;
+use Encode::Alias;
+
+
+my ($in_name, $ID, $new_ID);
+my ($help);
+
+print STDERR "$script_name -- Version: $script_rev\n" ;
+
+&get_options;
+
+if ( $help ) {
+ &usage();
+ exit 0;
+};
+
+
+open IN, "<$in_name" or die "Could not open $in_name for reading $! $^E";
+
+foreach $lang ( keys %files )
+{
+ open "F_$lang",">$files{$lang}" or die "Could not open $files{$lang} for writing $! $^E";
+ binmode "F_$lang";
+ $files{$lang} = "F_$lang";
+}
+
+%transunit = ();
+
+while ( <IN> )
+{
+ chomp;
+ $line = $_;
+ $line =~ s/\r$//;
+ # [RID_RESXLS_COST_Print_Area]
+ if ( $line =~ /^\[(.*)\]$/ )
+ {
+ $new_ID = $1;
+
+ write_transunit();
+ $ID = $new_ID;
+ %transunit = ();
+ }
+ # de = "Druckbereich"
+ elsif ( $line =~ /^(\S*)\s*=\s*\"(.*)\"$/ )
+ {
+ $lang = $1;
+ $string = $2;
+ $transunit{ $lang } = $string;
+ }
+ elsif ( $line !~ /^\s*$/ )
+ {
+ die "unknown lineformat in $in_name: $line\n";
+ }
+}
+write_transunit();
+
+
+sub write_transunit
+{
+ if ( ! $ID )
+ {
+ return;
+ }
+ foreach $lang ( keys %files )
+ {
+ my $string;
+ if ( defined $transunit{ $lang } )
+ {
+ $string = $transunit{ $lang };
+ }
+ else
+ {
+ $string = $transunit{ "en-US" };
+ }
+
+ my $dat_line = "$ID=$string";
+ Encode::from_to( $dat_line, "utf8", "UTF-16LE");
+ print { $files{$lang} } "$dat_line\015\000\012\000";
+ }
+}
+
+
+sub get_options {
+ my ($arg,$lang);
+
+ while ($arg = shift @ARGV) {
+ $arg =~ /^-i$/ and $in_name = shift @ARGV and next;
+ $arg =~ /^-help$/ and $help = 1 and next; #show help
+
+ $arg =~ /.*[\/\\]([^\/\\]*)\.dat$/;
+# $arg =~ /.*[/\]([^/\]*)\.dat$/;
+ $lang = $1;
+ print "got $lang = $arg\n";
+ $files{ $lang } = $arg;
+ }
+}
+
+
+
+sub usage {
+ print STDERR "\n\n";
+ print STDERR "Syntax: $script_name [-help|-i <ulf-filename>] <dat-filename> ... \n";
+ print STDERR "Example: $script_name -i strings.ulf en-US.dat de.dat\n";
+ print STDERR "Options:\n\n";
+ print STDERR " -i input ulf file\n";
+ print STDERR " -help print this help info\n\n";
+};
+
diff --git a/migrationanalysis/src/exe/LaunchDrivers.exe b/migrationanalysis/src/exe/LaunchDrivers.exe
new file mode 100644
index 000000000000..cf21a73a92fb
--- /dev/null
+++ b/migrationanalysis/src/exe/LaunchDrivers.exe
Binary files differ
diff --git a/migrationanalysis/src/exe/ProAnalysisWizard.exe b/migrationanalysis/src/exe/ProAnalysisWizard.exe
new file mode 100644
index 000000000000..1632d8ec9d52
--- /dev/null
+++ b/migrationanalysis/src/exe/ProAnalysisWizard.exe
Binary files differ
diff --git a/migrationanalysis/src/msokill/StdAfx.cpp b/migrationanalysis/src/msokill/StdAfx.cpp
new file mode 100644
index 000000000000..437fd8d04299
--- /dev/null
+++ b/migrationanalysis/src/msokill/StdAfx.cpp
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: StdAfx.cpp,v $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// stdafx.cpp : source file that includes just the standard includes
+// msokill.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/migrationanalysis/src/msokill/StdAfx.h b/migrationanalysis/src/msokill/StdAfx.h
new file mode 100644
index 000000000000..7bbae51de8f5
--- /dev/null
+++ b/migrationanalysis/src/msokill/StdAfx.h
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: StdAfx.h,v $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/*
+ *
+ * Description: Put MSO in a state where it can be closed using
+ * automation or kill it completely
+ *
+ */
+
+#if !defined(AFX_STDAFX_H__12149A50_72AF_409A_9B43_8ACCD98F50CE__INCLUDED_)
+#define AFX_STDAFX_H__12149A50_72AF_409A_9B43_8ACCD98F50CE__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <stdio.h>
+#pragma warning(push, 1)
+#include <windows.h>
+#pragma warning(pop)
+
+// TODO: reference additional headers your program requires here
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__12149A50_72AF_409A_9B43_8ACCD98F50CE__INCLUDED_)
diff --git a/migrationanalysis/src/msokill/makefile.mk b/migrationanalysis/src/msokill/makefile.mk
new file mode 100644
index 000000000000..349a1a59c395
--- /dev/null
+++ b/migrationanalysis/src/msokill/makefile.mk
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME = migrationanalysis
+TARGET = msokill
+LIBTARGET = NO
+TARGETTYPE = CUI
+
+ENABLE_EXCEPTIONS = TRUE
+
+# --- Settings ------------------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Allgemein -----------------------------------------------------------
+
+OBJFILES= $(OBJ)$/msokill.obj \
+ $(OBJ)$/StdAfx.obj
+
+# --- Targets ------------------------------------------------------
+
+UWINAPILIB=
+LIBSALCPPRT=
+
+APP1NOSAL= TRUE
+APP1TARGET= msokill
+
+#APP1STDLIB
+STDLIB1=msi.lib\
+ shell32.lib\
+ oleaut32.lib\
+ gdi32.lib\
+ comdlg32.lib\
+ advapi32.lib\
+ comctl32.lib\
+ shlwapi.lib\
+ oledlg.lib\
+ ole32.lib\
+ uuid.lib\
+ oleacc.lib\
+ winspool.lib\
+
+APP1OBJS= $(OBJFILES)
+
+PAW_RES_DIR:=$(BIN)$/ProAnalysisWizard$/Resources
+PAW_RES_EXE:=$(PAW_RES_DIR)$/$(APP1TARGET).exe
+
+# --- setup --------------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : $(PAW_RES_EXE)
+
+$(PAW_RES_EXE) : $(BIN)$/$$(@:f)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(BIN)$/$(@:f) $@
+
diff --git a/migrationanalysis/src/msokill/msokill.cpp b/migrationanalysis/src/msokill/msokill.cpp
new file mode 100644
index 000000000000..0b2e93768076
--- /dev/null
+++ b/migrationanalysis/src/msokill/msokill.cpp
@@ -0,0 +1,261 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: msokill.cpp,v $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/*
+ * Description: Put MSO in a state where it can be closed using
+ * automation or kill it completely
+ */
+
+#include "stdafx.h"
+#include <stdio.h>
+
+
+void KillOffice();
+BOOL KillAppFromWindow(HWND hWnd, char *appName);
+BOOL CloseActiveDialogs();
+void printUsage();
+
+//Callbacks used in closing
+BOOL CALLBACK CloseOfficeDlgProc(HWND hwndChild, LPARAM lParam);
+BOOL CALLBACK CountOfficeDlgProc(HWND hwndChild, LPARAM lParam);
+
+//Global counters for number of windows found
+int gWDDlgCount = 0;
+int gXLDlgCount = 0;
+int gPPDlgCount = 0;
+
+//Dialog window class names for excel, powerpoint and word
+//These are "Best guess" dialog names
+const char *pWordDlg2k = "bosa_sdm_Microsoft Word 9.0";
+const char *pWordDlg2k3 = "bosa_sdm_Microsoft Office Word";
+const char *pXLDlg2k = "bosa_sdm_XL9";
+const char *pPPDlg2k = "#32770";
+const char *pXLDlg2k3 = "bosa_sdm_XL9";
+const char *pPPDlg2k3 = "#32770";
+const char *pGenMSODlg = "bosa_sdm_Mso96";
+//consider adding - bosa_sdm_Mso96
+
+//Command Line Argument constants
+const char *ARG_HELP = "--help";
+const char *ARG_KILL = "--kill";
+const char *ARG_CLOSE = "--close";
+
+//Window class names for MSO apps - if we need to look at other office instances
+//then this list would need to be expanded
+#define NUM_WINDOWCLASSNAMES 4
+char *wndClassName[NUM_WINDOWCLASSNAMES] = {"OpusApp", "XLMAIN", "PP9FrameClass", "PP10FrameClass"};
+
+int main(int argc, char* argv[])
+{
+ if (argc < 2) {
+ printUsage();
+ return 0;
+ }
+
+ if (strcmpi(argv[1], ARG_HELP) == 0) {
+ printUsage();
+ return 0;
+ }
+
+ if (strcmpi(argv[1], ARG_KILL) == 0) {
+ KillOffice();
+ return 0;
+ }
+
+ if (strcmpi(argv[1], ARG_CLOSE) == 0) {
+ CloseActiveDialogs();
+ return 0;
+ }
+
+ return 0;
+}
+
+/*--------------------------------------------------------------
+ Find the MSO window if it is available and explictly kill it
+ MSO apps in this case are Excel, Word and PP
+ Use FindWindow Win32 API to detect if they are available
+
+ -------------------------------------------------------------*/
+void KillOffice() {
+ HWND hWnd;
+
+ for (int i=0;i<NUM_WINDOWCLASSNAMES;i++) {
+ int j = 0;
+ while (((hWnd = FindWindow(wndClassName[i], NULL )) != NULL) && (j < 10)) {
+ KillAppFromWindow(hWnd, wndClassName[i]);
+ j++;
+ }
+ }
+}
+
+/*--------------------------------------------------------------
+ Using window handle, get process handle and try to kill the
+ app. This may not be successful if you do not have enough
+ privileges to kill the app.
+
+ --------------------------------------------------------------*/
+BOOL KillAppFromWindow(
+ HWND hWnd,
+ char *
+#ifdef _DEBUG
+ appName
+#endif
+)
+{
+ BOOL bRet = TRUE;
+
+ if(hWnd == NULL) {
+ //The app doesn't appear to be running
+#ifdef _DEBUG
+ printf("App %s: window not found.\n,", appName);
+#endif
+ bRet = FALSE;
+ } else {
+ DWORD pid; // Variable to hold the process ID.
+ DWORD dThread; // Variable to hold (unused) thread ID.
+ dThread = GetWindowThreadProcessId(hWnd, &pid);
+ HANDLE hProcess; // Handle to existing process
+
+ hProcess = OpenProcess(SYNCHRONIZE | PROCESS_ALL_ACCESS, TRUE, pid);
+ if (hProcess == NULL) {
+#ifdef _DEBUG
+ printf("App %s : Failed to get process handle",appName);
+#endif
+ bRet = FALSE;
+ } else {
+ if (!TerminateProcess(hProcess, 0)) {
+ LPTSTR lpMsgBuf;
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &lpMsgBuf, 0, NULL );
+ printf("%s\n", lpMsgBuf);
+ LocalFree( lpMsgBuf );
+ bRet = FALSE;
+ }
+#ifdef _DEBUG
+ else {
+ printf("Kill %s appears to be successful.\n", appName);
+ }
+#endif
+ }
+ }
+ return bRet;
+}
+
+/*--------------------------------------------------------------
+ Close the dialogs if possible based on their window class
+ Use the EnumChildWindows win32 api for this
+ --------------------------------------------------------------*/
+BOOL CloseActiveDialogs() {
+ char buff[1024];
+
+ gWDDlgCount = 0;
+ gXLDlgCount = 0;
+ gPPDlgCount = 0;
+
+ EnumChildWindows(GetDesktopWindow(), CloseOfficeDlgProc, (LPARAM) 0);
+ sprintf(buff, "Word: %d\tExcel: %d\tPP: %d", gWDDlgCount, gXLDlgCount, gPPDlgCount);
+ return TRUE;
+}
+
+/*--------------------------------------------------------------
+ Callback for EnumChildWindows that sends close message to
+ any dialogs that match window class of MSO dialogs
+
+ --------------------------------------------------------------*/
+BOOL CALLBACK CloseOfficeDlgProc(HWND hwndChild, LPARAM)
+{
+ //bosa_sdm_Microsoft Word 9.0
+ //bosa_sdm_XL9
+ //#32770 (Dialog)
+
+ char szBuff[4096];
+ if (GetClassName(hwndChild, szBuff, 4096) == 0) {
+
+ } else {
+ if ((strcmpi(szBuff, pWordDlg2k) == 0) || (strcmpi(szBuff, pWordDlg2k3) == 0)) {
+ gWDDlgCount++;
+ SendMessage(hwndChild, WM_CLOSE, 0, 0);
+ }
+ if (strcmpi(szBuff, pXLDlg2k) == 0) {
+ gXLDlgCount++;
+ SendMessage(hwndChild, WM_CLOSE, 0, 0);
+ }
+ if (strcmpi(szBuff, pPPDlg2k) == 0) {
+ gPPDlgCount++;
+ SendMessage(hwndChild, WM_CLOSE, 0, 0);
+ }
+ if (strcmpi(szBuff, pGenMSODlg) == 0) {
+ SendMessage(hwndChild, WM_CLOSE, 0, 0);
+ }
+ }
+
+ return TRUE;
+}
+
+
+/*--------------------------------------------------------------
+ Callback for EnumChildWindows that counts numnnber of
+ dialogs that match window class of MSO dialogs
+
+ --------------------------------------------------------------*/
+BOOL CALLBACK CountOfficeDlgProc(HWND hwndChild, LPARAM)
+{
+ char szBuff[4096];
+ if (GetClassName(hwndChild, szBuff, 4096) == 0) {
+
+ } else {
+ if ((strcmpi(szBuff, pWordDlg2k) == 0) || (strcmpi(szBuff, pWordDlg2k3) == 0)) {
+ gWDDlgCount++;
+ }
+ if (strcmpi(szBuff, pXLDlg2k) == 0) {
+ gXLDlgCount++;
+ }
+ if (strcmpi(szBuff, pPPDlg2k) == 0) {
+ gPPDlgCount++;
+ }
+ }
+
+ return TRUE;
+}
+
+/*--------------------------------------------------------------
+ Simple usage message...
+
+ -------------------------------------------------------------*/
+void printUsage() {
+ printf("Recovery Assistant Utility - try and put MSO apps in a recoverable state\n");
+ printf("Copyright Sun Microsystems 2008\n");
+ printf("Options:\n");
+ printf(" --help : This message\n");
+ printf(" --close: Attempt to close any open dialogs owned by \n");
+ printf(" MSO apps so Application.Quit() can succeed\n");
+ printf(" --kill : Kill any open MSO apps. Use with caution and only as a last resort\n\n");
+} \ No newline at end of file
diff --git a/migrationanalysis/src/resources/analysis.dtd b/migrationanalysis/src/resources/analysis.dtd
new file mode 100644
index 000000000000..2a4482b65efe
--- /dev/null
+++ b/migrationanalysis/src/resources/analysis.dtd
@@ -0,0 +1,52 @@
+<!ELEMENT results ( document+ ) >
+<!ATTLIST results generated-by NMTOKEN #REQUIRED >
+<!ATTLIST results version CDATA #REQUIRED >
+<!ATTLIST results timestamp CDATA #REQUIRED >
+<!ATTLIST results type NMTOKEN #REQUIRED >
+
+<!ELEMENT document ( references?, issues? ) >
+<!ATTLIST document location CDATA #REQUIRED >
+<!ATTLIST document application CDATA #REQUIRED >
+<!ATTLIST document issues-count CDATA #IMPLIED >
+<!ATTLIST document pages CDATA #REQUIRED >
+<!ATTLIST document created CDATA #REQUIRED >
+<!ATTLIST document modified CDATA #REQUIRED >
+<!ATTLIST document accessed CDATA #REQUIRED >
+<!ATTLIST document printed CDATA #REQUIRED >
+<!ATTLIST document last-save-by CDATA #REQUIRED >
+<!ATTLIST document revision CDATA #REQUIRED >
+<!ATTLIST document based-on-template CDATA #REQUIRED >
+
+<!ELEMENT references ( reference+ ) >
+
+<!ELEMENT reference EMPTY >
+<!ATTLIST reference name CDATA #REQUIRED >
+<!ATTLIST reference description CDATA #REQUIRED >
+<!ATTLIST reference location CDATA #REQUIRED >
+<!ATTLIST reference type CDATA #REQUIRED >
+<!ATTLIST reference GUID CDATA #IMPLIED >
+<!ATTLIST reference is-broken CDATA #REQUIRED >
+<!ATTLIST reference builtin CDATA #REQUIRED >
+
+
+<!ELEMENT issues ( issue+ ) >
+
+<!ELEMENT issue ( location, details+ ) >
+<!ATTLIST issue category CDATA #REQUIRED >
+<!ATTLIST issue type CDATA #REQUIRED >
+<!ATTLIST issue prepared CDATA #REQUIRED >
+
+<!ELEMENT location ( property* ) >
+<!ATTLIST location type CDATA #REQUIRED >
+
+<!ELEMENT details ( (property+), (property | note)* ) >
+
+<!ELEMENT property EMPTY >
+<!ATTLIST property name CDATA #REQUIRED >
+<!ATTLIST property value CDATA #REQUIRED >
+
+<!ELEMENT note EMPTY >
+<!ATTLIST note index CDATA #REQUIRED >
+<!ATTLIST note value CDATA #REQUIRED >
+
+
diff --git a/migrationanalysis/src/resources/makefile.mk b/migrationanalysis/src/resources/makefile.mk
new file mode 100644
index 000000000000..f94a9c2cf4d9
--- /dev/null
+++ b/migrationanalysis/src/resources/makefile.mk
@@ -0,0 +1,61 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=migrationanalysis
+TARGET=resources
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+PAW_DEST:=$(BIN)$/ProAnalysisWizard$/Resources
+PAW_RESULT:= $(PAW_DEST)$/results.xlt
+PAW_RESULTSRC:= results_paw.xlt
+
+ANALYSIS_DTD:=analysis.dtd
+PAW_ANALYSIS_DTD:=$(PAW_DEST)$/analysis.dtd
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : $(PAW_RESULT) $(PAW_ANALYSIS_DTD)
+
+$(PAW_RESULT) : $(PAW_RESULTSRC)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(PAW_RESULTSRC) $@
+
+$(PAW_ANALYSIS_DTD) : $(ANALYSIS_DTD)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(ANALYSIS_DTD) $@
+
diff --git a/migrationanalysis/src/resources/results_paw.xlt b/migrationanalysis/src/resources/results_paw.xlt
new file mode 100644
index 000000000000..7ba5d5143d95
--- /dev/null
+++ b/migrationanalysis/src/resources/results_paw.xlt
Binary files differ
diff --git a/migrationanalysis/src/wizard/Analyse.bas b/migrationanalysis/src/wizard/Analyse.bas
new file mode 100644
index 000000000000..b74838057e60
--- /dev/null
+++ b/migrationanalysis/src/wizard/Analyse.bas
@@ -0,0 +1,592 @@
+Attribute VB_Name = "Analyse"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Analyse.bas,v $
+' * $Revision: 1.2.66.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+Private Const C_STAT_NOT_STARTED As Integer = 1
+Private Const C_STAT_RETRY As Integer = 2
+Private Const C_STAT_ERROR As Integer = 3
+Private Const C_STAT_DONE As Integer = 4
+Private Const C_STAT_ABORTED As Integer = 5
+
+Private Const C_MAX_RETRIES As Integer = 5
+Private Const C_ABORT_TIMEOUT As Integer = 30
+
+Private Const MAX_WAIT_TIME As Long = 600
+
+Private Const C_STAT_FINISHED As String = "finished"
+Private Const C_STAT_ANALYSED As String = "analysed="
+Private Const C_STAT_ANALYSING As String = "analysing="
+Private Const CSINGLE_FILE As String = "singlefile"
+Private Const CFILE_LIST As String = "filelist"
+Private Const CSTAT_FILE As String = "statfilename"
+Private Const CLAST_CHECKPOINT As String = "LastCheckpoint"
+Private Const CNEXT_FILE As String = "NextFile"
+Private Const C_ABORT_ANALYSIS As String = "AbortAnalysis"
+
+Private Const CAPPNAME_WORD As String = "word"
+Private Const CAPPNAME_EXCEL As String = "excel"
+Private Const CAPPNAME_POWERPOINT As String = "powerpoint"
+Private Const C_EXENAME_WORD As String = "winword.exe"
+Private Const C_EXENAME_EXCEL As String = "excel.exe"
+Private Const C_EXENAME_POWERPOINT As String = "powerpnt.exe"
+
+Const CNEW_RESULTS_FILE = "newresultsfile"
+Const C_LAUNCH_DRIVER = ".\resources\LaunchDrivers.exe"
+
+'from http://support.microsoft.com/kb/q129796
+
+Private Type STARTUPINFO
+ cb As Long
+ lpReserved As String
+ lpDesktop As String
+ lpTitle As String
+ dwX As Long
+ dwY As Long
+ dwXSize As Long
+ dwYSize As Long
+ dwXCountChars As Long
+ dwYCountChars As Long
+ dwFillAttribute As Long
+ dwFlags As Long
+ wShowWindow As Integer
+ cbReserved2 As Integer
+ lpReserved2 As Long
+ hStdInput As Long
+ hStdOutput As Long
+ hStdError As Long
+End Type
+
+Private Type PROCESS_INFORMATION
+ hProcess As Long
+ hThread As Long
+ dwProcessID As Long
+ dwThreadID As Long
+End Type
+
+Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal _
+ hHandle As Long, ByVal dwMilliseconds As Long) As Long
+
+Private Declare Function CreateProcessA Lib "kernel32" (ByVal _
+ lpApplicationName As String, ByVal lpCommandLine As String, ByVal _
+ lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _
+ ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
+ ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As String, _
+ lpStartupInfo As STARTUPINFO, lpProcessInformation As _
+ PROCESS_INFORMATION) As Long
+
+Private Declare Function CloseHandle Lib "kernel32" _
+ (ByVal hObject As Long) As Long
+
+Private Declare Function GetExitCodeProcess Lib "kernel32" _
+ (ByVal hProcess As Long, lpExitCode As Long) As Long
+
+Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, _
+ ByVal uExitCode As Long) As Long
+
+Private Const NORMAL_PRIORITY_CLASS = &H20&
+Private Const WAIT_TIMEOUT As Long = &H102
+Private Const ABORTED As Long = -2
+
+' from http://vbnet.mvps.org/index.html?code/system/toolhelpprocesses.htm
+Public Const TH32CS_SNAPPROCESS As Long = 2&
+Public Const MAX_PATH As Long = 260
+
+Public Type PROCESSENTRY32
+ dwSize As Long
+ cntUsage As Long
+ th32ProcessID As Long
+ th32DefaultHeapID As Long
+ th32ModuleID As Long
+ cntThreads As Long
+ th32ParentProcessID As Long
+ pcPriClassBase As Long
+ dwFlags As Long
+ szExeFile As String * MAX_PATH
+End Type
+
+Public Declare Function CreateToolhelp32Snapshot Lib "kernel32" _
+ (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
+
+Public Declare Function ProcessFirst Lib "kernel32" _
+ Alias "Process32First" _
+ (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
+
+Public Declare Function ProcessNext Lib "kernel32" _
+ Alias "Process32Next" _
+ (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
+
+
+Public Function IsOfficeAppRunning(curApplication As String) As Boolean
+'DV: we need some error handling here
+ Dim hSnapShot As Long
+ Dim uProcess As PROCESSENTRY32
+ Dim success As Long
+ Dim bRet As Boolean
+ Dim bAppFound As Boolean
+ Dim exeName As String
+ Dim curExeName As String
+
+ bRet = True
+ On Error GoTo FinalExit
+
+ curExeName = LCase$(curApplication)
+
+ If (curExeName = CAPPNAME_WORD) Then
+ exeName = C_EXENAME_WORD
+ ElseIf (curExeName = CAPPNAME_EXCEL) Then
+ exeName = C_EXENAME_EXCEL
+ ElseIf (curExeName = CAPPNAME_POWERPOINT) Then
+ exeName = C_EXENAME_POWERPOINT
+ Else
+ GoTo FinalExit
+ End If
+
+ hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0&)
+
+ If hSnapShot = -1 Then GoTo FinalExit
+
+ uProcess.dwSize = Len(uProcess)
+ success = ProcessFirst(hSnapShot, uProcess)
+ bAppFound = False
+
+ While ((success = 1) And Not bAppFound)
+ Dim i As Long
+ i = InStr(1, uProcess.szExeFile, Chr(0))
+ curExeName = LCase$(Left$(uProcess.szExeFile, i - 1))
+ If (curExeName = exeName) Then
+ bAppFound = True
+ Else
+ success = ProcessNext(hSnapShot, uProcess)
+ End If
+ Wend
+ bRet = bAppFound
+
+ Call CloseHandle(hSnapShot)
+
+FinalExit:
+ IsOfficeAppRunning = bRet
+
+End Function
+
+Private Sub CalculateProgress(statusFileName As String, fso As FileSystemObject, _
+ lastIndex As Long, docOffset As Long, _
+ myDocList As Collection)
+
+ On Error GoTo FinalExit
+
+ Dim curFile As String
+ Dim fileCont As TextStream
+ Dim myFile As file
+
+ If (fso.FileExists(statusFileName)) Then
+ Dim statLine As String
+
+ Set fileCont = fso.OpenTextFile(statusFileName, ForReading, False, TristateTrue)
+ statLine = fileCont.ReadLine
+
+ If (Left(statLine, Len(C_STAT_ANALYSED)) = C_STAT_ANALYSED) Then
+ curFile = Mid(statLine, Len(C_STAT_ANALYSED) + 1)
+ ElseIf (Left(statLine, Len(C_STAT_ANALYSING)) = C_STAT_ANALYSING) Then
+ curFile = Mid(statLine, Len(C_STAT_ANALYSING) + 1)
+ End If
+ End If
+
+ ' when we don't have a file, we will show the name of the last used file in
+ ' the progress window
+ If (curFile = "") Then curFile = myDocList.item(lastIndex)
+
+ If (GetDocumentIndex(curFile, myDocList, lastIndex)) Then
+ Set myFile = fso.GetFile(curFile)
+ Call ShowProgress.SP_UpdateProgress(myFile.Name, myFile.ParentFolder.path, lastIndex + docOffset)
+ End If
+
+FinalExit:
+ If Not (fileCont Is Nothing) Then fileCont.Close
+ Set fileCont = Nothing
+ Set myFile = Nothing
+
+End Sub
+
+Function CheckAliveStatus(statFileName As String, _
+ curApplication As String, _
+ lastDate As Date, _
+ fso As FileSystemObject) As Boolean
+
+ Dim isAlive As Boolean
+ Dim currDate As Date
+ Dim statFile As file
+ Dim testing As Long
+
+ isAlive = False
+
+ If Not fso.FileExists(statFileName) Then
+ currDate = Now()
+ If (val(DateDiff("s", lastDate, currDate)) > MAX_WAIT_TIME) Then
+ isAlive = False
+ Else
+ isAlive = True
+ End If
+ Else
+ Set statFile = fso.GetFile(statFileName)
+ currDate = statFile.DateLastModified
+ If (currDate > lastDate) Then
+ lastDate = currDate
+ isAlive = True
+ Else
+ currDate = Now()
+ If (lastDate >= currDate) Then ' There might be some inaccuracies in file and system dates
+ isAlive = True
+ ElseIf (val(DateDiff("s", lastDate, currDate)) > MAX_WAIT_TIME) Then
+ isAlive = False
+ Else
+ isAlive = IsOfficeAppRunning(curApplication)
+ End If
+ End If
+ End If
+
+ CheckAliveStatus = isAlive
+End Function
+
+Sub TerminateOfficeApps(fso As FileSystemObject, aParameter As String)
+
+ Dim msoKillFileName As String
+
+ msoKillFileName = fso.GetAbsolutePathName(".\resources\msokill.exe")
+ If fso.FileExists(msoKillFileName) Then
+ Shell msoKillFileName & aParameter
+ Else
+ End If
+End Sub
+
+Public Function launchDriver(statFileName As String, cmdLine As String, _
+ curApplication As String, fso As FileSystemObject, _
+ myDocList As Collection, myOffset As Long, _
+ myIniFilePath As String) As Long
+
+ Dim proc As PROCESS_INFORMATION
+ Dim start As STARTUPINFO
+ Dim ret As Long
+ Dim currDate As Date
+ Dim lastIndex As Long
+
+ currDate = Now()
+ lastIndex = 1
+
+ ' Initialize the STARTUPINFO structure:
+ start.cb = Len(start)
+
+ ' Start the shelled application:
+ ret = CreateProcessA(vbNullString, cmdLine$, 0&, 0&, 1&, _
+ NORMAL_PRIORITY_CLASS, 0&, vbNullString, start, proc)
+
+ ' Wait for the shelled application to finish:
+ Do
+ ret = WaitForSingleObject(proc.hProcess, 100)
+ If ret <> WAIT_TIMEOUT Then
+ Exit Do
+ End If
+ If Not CheckAliveStatus(statFileName, curApplication, currDate, fso) Then
+ ' Try to close open office dialogs and then wait a little bit
+ TerminateOfficeApps fso, " --close"
+ ret = WaitForSingleObject(proc.hProcess, 1000)
+
+ ' next try to kill all office programs and then wait a little bit
+ TerminateOfficeApps fso, " --kill"
+ ret = WaitForSingleObject(proc.hProcess, 1000)
+
+ ret = TerminateProcess(proc.hProcess, "0")
+ ret = WAIT_TIMEOUT
+ Exit Do
+ End If
+ If (ShowProgress.g_SP_Abort) Then
+ WriteToLog C_ABORT_ANALYSIS, True, myIniFilePath
+ Call HandleAbort(proc.hProcess, curApplication)
+ ret = ABORTED
+ Exit Do
+ End If
+ Call CalculateProgress(statFileName, fso, lastIndex, myOffset, myDocList)
+ DoEvents 'allow other processes
+ Loop While True
+
+ If (ret <> WAIT_TIMEOUT) And (ret <> ABORTED) Then
+ Call GetExitCodeProcess(proc.hProcess, ret&)
+ End If
+ Call CloseHandle(proc.hThread)
+ Call CloseHandle(proc.hProcess)
+ launchDriver = ret
+End Function
+
+Function CheckAnalyseStatus(statusFileName As String, _
+ lastFile As String, _
+ fso As FileSystemObject) As Integer
+
+ Dim currStatus As Integer
+ Dim fileCont As TextStream
+
+ If Not fso.FileExists(statusFileName) Then
+ currStatus = C_STAT_NOT_STARTED
+ Else
+ Dim statText As String
+ Set fileCont = fso.OpenTextFile(statusFileName, ForReading, False, TristateTrue)
+ statText = fileCont.ReadLine
+ If (statText = C_STAT_FINISHED) Then
+ currStatus = C_STAT_DONE
+ ElseIf (Left(statText, Len(C_STAT_ANALYSED)) = C_STAT_ANALYSED) Then
+ currStatus = C_STAT_RETRY
+ lastFile = Mid(statText, Len(C_STAT_ANALYSED) + 1)
+ ElseIf (Left(statText, Len(C_STAT_ANALYSING)) = C_STAT_ANALYSING) Then
+ currStatus = C_STAT_RETRY
+ lastFile = Mid(statText, Len(C_STAT_ANALYSING) + 1)
+ Else
+ currStatus = C_STAT_ERROR
+ End If
+ fileCont.Close
+ End If
+
+ CheckAnalyseStatus = currStatus
+End Function
+
+Function WriteDocsToAnalyze(myDocList As Collection, myApp As String, _
+ fso As FileSystemObject) As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteDocsToAnalyze"
+
+ Dim TempPath As String
+ Dim fileName As String
+ Dim fileContent As TextStream
+
+ fileName = ""
+ TempPath = fso.GetSpecialFolder(TemporaryFolder).path
+
+ If (TempPath = "") Then
+ TempPath = "."
+ End If
+
+ Dim vFileName As Variant
+ Dim Index As Long
+ Dim limit As Long
+
+ limit = myDocList.count
+ If (limit > 0) Then
+ fileName = fso.GetAbsolutePathName(TempPath & "\FileList" & myApp & ".txt")
+ Set fileContent = fso.OpenTextFile(fileName, ForWriting, True, TristateTrue)
+
+ For Index = 1 To limit
+ vFileName = myDocList(Index)
+ fileContent.WriteLine (vFileName)
+ Next
+
+ fileContent.Close
+ End If
+
+FinalExit:
+ Set fileContent = Nothing
+ WriteDocsToAnalyze = fileName
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+' This function looks for the given document name in the document collection
+' and returns TRUE and the position of the document in that collection if found,
+' FALSE otherwise
+Function GetDocumentIndex(myDocument As String, _
+ myDocList As Collection, _
+ lastIndex As Long) As Boolean
+
+ Dim currentFunctionName As String
+ currentFunctionName = "GetDocumentIndex"
+
+ On Error GoTo HandleErrors
+
+ Dim lastEntry As Long
+ Dim curIndex As Long
+ Dim curEntry As String
+ Dim entryFound As Boolean
+
+ entryFound = False
+ lastEntry = myDocList.count
+ curIndex = lastIndex
+
+ ' We start the search at the position of the last found
+ ' document
+ While Not entryFound And curIndex <= lastEntry
+ curEntry = myDocList.item(curIndex)
+ If (curEntry = myDocument) Then
+ lastIndex = curIndex
+ entryFound = True
+ Else
+ curIndex = curIndex + 1
+ End If
+ Wend
+
+ ' When we could not find the document, we start the search
+ ' from the beginning of the list
+ If Not entryFound Then
+ curIndex = 1
+ While Not entryFound And curIndex <= lastIndex
+ curEntry = myDocList.item(curIndex)
+ If (curEntry = myDocument) Then
+ lastIndex = curIndex
+ entryFound = True
+ Else
+ curIndex = curIndex + 1
+ End If
+ Wend
+ End If
+
+FinalExit:
+ GetDocumentIndex = entryFound
+ Exit Function
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function AnalyseList(myDocList As Collection, _
+ myApp As String, _
+ myIniFilePath As String, _
+ myOffset As Long, _
+ analysisAborted As Boolean) As Boolean
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "AnalyseList"
+
+ Dim cmdLine As String
+ Dim filelist As String
+ Dim statFileName As String
+ Dim finished As Boolean
+ Dim analyseStatus As Integer
+ Dim nRetries As Integer
+ Dim lastFile As String
+ Dim lastHandledFile As String
+ Dim launchStatus As Long
+ Dim fso As New FileSystemObject
+ Dim progressTitle As String
+
+ filelist = WriteDocsToAnalyze(myDocList, myApp, fso)
+ cmdLine = fso.GetAbsolutePathName(C_LAUNCH_DRIVER) & " " & myApp
+ finished = False
+
+ Dim TempPath As String
+ TempPath = fso.GetSpecialFolder(TemporaryFolder).path
+ If (TempPath = "") Then TempPath = "."
+ statFileName = fso.GetAbsolutePathName(TempPath & "\StatFile" & myApp & ".txt")
+ If (fso.FileExists(statFileName)) Then fso.DeleteFile (statFileName)
+
+ WriteToLog CFILE_LIST, filelist, myIniFilePath
+ WriteToLog CSTAT_FILE, statFileName, myIniFilePath
+ WriteToLog CLAST_CHECKPOINT, "", myIniFilePath
+ WriteToLog CNEXT_FILE, "", myIniFilePath
+ WriteToLog C_ABORT_ANALYSIS, "", myIniFilePath
+
+ ' In this loop we will restart the driver until we have finished the analysis
+ nRetries = 0
+ While Not finished And nRetries < C_MAX_RETRIES
+ launchStatus = launchDriver(statFileName, cmdLine, myApp, fso, _
+ myDocList, myOffset, myIniFilePath)
+ If (launchStatus = ABORTED) Then
+ finished = True
+ analyseStatus = C_STAT_ABORTED
+ analysisAborted = True
+ Else
+ analyseStatus = CheckAnalyseStatus(statFileName, lastHandledFile, fso)
+ End If
+ If (analyseStatus = C_STAT_DONE) Then
+ finished = True
+ ElseIf (analyseStatus = C_STAT_RETRY) Then
+ If (lastHandledFile = lastFile) Then
+ nRetries = nRetries + 1
+ Else
+ lastFile = lastHandledFile
+ nRetries = 1
+ End If
+ Else
+ nRetries = nRetries + 1
+ End If
+ Wend
+
+ If (analyseStatus = C_STAT_DONE) Then
+ AnalyseList = True
+ Else
+ AnalyseList = False
+ End If
+
+ 'The next driver should not overwrite this result file
+ WriteToLog CNEW_RESULTS_FILE, "False", myIniFilePath
+
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ AnalyseList = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub HandleAbort(hProcess As Long, curApplication As String)
+
+ On Error Resume Next
+
+ Dim ret As Long
+ Dim curDate As Date
+ Dim stillWaiting As Boolean
+ Dim killApplication As Boolean
+ Dim waitTime As Long
+
+ curDate = Now()
+ stillWaiting = True
+ killApplication = False
+
+ While stillWaiting
+ stillWaiting = IsOfficeAppRunning(curApplication)
+ If (stillWaiting) Then
+ waitTime = val(DateDiff("s", curDate, Now()))
+ If (waitTime > C_ABORT_TIMEOUT) Then
+ stillWaiting = False
+ killApplication = True
+ End If
+ End If
+ Wend
+
+ If (killApplication) Then
+ ShowProgress.g_SP_AllowOtherDLG = True
+ TerminateMSO.Show vbModal, ShowProgress
+ End If
+
+ ret = TerminateProcess(hProcess, "0")
+End Sub
diff --git a/migrationanalysis/src/wizard/CollectedFiles.cls b/migrationanalysis/src/wizard/CollectedFiles.cls
new file mode 100644
index 000000000000..bc7fbb2b279c
--- /dev/null
+++ b/migrationanalysis/src/wizard/CollectedFiles.cls
@@ -0,0 +1,533 @@
+VERSION 1.0 CLASS
+BEGIN
+ MultiUse = -1 'True
+ Persistable = 0 'NotPersistable
+ DataBindingBehavior = 0 'vbNone
+ DataSourceBehavior = 0 'vbNone
+ MTSTransactionMode = 0 'NotAnMTSObject
+END
+Attribute VB_Name = "CollectedFiles"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = True
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: CollectedFiles.cls,v $
+' * $Revision: 1.9.66.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Private Const vbDot = 46
+Private Const MAX_PATH = 260
+Private Const INVALID_HANDLE_VALUE = -1
+Private Const vbBackslash = "\"
+Private Const ALL_FILES = "*.*"
+
+Private Type FILETIME
+ dwLowDateTime As Long
+ dwHighDateTime As Long
+End Type
+
+Private Type SYSTEMTIME
+ wYear As Integer
+ wMonth As Integer
+ wDayOfWeek As Integer
+ wDay As Integer
+ wHour As Integer
+ wMinute As Integer
+ wSecond As Integer
+ wMilliseconds As Integer
+End Type
+
+Private Type WIN32_FIND_DATA
+ dwFileAttributes As Long
+ ftCreationTime As FILETIME
+ ftLastAccessTime As FILETIME
+ ftLastWriteTime As FILETIME
+ nFileSizeHigh As Long
+ nFileSizeLow As Long
+ dwReserved0 As Long
+ dwReserved1 As Long
+ cFileName As String * MAX_PATH
+ cAlternate As String * 14
+End Type
+
+Private Type FILE_PARAMS
+ bRecurse As Boolean
+ nSearched As Long
+ sFileNameExt As String
+ sFileRoot As String
+End Type
+
+Private Declare Function SystemTimeToFileTime Lib "kernel32" _
+ (lpSystemTime As SYSTEMTIME, _
+ lpFileTime As FILETIME) As Long
+
+Private Declare Function CompareFileTime Lib "kernel32" _
+ (lpFileTime1 As FILETIME, _
+ lpFileTime2 As FILETIME) As Long
+
+Private Declare Function FindClose Lib "kernel32" _
+ (ByVal hFindFile As Long) As Long
+
+Private Declare Function FindFirstFile Lib "kernel32" _
+ Alias "FindFirstFileA" _
+ (ByVal lpFileName As String, _
+ lpFindFileData As WIN32_FIND_DATA) As Long
+
+Private Declare Function FindNextFile Lib "kernel32" _
+ Alias "FindNextFileA" _
+ (ByVal hFindFile As Long, _
+ lpFindFileData As WIN32_FIND_DATA) As Long
+
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+
+Private Declare Function lstrlen Lib "kernel32" _
+ Alias "lstrlenW" (ByVal lpString As Long) As Long
+
+Private Declare Function PathMatchSpec Lib "shlwapi" _
+ Alias "PathMatchSpecW" _
+ (ByVal pszFileParam As Long, _
+ ByVal pszSpec As Long) As Long
+
+Private fp As FILE_PARAMS 'holds search parameters
+
+Private mWordFilesCol As Collection
+Private mExcelFilesCol As Collection
+Private mPPFilesCol As Collection
+
+Private mLessThan3 As Long
+Private mLessThan6 As Long
+Private mLessThan12 As Long
+Private mMoreThan12 As Long
+Private m3Months As FILETIME
+Private m6Months As FILETIME
+Private m12Months As FILETIME
+
+Private mDocCount As Long
+Private mDotCount As Long
+Private mXlsCount As Long
+Private mXltCount As Long
+Private mPptCount As Long
+Private mPotCount As Long
+Private mIgnoredDocs As Long
+Private mbDocSearch As Boolean
+Private mbDotSearch As Boolean
+Private mbXlsSearch As Boolean
+Private mbXltSearch As Boolean
+Private mbPptSearch As Boolean
+Private mbPotSearch As Boolean
+
+Private mWordDriverPath As String
+Private mExcelDriverPath As String
+Private mPPDriverPath As String
+
+Private Sub Class_Initialize()
+ Set mWordFilesCol = New Collection
+ Set mExcelFilesCol = New Collection
+ Set mPPFilesCol = New Collection
+End Sub
+Private Sub Class_Terminate()
+ Set mWordFilesCol = Nothing
+ Set mExcelFilesCol = Nothing
+ Set mPPFilesCol = Nothing
+End Sub
+
+Public Property Get DocCount() As Long
+ DocCount = mDocCount
+End Property
+Public Property Get DotCount() As Long
+ DotCount = mDotCount
+End Property
+Public Property Get XlsCount() As Long
+ XlsCount = mXlsCount
+End Property
+Public Property Get XltCount() As Long
+ XltCount = mXltCount
+End Property
+Public Property Get PptCount() As Long
+ PptCount = mPptCount
+End Property
+Public Property Get PotCount() As Long
+ PotCount = mPotCount
+End Property
+Public Property Get IgnoredDocCount() As Long
+ IgnoredDocCount = mIgnoredDocs
+End Property
+Public Property Get DocsLessThan3Months() As Long
+ DocsLessThan3Months = mLessThan3
+End Property
+Public Property Get DocsLessThan6Months() As Long
+ DocsLessThan6Months = mLessThan6
+End Property
+Public Property Get DocsLessThan12Months() As Long
+ DocsLessThan12Months = mLessThan12
+End Property
+Public Property Get DocsMoreThan12Months() As Long
+ DocsMoreThan12Months = mMoreThan12
+End Property
+
+Public Property Get WordFiles() As Collection
+ Set WordFiles = mWordFilesCol
+End Property
+Public Property Get ExcelFiles() As Collection
+ Set ExcelFiles = mExcelFilesCol
+End Property
+Public Property Get PowerPointFiles() As Collection
+ Set PowerPointFiles = mPPFilesCol
+End Property
+
+Public Function count() As Long
+ count = mWordFilesCol.count + mExcelFilesCol.count + mPPFilesCol.count
+End Function
+
+Public Function Search(rootDir As String, FileSpecs As Collection, IncludeSubdirs As Boolean, _
+ ignoreOld As Boolean, Months As Integer) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Search"
+
+ Dim tstart As Single 'timer var for this routine only
+ Dim tend As Single 'timer var for this routine only
+ Dim spec As Variant
+ Dim allSpecs As String
+ Dim fso As New FileSystemObject
+
+ Search = True
+
+ If FileSpecs.count = 0 Then Exit Function
+
+ If FileSpecs.count > 1 Then
+ For Each spec In FileSpecs
+ allSpecs = allSpecs & "; " & spec
+ SetSearchBoolean CStr(spec)
+ Next
+ Else
+ allSpecs = FileSpecs(1)
+ SetSearchBoolean CStr(FileSpecs(1))
+ End If
+
+ mWordDriverPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CWORD_DRIVER_FILE)
+ mExcelDriverPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CEXCEL_DRIVER_FILE)
+ mPPDriverPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE)
+
+ With fp
+ .sFileRoot = QualifyPath(rootDir)
+ .sFileNameExt = allSpecs
+ .bRecurse = IncludeSubdirs
+ .nSearched = 0
+ End With
+
+ Load SearchDocs
+
+ ignoreOld = ignoreOld And InitFileTimes
+
+ Dim limDate As FILETIME
+ If ignoreOld Then
+ If Months = 3 Then
+ limDate = m3Months
+ ElseIf Months = 6 Then
+ limDate = m6Months
+ ElseIf Months = 12 Then
+ limDate = m12Months
+ Else
+ ignoreOld = False
+ End If
+ End If
+
+ 'tstart = GetTickCount()
+ Search = SearchForFiles(QualifyPath(rootDir), IncludeSubdirs, ignoreOld, limDate)
+ 'tend = GetTickCount()
+
+ Unload SearchDocs
+
+ 'Debug:
+ 'MsgBox "Specs " & allSpecs & vbLf & _
+ ' Format$(fp.nSearched, "###,###,###,##0") & vbLf & _
+ ' Format$(count, "###,###,###,##0") & vbLf & _
+ ' FormatNumber((tend - tstart) / 1000, 2) & " seconds"
+
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+Sub SetSearchBoolean(spec As String)
+
+ If spec = "*.doc" Then
+ mbDocSearch = True
+ End If
+ If spec = "*.dot" Then
+ mbDotSearch = True
+ End If
+ If spec = "*.xls" Then
+ mbXlsSearch = True
+ End If
+ If spec = "*.xlt" Then
+ mbXltSearch = True
+ End If
+ If spec = "*.ppt" Then
+ mbPptSearch = True
+ End If
+ If spec = "*.pot" Then
+ mbPotSearch = True
+ End If
+
+End Sub
+
+Private Function SearchForFiles(sRoot As String, bRecurse As Boolean, _
+ bIgnoreOld As Boolean, limDate As FILETIME) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SearchForFiles"
+
+ Dim WFD As WIN32_FIND_DATA
+ Dim hFile As Long
+ Dim path As String
+ Dim sFileName As String
+ Dim nTotal As Long
+
+ SearchForFiles = False
+
+ hFile = FindFirstFile(sRoot & ALL_FILES, WFD)
+
+ If hFile = INVALID_HANDLE_VALUE Then GoTo FinalExit
+
+ Do
+ If (SearchDocs.g_SD_Abort) Then GoTo FinalExit
+ sFileName = TrimNull(WFD.cFileName)
+ 'if a folder, and recurse specified, call
+ 'method again
+ If (WFD.dwFileAttributes And vbDirectory) Then
+ If (Asc(WFD.cFileName) <> vbDot) And bRecurse Then
+ SearchForFiles sRoot & sFileName & vbBackslash, bRecurse, bIgnoreOld, limDate
+ End If
+ Else
+ 'must be a file..
+ nTotal = mDocCount + mDotCount + mXlsCount + _
+ mXltCount + mPptCount + mPotCount
+ SearchDocs.SD_UpdateProgress str$(nTotal), sRoot
+ DoEvents
+
+ If mbDocSearch Then
+ If MatchSpec(WFD.cFileName, "*.doc") Then
+ path = sRoot & sFileName
+
+ 'If StrComp(path, mWordDriverPath, vbTextCompare) <> 0 Then
+ If Not MatchSpec(path, mWordDriverPath) Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mDocCount = mDocCount + 1
+ mWordFilesCol.add path
+ End If
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbDotSearch Then
+ If MatchSpec(WFD.cFileName, "*.dot") Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mDotCount = mDotCount + 1
+ mWordFilesCol.add sRoot & sFileName
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbXlsSearch Then
+ If MatchSpec(WFD.cFileName, "*.xls") Then
+ 'If StrComp(sFileName, CEXCEL_DRIVER_FILE, vbTextCompare) <> 0 Then
+ If Not MatchSpec(WFD.cFileName, CEXCEL_DRIVER_FILE) Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mXlsCount = mXlsCount + 1
+ mExcelFilesCol.add sRoot & sFileName
+ End If
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbXltSearch Then
+ If MatchSpec(WFD.cFileName, "*.xlt") Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mXltCount = mXltCount + 1
+ mExcelFilesCol.add sRoot & sFileName
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbPptSearch Then
+ If MatchSpec(WFD.cFileName, "*.ppt") Then
+ path = sRoot & sFileName
+ 'If StrComp(path, mPPDriverPath, vbTextCompare) <> 0 Then
+ If Not MatchSpec(path, mPPDriverPath) Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mPptCount = mPptCount + 1
+ mPPFilesCol.add path
+ End If
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+ If mbPotSearch Then
+ If MatchSpec(WFD.cFileName, "*.pot") Then
+ If (IsTooOld(WFD, limDate, bIgnoreOld)) Then
+ mIgnoredDocs = mIgnoredDocs + 1
+ Else
+ mPotCount = mPotCount + 1
+ mPPFilesCol.add sRoot & sFileName
+ End If
+ GoTo CONTINUE_LOOP
+ End If
+ End If
+
+ End If 'If WFD.dwFileAttributes
+
+CONTINUE_LOOP:
+ fp.nSearched = fp.nSearched + 1
+
+ Loop While FindNextFile(hFile, WFD)
+
+ SearchForFiles = True
+FinalExit:
+ Call FindClose(hFile)
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Private Function QualifyPath(sPath As String) As String
+
+ If Right$(sPath, 1) <> vbBackslash Then
+ QualifyPath = sPath & vbBackslash
+ Else: QualifyPath = sPath
+ End If
+
+End Function
+
+Private Function TrimNull(startstr As String) As String
+
+ TrimNull = Left$(startstr, lstrlen(StrPtr(startstr)))
+
+End Function
+
+Private Function MatchSpec(sFile As String, sSpec As String) As Boolean
+
+ MatchSpec = PathMatchSpec(StrPtr(sFile), StrPtr(sSpec))
+
+End Function
+
+Private Function IsTooOld(aWFD As WIN32_FIND_DATA, minDate As FILETIME, _
+ ignoreOld As Boolean) As Boolean
+
+ IsTooOld = False
+
+ Dim aFileTime As FILETIME
+
+ If (aWFD.ftLastWriteTime.dwHighDateTime <> 0) Then
+ aFileTime = aWFD.ftLastWriteTime
+ ElseIf (aWFD.ftCreationTime.dwHighDateTime <> 0) Then
+ aFileTime = aWFD.ftCreationTime
+ Else
+ ' No valid time found, don't ignore file
+ mLessThan3 = mLessThan3 + 1
+ Exit Function
+ End If
+
+ If (ignoreOld) Then
+ If (CompareFileTime(aFileTime, minDate) < 0) Then
+ IsTooOld = True
+ End If
+ End If
+
+ If (CompareFileTime(aWFD.ftLastWriteTime, m12Months) < 0) Then
+ mMoreThan12 = mMoreThan12 + 1
+ ElseIf (CompareFileTime(aWFD.ftLastWriteTime, m6Months) < 0) Then
+ mLessThan12 = mLessThan12 + 1
+ ElseIf (CompareFileTime(aWFD.ftLastWriteTime, m3Months) < 0) Then
+ mLessThan6 = mLessThan6 + 1
+ Else
+ mLessThan3 = mLessThan3 + 1
+ End If
+
+End Function
+
+Private Function BasicDateToFileTime(basDate As Date, _
+ fileDate As FILETIME) As Boolean
+
+ Dim sysDate As SYSTEMTIME
+ Dim retval As Long
+
+ sysDate.wYear = DatePart("yyyy", basDate)
+ sysDate.wMonth = DatePart("m", basDate)
+ sysDate.wDay = DatePart("d", basDate)
+ sysDate.wHour = DatePart("h", basDate)
+ sysDate.wMinute = DatePart("m", basDate)
+ retval = SystemTimeToFileTime(sysDate, fileDate)
+ If (retval = 0) Then
+ BasicDateToFileTime = False
+ Else
+ BasicDateToFileTime = True
+ End If
+End Function
+
+Private Function InitFileTimes() As Boolean
+
+ Dim nowDate As Date
+ Dim basDate As Date
+
+ InitFileTimes = True
+
+ nowDate = Now()
+ basDate = DateAdd("m", -3, nowDate)
+ If Not BasicDateToFileTime(basDate, m3Months) Then InitFileTimes = False
+
+ basDate = DateAdd("m", -6, nowDate)
+ If Not BasicDateToFileTime(basDate, m6Months) Then InitFileTimes = False
+
+ basDate = DateAdd("yyyy", -1, nowDate)
+ If Not BasicDateToFileTime(basDate, m12Months) Then InitFileTimes = False
+
+ mMoreThan12 = 0
+ mLessThan12 = 0
+ mLessThan6 = 0
+ mLessThan3 = 0
+
+End Function
diff --git a/migrationanalysis/src/wizard/DocAnalysisWizard.exe.manifest b/migrationanalysis/src/wizard/DocAnalysisWizard.exe.manifest
new file mode 100644
index 000000000000..911bdc94297d
--- /dev/null
+++ b/migrationanalysis/src/wizard/DocAnalysisWizard.exe.manifest
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="X86"
+ name="SunMicrosystems.WinXPStyle.DocumentAnalysis"
+ type="win32"
+/>
+<description>Windows XP Style for Document Analysis Wizard</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="X86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly> \ No newline at end of file
diff --git a/migrationanalysis/src/wizard/Get Directory Dialog.bas b/migrationanalysis/src/wizard/Get Directory Dialog.bas
new file mode 100644
index 000000000000..553283e7b90c
--- /dev/null
+++ b/migrationanalysis/src/wizard/Get Directory Dialog.bas
@@ -0,0 +1,146 @@
+Attribute VB_Name = "BrowseDirectorysOnly"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Get\040Directory\040Dialog.bas,v $
+' * $Revision: 1.5.148.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+' Modified as BIF_STATUSTEXT overflows for nested folders so is no longer
+' shown.
+
+'=====================================================================================
+' Browse for a Folder using SHBrowseForFolder API function with a callback
+' function BrowseCallbackProc.
+'
+' This Extends the functionality that was given in the
+' MSDN Knowledge Base article Q179497 "HOWTO: Select a Directory
+' Without the Common Dialog Control".
+'
+' After reading the MSDN knowledge base article Q179378 "HOWTO: Browse for
+' Folders from the Current Directory", I was able to figure out how to add
+' a callback function that sets the starting directory and displays the
+' currently selected path in the "Browse For Folder" dialog.
+'
+'
+' Stephen Fonnesbeck
+' steev@xmission.com
+' http://www.xmission.com/~steev
+' Feb 20, 2000
+'
+'=====================================================================================
+' Usage:
+'
+' Dim folder As String
+' folder = BrowseForFolder(Me, "Select A Directory", "C:\startdir\anywhere")
+' If Len(folder) = 0 Then Exit Sub 'User Selected Cancel
+'
+'=====================================================================================
+
+Option Explicit
+
+Private Const BIF_STATUSTEXT = &H4&
+Private Const BIF_RETURNONLYFSDIRS = 1
+Private Const BIF_DONTGOBELOWDOMAIN = 2
+Private Const MAX_PATH = 260
+
+Private Const WM_USER = &H400
+Private Const BFFM_INITIALIZED = 1
+Private Const BFFM_SELCHANGED = 2
+Private Const BFFM_SETSELECTION = (WM_USER + 102)
+
+Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
+Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
+Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
+Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
+
+Private Type BrowseInfo
+ hWndOwner As Long
+ pIDLRoot As Long
+ pszDisplayName As Long
+ lpszTitle As Long
+ ulFlags As Long
+ lpfnCallback As Long
+ lParam As Long
+ iImage As Long
+End Type
+
+Private m_CurrentDirectory As String 'The current directory
+'
+
+Public Function BrowseForFolder(owner As Form, Title As String, StartDir As String) As String
+ 'Opens a Treeview control that displays the directories in a computer
+
+ Dim lpIDList As Long
+ Dim szTitle As String
+ Dim sBuffer As String
+ Dim tBrowseInfo As BrowseInfo
+ m_CurrentDirectory = StartDir & vbNullChar
+
+ szTitle = Title
+ With tBrowseInfo
+ .hWndOwner = owner.hWnd
+ .lpszTitle = lstrcat(szTitle, "")
+ .ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN '+ BIF_STATUSTEXT
+ .lpfnCallback = GetAddressofFunction(AddressOf BrowseCallbackProc) 'get address of function.
+ End With
+
+ lpIDList = SHBrowseForFolder(tBrowseInfo)
+ If (lpIDList) Then
+ sBuffer = Space(MAX_PATH)
+ SHGetPathFromIDList lpIDList, sBuffer
+ sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
+ BrowseForFolder = sBuffer
+ Else
+ BrowseForFolder = ""
+ End If
+
+End Function
+
+Private Function BrowseCallbackProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal lp As Long, ByVal pData As Long) As Long
+
+ Dim lpIDList As Long
+ Dim ret As Long
+ Dim sBuffer As String
+
+ On Error Resume Next 'Sugested by MS to prevent an error from
+ 'propagating back into the calling process.
+
+ Select Case uMsg
+
+ Case BFFM_INITIALIZED
+ Call SendMessage(hWnd, BFFM_SETSELECTION, 1, m_CurrentDirectory)
+
+ End Select
+
+ BrowseCallbackProc = 0
+
+End Function
+
+' This function allows you to assign a function pointer to a vaiable.
+Private Function GetAddressofFunction(add As Long) As Long
+ GetAddressofFunction = add
+End Function
diff --git a/migrationanalysis/src/wizard/IniSupport.bas b/migrationanalysis/src/wizard/IniSupport.bas
new file mode 100644
index 000000000000..f14a7ad1ef5d
--- /dev/null
+++ b/migrationanalysis/src/wizard/IniSupport.bas
@@ -0,0 +1,272 @@
+Attribute VB_Name = "IniSupport"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: IniSupport.bas,v $
+' * $Revision: 1.6.148.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Private Declare Function GetPrivateProfileString Lib "kernel32" _
+ Alias "GetPrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpDefault As String, _
+ ByVal lpReturnedString As String, _
+ ByVal nSize As Long, _
+ ByVal lpFileName As String) As Long
+
+Private Declare Function WritePrivateProfileString Lib "kernel32" _
+ Alias "WritePrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpString As Any, _
+ ByVal lpFileName As String) As Long
+
+
+Public Function ProfileGetItem(lpSectionName As String, _
+ lpKeyName As String, _
+ defaultValue As String, _
+ inifile As String) As String
+
+'Retrieves a value from an ini file corresponding
+'to the section and key name passed.
+
+ Dim success As Long
+ Dim nSize As Long
+ Dim ret As String
+
+ 'call the API with the parameters passed.
+ 'The return value is the length of the string
+ 'in ret, including the terminating null. If a
+ 'default value was passed, and the section or
+ 'key name are not in the file, that value is
+ 'returned. If no default value was passed (""),
+ 'then success will = 0 if not found.
+
+ 'Pad a string large enough to hold the data.
+ ret = Space$(2048)
+ nSize = Len(ret)
+ success = GetPrivateProfileString(lpSectionName, _
+ lpKeyName, _
+ defaultValue, _
+ ret, _
+ nSize, _
+ inifile)
+
+ If success Then
+ ProfileGetItem = Left$(ret, success)
+ End If
+
+End Function
+
+
+Public Sub ProfileDeleteItem(lpSectionName As String, _
+ lpKeyName As String, _
+ inifile As String)
+
+'this call will remove the keyname and its
+'corresponding value from the section specified
+'in lpSectionName. This is accomplished by passing
+'vbNullString as the lpValue parameter. For example,
+'assuming that an ini file had:
+' [Colours]
+' Colour1=Red
+' Colour2=Blue
+' Colour3=Green
+'
+'and this sub was called passing "Colour2"
+'as lpKeyName, the resulting ini file
+'would contain:
+' [Colours]
+' Colour1=Red
+' Colour3=Green
+
+ Call WritePrivateProfileString(lpSectionName, _
+ lpKeyName, _
+ vbNullString, _
+ inifile)
+
+End Sub
+
+
+Public Sub ProfileDeleteSection(lpSectionName As String, _
+ inifile As String)
+
+'this call will remove the entire section
+'corresponding to lpSectionName. This is
+'accomplished by passing vbNullString
+'as both the lpKeyName and lpValue parameters.
+'For example, assuming that an ini file had:
+' [Colours]
+' Colour1=Red
+' Colour2=Blue
+' Colour3=Green
+'
+'and this sub was called passing "Colours"
+'as lpSectionName, the resulting Colours
+'section in the ini file would be deleted.
+
+ Call WritePrivateProfileString(lpSectionName, _
+ vbNullString, _
+ vbNullString, _
+ inifile)
+
+End Sub
+
+Private Function StripNulls(startStrg As String) As String
+
+'take a string separated by nulls, split off 1 item, and shorten the string
+'so the next item is ready for removal.
+'The passed string must have a terminating null for this function to work correctly.
+'If you remain in a loop, check this first!
+
+ Dim pos As Long
+ Dim item As String
+
+ pos = InStr(1, startStrg, Chr$(0))
+
+ If pos Then
+
+ item = Mid$(startStrg, 1, pos - 1)
+ startStrg = Mid$(startStrg, pos + 1, Len(startStrg))
+ StripNulls = item
+
+ End If
+
+End Function
+
+Public Function ProfileLoadList(lst As ComboBox, _
+ lpSectionName As String, _
+ inifile As String) As Long
+ Dim success As Long
+ Dim c As Long
+ Dim nSize As Long
+ Dim KeyData As String
+ Dim lpKeyName As String
+ Dim ret As String
+
+ ' call the API passing lpKeyName = null. This causes
+ ' the API to return a list of all keys under that section.
+ ' Pad the passed string large enough to hold the data.
+ ret = Space$(2048)
+ nSize = Len(ret)
+ success = GetPrivateProfileString( _
+ lpSectionName, vbNullString, "", ret, nSize, inifile)
+
+ ' The returned string is a null-separated list of key names,
+ ' terminated by a pair of null characters.
+ ' If the Get call was successful, success holds the length of the
+ ' string in ret up to but not including that second terminating null.
+ ' The ProfileGetItem function below extracts each key item using the
+ ' nulls as markers, so trim off the terminating null.
+ If success Then
+
+ 'trim terminating null and trailing spaces
+ ret = Left$(ret, success)
+
+ 'with the resulting string extract each element
+ Do Until ret = ""
+ 'strip off an item (i.e. "Item1", "Item2")
+ lpKeyName = StripNulls(ret)
+
+ 'pass the lpKeyName received to a routine that
+ 'again calls GetPrivateProfileString, this
+ 'time passing the real key name. Returned
+ 'is the value associated with that key,
+ 'ie the "Apple" corresponding to the ini
+ 'entry "Item1=Apple"
+ KeyData = ProfileGetItem( _
+ lpSectionName, lpKeyName, "", inifile)
+
+ 'add the item retruned to the listbox
+ lst.AddItem KeyData
+ Loop
+
+ End If
+
+ 'return the number of items as an
+ 'indicator of success
+ ProfileLoadList = lst.ListCount
+End Function
+
+Public Function ProfileLoadDict(dict As Scripting.Dictionary, _
+ lpSectionName As String, _
+ inifile As String) As Long
+ Dim success As Long
+ Dim c As Long
+ Dim nSize As Long
+ Dim KeyData As String
+ Dim lpKeyName As String
+ Dim ret As String
+
+ ' call the API passing lpKeyName = null. This causes
+ ' the API to return a list of all keys under that section.
+ ' Pad the passed string large enough to hold the data.
+ ret = Space$(2048)
+ nSize = Len(ret)
+ success = GetPrivateProfileString( _
+ lpSectionName, vbNullString, "", ret, nSize, inifile)
+
+ ' The returned string is a null-separated list of key names,
+ ' terminated by a pair of null characters.
+ ' If the Get call was successful, success holds the length of the
+ ' string in ret up to but not including that second terminating null.
+ ' The ProfileGetItem function below extracts each key item using the
+ ' nulls as markers, so trim off the terminating null.
+ If success Then
+
+ 'trim terminating null and trailing spaces
+ ret = Left$(ret, success)
+
+ 'with the resulting string extract each element
+ Do Until ret = ""
+ 'strip off an item (i.e. "Item1", "Item2")
+ lpKeyName = StripNulls(ret)
+
+ 'pass the lpKeyName received to a routine that
+ 'again calls GetPrivateProfileString, this
+ 'time passing the real key name. Returned
+ 'is the value associated with that key,
+ 'ie the "Apple" corresponding to the ini
+ 'entry "Item1=Apple"
+ KeyData = ProfileGetItem( _
+ lpSectionName, lpKeyName, "", inifile)
+
+ dict.add lpKeyName, KeyData
+ Loop
+
+ End If
+
+ ProfileLoadDict = dict.count
+End Function
+
+
+
+
+
+
+
diff --git a/migrationanalysis/src/wizard/LaunchDrivers.vbp b/migrationanalysis/src/wizard/LaunchDrivers.vbp
new file mode 100644
index 000000000000..868a1d14ee00
--- /dev/null
+++ b/migrationanalysis/src/wizard/LaunchDrivers.vbp
@@ -0,0 +1,42 @@
+Type=Exe
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation
+Reference=*\G{00020813-0000-0000-C000-000000000046}#1.3#0#C:\Program Files\Microsoft Office\Office\EXCEL9.OLB#Microsoft Excel 9.0 Object Library
+Reference=*\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.1#0#C:\Program Files\Microsoft Office\Office\mso9.dll#Microsoft Office 9.0 Object Library
+Reference=*\G{91493440-5A91-11CF-8700-00AA0060263B}#2.6#0#C:\Program Files\Microsoft Office\Office\msppt9.olb#Microsoft PowerPoint 9.0 Object Library
+Reference=*\G{00020905-0000-0000-C000-000000000046}#8.1#0#C:\Program Files\Microsoft Office\Office\MSWORD9.OLB#Microsoft Word 9.0 Object Library
+Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#C:\WINDOWS\system32\scrrun.dll#Microsoft Scripting Runtime
+Module=RunServer; ..\..\src\wizard\RunServer.bas
+Startup="Sub Main"
+HelpFile=""
+Title="LaunchDrivers"
+ExeName32="LaunchDrivers.exe"
+Path32="..\bin"
+Command32=""
+Name="LaunchDrivers"
+HelpContextID="0"
+CompatibleMode="0"
+MajorVer=2
+MinorVer=0
+RevisionVer=000
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionCompanyName="OpenOffice.org"
+VersionLegalCopyright="Copyright 2006-2008 Sun Microsystems, Inc."
+CompilationType=0
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=0
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
+
+[MS Transaction Server]
+AutoRefresh=1
diff --git a/migrationanalysis/src/wizard/LaunchDrivers.vbw b/migrationanalysis/src/wizard/LaunchDrivers.vbw
new file mode 100644
index 000000000000..af96d226e68a
--- /dev/null
+++ b/migrationanalysis/src/wizard/LaunchDrivers.vbw
@@ -0,0 +1 @@
+RunServer = 22, 22, 301, 626, Z
diff --git a/migrationanalysis/src/wizard/OOo3_Analysis.ico b/migrationanalysis/src/wizard/OOo3_Analysis.ico
new file mode 100644
index 000000000000..d12f42d2f868
--- /dev/null
+++ b/migrationanalysis/src/wizard/OOo3_Analysis.ico
Binary files differ
diff --git a/migrationanalysis/src/wizard/OOo_AnalysisBitmap.png b/migrationanalysis/src/wizard/OOo_AnalysisBitmap.png
new file mode 100644
index 000000000000..6d852d90c5ae
--- /dev/null
+++ b/migrationanalysis/src/wizard/OOo_AnalysisBitmap.png
Binary files differ
diff --git a/migrationanalysis/src/wizard/Office10Issues.bas b/migrationanalysis/src/wizard/Office10Issues.bas
new file mode 100644
index 000000000000..bd65b7b9288c
--- /dev/null
+++ b/migrationanalysis/src/wizard/Office10Issues.bas
@@ -0,0 +1,364 @@
+Attribute VB_Name = "Office10Issues"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Office10Issues.bas,v $
+' * $Revision: 1.8.148.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+'Disable Option Explicit so this will compile on earlier Office versions
+'Option Explicit
+Public Declare Function RegCloseKey Lib "advapi32.dll" _
+ (ByVal hKey As Long) As Long
+Public Declare Function RegQueryValueEx Lib "advapi32.dll" _
+ Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, _
+ ByVal lpReserved As Long, lpType As Long, lpData As Any, _
+ lpcbData As Long) As Long
+Public Declare Function RegSetValueEx Lib "advapi32.dll" _
+ Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, _
+ ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, _
+ ByVal cbData As Long) As Long
+Public Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal _
+ hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass _
+ As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes _
+ As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long
+Public Declare Function RegOpenKey Lib "advapi32.dll" _
+ Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, _
+ phkResult As Long) As Long
+Public Declare Function RegCreateKey Lib "advapi32.dll" _
+ Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, _
+ phkResult As Long) As Long
+Public Declare Function RegDeleteValue Lib "advapi32.dll" _
+ Alias "RegDeleteValueA" (ByVal hKey As Long, _
+ ByVal lpValueName As String) As Long
+Public Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal _
+ hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired _
+ As Long, phkResult As Long) As Long
+
+Type SECURITY_ATTRIBUTES
+ nLength As Long
+ lpSecurityDescriptor As Long
+ bInheritHandle As Long
+End Type
+
+Enum RegHive
+ 'HKEY_CLASSES_ROOT = &H80000000
+ HK_CR = &H80000000
+ HKEY_CURRENT_USER = &H80000001
+ HK_CU = &H80000001
+ HKEY_LOCAL_MACHINE = &H80000002
+ HK_LM = &H80000002
+ HKEY_USERS = &H80000003
+ HK_US = &H80000003
+ HKEY_CURRENT_CONFIG = &H80000005
+ HK_CC = &H80000005
+ HKEY_DYN_DATA = &H80000006
+ HK_DD = &H80000006
+End Enum
+
+Enum RegType
+ REG_SZ = 1 'Unicode nul terminated string
+ REG_BINARY = 3 'Free form binary
+ REG_DWORD = 4 '32-bit number
+End Enum
+
+Const ERROR_SUCCESS = 0
+Const KEY_WRITE = &H20006
+Const APP_EXCEL = "Excel"
+Const APP_WORD = "Word"
+Const APP_PP = "PowerPoint"
+
+Public Function CreateRegKey(hKey As RegHive, strPath As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CreateRegKey"
+
+ Dim heKey As Long
+ Dim secattr As SECURITY_ATTRIBUTES ' security settings for the key
+ Dim subkey As String ' name of the subkey to create or open
+ Dim neworused As Long ' receives flag for if the key was created or opened
+ Dim stringbuffer As String ' the string to put into the registry
+ Dim retval As Long ' return value
+
+ ' Set the name of the new key and the default security settings
+ secattr.nLength = Len(secattr)
+ secattr.lpSecurityDescriptor = 0
+ secattr.bInheritHandle = 1
+
+ retval = RegCreateKeyEx(hKey, strPath, 0, "", 0, KEY_WRITE, _
+ secattr, heKey, neworused)
+ If retval = 0 Then
+ retval = RegCloseKey(hKey)
+ Exit Function
+ End If
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Public Function CreateRegKey2(hKey As RegHive, strPath As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CreateRegKey"
+ CreateRegKey2 = 0
+
+ Dim heKey As Long
+ Dim secattr As SECURITY_ATTRIBUTES ' security settings for the key
+ Dim subkey As String ' name of the subkey to create or open
+ Dim neworused As Long ' receives flag for if the key was created or opened
+ Dim stringbuffer As String ' the string to put into the registry
+ Dim retval As Long ' return value
+
+ ' Set the name of the new key and the default security settings
+ secattr.nLength = Len(secattr)
+ secattr.lpSecurityDescriptor = 0
+ secattr.bInheritHandle = 1
+
+ retval = RegCreateKeyEx(hKey, strPath, 0, "", 0, KEY_WRITE, _
+ secattr, heKey, neworused)
+ If retval = ERROR_SUCCESS Then
+ CreateRegKey2 = heKey
+ Exit Function
+ End If
+
+FinalExit:
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ CreateRegKey2 = 0
+ GoTo FinalExit
+End Function
+
+
+Public Function GetRegLong(ByVal hKey As RegHive, ByVal strPath As String, ByVal strValue As String) As Long
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetRegLong"
+
+ Dim lRegResult As Long
+ Dim lValueType As Long
+ Dim lBuffer As Long
+ Dim lDataBufferSize As Long
+ Dim hCurKey As Long
+
+ GetRegLong = 0
+ lRegResult = RegOpenKey(hKey, strPath, hCurKey)
+ lDataBufferSize = 4 '4 bytes = 32 bits = long
+
+ lRegResult = RegQueryValueEx(hCurKey, strValue, 0, REG_DWORD, lBuffer, lDataBufferSize)
+ If lRegResult = ERROR_SUCCESS Then
+ GetRegLong = lBuffer
+ End If
+ lRegResult = RegCloseKey(hCurKey)
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Public Function SaveRegLong(ByVal hKey As RegHive, ByVal strPath As String, ByVal strValue As String, ByVal lData As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SaveRegLong"
+
+ Const NumofByte = 4
+ Dim hCurKey As Long
+ Dim lRegResult As Long
+
+ lRegResult = RegCreateKey(hKey, strPath, hCurKey)
+ lRegResult = RegSetValueEx(hCurKey, strValue, 0&, REG_DWORD, lData, NumofByte)
+ If lRegResult = ERROR_SUCCESS Then
+ lRegResult = RegCloseKey(hCurKey)
+ Exit Function
+ End If
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+
+Public Function GiveAccessToMacroProject(application As String, sVersion As String, oldvalue As Long) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SaveRegLong"
+ GiveAccessToMacroProject = False
+
+ Const OfficePath = "Software\Policies\Microsoft\Office\"
+ Const security = "\Security"
+ Const AccessVBOM = "AccessVBOM"
+ Const AccessVBOMValue = 1
+ Dim subpath As String
+ Dim RegistryValue As Long
+
+ subpath = OfficePath & sVersion & "\" & application & security
+ CreateRegKey HKEY_CURRENT_USER, subpath
+ RegistryValue = GetRegLong(HKEY_CURRENT_USER, subpath, AccessVBOM)
+ oldvalue = RegistryValue
+ SaveRegLong HKEY_CURRENT_USER, subpath, AccessVBOM, AccessVBOMValue
+ GiveAccessToMacroProject = True
+ Exit Function
+
+HandleErrors:
+ GiveAccessToMacroProject = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Public Function SetDefaultRegValue(application As String, sVersion As String, sValue As Long)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SaveRegLong"
+
+ Const OfficePath = "Software\Policies\Microsoft\Office\"
+ Const security = "\Security"
+ Const AccessVBOM = "AccessVBOM"
+ Dim subpath As String
+
+ subpath = OfficePath & sVersion & "\" & application & security
+ SaveRegLong HKEY_CURRENT_USER, subpath, AccessVBOM, sValue
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+Public Function DeleteRegValue(application As String, sVersion As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "SaveRegLong"
+
+ Const OfficePath = "Software\Policies\Microsoft\Office\"
+ Const security = "\Security"
+ Const AccessVBOM = "AccessVBOM"
+ Dim subpath As String
+ Dim retval As Long
+ Dim hKey As Long
+
+ subpath = OfficePath & sVersion & "\" & application & security
+ retval = RegOpenKeyEx(HKEY_CURRENT_USER, subpath, 0, KEY_WRITE, hKey)
+ If retval = ERROR_SUCCESS Then
+ retval = RegDeleteValue(hKey, AccessVBOM)
+ retval = RegCloseKey(hKey)
+ Exit Function
+ End If
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+End Function
+
+Public Function CheckForAccesToWordVBProject1(wrd As Word.application, RestoreValue As Long) As Boolean
+ On Error Resume Next
+ CheckForAccesToWordVBProject1 = True
+ RestoreValue = -1
+ If val(wrd.Version) < 10# Then Exit Function
+
+ Set myProject = wrd.ActiveDocument.VBProject
+ If Err.Number <> 0 Then
+ Dim RegValue As Long
+ If GiveAccessToMacroProject(APP_WORD, wrd.Version, RegValue) Then
+ CheckForAccesToWordVBProject1 = True
+ RestoreValue = RegValue
+ Else
+ CheckForAccesToWordVBProject1 = False
+ End If
+ End If
+
+End Function
+Public Function CheckForAccesToWordVBProject(wrd As Word.application) As Boolean
+ On Error Resume Next
+ CheckForAccesToWordVBProject = True
+ If val(wrd.Version) < 10# Then Exit Function
+
+ Set myProject = wrd.ActiveDocument.VBProject
+ If Err.Number <> 0 Then
+ CheckForAccesToWordVBProject = False
+ End If
+
+End Function
+Public Function CheckForAccesToExcelVBProject1(xl As Excel.application, RestoreValue As Long) As Boolean
+ On Error Resume Next
+ CheckForAccesToExcelVBProject1 = True
+ RestoreValue = -1
+ If val(xl.Version) < 10# Then Exit Function
+
+ Dim displayAlerts As Boolean
+ displayAlerts = xl.displayAlerts
+ xl.displayAlerts = False
+ Set myProject = xl.ActiveWorkbook.VBProject
+ If Err.Number <> 0 Then
+ Dim RegValue As Long
+ If GiveAccessToMacroProject(APP_EXCEL, xl.Version, RegValue) Then
+ CheckForAccesToExcelVBProject1 = True
+ RestoreValue = RegValue
+ Else
+ CheckForAccesToExcelVBProject1 = False
+ End If
+ End If
+ xl.displayAlerts = displayAlerts
+
+End Function
+Public Function CheckForAccesToExcelVBProject(xl As Excel.application) As Boolean
+ On Error Resume Next
+ CheckForAccesToExcelVBProject = True
+ If val(xl.Version) < 10# Then Exit Function
+
+ Dim displayAlerts As Boolean
+ displayAlerts = xl.displayAlerts
+ xl.displayAlerts = False
+ Set myProject = xl.ActiveWorkbook.VBProject
+ If Err.Number <> 0 Then
+ CheckForAccesToExcelVBProject = False
+ End If
+ xl.displayAlerts = displayAlerts
+
+End Function
+Public Function CheckForAccesToPPVBProject1(pp As PowerPoint.application, pres As PowerPoint.Presentation, RestoreValue As Long) As Boolean
+ On Error Resume Next
+ CheckForAccesToPPVBProject1 = True
+ RestoreValue = -1
+ If val(pp.Version) < 10# Then Exit Function
+
+ Set myProject = pres.VBProject
+ If Err.Number <> 0 Then
+ Dim RegValue As Long
+ If GiveAccessToMacroProject(APP_PP, pp.Version, RegValue) Then
+ CheckForAccesToPPVBProject1 = True
+ RestoreValue = RegValue
+ Else
+ CheckForAccesToPPVBProject1 = False
+ End If
+ End If
+End Function
+
+Public Function CheckForAccesToPPVBProject(pp As PowerPoint.application, pres As PowerPoint.Presentation) As Boolean
+ On Error Resume Next
+ CheckForAccesToPPVBProject = True
+ If val(pp.Version) < 10# Then Exit Function
+
+ Set myProject = pres.VBProject
+ If Err.Number <> 0 Then
+ CheckForAccesToPPVBProject = False
+ End If
+End Function
diff --git a/migrationanalysis/src/wizard/ProAnalysisWizard.vbp b/migrationanalysis/src/wizard/ProAnalysisWizard.vbp
new file mode 100644
index 000000000000..99b320e839b6
--- /dev/null
+++ b/migrationanalysis/src/wizard/ProAnalysisWizard.vbp
@@ -0,0 +1,65 @@
+Type=Exe
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\WINDOWS\System32\stdole2.tlb#Standard OLE Types
+Reference=*\G{EF404E00-EDA6-101A-8DAF-00DD010F7EBB}#5.0#0#..\..\..\..\..\Program Files\Microsoft Visual Studio\VB98\VB6EXT.OLB#Microsoft Visual Basic Extensibility
+Reference=*\G{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}#1.0#0#..\..\..\..\..\Program Files\Common Files\Designer\MSADDNDR.DLL#Add-In Designer/Instance Control Library
+Reference=*\G{00025E01-0000-0000-C000-000000000046}#4.0#0#..\..\..\..\..\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL#Microsoft DAO 3.51 Object Library
+Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\..\..\..\WINDOWS\System32\scrrun.dll#Microsoft Scripting Runtime
+Reference=*\G{00020813-0000-0000-C000-000000000046}#1.3#0#..\..\..\..\..\Program Files\Microsoft Office\Office\EXCEL9.OLB#Microsoft Excel 9.0 Object Library
+Reference=*\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.1#0#..\..\..\..\..\Program Files\Microsoft Office\Office\mso9.dll#Microsoft Office 9.0 Object Library
+Reference=*\G{00020905-0000-0000-C000-000000000046}#8.1#0#..\..\..\..\..\Program Files\Microsoft Office\Office\MSWORD9.OLB#Microsoft Word 9.0 Object Library
+Reference=*\G{91493440-5A91-11CF-8700-00AA0060263B}#2.6#0#..\..\..\..\..\Program Files\Microsoft Office\Office\msppt9.olb#Microsoft PowerPoint 9.0 Object Library
+Module=modWizard; ..\..\..\src\wizard\Wizard.bas
+Form=..\..\..\src\wizard\Wizard.frm
+Designer=..\..\..\src\wizard\Wizard.Dsr
+Module=BrowseDirectorysOnly; ..\..\..\src\wizard\Get Directory Dialog.bas
+Class=CollectedFiles; ..\..\..\src\wizard\CollectedFiles.cls
+Module=IniSupport; ..\..\..\src\wizard\IniSupport.bas
+Module=Utilities; ..\..\..\src\wizard\Utilities.bas
+Module=Office10Issues; ..\..\..\src\wizard\Office10Issues.bas
+Module=Analyse; ..\..\..\src\wizard\Analyse.bas
+Form=..\..\..\src\wizard\ScanFolders.frm
+Form=..\..\..\src\wizard\SearchDocs.frm
+Form=..\..\..\src\wizard\Terminate.frm
+Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
+Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
+IconForm="frmWizard"
+Startup="frmWizard"
+HelpFile=""
+Title="Professional Analysis Wizard"
+ExeName32="ProAnalysisWizard.exe"
+Path32="..\..\bin\ProAnalysisWizard"
+Command32=""
+Name="ProAnalysisWizard"
+HelpContextID="0"
+Description="Professional Analysis Wizard"
+CompatibleMode="0"
+MajorVer=2
+MinorVer=0
+RevisionVer=000
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionComments="A tool for analyzing issues and working around some of them when migrating documents from Microsoft Office"
+VersionCompanyName="OpenOffice.org"
+VersionFileDescription="ProAnalysisWizard.exe"
+VersionLegalCopyright="Copyright 2005-2008 Sun Microsystems, Inc."
+VersionProductName="ProAnalysisWizard"
+CondComp="VB5 = 1 : PREPARATION = 1"
+CompilationType=-1
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=-1
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
+DebugStartupOption=0
+
+[MS Transaction Server]
+AutoRefresh=1
diff --git a/migrationanalysis/src/wizard/RunServer.bas b/migrationanalysis/src/wizard/RunServer.bas
new file mode 100644
index 000000000000..310098345c73
--- /dev/null
+++ b/migrationanalysis/src/wizard/RunServer.bas
@@ -0,0 +1,202 @@
+Attribute VB_Name = "RunServer"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: RunServer.bas,v $
+' * $Revision: 1.2.66.2 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+
+Option Explicit
+
+Private Declare Function WritePrivateProfileString Lib "kernel32" _
+ Alias "WritePrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpString As Any, _
+ ByVal lpFileName As String) As Long
+
+Const CWORD_DRIVER = "_OOoDocAnalysisWordDriver.doc"
+Const CEXCEL_DRIVER = "_OOoDocAnalysisExcelDriver.xls"
+Const CPP_DRIVER = "_OOoDocAnalysisPPTDriver.ppt"
+
+Const CWORD_APP = "word"
+Const CEXCEL_APP = "excel"
+Const CPP_APP = "pp"
+
+Const CSTART_FILE = "PAW_Start_Analysis"
+Const CSTOP_FILE = "PAW_Stop_Analysis"
+
+Sub Main()
+
+ Dim serverType As String
+ serverType = LCase(Command$)
+ If (serverType <> CWORD_APP) And (serverType <> CEXCEL_APP) And (serverType <> CPP_APP) Then
+ MsgBox "Unknown server type: " & serverType
+ GoTo FinalExit
+ End If
+
+ Dim fso As New FileSystemObject
+ Dim driverName As String
+
+ If (serverType = CWORD_APP) Then
+ driverName = fso.GetAbsolutePathName(".\" & CWORD_DRIVER)
+ ElseIf (serverType = CEXCEL_APP) Then
+ driverName = fso.GetAbsolutePathName(".\" & CEXCEL_DRIVER)
+ ElseIf (serverType = CPP_APP) Then
+ driverName = fso.GetAbsolutePathName(".\" & CPP_DRIVER)
+ End If
+
+ If Not fso.FileExists(driverName) Then
+ If (serverType = CWORD_APP) Then
+ driverName = fso.GetAbsolutePathName(".\Resources\" & CWORD_DRIVER)
+ ElseIf (serverType = CEXCEL_APP) Then
+ driverName = fso.GetAbsolutePathName(".\Resources\" & CEXCEL_DRIVER)
+ ElseIf (serverType = CPP_APP) Then
+ driverName = fso.GetAbsolutePathName(".\Resources\" & CPP_DRIVER)
+ End If
+ End If
+
+ If Not fso.FileExists(driverName) Then
+ WriteToLog fso, "ALL", "LaunchDrivers: Could not find: " & driverName
+ GoTo FinalExit
+ End If
+
+ If (serverType = CWORD_APP) Then
+ OpenWordDriverDoc fso, driverName
+ ElseIf (serverType = CEXCEL_APP) Then
+ OpenExcelDriverDoc fso, driverName
+ ElseIf (serverType = CPP_APP) Then
+ OpenPPDriverDoc fso, driverName
+ End If
+
+FinalExit:
+
+ Set fso = Nothing
+End Sub
+
+Sub OpenWordDriverDoc(fso As FileSystemObject, driverName As String)
+
+ Dim wrdApp As Word.Application
+ Dim wrdDriverDoc As Word.Document
+
+ On Error GoTo HandleErrors
+
+ Set wrdApp = New Word.Application
+ Set wrdDriverDoc = wrdApp.Documents.Open(driverName)
+
+ wrdApp.Run ("AnalysisTool.AnalysisDriver.AnalyseDirectory")
+ If Err.Number <> 0 Then
+ WriteToLog fso, CWORD_APP, "OpenWordDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ End If
+
+ wrdDriverDoc.Close wdDoNotSaveChanges
+ wrdApp.Quit False
+
+FinalExit:
+ Set wrdDriverDoc = Nothing
+ Set wrdApp = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteToLog fso, CWORD_APP, "OpenWordDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OpenExcelDriverDoc(fso As FileSystemObject, driverName As String)
+
+ Dim excelApp As Excel.Application
+ Dim excelDriverDoc As Excel.Workbook
+
+ On Error GoTo HandleErrors
+
+ Set excelApp = New Excel.Application
+ Set excelDriverDoc = Excel.Workbooks.Open(driverName)
+ excelApp.Run ("AnalysisTool.AnalysisDriver.AnalyseDirectory")
+
+ If Err.Number <> 0 Then
+ WriteToLog fso, CEXCEL_APP, "OpenExcelDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ End If
+
+ excelDriverDoc.Close False
+ excelApp.Quit
+
+FinalExit:
+ Set excelDriverDoc = Nothing
+ Set excelApp = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteToLog fso, CEXCEL_APP, "OpenExcelDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub OpenPPDriverDoc(fso As FileSystemObject, driverName As String)
+
+ Dim ppApp As PowerPoint.Application
+ Dim ppDriverDoc As PowerPoint.Presentation
+ Dim ppDummy(0) As Variant
+
+ On Error GoTo HandleErrors
+
+ Set ppApp = New PowerPoint.Application
+ ppApp.Visible = msoTrue
+ Set ppDriverDoc = ppApp.Presentations.Open(driverName) ', msoTrue, msoFalse, msoFalse)
+ ppApp.Run ("AnalysisDriver.AnalyseDirectory")
+
+ If Err.Number <> 0 Then
+ WriteToLog fso, CPP_APP, "OpenPPDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ End If
+
+ ppDriverDoc.Close
+ ppApp.Quit
+
+FinalExit:
+ Set ppDriverDoc = Nothing
+ Set ppApp = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteToLog fso, CPP_APP, "OpenPPDriverDoc: " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteToLog(fso As FileSystemObject, currApp As String, errMsg As String)
+
+ On Error Resume Next
+
+ Static ErrCount As Long
+ Dim logFileName As String
+ Dim tempPath As String
+
+ tempPath = fso.GetSpecialFolder(TemporaryFolder).Path
+ If (tempPath = "") Then tempPath = "."
+ logFileName = fso.GetAbsolutePathName(tempPath & "\LauchDrivers.log")
+ ErrCount = ErrCount + 1
+
+ Call WritePrivateProfileString("ERRORS", currApp & "_log" & ErrCount, _
+ errMsg, logFileName)
+End Sub
+
diff --git a/migrationanalysis/src/wizard/ScanFolders.frm b/migrationanalysis/src/wizard/ScanFolders.frm
new file mode 100644
index 000000000000..4c725f5dbeb3
--- /dev/null
+++ b/migrationanalysis/src/wizard/ScanFolders.frm
@@ -0,0 +1,157 @@
+VERSION 5.00
+Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.ocx"
+Begin VB.Form ShowProgress
+ BorderStyle = 1 'Fixed Single
+ Caption = "Looking for Files"
+ ClientHeight = 2160
+ ClientLeft = 2505
+ ClientTop = 2325
+ ClientWidth = 7110
+ ControlBox = 0 'False
+ LinkTopic = "Form1"
+ MaxButton = 0 'False
+ MinButton = 0 'False
+ ScaleHeight = 2160
+ ScaleWidth = 7110
+ ShowInTaskbar = 0 'False
+ Visible = 0 'False
+ Begin MSComctlLib.ProgressBar ScanProgress
+ Height = 255
+ Left = 120
+ TabIndex = 2
+ Top = 1400
+ Width = 5500
+ _ExtentX = 9710
+ _ExtentY = 450
+ _Version = 393216
+ Appearance = 1
+ End
+ Begin VB.CommandButton AbortScan
+ Cancel = -1 'True
+ Caption = "Cancel"
+ CausesValidation= 0 'False
+ Height = 375
+ Left = 2880
+ TabIndex = 1
+ Top = 1760
+ Width = 1455
+ End
+ Begin VB.Label Label6
+ Caption = "X / Y"
+ Height = 195
+ Left = 5760
+ TabIndex = 7
+ Top = 1430
+ Width = 1200
+ End
+ Begin VB.Label Label5
+ Caption = "Label5"
+ Height = 440
+ Left = 120
+ TabIndex = 6
+ Top = 120
+ Width = 6870
+ End
+ Begin VB.Label Label4
+ Caption = "Label4"
+ Height = 195
+ Left = 120
+ TabIndex = 5
+ Top = 995
+ Width = 1155
+ End
+ Begin VB.Label Label3
+ Caption = "Label3"
+ Height = 195
+ Left = 120
+ TabIndex = 4
+ Top = 680
+ Width = 1155
+ End
+ Begin VB.Label Label2
+ Caption = "Label2"
+ Height = 195
+ Left = 1395
+ TabIndex = 3
+ Top = 995
+ Width = 5595
+ End
+ Begin VB.Label Label1
+ Caption = "Label1"
+ Height = 195
+ Left = 1395
+ TabIndex = 0
+ Top = 680
+ Width = 5595
+ End
+End
+Attribute VB_Name = "ShowProgress"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Option Explicit
+
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+
+Private Const C_MIN_WAIT_TIME As Long = 0
+Private Const C_MIN_UPDATE_TIME As Long = 100
+
+Private g_SP_StartTime As Long
+Private g_SP_LastUpdate As Long
+
+Public g_SP_Abort As Boolean
+Public g_SP_AllowOtherDLG As Boolean
+
+Public Sub SP_Init(maxIndex As Long)
+ g_SP_Abort = False
+ g_SP_AllowOtherDLG = False
+ g_SP_StartTime = GetTickCount()
+ g_SP_LastUpdate = g_SP_StartTime
+
+ ShowProgress.Visible = False
+ ShowProgress.Caption = GetResString(PROGRESS_CAPTION)
+
+ Label3.Caption = GetResString(PROGRESS_PATH_LABEL)
+ Label4.Caption = GetResString(PROGRESS_FILE_LABEL)
+ Label5.Caption = GetResString(PROGRESS_INFO_LABEL)
+ ScanProgress.Max = maxIndex
+
+ ShowProgress.Top = frmWizard.Top + 3200
+ ShowProgress.Left = frmWizard.Left + 500
+End Sub
+
+Public Sub SP_UpdateProgress(curObject As String, curParent As String, _
+ curIndex As Long)
+
+ Dim currTicks As Long
+ currTicks = GetTickCount()
+
+ ScanProgress.value = curIndex
+
+ If (Not ShowProgress.Visible) Then
+ If (currTicks - g_SP_StartTime > C_MIN_WAIT_TIME) Then
+ ShowProgress.Visible = True
+ End If
+ End If
+ If (currTicks - g_SP_LastUpdate > C_MIN_UPDATE_TIME) Then
+ g_SP_LastUpdate = currTicks
+ Label1.Caption = curParent
+ Label2.Caption = curObject
+ Label6.Caption = "(" & str$(curIndex) & "/" & str$(ScanProgress.Max) & ")"
+ End If
+End Sub
+
+Private Sub AbortScan_Click()
+ g_SP_Abort = True
+ Label5.Caption = GetResString(PROGRESS_WAIT_LABEL)
+ AbortScan.Caption = GetResString(PROGRESS_ABORTING)
+ AbortScan.Enabled = False
+End Sub
+
+Private Sub Form_Deactivate()
+ If Not g_SP_AllowOtherDLG Then
+ ShowProgress.ZOrder (0)
+ End If
+End Sub
+
diff --git a/migrationanalysis/src/wizard/SearchDocs.frm b/migrationanalysis/src/wizard/SearchDocs.frm
new file mode 100644
index 000000000000..571f8a23cc9b
--- /dev/null
+++ b/migrationanalysis/src/wizard/SearchDocs.frm
@@ -0,0 +1,124 @@
+VERSION 5.00
+Begin VB.Form SearchDocs
+ BorderStyle = 3 'Fixed Dialog
+ Caption = "Looking for Files"
+ ClientHeight = 1830
+ ClientLeft = 2505
+ ClientTop = 2325
+ ClientWidth = 7110
+ ControlBox = 0 'False
+ LinkTopic = "Form1"
+ MaxButton = 0 'False
+ MinButton = 0 'False
+ ScaleHeight = 1830
+ ScaleWidth = 7110
+ ShowInTaskbar = 0 'False
+ Visible = 0 'False
+ Begin VB.CommandButton AbortScan
+ Cancel = -1 'True
+ Caption = "Cancel"
+ CausesValidation= 0 'False
+ Height = 375
+ Left = 2880
+ TabIndex = 1
+ Top = 1350
+ Width = 1455
+ End
+ Begin VB.Label Label5
+ Caption = "Label5"
+ Height = 440
+ Left = 120
+ TabIndex = 5
+ Top = 120
+ Width = 6870
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label4
+ Caption = "gefundene Dokumente:"
+ Height = 195
+ Left = 120
+ TabIndex = 4
+ Top = 960
+ Width = 1800
+ End
+ Begin VB.Label Label3
+ Caption = "Pfad:"
+ Height = 195
+ Left = 120
+ TabIndex = 3
+ Top = 680
+ Width = 1800
+ End
+ Begin VB.Label Label2
+ Caption = "Label2"
+ Height = 195
+ Left = 2040
+ TabIndex = 2
+ Top = 995
+ Width = 5595
+ End
+ Begin VB.Label Label1
+ Caption = "Label1"
+ Height = 195
+ Left = 2040
+ TabIndex = 0
+ Top = 680
+ Width = 5595
+ End
+End
+Attribute VB_Name = "SearchDocs"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Option Explicit
+
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+
+Private Const C_MIN_WAIT_TIME As Long = 1000
+Private Const C_MIN_UPDATE_TIME As Long = 100
+
+Private g_SD_StartTime As Long
+Private g_SD_LastUpdate As Long
+
+Public g_SD_Abort As Boolean
+
+Private Sub Form_Load()
+
+ g_SD_Abort = False
+ g_SD_StartTime = GetTickCount()
+ g_SD_LastUpdate = g_SD_StartTime
+
+ SearchDocs.Visible = False
+ SearchDocs.Caption = GetResString(SEARCH_CAPTION)
+
+ Label3.Caption = GetResString(SEARCH_PATH_LABEL)
+ Label4.Caption = GetResString(SEARCH_FOUND_LABEL)
+ Label5.Caption = GetResString(SEARCH_INFO_LABEL)
+End Sub
+
+Public Sub SD_UpdateProgress(curObject As String, curParent As String)
+
+ Dim currTicks As Long
+ currTicks = GetTickCount()
+
+ If (Not SearchDocs.Visible) Then
+ If (currTicks - g_SD_StartTime > C_MIN_WAIT_TIME) Then
+ SearchDocs.Visible = True
+ End If
+ End If
+ If (currTicks - g_SD_LastUpdate > C_MIN_UPDATE_TIME) Then
+ g_SD_LastUpdate = currTicks
+ Label1.Caption = curParent
+ Label2.Caption = curObject
+ End If
+End Sub
+
+Private Sub AbortScan_Click()
+ g_SD_Abort = True
+End Sub
+
+Private Sub Form_Deactivate()
+ SearchDocs.ZOrder (0)
+End Sub
+
diff --git a/migrationanalysis/src/wizard/Terminate.frm b/migrationanalysis/src/wizard/Terminate.frm
new file mode 100644
index 000000000000..c196528fbd11
--- /dev/null
+++ b/migrationanalysis/src/wizard/Terminate.frm
@@ -0,0 +1,81 @@
+VERSION 5.00
+Begin VB.Form TerminateMSO
+ BorderStyle = 3 'Fixed Dialog
+ Caption = "Dialog Caption"
+ ClientHeight = 2280
+ ClientLeft = 3165
+ ClientTop = 2835
+ ClientWidth = 6030
+ ControlBox = 0 'False
+ LinkTopic = "Form1"
+ MaxButton = 0 'False
+ MinButton = 0 'False
+ ScaleHeight = 2280
+ ScaleWidth = 6030
+ ShowInTaskbar = 0 'False
+ Begin VB.CommandButton NoButton
+ Cancel = -1 'True
+ Caption = "No"
+ CausesValidation= 0 'False
+ Default = -1 'True
+ Height = 375
+ Left = 4560
+ TabIndex = 0
+ Top = 1800
+ Width = 1215
+ End
+ Begin VB.CommandButton YesButton
+ Caption = "Yes"
+ CausesValidation= 0 'False
+ Height = 375
+ Left = 3120
+ TabIndex = 1
+ Top = 1800
+ Width = 1215
+ End
+ Begin VB.Label Info
+ Caption = "Label1"
+ Height = 1455
+ Left = 120
+ TabIndex = 2
+ Top = 120
+ Width = 5775
+ End
+End
+Attribute VB_Name = "TerminateMSO"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Option Explicit
+
+Const CR_STR = "<CR>"
+
+Private Sub Form_Activate()
+ NoButton.Default = True
+End Sub
+
+Private Sub Form_Load()
+
+ TerminateMSO.Top = frmWizard.Top + 3000
+ TerminateMSO.Left = frmWizard.Left + 1000
+
+ TerminateMSO.Caption = GetResString(TERMINATE_CAPTION)
+ Info.Caption = ReplaceTopicTokens(GetResString(TERMINATE_INFO), CR_STR, Chr(13))
+ YesButton.Caption = GetResString(TERMINATE_YES)
+ NoButton.Caption = GetResString(TERMINATE_NO)
+ NoButton.Default = True
+End Sub
+
+Private Sub YesButton_Click()
+ Dim fso As New FileSystemObject
+ TerminateOfficeApps fso, " --kill"
+ TerminateMSO.Hide
+ Set fso = Nothing
+End Sub
+
+Private Sub NoButton_Click()
+ TerminateMSO.Hide
+End Sub
+
+
diff --git a/migrationanalysis/src/wizard/Utilities.bas b/migrationanalysis/src/wizard/Utilities.bas
new file mode 100644
index 000000000000..8db22755a55b
--- /dev/null
+++ b/migrationanalysis/src/wizard/Utilities.bas
@@ -0,0 +1,555 @@
+Attribute VB_Name = "Utilities"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Utilities.bas,v $
+' * $Revision: 1.11.66.1 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Public Const LOCALE_ILANGUAGE As Long = &H1 'language id
+Public Const LOCALE_SLANGUAGE As Long = &H2 'localized name of lang
+Public Const LOCALE_SENGLANGUAGE As Long = &H1001 'English name of lang
+Public Const LOCALE_SABBREVLANGNAME As Long = &H3 'abbreviated lang name
+Public Const LOCALE_SNATIVELANGNAME As Long = &H4 'native name of lang
+Public Const LOCALE_ICOUNTRY As Long = &H5 'country code
+Public Const LOCALE_SCOUNTRY As Long = &H6 'localized name of country
+Public Const LOCALE_SENGCOUNTRY As Long = &H1002 'English name of country
+Public Const LOCALE_SABBREVCTRYNAME As Long = &H7 'abbreviated country name
+Public Const LOCALE_SNATIVECTRYNAME As Long = &H8 'native name of country
+Public Const LOCALE_SINTLSYMBOL As Long = &H15 'intl monetary symbol
+Public Const LOCALE_IDEFAULTLANGUAGE As Long = &H9 'def language id
+Public Const LOCALE_IDEFAULTCOUNTRY As Long = &HA 'def country code
+Public Const LOCALE_IDEFAULTCODEPAGE As Long = &HB 'def oem code page
+Public Const LOCALE_IDEFAULTANSICODEPAGE As Long = &H1004 'def ansi code page
+Public Const LOCALE_IDEFAULTMACCODEPAGE As Long = &H1011 'def mac code page
+
+Public Const LOCALE_IMEASURE As Long = &HD '0 = metric, 1 = US
+Public Const LOCALE_SSHORTDATE As Long = &H1F 'short date format string
+
+'#if(WINVER >= &H0400)
+Public Const LOCALE_SISO639LANGNAME As Long = &H59 'ISO abbreviated language name
+Public Const LOCALE_SISO3166CTRYNAME As Long = &H5A 'ISO abbreviated country name
+'#endif /* WINVER >= as long = &H0400 */
+
+'#if(WINVER >= &H0500)
+Public Const LOCALE_SNATIVECURRNAME As Long = &H1008 'native name of currency
+Public Const LOCALE_IDEFAULTEBCDICCODEPAGE As Long = &H1012 'default ebcdic code page
+Public Const LOCALE_SSORTNAME As Long = &H1013 'sort name
+'#endif /* WINVER >= &H0500 */
+
+Public Const CSTR_LOG_FILE_NAME = "analysis.log"
+
+Public Declare Function GetThreadLocale Lib "kernel32" () As Long
+
+Public Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
+Public Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
+Public Declare Function GetUserDefaultLangID Lib "kernel32" () As Long
+Public Declare Function GetSystemDefaultLangID Lib "kernel32" () As Long
+
+Public Declare Function GetLocaleInfo Lib "kernel32" _
+ Alias "GetLocaleInfoA" _
+ (ByVal Locale As Long, _
+ ByVal LCType As Long, _
+ ByVal lpLCData As String, _
+ ByVal cchData As Long) As Long
+
+Private Const VER_PLATFORM_WIN32s = 0
+Private Const VER_PLATFORM_WIN32_WINDOWS = 1
+Private Const VER_PLATFORM_WIN32_NT = 2
+
+Private Type OSVERSIONINFO
+ OSVSize As Long 'size, in bytes, of this data structure
+ dwVerMajor As Long 'ie NT 3.51, dwVerMajor = 3; NT 4.0, dwVerMajor = 4.
+ dwVerMinor As Long 'ie NT 3.51, dwVerMinor = 51; NT 4.0, dwVerMinor= 0.
+ dwBuildNumber As Long 'NT: build number of the OS
+ 'Win9x: build number of the OS in low-order word.
+ ' High-order word contains major & minor ver nos.
+ PlatformID As Long 'Identifies the operating system platform.
+ szCSDVersion As String * 128 'NT: string, such as "Service Pack 3"
+ 'Win9x: string providing arbitrary additional information
+End Type
+
+Public Type RGB_WINVER
+ PlatformID As Long
+ VersionName As String
+ VersionNo As String
+ ServicePack As String
+ BuildNo As String
+End Type
+
+'defined As Any to support OSVERSIONINFO and OSVERSIONINFOEX
+Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _
+ (lpVersionInformation As Any) As Long
+
+Private Declare Function GetDesktopWindow Lib "user32" () As Long
+
+Private Declare Function ShellExecute Lib "shell32" _
+ Alias "ShellExecuteA" _
+ (ByVal hWnd As Long, _
+ ByVal lpOperation As String, _
+ ByVal lpFile As String, _
+ ByVal lpParameters As String, _
+ ByVal lpDirectory As String, _
+ ByVal nShowCmd As Long) As Long
+
+Public Const SW_SHOWNORMAL As Long = 1
+Public Const SW_SHOWMAXIMIZED As Long = 3
+Public Const SW_SHOWDEFAULT As Long = 10
+Public Const SE_ERR_NOASSOC As Long = 31
+
+Public Const CNO_OPTIONAL_PARAM = "_NoOptionalParam_"
+Private Declare Function WritePrivateProfileString Lib "kernel32" _
+ Alias "WritePrivateProfileStringA" _
+ (ByVal lpSectionName As String, _
+ ByVal lpKeyName As Any, _
+ ByVal lpString As Any, _
+ ByVal lpFileName As String) As Long
+
+
+Public Const HKEY_LOCAL_MACHINE As Long = &H80000002
+Public Const HKEY_CLASSES_ROOT = &H80000000
+Private Const ERROR_MORE_DATA = 234
+Private Const ERROR_SUCCESS As Long = 0
+Private Const KEY_QUERY_VALUE As Long = &H1
+Private Const KEY_ENUMERATE_SUB_KEYS As Long = &H8
+Private Const KEY_NOTIFY As Long = &H10
+Private Const STANDARD_RIGHTS_READ As Long = &H20000
+Private Const SYNCHRONIZE As Long = &H100000
+Private Const KEY_READ As Long = ((STANDARD_RIGHTS_READ Or _
+ KEY_QUERY_VALUE Or _
+ KEY_ENUMERATE_SUB_KEYS Or _
+ KEY_NOTIFY) And _
+ (Not SYNCHRONIZE))
+
+Private Declare Function RegOpenKeyEx Lib "advapi32.dll" _
+ Alias "RegOpenKeyExA" _
+ (ByVal hKey As Long, _
+ ByVal lpSubKey As String, _
+ ByVal ulOptions As Long, _
+ ByVal samDesired As Long, _
+ phkResult As Long) As Long
+
+Private Declare Function RegQueryValueEx Lib "advapi32.dll" _
+ Alias "RegQueryValueExA" _
+ (ByVal hKey As Long, _
+ ByVal lpValueName As String, _
+ ByVal lpReserved As Long, _
+ lpType As Long, _
+ lpData As Any, _
+ lpcbData As Long) As Long
+
+Private Declare Function RegCloseKey Lib "advapi32.dll" _
+ (ByVal hKey As Long) As Long
+
+Private Declare Function lstrlenW Lib "kernel32" _
+ (ByVal lpString As Long) As Long
+
+Private Type ShortItemId
+ cb As Long
+ abID As Byte
+End Type
+
+Private Type ITEMIDLIST
+ mkid As ShortItemId
+End Type
+
+Private Declare Function SHGetPathFromIDList Lib "shell32.dll" _
+ (ByVal pidl As Long, ByVal pszPath As String) As Long
+
+Private Declare Function SHGetSpecialFolderLocation Lib _
+ "shell32.dll" (ByVal hWndOwner As Long, ByVal nFolder _
+ As Long, pidl As ITEMIDLIST) As Long
+
+
+Public Function IsWin98Plus() As Boolean
+ 'returns True if running Windows 2000 or later
+ Dim osv As OSVERSIONINFO
+
+ osv.OSVSize = Len(osv)
+
+ If GetVersionEx(osv) = 1 Then
+
+ Select Case osv.PlatformID 'win 32
+ Case VER_PLATFORM_WIN32s:
+ IsWin98Plus = False
+ Exit Function
+ Case VER_PLATFORM_WIN32_NT: 'win nt, 2000, xp
+ IsWin98Plus = True
+ Exit Function
+ Case VER_PLATFORM_WIN32_WINDOWS:
+ Select Case osv.dwVerMinor
+ Case 0: 'win95
+ IsWin98Plus = False
+ Exit Function
+ Case 90: 'Windows ME
+ IsWin98Plus = True
+ Exit Function
+ Case 10: ' Windows 98
+ If osv.dwBuildNumber >= 2222 Then 'second edition
+ IsWin98Plus = True
+ Exit Function
+ Else
+ IsWin98Plus = False
+ Exit Function
+ End If
+ End Select
+ Case Else
+ IsWin98Plus = False
+ Exit Function
+ End Select
+
+ End If
+
+End Function
+
+Public Function GetWinVersion(WIN As RGB_WINVER) As String
+
+'returns a structure (RGB_WINVER)
+'filled with OS information
+
+ #If Win32 Then
+
+ Dim osv As OSVERSIONINFO
+ Dim pos As Integer
+ Dim sVer As String
+ Dim sBuild As String
+
+ osv.OSVSize = Len(osv)
+
+ If GetVersionEx(osv) = 1 Then
+
+ 'PlatformId contains a value representing the OS
+ WIN.PlatformID = osv.PlatformID
+
+ Select Case osv.PlatformID
+ Case VER_PLATFORM_WIN32s: WIN.VersionName = "Win32s"
+ Case VER_PLATFORM_WIN32_NT: WIN.VersionName = "Windows NT"
+
+ Select Case osv.dwVerMajor
+ Case 4: WIN.VersionName = "Windows NT"
+ Case 5:
+ Select Case osv.dwVerMinor
+ Case 0: WIN.VersionName = "Windows 2000"
+ Case 1: WIN.VersionName = "Windows XP"
+ End Select
+ End Select
+
+ Case VER_PLATFORM_WIN32_WINDOWS:
+
+ 'The dwVerMinor bit tells if its 95 or 98.
+ Select Case osv.dwVerMinor
+ Case 0: WIN.VersionName = "Windows 95"
+ Case 90: WIN.VersionName = "Windows ME"
+ Case Else: WIN.VersionName = "Windows 98"
+ End Select
+
+ End Select
+
+
+ 'Get the version number
+ WIN.VersionNo = osv.dwVerMajor & "." & osv.dwVerMinor
+
+ 'Get the build
+ WIN.BuildNo = (osv.dwBuildNumber And &HFFFF&)
+
+ 'Any additional info. In Win9x, this can be
+ '"any arbitrary string" provided by the
+ 'manufacturer. In NT, this is the service pack.
+ pos = InStr(osv.szCSDVersion, Chr$(0))
+ If pos Then
+ WIN.ServicePack = Left$(osv.szCSDVersion, pos - 1)
+ End If
+
+ End If
+
+ #Else
+
+ 'can only return that this does not
+ 'support the 32 bit call, so must be Win3x
+ WIN.VersionName = "Windows 3.x"
+ #End If
+ GetWinVersion = WIN.VersionName
+
+End Function
+
+Public Sub RunShellExecute(sTopic As String, _
+ sFile As Variant, _
+ sParams As Variant, _
+ sDirectory As Variant, _
+ nShowCmd As Long)
+
+ Dim hWndDesk As Long
+ Dim success As Long
+
+ 'the desktop will be the
+ 'default for error messages
+ hWndDesk = GetDesktopWindow()
+
+ 'execute the passed operation
+ success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd)
+
+ 'This is optional. Uncomment the three lines
+ 'below to have the "Open With.." dialog appear
+ 'when the ShellExecute API call fails
+ If success = SE_ERR_NOASSOC Then
+ Call Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " & sFile, vbNormalFocus)
+ End If
+
+End Sub
+
+Public Sub WriteToLog(key As String, value As String, _
+ Optional path As String = CNO_OPTIONAL_PARAM, _
+ Optional section As String = WIZARD_NAME)
+
+ Static logFile As String
+
+ If logFile = "" Then
+ logFile = GetLogFilePath
+ End If
+
+ If path = "" Then
+ Exit Sub
+ End If
+
+ If path = CNO_OPTIONAL_PARAM Then
+ path = logFile
+ End If
+ Call WritePrivateProfileString(section, key, value, path)
+End Sub
+
+Public Sub WriteDebug(value As String)
+ Static ErrCount As Long
+ Static logFile As String
+ Static debugLevel As Long
+
+ If logFile = "" Then
+ logFile = GetLogFilePath
+ End If
+
+ Dim sSection As String
+ sSection = WIZARD_NAME & "Debug"
+
+ Call WritePrivateProfileString(sSection, "Analysis" & "_debug" & ErrCount, _
+ value, logFile)
+ ErrCount = ErrCount + 1
+End Sub
+
+Public Function GetDebug(section As String, key As String) As String
+ Static logFile As String
+
+ If logFile = "" Then
+ logFile = GetLogFilePath
+ End If
+
+ GetDebug = ProfileGetItem(section, key, "", logFile)
+End Function
+
+Public Function GetUserLocaleInfo(ByVal dwLocaleID As Long, ByVal dwLCType As Long) As String
+
+ Dim sReturn As String
+ Dim r As Long
+
+ 'call the function passing the Locale type
+ 'variable to retrieve the required size of
+ 'the string buffer needed
+ r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
+
+ 'if successful..
+ If r Then
+
+ 'pad the buffer with spaces
+ sReturn = Space$(r)
+
+ 'and call again passing the buffer
+ r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
+
+ 'if successful (r > 0)
+ If r Then
+
+ 'r holds the size of the string
+ 'including the terminating null
+ GetUserLocaleInfo = Left$(sReturn, r - 1)
+
+ End If
+
+ End If
+
+End Function
+
+Public Function GetRegistryInfo(sHive As String, sSubKey As String, sKey As String) As String
+ GetRegistryInfo = ""
+ Dim hKey As Long
+
+ hKey = OpenRegKey(sHive, sSubKey)
+
+ If hKey <> 0 Then
+ GetRegistryInfo = GetRegValue(hKey, sKey)
+
+ 'the opened key must be closed
+ Call RegCloseKey(hKey)
+ End If
+End Function
+
+
+Private Function GetRegValue(hSubKey As Long, sKeyName As String) As String
+
+ Dim lpValue As String 'value retrieved
+ Dim lpcbData As Long 'length of retrieved string
+
+ 'if valid
+ If hSubKey <> 0 Then
+
+ 'Pass an zero-length string to
+ 'obtain the required buffer size
+ 'required to return the result.
+ 'If the key passed exists, the call
+ 'will return error 234 (more data)
+ 'and lpcbData will indicate the
+ 'required buffer size (including
+ 'the terminating null).
+ lpValue = ""
+ lpcbData = 0
+ If RegQueryValueEx(hSubKey, _
+ sKeyName, _
+ 0&, _
+ 0&, _
+ ByVal lpValue, _
+ lpcbData) = ERROR_MORE_DATA Then
+
+ lpValue = Space$(lpcbData)
+
+ 'retrieve the desired value
+ If RegQueryValueEx(hSubKey, _
+ sKeyName, _
+ 0&, _
+ 0&, _
+ ByVal lpValue, _
+ lpcbData) = ERROR_SUCCESS Then
+
+ GetRegValue = TrimNull(lpValue)
+
+ End If 'If RegQueryValueEx (second call)
+ End If 'If RegQueryValueEx (first call)
+ End If 'If hSubKey
+
+End Function
+
+Private Function OpenRegKey(ByVal hKey As Long, _
+ ByVal lpSubKey As String) As Long
+ Dim hSubKey As Long
+ Dim retval As Long
+
+ retval = RegOpenKeyEx(hKey, lpSubKey, _
+ 0, KEY_READ, hSubKey)
+
+ If retval = ERROR_SUCCESS Then
+ OpenRegKey = hSubKey
+ End If
+End Function
+
+
+Private Function TrimNull(startstr As String) As String
+
+ TrimNull = Left$(startstr, lstrlenW(StrPtr(startstr)))
+
+End Function
+
+Function GetLogFilePath() As String
+
+ Dim fso As New FileSystemObject
+ Dim TempPath As String
+
+ TempPath = fso.GetSpecialFolder(TemporaryFolder).path
+
+ If (TempPath = "") Then
+ TempPath = "."
+ End If
+
+ GetLogFilePath = fso.GetAbsolutePathName(TempPath & "\" & CSTR_LOG_FILE_NAME)
+End Function
+
+Function GetIniFilePath() As String
+
+ Dim fso As New FileSystemObject
+ Dim AppDataDir As String
+
+ AppDataDir = GetAppDataFolder
+ If (AppDataDir = "") Then
+ AppDataDir = CBASE_RESOURCE_DIR
+ Else
+ If Not fso.FolderExists(AppDataDir) Then
+ fso.CreateFolder (AppDataDir)
+ End If
+ AppDataDir = AppDataDir & "\Sun"
+ If Not fso.FolderExists(AppDataDir) Then
+ fso.CreateFolder (AppDataDir)
+ End If
+ AppDataDir = AppDataDir & "\AnalysisWizard"
+ If Not fso.FolderExists(AppDataDir) Then
+ fso.CreateFolder (AppDataDir)
+ End If
+ End If
+
+ GetIniFilePath = fso.GetAbsolutePathName(AppDataDir & "\" & CANALYSIS_INI_FILE)
+End Function
+
+' This function returns the Application Data Folder Path
+Function GetAppDataFolder() As String
+ Dim idlstr As Long
+ Dim sPath As String
+ Dim IDL As ITEMIDLIST
+ Const NOERROR = 0
+ Const MAX_LENGTH = 260
+ Const CSIDL_APPDATA = &H1A
+
+ On Error GoTo Err_GetFolder
+
+ ' Fill the idl structure with the specified folder item.
+ idlstr = SHGetSpecialFolderLocation(0, CSIDL_APPDATA, IDL)
+
+ If idlstr = NOERROR Then
+ ' Get the path from the idl list, and return
+ ' the folder with a slash at the end.
+ sPath = Space$(MAX_LENGTH)
+ idlstr = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal sPath)
+ If idlstr Then
+ GetAppDataFolder = Left$(sPath, InStr(sPath, Chr$(0)) - 1)
+ End If
+ End If
+
+Exit_GetFolder:
+ Exit Function
+
+Err_GetFolder:
+ MsgBox "An Error was Encountered" & Chr(13) & Err.Description, _
+ vbCritical Or vbOKOnly
+ Resume Exit_GetFolder
+
+End Function
+
+
+
diff --git a/migrationanalysis/src/wizard/Wizard.DCA b/migrationanalysis/src/wizard/Wizard.DCA
new file mode 100644
index 000000000000..56ef0d79e381
--- /dev/null
+++ b/migrationanalysis/src/wizard/Wizard.DCA
Binary files differ
diff --git a/migrationanalysis/src/wizard/Wizard.Dsr b/migrationanalysis/src/wizard/Wizard.Dsr
new file mode 100644
index 000000000000..7b031dc5b048
--- /dev/null
+++ b/migrationanalysis/src/wizard/Wizard.Dsr
@@ -0,0 +1,79 @@
+VERSION 5.00
+Begin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} Wizard
+ ClientHeight = 7470
+ ClientLeft = 1740
+ ClientTop = 1545
+ ClientWidth = 6585
+ _ExtentX = 11615
+ _ExtentY = 13176
+ _Version = 393216
+ DisplayName = "AnalysisWizard"
+ AppName = "Visual Basic"
+ AppVer = "Visual Basic 6.0"
+ LoadName = "Command Line / Startup"
+ LoadBehavior = 5
+ RegLocation = "HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0"
+ CmdLineSupport = -1 'True
+End
+Attribute VB_Name = "Wizard"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = True
+Attribute VB_PredeclaredId = False
+Attribute VB_Exposed = False
+Option Explicit
+
+Dim mcbMenuCommandBar As Office.CommandBarControl 'command bar object
+Public WithEvents MenuHandler As CommandBarEvents 'command bar event handler
+Attribute MenuHandler.VB_VarHelpID = -1
+Dim mfrmWizard As frmWizard
+Dim VBInstance As VBIDE.VBE
+
+
+'------------------------------------------------------
+'this method adds the Add-In to the VB menu
+'it is called by the VB addin manager
+'------------------------------------------------------
+Private Sub AddinInstance_OnConnection(ByVal application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
+ On Error GoTo error_handler
+
+ Set VBInstance = application
+
+ If ConnectMode = ext_cm_External Then
+ 'Used by the wizard toolbar to start this wizard
+ LoadMe
+ Else
+ Set mcbMenuCommandBar = AddToAddInCommandBar(VBInstance, LoadResString(15), LoadResPicture(5000, 0))
+ 'sink the event
+ Set Me.MenuHandler = VBInstance.Events.CommandBarEvents(mcbMenuCommandBar)
+ End If
+
+ Exit Sub
+
+error_handler:
+ MsgBox Err.Description
+End Sub
+
+'------------------------------------------------------
+'this method removes the Add-In from the VB menu
+'it is called by the VB addin manager
+'------------------------------------------------------
+Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
+ 'delete the command bar entry
+ mcbMenuCommandBar.Delete
+End Sub
+
+'this event fires when the menu is clicked in the IDE
+Private Sub MenuHandler_Click(ByVal CommandBarControl As Object, handled As Boolean, CancelDefault As Boolean)
+ LoadMe
+End Sub
+
+Private Sub LoadMe()
+ Set mfrmWizard = New frmWizard
+ 'pass the vb instance to the wizard module
+ Set mfrmWizard.VBInst = VBInstance
+ 'load and show the form
+ mfrmWizard.Show vbModal
+ Set mfrmWizard = Nothing
+End Sub
+
+
diff --git a/migrationanalysis/src/wizard/Wizard.FRX b/migrationanalysis/src/wizard/Wizard.FRX
new file mode 100644
index 000000000000..20c068343090
--- /dev/null
+++ b/migrationanalysis/src/wizard/Wizard.FRX
Binary files differ
diff --git a/migrationanalysis/src/wizard/Wizard.bas b/migrationanalysis/src/wizard/Wizard.bas
new file mode 100644
index 000000000000..5f6b764c968d
--- /dev/null
+++ b/migrationanalysis/src/wizard/Wizard.bas
@@ -0,0 +1,654 @@
+Attribute VB_Name = "modWizard"
+'/*************************************************************************
+' *
+' * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+' *
+' * Copyright 2008 by Sun Microsystems, Inc.
+' *
+' * OpenOffice.org - a multi-platform office productivity suite
+' *
+' * $RCSfile: Wizard.bas,v $
+' * $Revision: 1.28.66.2 $
+' *
+' * This file is part of OpenOffice.org.
+' *
+' * OpenOffice.org is free software: you can redistribute it and/or modify
+' * it under the terms of the GNU Lesser General Public License version 3
+' * only, as published by the Free Software Foundation.
+' *
+' * OpenOffice.org is distributed in the hope that it will be useful,
+' * but WITHOUT ANY WARRANTY; without even the implied warranty of
+' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' * GNU Lesser General Public License version 3 for more details
+' * (a copy is included in the LICENSE file that accompanied this code).
+' *
+' * You should have received a copy of the GNU Lesser General Public License
+' * version 3 along with OpenOffice.org. If not, see
+' * <http://www.openoffice.org/license.html>
+' * for a copy of the LGPLv3 License.
+' *
+' ************************************************************************/
+Option Explicit
+
+Global Const WIZARD_NAME = "Analysis"
+
+'Implementation details - not required for localisation
+Public Const CWORD_DRIVER_FILE = "_OOoDocAnalysisWordDriver.doc"
+Public Const CEXCEL_DRIVER_FILE = "_OOoDocAnalysisExcelDriver.xls"
+Public Const CPP_DRIVER_FILE = "_OOoDocAnalysisPPTDriver.ppt"
+Public Const CRESULTS_TEMPLATE_FILE = "results.xlt"
+Public Const CISSUES_LIST_FILE = "issues.list"
+Public Const CANALYSIS_INI_FILE = "analysis.ini"
+Public Const CLAUNCH_DRIVERS_EXE = "LaunchDrivers.exe"
+Public Const CMSO_KILL_EXE = "msokill.exe"
+Public Const CRESOURCE_DLL = "Resources.dll"
+
+' Preparation String ID's from DocAnalysisWizard.rc
+Public Const RID_STR_ENG_TITLE_PREP_ID = 1030
+Public Const RID_STR_ENG_SIDEBAR_ANALYZE_PREP_ID = 1074
+
+Public Const RID_STR_ENG_INTRODUCTION_INTRO1_PREP_ID = 1131
+Public Const RID_STR_ENG_INTRODUCTION_INTRO2_PREP_ID = 1132
+Public Const RID_STR_ENG_INTRODUCTION_INTRO3_PREP_ID = 1134
+
+Public Const RID_STR_ENG_DOCUMENTS_CHOOSE_DOCUMENTS_PREP_ID = 1230
+Public Const RID_STR_ENG_DOCUMENTS_CHOOSE_DOC_TYPES_PREP_ID = 1236
+Public Const RID_STR_ENG_DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP_ID = 1232
+
+Public Const RID_STR_IGNORE_OLDER_CB_ID = 1231
+Public Const RID_STR_IGNORE_OLDER_3_MONTHS_ID = 1233
+Public Const RID_STR_IGNORE_OLDER_6_MONTHS_ID = 1234
+Public Const RID_STR_IGNORE_OLDER_12_MONTHS_ID = 1235
+
+Public Const RID_STR_ENG_RESULTS_CHOOSE_OPTIONS_PREP_ID = 1330
+Public Const RID_STR_ENG_RESULTS_ANALYSIS_XLS_PREP_ID = 1332
+
+Public Const RID_STR_ENG_ANALYZE_NUM_DOCS_PREP_ID = 1431
+Public Const RID_STR_ENG_ANALYZE_SETUP_COMPLETE_PREP_ID = 1430
+Public Const RID_STR_ENG_ANALYZE_IGNORED_DOCS_ID = 1435
+Public Const RID_STR_ENG_ANALYZE_START_ID = 1413
+Public Const RID_STR_ENG_ANALYZE_COMPLETED_ID = 1412
+Public Const RID_STR_ENG_ANALYZE_VIEW_NOW_ID = 1414
+Public Const RID_STR_ENG_ANALYZE_VIEW_LATER_ID = 1415
+Public Const RID_STR_ENG_ANALYSE_NOT_RUN = 1416
+
+Public Const RID_STR_ENG_OTHER_PLEASE_REFER_TO_README_PREP_ID = 1838
+Public Const RID_STR_ENG_OTHER_XML_RESULTS_PREP_ID = 1845
+Public Const RID_STR_ENG_OTHER_PREPARE_PROMPT_PREP_ID = 1846
+Public Const RID_STR_ENG_OTHER_PREPARE_COMPLETED_PREP_ID = 1847
+
+'Resource Strings Codes
+' NOTE: to make a resource the default it must be the first string table inserted
+' in the resource table - if it is not, just create several new string tables and
+' copy what you want as default into the first new one you create, copy the others
+' then delete the originals.
+'
+' To provide same string table for all English variants or all German variants
+' I have added code to set LANG_BASE_ID dependent on current locale
+' Refer to p.414 VBA in a Nutshell, Lomax
+' I now have a single string table with each lang variant suitably offset:
+' New locale - increase ofsets by 1000 - refer to DocAnalysisWizard.rc
+'
+' English - eng - Start at 1000
+' German - ger - Start at 2000
+' BrazilianPortugese - por - Start at 4000
+' French - fre - Start at 5000
+' Italian - ita - Start at 6000
+' Spanish - spa - Start at 7000
+' Swedish - swe - Start at 8000
+
+
+' String ID's must match those in DocAnalysisWizard.rc
+Const LANG_BASE_ID = 1000
+Const INTERNAL_RESOURCE_BASE_ID = LANG_BASE_ID + 800
+
+' Setup Doc Preparation specific strings
+#If PREPARATION Then
+Global Const gBoolPreparation = True
+
+Public Const TITLE_ID = RID_STR_ENG_TITLE_PREP_ID
+Public Const CHK_SUBDIRS_ID = RID_STR_ENG_DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP_ID
+Public Const SETUP_ANALYSIS_XLS_ID = RID_STR_ENG_RESULTS_ANALYSIS_XLS_PREP_ID
+Public Const ANALYZE_TOTAL_NUM_DOCS_ID = RID_STR_ENG_ANALYZE_NUM_DOCS_PREP_ID
+Public Const XML_RESULTS_ID = RID_STR_ENG_OTHER_XML_RESULTS_PREP_ID
+
+#Else
+Global Const gBoolPreparation = False
+
+Public Const TITLE_ID = LANG_BASE_ID + 0
+Public Const CHK_SUBDIRS_ID = LANG_BASE_ID + 202
+Public Const SETUP_ANALYSIS_XLS_ID = LANG_BASE_ID + 302
+Public Const ANALYZE_TOTAL_NUM_DOCS_ID = LANG_BASE_ID + 401
+Public Const XML_RESULTS_ID = INTERNAL_RESOURCE_BASE_ID + 15
+#End If
+
+Public Const PRODUCTNAME_ID = LANG_BASE_ID + 1
+Public Const LBL_STEPS_ID = LANG_BASE_ID + 40
+Public Const INTRO1_ID = LANG_BASE_ID + 101
+
+Public Const ANALYZE_DOCUMENTS_ID = LANG_BASE_ID + 402
+Public Const ANALYZE_TEMPLATES_ID = LANG_BASE_ID + 403
+Public Const ANALYZE_DOCUMENTS_XLS_ID = LANG_BASE_ID + 408
+Public Const ANALYZE_DOCUMENTS_PPT_ID = LANG_BASE_ID + 409
+Public Const RUNBTN_START_ID = LANG_BASE_ID + 404
+Public Const PREPAREBTN_START_ID = LANG_BASE_ID + 411
+
+Public Const README_FILE_ID = INTERNAL_RESOURCE_BASE_ID + 5 'Readme.doc
+Public Const BROWSE_FOR_DOC_DIR_ID = INTERNAL_RESOURCE_BASE_ID + 6
+Public Const BROWSE_FOR_RES_DIR_ID = INTERNAL_RESOURCE_BASE_ID + 7
+Public Const RUNBTN_RUNNING_ID = INTERNAL_RESOURCE_BASE_ID + 10
+
+Public Const PROGRESS_CAPTION = INTERNAL_RESOURCE_BASE_ID + 20
+Public Const PROGRESS_ABORTING = INTERNAL_RESOURCE_BASE_ID + 21
+Public Const PROGRESS_PATH_LABEL = INTERNAL_RESOURCE_BASE_ID + 22
+Public Const PROGRESS_FILE_LABEL = INTERNAL_RESOURCE_BASE_ID + 23
+Public Const PROGRESS_INFO_LABEL = INTERNAL_RESOURCE_BASE_ID + 24
+Public Const PROGRESS_WAIT_LABEL = INTERNAL_RESOURCE_BASE_ID + 25
+
+Public Const SEARCH_PATH_LABEL = PROGRESS_PATH_LABEL
+Public Const SEARCH_CAPTION = INTERNAL_RESOURCE_BASE_ID + 26
+Public Const SEARCH_INFO_LABEL = INTERNAL_RESOURCE_BASE_ID + 27
+Public Const SEARCH_FOUND_LABEL = INTERNAL_RESOURCE_BASE_ID + 28
+
+Public Const TERMINATE_CAPTION = INTERNAL_RESOURCE_BASE_ID + 30
+Public Const TERMINATE_INFO = INTERNAL_RESOURCE_BASE_ID + 31
+Public Const TERMINATE_YES = INTERNAL_RESOURCE_BASE_ID + 32
+Public Const TERMINATE_NO = INTERNAL_RESOURCE_BASE_ID + 33
+
+'Error Resource Strings Codes
+Const ERROR_BASE_ID = LANG_BASE_ID + 900
+Public Const ERR_MISSING_RESULTS_DOC = ERROR_BASE_ID + 0
+Public Const ERR_NO_DOC_DIR = ERROR_BASE_ID + 1
+Public Const ERR_NO_DOC_TYPES = ERROR_BASE_ID + 2
+Public Const ERR_NO_RES_DIR = ERROR_BASE_ID + 3
+Public Const ERR_CREATE_DIR = ERROR_BASE_ID + 4
+Public Const ERR_MISSING_RESULTS_TEMPLATE = ERROR_BASE_ID + 5
+Public Const ERR_MISSING_EXCEL_DRIVER = ERROR_BASE_ID + 6
+Public Const ERR_EXCEL_DRIVER_CRASH = ERROR_BASE_ID + 7
+Public Const ERR_MISSING_WORD_DRIVER = ERROR_BASE_ID + 8
+Public Const ERR_WORD_DRIVER_CRASH = ERROR_BASE_ID + 9
+Public Const ERR_MISSING_README = ERROR_BASE_ID + 10
+Public Const ERR_MISSING_PP_DRIVER = ERROR_BASE_ID + 11
+Public Const ERR_PP_DRIVER_CRASH = ERROR_BASE_ID + 12
+Public Const ERR_SUPPORTED_VERSION = ERROR_BASE_ID + 13
+Public Const ERR_ISSUES_VERSION_MISMATCH = ERROR_BASE_ID + 14
+Public Const ERR_ISSUES_LIST_MISSING = ERROR_BASE_ID + 15
+Public Const ERR_SUPPORTED_OSVERSION = ERROR_BASE_ID + 16
+Public Const ERR_OPEN_RESULTS_SPREADSHEET = ERROR_BASE_ID + 17
+Public Const ERR_EXCEL_OPEN = ERROR_BASE_ID + 18
+Public Const ERR_NO_ACCESS_TO_VBPROJECT = ERROR_BASE_ID + 19
+Public Const ERR_AUTOMATION_FAILURE = ERROR_BASE_ID + 20
+Public Const ERR_NO_RESULTS_DIRECTORY = ERROR_BASE_ID + 21
+Public Const ERR_CREATE_FILE = ERROR_BASE_ID + 22
+Public Const ERR_XML_RESULTS_ONLY = ERROR_BASE_ID + 23
+Public Const ERR_NOT_INSTALLED = ERROR_BASE_ID + 24
+Public Const ERR_CDROM_NOT_ALLOWED = ERROR_BASE_ID + 25
+Public Const ERR_CDROM_NOT_READY = ERROR_BASE_ID + 26
+Public Const ERR_NO_WRITE_TO_READ_ONLY_FOLDER = ERROR_BASE_ID + 27
+Public Const ERR_APPLICATION_IN_USE = ERROR_BASE_ID + 28
+Public Const ERR_MISSING_IMPORTANT_FILE = ERROR_BASE_ID + 29
+
+
+Private Const LOCALE_ILANGUAGE As Long = &H1 'language id
+Private Const LOCALE_SLANGUAGE As Long = &H2 'localized name of language
+Private Const LOCALE_SENGLANGUAGE As Long = &H1001 'English name of language
+Private Const LOCALE_SABBREVLANGNAME As Long = &H3 'abbreviated language name
+Private Const LOCALE_SCOUNTRY As Long = &H6 'localized name of country
+Private Const LOCALE_SENGCOUNTRY As Long = &H1002 'English name of country
+Private Const LOCALE_SABBREVCTRYNAME As Long = &H7 'abbreviated country name
+Private Const LOCALE_SISO639LANGNAME As Long = &H59 'ISO abbreviated language name
+Private Const LOCALE_SISO3166CTRYNAME As Long = &H5A 'ISO abbreviated country name
+
+Private Const LOCALE_JAPAN As Long = &H411
+Private Const LOCALE_KOREA As Long = &H412
+Private Const LOCALE_ZH_CN As Long = &H404
+Private Const LOCALE_ZH_TW As Long = &H804
+
+Private Const RES_PREFIX = ".\Resources\Resources.dll"
+
+Declare Function GetLocaleInfo Lib "kernel32" Alias _
+"GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, _
+ByVal cchData As Long) As Long
+
+Declare Function WritePrivateProfileString& Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal fileName$)
+Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
+Private Declare Function LoadString Lib "user32" Alias "LoadStringA" _
+ (ByVal hInstance As Long, ByVal wID As Long, ByVal lpBuffer As String, _
+ ByVal nBufferMax As Long) As Long
+
+'WinHelp Commands
+'Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
+'Public Const HELP_QUIT = &H2 ' Terminate help
+'Public Const HELP_CONTENTS = &H3& ' Display index/contents
+'Public Const HELP_CONTEXT = &H1 ' Display topic in ulTopic
+'Public Const HELP_INDEX = &H3 ' Display index
+
+Public Const CBASE_RESOURCE_DIR = ".\resources"
+Private mStrTrue As String
+Private mLocaleDir As String
+Private ghInst As Long
+
+
+Function getLocaleDir() As String
+ If mLocaleDir = "" Then
+ getLocaleLangBaseIDandSetLocaleDir
+ End If
+ getLocaleDir = mLocaleDir
+End Function
+
+Public Function GetLocaleLanguage() As String
+ Dim lReturn As Long
+ Dim lLocID As Long
+ Dim sData As String
+ Dim lDataLen As Long
+
+ lDataLen = 0
+ lReturn = GetLocaleInfo(lLocID, LOCALE_SENGLANGUAGE, sData, lDataLen)
+ sData = String(lReturn, 0) & vbNullChar
+ lDataLen = lReturn
+ lReturn = GetLocaleInfo(lLocID, LOCALE_SENGLANGUAGE, sData, lDataLen)
+
+End Function
+
+Function getLocaleLangBaseIDandSetLocaleDir() As Integer
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "getLocaleLangBaseIDandSetLocaleDir"
+
+ Dim baseID As Long
+ Dim bUseLocale As Boolean
+ Dim fso As FileSystemObject
+ Set fso = New FileSystemObject
+
+ Dim isoLangStr As String
+ Dim isoCountryStr As String
+ Dim langStr As String
+
+ Dim userLCID As Long
+ userLCID = GetUserDefaultLCID()
+ Dim sysLCID As Long
+ sysLCID = GetSystemDefaultLCID()
+
+ isoLangStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO639LANGNAME)
+ isoCountryStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO3166CTRYNAME)
+ langStr = GetUserLocaleInfo(sysLCID, LOCALE_SENGLANGUAGE)
+
+ baseID = 0
+ mLocaleDir = ""
+
+ If fso.FileExists(fso.GetAbsolutePathName("debug.ini")) Then
+ Dim overrideLangStr As String
+ overrideLangStr = ProfileGetItem("debug", "langoverride", "", fso.GetAbsolutePathName("debug.ini"))
+ If overrideLangStr <> "" Then
+ Debug.Print "Overriding language " & isoLangStr & " with " & overrideLangStr & "\n"
+ isoLangStr = overrideLangStr
+ End If
+ End If
+
+ 'check for locale dirs in following order:
+ ' CBASE_RESOURCE_DIR & "\" & isoLangStr
+ ' CBASE_RESOURCE_DIR & "\" & isoLangStr & "-" & isoCountryStr
+ ' CBASE_RESOURCE_DIR & "\" & "eng"
+ 'If fso.FolderExists(fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & isoLangStr)) Then
+ ' mLocaleDir = CBASE_RESOURCE_DIR & "\" & isoLangStr
+ ' baseID = getBaseID(isoLangStr)
+ 'ElseIf fso.FolderExists(fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & isoLangStr & "-" & isoCountryStr)) Then
+ ' mLocaleDir = CBASE_RESOURCE_DIR & "\" & isoLangStr & "-" & isoCountryStr
+ ' baseID = getBaseID(isoLangStr & "-" & isoCountryStr)
+ 'Else
+ mLocaleDir = CBASE_RESOURCE_DIR
+ baseID = 1000
+ 'End If
+
+ getLocaleLangBaseIDandSetLocaleDir = CInt(baseID)
+
+FinalExit:
+ Set fso = Nothing
+
+ Exit Function
+
+HandleErrors:
+ Debug.Print currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+'--------------------------------------------------------------------------
+'this sub must be executed from the immediate window
+'it will add the entry to VBADDIN.INI if it doesn't already exist
+'so that the add-in is on available next time VB is loaded
+'--------------------------------------------------------------------------
+Sub AddToINI()
+ Debug.Print WritePrivateProfileString("Add-Ins32", WIZARD_NAME & ".Wizard", "0", "VBADDIN.INI")
+End Sub
+
+Function GetResString(nRes As Integer) As String
+ Dim sTmp As String
+ Dim sRes As String * 1024
+ Dim sRetStr As String
+ Dim nRet As Long
+
+ Do
+ 'sTmp = LoadResString(nRes)
+ nRet = LoadString(ghInst, nRes, sRes, 1024)
+ sTmp = Left$(sRes, nRet)
+
+ If Right(sTmp, 1) = "_" Then
+ sRetStr = sRetStr + VBA.Left(sTmp, Len(sTmp) - 1)
+ Else
+ sRetStr = sRetStr + sTmp
+ End If
+ nRes = nRes + 1
+ Loop Until Right(sTmp, 1) <> "_"
+ GetResString = sRetStr
+
+End Function
+
+Function GetField(sBuffer As String, sSep As String) As String
+ Dim p As Integer
+
+ p = InStr(sBuffer & sSep, sSep)
+ GetField = VBA.Left(sBuffer, p - 1)
+ sBuffer = Mid(sBuffer, p + Len(sSep))
+
+End Function
+' Parts of the following code are from:
+' http://support.microsoft.com/default.aspx?scid=kb;en-us;232625&Product=vb6
+
+Private Function GetCharSet(sCdpg As String) As Integer
+ Select Case sCdpg
+ Case "932" ' Japanese
+ GetCharSet = 128
+ Case "936" ' Simplified Chinese
+ GetCharSet = 134
+ Case "949" ' Korean
+ GetCharSet = 129
+ Case "950" ' Traditional Chinese
+ GetCharSet = 136
+ Case "1250" ' Eastern Europe
+ GetCharSet = 238
+ Case "1251" ' Russian
+ GetCharSet = 204
+ Case "1252" ' Western European Languages
+ GetCharSet = 0
+ Case "1253" ' Greek
+ GetCharSet = 161
+ Case "1254" ' Turkish
+ GetCharSet = 162
+ Case "1255" ' Hebrew
+ GetCharSet = 177
+ Case "1256" ' Arabic
+ GetCharSet = 178
+ Case "1257" ' Baltic
+ GetCharSet = 186
+ Case Else
+ GetCharSet = 0
+ End Select
+End Function
+
+Private Function StripNullTerminator(sCP As String)
+ Dim posNull As Long
+ posNull = InStr(sCP, Chr$(0))
+ StripNullTerminator = Left$(sCP, posNull - 1)
+End Function
+
+Private Function GetResourceDataFileName() As String
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "GetResourceDataFileName"
+
+ Dim fileName As String
+ Dim fso As FileSystemObject
+ Set fso = New FileSystemObject
+
+ GetResourceDataFileName = fso.GetAbsolutePathName(RES_PREFIX)
+
+ GoTo FinalExit
+
+ ' use the following code when we have one resource file for each language
+ Dim isoLangStr As String
+ Dim isoCountryStr As String
+
+ Dim userLCID As Long
+ userLCID = GetUserDefaultLangID()
+ Dim sysLCID As Long
+ sysLCID = GetSystemDefaultLangID()
+
+ isoLangStr = GetUserLocaleInfo(userLCID, LOCALE_SISO639LANGNAME)
+ isoCountryStr = GetUserLocaleInfo(userLCID, LOCALE_SISO3166CTRYNAME)
+
+ 'check for locale data in following order:
+ ' user language
+ ' isoLangStr & "_" & isoCountryStr & ".dll"
+ ' isoLangStr & ".dll"
+ ' system language
+ ' isoLangStr & "_" & isoCountryStr & ".dll"
+ ' isoLangStr & ".dll"
+ ' "en_US" & ".dll"
+
+ fileName = fso.GetAbsolutePathName(RES_PREFIX & isoLangStr & "-" & isoCountryStr & ".dll")
+ If fso.FileExists(fileName) Then
+ GetResourceDataFileName = fileName
+ Else
+ fileName = fso.GetAbsolutePathName(RES_PREFIX & isoLangStr & ".dll")
+ If fso.FileExists(fileName) Then
+ GetResourceDataFileName = fileName
+ Else
+ isoLangStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO639LANGNAME)
+ isoCountryStr = GetUserLocaleInfo(sysLCID, LOCALE_SISO3166CTRYNAME)
+
+ fileName = fso.GetAbsolutePathName(RES_PREFIX & isoLangStr & "-" & isoCountryStr & ".dll")
+ If fso.FileExists(fileName) Then
+ GetResourceDataFileName = fileName
+ Else
+ fileName = fso.GetAbsolutePathName(RES_PREFIX & isoLangStr & ".dll")
+ If fso.FileExists(fileName) Then
+ GetResourceDataFileName = fileName
+ Else
+ GetResourceDataFileName = fso.GetAbsolutePathName(RES_PREFIX & "en-US.dll")
+ End If
+ End If
+ End If
+ End If
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub LoadResStrings(frm As Form)
+ Dim ctl As Control
+ Dim obj As Object
+
+ Dim LCID As Long, X As Long
+ Dim sCodePage As String
+ Dim nCharSet As Integer
+ Dim currentFunctionName As String
+ currentFunctionName = "LoadResStrings"
+
+ On Error GoTo HandleErrors
+ ghInst = LoadLibrary(GetResourceDataFileName())
+
+ On Error Resume Next
+
+ sCodePage = String$(16, " ")
+ LCID = GetThreadLocale() 'Get Current locale
+
+ X = GetLocaleInfo(LCID, LOCALE_IDEFAULTANSICODEPAGE, _
+ sCodePage, Len(sCodePage)) 'Get code page
+ sCodePage = StripNullTerminator(sCodePage)
+ nCharSet = GetCharSet(sCodePage) 'Convert code page to charset
+
+ 'set the form's caption
+ If IsNumeric(frm.Tag) Then
+ frm.Caption = LoadResString(CInt(frm.Tag))
+ End If
+
+ 'set the controls' captions using the caption
+ 'property for menu items and the Tag property
+ 'for all other controls
+ For Each ctl In frm.Controls
+ Err = 0
+ If (nCharSet <> 0) Then
+ ctl.Font.Charset = nCharSet
+ End If
+ If TypeName(ctl) = "Menu" Then
+ If IsNumeric(ctl.Caption) Then
+ ctl.Caption = LoadResString(CInt(ctl.Caption))
+ End If
+ ElseIf TypeName(ctl) = "TabStrip" Then
+ For Each obj In ctl.Tabs
+ If IsNumeric(obj.Tag) Then
+ obj.Caption = LoadResString(CInt(obj.Tag))
+ End If
+ 'check for a tooltip
+ If IsNumeric(obj.ToolTipText) Then
+ If Err = 0 Then
+ obj.ToolTipText = LoadResString(CInt(obj.ToolTipText))
+ End If
+ End If
+ Next
+ ElseIf TypeName(ctl) = "Toolbar" Then
+ For Each obj In ctl.Buttons
+ If IsNumeric(obj.Tag) Then
+ obj.ToolTipText = LoadResString(CInt(obj.Tag))
+ End If
+ Next
+ ElseIf TypeName(ctl) = "ListView" Then
+ For Each obj In ctl.ColumnHeaders
+ If IsNumeric(obj.Tag) Then
+ obj.Text = LoadResString(CInt(obj.Tag))
+ End If
+ Next
+ ElseIf TypeName(ctl) = "TextBox" Then
+ If IsNumeric(ctl.Tag) Then
+ ctl.Text = LoadResString(CInt(ctl.Tag))
+ End If
+ Else
+ If IsNumeric(ctl.Tag) Then
+ ctl.Caption = GetResString(CInt(ctl.Tag))
+ End If
+ 'check for a tooltip
+ If IsNumeric(ctl.ToolTipText) Then
+ If Err = 0 Then
+ ctl.ToolTipText = LoadResString(CInt(ctl.ToolTipText))
+ End If
+ End If
+ End If
+ Next
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+
+End Sub
+
+'==================================================
+'Purpose: Replace the sToken string(s) in
+' res file string for correct placement
+' of localized tokens
+'
+'Inputs: sString = String to search and replace in
+' sToken = token to replace
+' sReplacement = String to replace token with
+'
+'Outputs: New string with token replaced throughout
+'==================================================
+Function ReplaceTopicTokens(sString As String, _
+ sToken As String, _
+ sReplacement As String) As String
+ On Error Resume Next
+
+ Dim p As Integer
+ Dim sTmp As String
+
+ sTmp = sString
+ Do
+ p = InStr(sTmp, sToken)
+ If p Then
+ sTmp = VBA.Left(sTmp, p - 1) + sReplacement + Mid(sTmp, p + Len(sToken))
+ End If
+ Loop While p
+
+
+ ReplaceTopicTokens = sTmp
+
+End Function
+'==================================================
+'Purpose: Replace the sToken1 and sToken2 strings in
+' res file string for correct placement
+' of localized tokens
+'
+'Inputs: sString = String to search and replace in
+' sToken1 = 1st token to replace
+' sReplacement1 = 1st String to replace token with
+' sToken2 = 2nd token to replace
+' sReplacement2 = 2nd String to replace token with
+'
+'Outputs: New string with token replaced throughout
+'==================================================
+Function ReplaceTopic2Tokens(sString As String, _
+ sToken1 As String, _
+ sReplacement1 As String, _
+ sToken2 As String, _
+ sReplacement2 As String) As String
+ On Error Resume Next
+
+ ReplaceTopic2Tokens = _
+ ReplaceTopicTokens(ReplaceTopicTokens(sString, sToken1, sReplacement1), _
+ sToken2, sReplacement2)
+End Function
+
+
+Public Function GetResData(sResName As String, sResType As String) As String
+ Dim sTemp As String
+ Dim p As Integer
+
+ sTemp = StrConv(LoadResData(sResName, sResType), vbUnicode)
+ p = InStr(sTemp, vbNullChar)
+ If p Then sTemp = VBA.Left$(sTemp, p - 1)
+ GetResData = sTemp
+End Function
+
+Function AddToAddInCommandBar(VBInst As Object, sCaption As String, oBitmap As Object) As Object 'Office.CommandBarControl
+ On Error GoTo AddToAddInCommandBarErr
+
+ Dim c As Integer
+ Dim cbMenuCommandBar As Object 'Office.CommandBarControl 'command bar object
+ Dim cbMenu As Object
+
+ 'see if we can find the Add-Ins menu
+ Set cbMenu = VBInst.CommandBars("Add-Ins")
+ If cbMenu Is Nothing Then
+ 'not available so we fail
+ Exit Function
+ End If
+
+ 'add it to the command bar
+ Set cbMenuCommandBar = cbMenu.Controls.add(1)
+ c = cbMenu.Controls.count - 1
+ If cbMenu.Controls(c).BeginGroup And _
+ Not cbMenu.Controls(c - 1).BeginGroup Then
+ 'this s the first addin being added so it needs a separator
+ cbMenuCommandBar.BeginGroup = True
+ End If
+ 'set the caption
+ cbMenuCommandBar.Caption = sCaption
+ 'undone:set the onaction (required at this point)
+ cbMenuCommandBar.OnAction = "hello"
+ 'copy the icon to the clipboard
+ Clipboard.SetData oBitmap
+ 'set the icon for the button
+ cbMenuCommandBar.PasteFace
+
+ Set AddToAddInCommandBar = cbMenuCommandBar
+
+ Exit Function
+AddToAddInCommandBarErr:
+
+End Function
+
diff --git a/migrationanalysis/src/wizard/Wizard.frm b/migrationanalysis/src/wizard/Wizard.frm
new file mode 100644
index 000000000000..bdf08b91d04c
--- /dev/null
+++ b/migrationanalysis/src/wizard/Wizard.frm
@@ -0,0 +1,3458 @@
+VERSION 5.00
+Begin VB.Form frmWizard
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 1 'Fixed Single
+ Caption = "OpenOffice.org Document Analysis Wizard"
+ ClientHeight = 5520
+ ClientLeft = 1965
+ ClientTop = 1815
+ ClientWidth = 8175
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Icon = "Wizard.frx":0000
+ KeyPreview = -1 'True
+ LinkTopic = "Form1"
+ LockControls = -1 'True
+ MaxButton = 0 'False
+ MinButton = 0 'False
+ ScaleHeight = 5520
+ ScaleWidth = 8175
+ Tag = "1000"
+ Begin VB.Frame fraStep
+ BorderStyle = 0 'None
+ Caption = "Introduction"
+ ClipControls = 0 'False
+ Enabled = 0 'False
+ BeginProperty Font
+ Name = "MS Sans Serif"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 4905
+ Index = 0
+ Left = -10000
+ TabIndex = 25
+ Tag = "1000"
+ Top = 0
+ Width = 8235
+ Begin VB.PictureBox Picture4
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 4935
+ Index = 0
+ Left = 0
+ ScaleHeight = 4935
+ ScaleWidth = 2565
+ TabIndex = 2
+ TabStop = 0 'False
+ Top = 0
+ Width = 2565
+ Begin VB.PictureBox Picture10
+ Height = 735
+ Left = 2580
+ ScaleHeight = 735
+ ScaleWidth = 30
+ TabIndex = 68
+ TabStop = 0 'False
+ Top = 2610
+ Width = 30
+ End
+ Begin VB.PictureBox Picture6
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1485
+ Left = 150
+ ScaleHeight = 1485
+ ScaleWidth = 2355
+ TabIndex = 67
+ TabStop = 0 'False
+ Top = 3390
+ Width = 2355
+ Begin VB.PictureBox Picture1
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1200
+ Index = 0
+ Left = 200
+ Picture = "Wizard.frx":482C2
+ ScaleHeight = 1200
+ ScaleWidth = 1980
+ TabIndex = 7
+ TabStop = 0 'False
+ Tag = "1060"
+ Top = 300
+ Width = 1980
+ End
+ End
+ Begin VB.Label lblStep1_4
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "4. Analyze"
+ ForeColor = &H00BF4F59&
+ Height = 195
+ Left = 120
+ TabIndex = 89
+ Tag = "1044"
+ Top = 1800
+ Width = 2140
+ End
+ Begin VB.Line Line2
+ BorderColor = &H00808080&
+ Index = 2
+ X1 = 2550
+ X2 = 2550
+ Y1 = 0
+ Y2 = 4920
+ End
+ Begin VB.Line Line3
+ Index = 1
+ X1 = 120
+ X2 = 2280
+ Y1 = 480
+ Y2 = 480
+ End
+ Begin VB.Label Label7
+ BackColor = &H00EED3C2&
+ Caption = "1. Introduction"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 1
+ Left = 120
+ TabIndex = 11
+ Tag = "1041"
+ Top = 720
+ Width = 2140
+ End
+ Begin VB.Label Label8
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "3. Results"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 1
+ Left = 120
+ TabIndex = 9
+ Tag = "1043"
+ Top = 1440
+ Width = 2140
+ End
+ Begin VB.Label Label9
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "2. Documents"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 1
+ Left = 120
+ TabIndex = 10
+ Tag = "1042"
+ Top = 1080
+ Width = 2140
+ End
+ Begin VB.Label Label12
+ BackStyle = 0 'Transparent
+ Caption = "Steps"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 255
+ Index = 1
+ Left = 120
+ TabIndex = 8
+ Tag = "1040"
+ Top = 240
+ Width = 2115
+ End
+ End
+ Begin VB.PictureBox Picture8
+ Appearance = 0 'Flat
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 4935
+ Left = 2400
+ ScaleHeight = 4935
+ ScaleWidth = 5925
+ TabIndex = 3
+ TabStop = 0 'False
+ Top = -30
+ Width = 5925
+ Begin VB.CheckBox chkShowIntro
+ Caption = "Do not show this introduction again"
+ Enabled = 0 'False
+ Height = 315
+ Left = 690
+ MaskColor = &H00000000&
+ TabIndex = 6
+ Tag = "1103"
+ Top = 4890
+ Visible = 0 'False
+ Width = 3810
+ End
+ Begin VB.Label lblIntroduction1
+ AutoSize = -1 'True
+ Caption = $"Wizard.frx":4F8B8
+ Height = 585
+ Left = 690
+ TabIndex = 93
+ Tag = "1101"
+ Top = 750
+ Width = 4890
+ WordWrap = -1 'True
+ End
+ Begin VB.Label lblIntroduction3
+ AutoSize = -1 'True
+ Caption = "The wizard will remain on screen while the analysis is carried out."
+ Height = 195
+ Left = 690
+ TabIndex = 0
+ Tag = "1104"
+ Top = 2670
+ Width = 4845
+ WordWrap = -1 'True
+ End
+ Begin VB.Label lblIntroduction2
+ AutoSize = -1 'True
+ Caption = "You will be able to select which documents you want to analyze as well as where you want the results to the analysis to be saved. "
+ Height = 390
+ Left = 690
+ TabIndex = 1
+ Tag = "1102"
+ Top = 1800
+ Width = 4875
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label12
+ BackStyle = 0 'Transparent
+ Caption = "Introduction"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 255
+ Index = 2
+ Left = 450
+ TabIndex = 5
+ Tag = "1100"
+ Top = 270
+ Width = 4000
+ End
+ End
+ End
+ Begin VB.Frame fraStep
+ BorderStyle = 0 'None
+ Caption = "Setup"
+ Enabled = 0 'False
+ BeginProperty Font
+ Name = "MS Sans Serif"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 4905
+ Index = 1
+ Left = -10000
+ TabIndex = 32
+ Tag = "2000"
+ Top = 0
+ Width = 8235
+ Begin VB.PictureBox Picture4
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 4905
+ Index = 1
+ Left = 0
+ ScaleHeight = 4905
+ ScaleWidth = 2565
+ TabIndex = 61
+ TabStop = 0 'False
+ Top = 0
+ Width = 2565
+ Begin VB.PictureBox Picture1
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1200
+ Index = 1
+ Left = 350
+ Picture = "Wizard.frx":4F971
+ ScaleHeight = 1200
+ ScaleWidth = 1980
+ TabIndex = 62
+ TabStop = 0 'False
+ Tag = "1060"
+ Top = 3690
+ Width = 1980
+ End
+ Begin VB.Label lblStep2_4
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "4. Analyze"
+ ForeColor = &H00BF4F59&
+ Height = 195
+ Left = 120
+ TabIndex = 90
+ Tag = "1044"
+ Top = 1800
+ Width = 2140
+ End
+ Begin VB.Line Line2
+ BorderColor = &H00808080&
+ Index = 1
+ X1 = 2550
+ X2 = 2550
+ Y1 = 0
+ Y2 = 4920
+ End
+ Begin VB.Label Label12
+ BackStyle = 0 'Transparent
+ Caption = "Steps"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 255
+ Index = 3
+ Left = 120
+ TabIndex = 66
+ Tag = "1040"
+ Top = 240
+ Width = 1335
+ End
+ Begin VB.Label Label9
+ BackColor = &H00EED3C2&
+ Caption = "2. Documents"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 2
+ Left = 120
+ TabIndex = 65
+ Tag = "1042"
+ Top = 1080
+ Width = 2140
+ End
+ Begin VB.Label Label8
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "3. Results"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 2
+ Left = 120
+ TabIndex = 64
+ Tag = "1043"
+ Top = 1440
+ Width = 2140
+ End
+ Begin VB.Label Label7
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "1. Introduction"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 2
+ Left = 120
+ TabIndex = 63
+ Tag = "1041"
+ Top = 720
+ Width = 2140
+ End
+ Begin VB.Line Line3
+ Index = 2
+ X1 = 120
+ X2 = 2280
+ Y1 = 480
+ Y2 = 480
+ End
+ End
+ Begin VB.PictureBox Picture7
+ Appearance = 0 'Flat
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 4725
+ Left = 2580
+ ScaleHeight = 4725
+ ScaleWidth = 5535
+ TabIndex = 58
+ TabStop = 0 'False
+ Top = 0
+ Width = 5535
+ Begin VB.ComboBox cbIgnoreOld
+ Height = 330
+ ItemData = "Wizard.frx":56F67
+ Left = 3950
+ List = "Wizard.frx":56F74
+ Style = 2 'Dropdown List
+ TabIndex = 99
+ Top = 1570
+ Width = 1215
+ End
+ Begin VB.CheckBox chkIgnoreOld
+ Caption = "Ignore documents older than"
+ Height = 225
+ Left = 450
+ TabIndex = 98
+ Top = 1600
+ Width = 3400
+ End
+ Begin VB.CheckBox chkWordDoc
+ Caption = "Documents (*.doc)"
+ Height = 225
+ Left = 2160
+ TabIndex = 19
+ Tag = "1208"
+ Top = 2600
+ Value = 1 'Checked
+ Width = 3200
+ End
+ Begin VB.CheckBox chkWordTemplate
+ Caption = "Templates (*.dot)"
+ Height = 225
+ Left = 2160
+ TabIndex = 20
+ Tag = "1209"
+ Top = 2900
+ Width = 3200
+ End
+ Begin VB.CheckBox chkPPTemplate
+ Caption = "Templates (*.pot)"
+ Height = 225
+ Left = 2160
+ TabIndex = 24
+ Tag = "1215"
+ Top = 4400
+ Width = 3200
+ End
+ Begin VB.CheckBox chkPPDoc
+ Caption = "Presentations (*.ppt)"
+ Height = 225
+ Left = 2160
+ TabIndex = 23
+ Tag = "1214"
+ Top = 4100
+ Width = 3200
+ End
+ Begin VB.CheckBox chkExcelDoc
+ Caption = "Spreadsheets (*.xls)"
+ Height = 225
+ Left = 2160
+ TabIndex = 21
+ Tag = "1211"
+ Top = 3350
+ Width = 3200
+ End
+ Begin VB.CheckBox chkExcelTemplate
+ Caption = "Templates (*.xlt)"
+ Height = 225
+ Left = 2160
+ TabIndex = 22
+ Tag = "1212"
+ Top = 3650
+ Width = 3200
+ End
+ Begin VB.CommandButton btnBrowseDirInput
+ Caption = "..."
+ Height = 315
+ Left = 4740
+ TabIndex = 17
+ Top = 900
+ Width = 400
+ End
+ Begin VB.TextBox txtInputDir
+ Height = 315
+ Left = 450
+ TabIndex = 16
+ Tag = "1205"
+ Text = "C:\"
+ Top = 900
+ Width = 4155
+ End
+ Begin VB.CheckBox chkIncludeSubdirs
+ Caption = "Include subdirectories in the analysis"
+ Height = 225
+ Left = 450
+ TabIndex = 18
+ Tag = "1202"
+ Top = 1300
+ Width = 4965
+ End
+ Begin VB.Label lblDocTypes
+ Caption = "Document types to analyze"
+ Height = 225
+ Left = 450
+ TabIndex = 95
+ Tag = "1206"
+ Top = 2250
+ Width = 4905
+ End
+ Begin VB.Label lblChooseDocs
+ AutoSize = -1 'True
+ Caption = "Choose the documents you want to analyze"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 195
+ Left = 300
+ TabIndex = 94
+ Tag = "1200"
+ Top = 240
+ Width = 5115
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label13
+ AutoSize = -1 'True
+ Caption = "PowerPoint"
+ Height = 225
+ Index = 2
+ Left = 690
+ TabIndex = 74
+ Tag = "1213"
+ Top = 4100
+ Width = 1245
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label13
+ AutoSize = -1 'True
+ Caption = "Excel"
+ Height = 225
+ Index = 1
+ Left = 690
+ TabIndex = 73
+ Tag = "1210"
+ Top = 3350
+ Width = 1245
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label13
+ AutoSize = -1 'True
+ Caption = "Word"
+ Height = 225
+ Index = 0
+ Left = 690
+ TabIndex = 72
+ Tag = "1207"
+ Top = 2600
+ Width = 1245
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label1
+ Caption = "Location of Microsoft Office documents"
+ Height = 200
+ Left = 450
+ TabIndex = 59
+ Tag = "1201"
+ Top = 600
+ Width = 4935
+ End
+ End
+ End
+ Begin VB.Frame fraStep
+ BorderStyle = 0 'None
+ Caption = "Options"
+ Enabled = 0 'False
+ BeginProperty Font
+ Name = "MS Sans Serif"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 4905
+ Index = 2
+ Left = -10000
+ TabIndex = 33
+ Tag = "2002"
+ Top = 0
+ Width = 8235
+ Begin VB.PictureBox Picture11
+ BorderStyle = 0 'None
+ Height = 555
+ Left = 7260
+ ScaleHeight = 555
+ ScaleWidth = 705
+ TabIndex = 75
+ Top = 1890
+ Width = 705
+ Begin VB.CommandButton btnBrowseDirOut
+ Caption = "..."
+ Height = 375
+ Left = 90
+ TabIndex = 28
+ Top = 90
+ Width = 495
+ End
+ End
+ Begin VB.TextBox txtResultsName
+ Height = 375
+ Left = 3030
+ TabIndex = 26
+ Tag = "1302"
+ Text = "Analysis Results.xls"
+ Top = 1140
+ Width = 3045
+ End
+ Begin VB.TextBox txtOutputDir
+ Height = 375
+ Left = 3030
+ TabIndex = 27
+ Top = 1980
+ Width = 4185
+ End
+ Begin VB.PictureBox Picture5
+ Appearance = 0 'Flat
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1365
+ Left = 3300
+ ScaleHeight = 1365
+ ScaleWidth = 4635
+ TabIndex = 57
+ TabStop = 0 'False
+ Top = 3210
+ Width = 4635
+ Begin VB.OptionButton rdbResultsPrompt
+ Caption = "Ask me before overwriting"
+ Height = 435
+ Left = 0
+ TabIndex = 29
+ Tag = "1312"
+ Top = 0
+ Value = -1 'True
+ Width = 4485
+ End
+ Begin VB.OptionButton rdbResultsOverwrite
+ Caption = "Overwrite without asking me"
+ Height = 435
+ Left = 0
+ TabIndex = 30
+ Tag = "1313"
+ Top = 450
+ Width = 4455
+ End
+ Begin VB.OptionButton rdbResultsAppend
+ Caption = "Append the new results to the existing results"
+ Height = 675
+ Left = 0
+ TabIndex = 31
+ Tag = "1314"
+ Top = 780
+ Visible = 0 'False
+ Width = 4515
+ End
+ End
+ Begin VB.Frame Frame3
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ Enabled = 0 'False
+ ForeColor = &H0099A8AC&
+ Height = 5175
+ Index = 0
+ Left = 0
+ TabIndex = 39
+ Top = 0
+ Width = 2535
+ Begin VB.PictureBox Picture1
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1200
+ Index = 3
+ Left = 350
+ Picture = "Wizard.frx":56F97
+ ScaleHeight = 1200
+ ScaleWidth = 1980
+ TabIndex = 40
+ TabStop = 0 'False
+ Top = 3690
+ Width = 1980
+ End
+ Begin VB.Label lblStep3_4
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "4. Analyze"
+ ForeColor = &H00BF4F59&
+ Height = 195
+ Left = 120
+ TabIndex = 91
+ Tag = "1044"
+ Top = 1800
+ Width = 2140
+ End
+ Begin VB.Label Label12
+ BackStyle = 0 'Transparent
+ Caption = "Steps"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 255
+ Index = 0
+ Left = 120
+ TabIndex = 53
+ Tag = "1040"
+ Top = 240
+ Width = 1335
+ End
+ Begin VB.Label Label9
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "2. Documents"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 0
+ Left = 120
+ TabIndex = 43
+ Tag = "1042"
+ Top = 1080
+ Width = 2140
+ End
+ Begin VB.Label Label8
+ BackColor = &H00EED3C2&
+ Caption = "3. Results"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 0
+ Left = 120
+ TabIndex = 42
+ Tag = "1043"
+ Top = 1440
+ Width = 2140
+ End
+ Begin VB.Label Label7
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "1. Introduction"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 0
+ Left = 120
+ TabIndex = 41
+ Tag = "1041"
+ Top = 720
+ Width = 2140
+ End
+ Begin VB.Line Line3
+ Index = 0
+ X1 = 120
+ X2 = 2280
+ Y1 = 480
+ Y2 = 480
+ End
+ End
+ Begin VB.Label Label3
+ Caption = "File name for the results spreadsheet"
+ Height = 195
+ Left = 3030
+ TabIndex = 71
+ Tag = "1301"
+ Top = 840
+ Width = 4785
+ End
+ Begin VB.Label lblResultsLocation
+ Caption = "Location"
+ Height = 195
+ Left = 3030
+ TabIndex = 70
+ Tag = "1304"
+ Top = 1710
+ Width = 4755
+ End
+ Begin VB.Label Label13
+ AutoSize = -1 'True
+ Caption = "If results already exisit under the same name and location:"
+ Height = 195
+ Index = 5
+ Left = 3030
+ TabIndex = 38
+ Tag = "1311"
+ Top = 2730
+ Width = 4230
+ WordWrap = -1 'True
+ End
+ Begin VB.Line Line2
+ BorderColor = &H00808080&
+ Index = 0
+ X1 = 2550
+ X2 = 2550
+ Y1 = 0
+ Y2 = 4920
+ End
+ Begin VB.Label lblChooseResults
+ AutoSize = -1 'True
+ Caption = "Choose where and how to save the analysis results"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 195
+ Left = 2880
+ TabIndex = 37
+ Tag = "1300"
+ Top = 240
+ Width = 5055
+ WordWrap = -1 'True
+ End
+ End
+ Begin VB.Frame fraStep
+ BorderStyle = 0 'None
+ Caption = "Analyze"
+ Enabled = 0 'False
+ BeginProperty Font
+ Name = "MS Sans Serif"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 4905
+ Index = 3
+ Left = 0
+ TabIndex = 34
+ Tag = "3000"
+ Top = 0
+ Width = 2.45745e5
+ Begin VB.PictureBox Picture12
+ Appearance = 0 'Flat
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 4905
+ Left = 10020
+ ScaleHeight = 4905
+ ScaleWidth = 8175
+ TabIndex = 69
+ TabStop = 0 'False
+ Top = 0
+ Width = 8175
+ End
+ Begin VB.CommandButton btnPrepare
+ Caption = "Prepare"
+ Enabled = 0 'False
+ Height = 375
+ Left = 3340
+ TabIndex = 97
+ Tag = "1411"
+ Top = 4410
+ Visible = 0 'False
+ Width = 4000
+ End
+ Begin VB.CommandButton btnRunAnalysis
+ Caption = "Run"
+ Height = 375
+ Left = 3340
+ TabIndex = 35
+ Tag = "1404"
+ Top = 3410
+ Width = 4000
+ End
+ Begin VB.CommandButton btnViewResults
+ Caption = "View"
+ Enabled = 0 'False
+ Height = 375
+ Left = 3340
+ TabIndex = 36
+ Tag = "1406"
+ Top = 3910
+ Width = 4000
+ End
+ Begin VB.Frame Frame3
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ Enabled = 0 'False
+ ForeColor = &H0099A8AC&
+ Height = 5175
+ Index = 3
+ Left = 0
+ TabIndex = 44
+ Top = 0
+ Width = 2535
+ Begin VB.PictureBox Picture4
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1575
+ Index = 2
+ Left = 150
+ ScaleHeight = 1575
+ ScaleWidth = 2385
+ TabIndex = 55
+ TabStop = 0 'False
+ Top = 3390
+ Width = 2385
+ Begin VB.PictureBox Picture1
+ Appearance = 0 'Flat
+ BackColor = &H80000005&
+ BorderStyle = 0 'None
+ ForeColor = &H80000008&
+ Height = 1200
+ Index = 2
+ Left = 200
+ Picture = "Wizard.frx":5E58D
+ ScaleHeight = 1200
+ ScaleWidth = 2475
+ TabIndex = 56
+ TabStop = 0 'False
+ Tag = "1060"
+ Top = 300
+ Width = 2480
+ End
+ End
+ Begin VB.Label lblStep4_4
+ BackColor = &H00EED3C2&
+ Caption = "4. Analyze"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Left = 120
+ TabIndex = 92
+ Tag = "1044"
+ Top = 1800
+ Width = 2140
+ End
+ Begin VB.Label Label12
+ BackStyle = 0 'Transparent
+ Caption = "Steps"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 255
+ Index = 5
+ Left = 120
+ TabIndex = 54
+ Tag = "1040"
+ Top = 240
+ Width = 1335
+ End
+ Begin VB.Label Label9
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "2. Documents"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 3
+ Left = 120
+ TabIndex = 47
+ Tag = "1042"
+ Top = 1080
+ Width = 2140
+ End
+ Begin VB.Label Label8
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "3. Results"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 3
+ Left = 120
+ TabIndex = 46
+ Tag = "1043"
+ Top = 1440
+ Width = 2140
+ End
+ Begin VB.Label Label7
+ BackColor = &H00EED3C2&
+ BackStyle = 0 'Transparent
+ Caption = "1. Introduction"
+ ForeColor = &H00BF4F59&
+ Height = 255
+ Index = 3
+ Left = 120
+ TabIndex = 45
+ Tag = "1041"
+ Top = 720
+ Width = 2140
+ End
+ Begin VB.Line Line3
+ Index = 3
+ X1 = 120
+ X2 = 2280
+ Y1 = 480
+ Y2 = 480
+ End
+ End
+ Begin VB.Label lblSkippedOld
+ Caption = "Skipped <TOPIC> documets, because they were too old"
+ Height = 195
+ Left = 3180
+ TabIndex = 60
+ Top = 2880
+ Width = 4935
+ End
+ Begin VB.Label lblSetupDone
+ AutoSize = -1 'True
+ Caption = "Run the analysis and view the results"
+ BeginProperty Font
+ Name = "Arial"
+ Size = 8.25
+ Charset = 0
+ Weight = 700
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ Height = 195
+ Left = 2880
+ TabIndex = 96
+ Tag = "1400"
+ Top = 240
+ Width = 4905
+ WordWrap = -1 'True
+ End
+ Begin VB.Label lblNumPPT
+ Caption = "<TOPIC> Presentations"
+ Height = 255
+ Left = 4620
+ TabIndex = 88
+ Tag = "1409"
+ Top = 2280
+ Width = 3375
+ End
+ Begin VB.Label lblNumPOT
+ Caption = "<TOPIC> Templates"
+ Height = 255
+ Left = 4620
+ TabIndex = 87
+ Tag = "1403"
+ Top = 2550
+ Width = 3375
+ End
+ Begin VB.Label lblNumXLS
+ Caption = "<TOPIC> Spreadsheets"
+ Height = 255
+ Left = 4620
+ TabIndex = 86
+ Tag = "1408"
+ Top = 1680
+ Width = 3375
+ End
+ Begin VB.Label lblNumXLT
+ Caption = "<TOPIC> Templates"
+ Height = 255
+ Left = 4620
+ TabIndex = 85
+ Tag = "1403"
+ Top = 1950
+ Width = 3375
+ End
+ Begin VB.Label Label16
+ AutoSize = -1 'True
+ Caption = "PowerPoint"
+ Height = 195
+ Left = 3360
+ TabIndex = 82
+ Tag = "1213"
+ Top = 2280
+ Width = 1095
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label13
+ Caption = "Word"
+ Height = 705
+ Index = 10
+ Left = 0
+ TabIndex = 81
+ Tag = "1207"
+ Top = 0
+ Width = 1245
+ End
+ Begin VB.Label Label13
+ Caption = "Excel"
+ Height = 705
+ Index = 9
+ Left = 0
+ TabIndex = 80
+ Tag = "1210"
+ Top = 810
+ Width = 1245
+ End
+ Begin VB.Label Label13
+ Caption = "PowerPoint"
+ Height = 585
+ Index = 8
+ Left = 0
+ TabIndex = 79
+ Tag = "1213"
+ Top = 1620
+ Width = 1245
+ End
+ Begin VB.Label Label13
+ Caption = "Word"
+ Height = 585
+ Index = 7
+ Left = 0
+ TabIndex = 78
+ Tag = "1207"
+ Top = 0
+ Width = 1245
+ End
+ Begin VB.Label Label13
+ Caption = "Excel"
+ Height = 585
+ Index = 6
+ Left = 0
+ TabIndex = 77
+ Tag = "1210"
+ Top = 810
+ Width = 1245
+ End
+ Begin VB.Label Label13
+ Caption = "PowerPoint"
+ Height = 465
+ Index = 4
+ Left = 0
+ TabIndex = 76
+ Tag = "1213"
+ Top = 1620
+ Width = 1245
+ End
+ Begin VB.Label lblNumTemplates
+ Caption = "<TOPIC> Templates"
+ Height = 255
+ Left = 4620
+ TabIndex = 52
+ Tag = "1403"
+ Top = 1350
+ Width = 3375
+ End
+ Begin VB.Label lblNumDocs
+ Caption = "<TOPIC> Documents"
+ Height = 255
+ Left = 4620
+ TabIndex = 51
+ Tag = "1402"
+ Top = 1080
+ Width = 3375
+ End
+ Begin VB.Line Line6
+ BorderColor = &H00808080&
+ X1 = 2640
+ X2 = 8040
+ Y1 = 3270
+ Y2 = 3270
+ End
+ Begin VB.Label Label15
+ AutoSize = -1 'True
+ Caption = "Excel"
+ Height = 195
+ Left = 3360
+ TabIndex = 50
+ Tag = "1210"
+ Top = 1680
+ Width = 1095
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label14
+ AutoSize = -1 'True
+ Caption = "Word"
+ Height = 195
+ Left = 3360
+ TabIndex = 49
+ Tag = "1207"
+ Top = 1080
+ Width = 1110
+ WordWrap = -1 'True
+ End
+ Begin VB.Label lblTotalNumDocs
+ AutoSize = -1 'True
+ Caption = "A total of <TOPIC> documents will be analyzed:"
+ Height = 195
+ Left = 3180
+ TabIndex = 48
+ Tag = "1401"
+ Top = 660
+ Width = 4800
+ WordWrap = -1 'True
+ End
+ Begin VB.Line Line2
+ BorderColor = &H00808080&
+ Index = 3
+ X1 = 2550
+ X2 = 2550
+ Y1 = 0
+ Y2 = 4920
+ End
+ End
+ Begin VB.PictureBox picNav
+ Align = 2 'Align Bottom
+ Appearance = 0 'Flat
+ BorderStyle = 0 'None
+ BeginProperty Font
+ Name = "MS Sans Serif"
+ Size = 8.25
+ Charset = 0
+ Weight = 400
+ Underline = 0 'False
+ Italic = 0 'False
+ Strikethrough = 0 'False
+ EndProperty
+ ForeColor = &H80000008&
+ Height = 570
+ Left = 0
+ ScaleHeight = 570
+ ScaleWidth = 8175
+ TabIndex = 4
+ TabStop = 0 'False
+ Top = 4950
+ Width = 8175
+ Begin VB.CommandButton cmdNav
+ Caption = "Finish"
+ Height = 312
+ Index = 4
+ Left = 5325
+ MaskColor = &H00000000&
+ TabIndex = 14
+ Tag = "1023"
+ Top = 120
+ Width = 1320
+ End
+ Begin VB.CommandButton cmdNav
+ Caption = "Next >>"
+ Height = 312
+ Index = 3
+ Left = 3870
+ MaskColor = &H00000000&
+ TabIndex = 13
+ Tag = "1022"
+ Top = 120
+ Width = 1320
+ End
+ Begin VB.CommandButton cmdNav
+ Caption = "<< Back"
+ Height = 312
+ Index = 2
+ Left = 2535
+ MaskColor = &H00000000&
+ TabIndex = 12
+ Tag = "1021"
+ Top = 120
+ Width = 1320
+ End
+ Begin VB.CommandButton cmdNav
+ Cancel = -1 'True
+ Caption = "Cancel"
+ Height = 312
+ Index = 1
+ Left = 6750
+ MaskColor = &H00000000&
+ TabIndex = 15
+ Tag = "1024"
+ Top = 120
+ Width = 1320
+ End
+ End
+ Begin VB.Label Label18
+ Caption = "<TOPIC> Documents"
+ Height = 255
+ Left = 0
+ TabIndex = 84
+ Top = 0
+ Width = 2085
+ WordWrap = -1 'True
+ End
+ Begin VB.Label Label17
+ Caption = "<TOPIC> Templates"
+ Height = 255
+ Left = 0
+ TabIndex = 83
+ Top = 390
+ Width = 3615
+ WordWrap = -1 'True
+ End
+ Begin VB.Line Line4
+ BorderColor = &H00808080&
+ X1 = 0
+ X2 = 8160
+ Y1 = 4920
+ Y2 = 4920
+ End
+End
+Attribute VB_Name = "frmWizard"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+' *******************************************************************************
+' * $RCSfile: Wizard.frm,v $
+' *
+' * Description:
+' *
+' * Last change: $Date: 2008/10/07 11:35:55 $ $Revision: 1.42.66.2 $
+' *
+' * Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use of this
+' * product is subject to license terms.
+' *
+' *******************************************************************************
+
+Option Explicit
+
+Const TOPIC_STR = "<TOPIC>"
+Const TOPIC2_STR = "<TOPIC2>"
+Const CR_STR = "<CR>"
+Const CDEBUG_LEVEL_DEFAULT = 1 'Will output all Debug output to analysis.log file
+Const CSUPPORTED_VERSION = 9#
+
+Const NUM_STEPS = 4
+
+Const CAPPNAME_WORD = "Word"
+Const CAPPNAME_EXCEL = "Excel"
+Const CAPPNAME_POWERPOINT = "PowerPoint"
+Const CANALYZING = "Analyzing"
+
+Const BTN_CANCEL = 1
+Const BTN_BACK = 2
+Const BTN_NEXT = 3
+Const BTN_FINISH = 4
+
+Const STEP_INTRO = 0
+Const STEP_1 = 1
+Const STEP_2 = 2
+Const STEP_FINISH = 3
+
+Const DIR_NONE = 0
+Const DIR_BACK = 1
+Const DIR_NEXT = 2
+
+Const CPRODUCTNAME_STR = "<PRODUCTNAME>"
+
+Const CSTR_ANALYSIS_LOG_DONE = "Done"
+
+Const CINPUT_DIR = "indir"
+Const COUTPUT_DIR = "outdir"
+Const CRESULTS_FILE = "resultsfile"
+Const CLOG_FILE = "logfile"
+Const CRESULTS_TEMPLATE = "resultstemplate"
+Const CRESULTS_EXIST = "resultsexist"
+Const CPROMPT_FILE = "promptfile"
+Const COVERWRITE_FILE = "overwritefile"
+Const CAPPEND_FILE = "appendfile"
+Const CNEW_RESULTS_FILE = "newresultsfile"
+Const CINCLUDE_SUBDIRS = "includesubdirs"
+Const CDEBUG_LEVEL = "debuglevel"
+Const CTYPE_WORDDOC = "typeworddoc"
+Const CTYPE_WORDDOT = "typeworddot"
+Const CTYPE_EXCELDOC = "typeexceldoc"
+Const CTYPE_EXCELDOT = "typeexceldot"
+Const CTYPE_PPDOC = "typepowerpointdoc"
+Const CTYPE_PPDOT = "typepowerpointdot"
+Const COUTPUT_TYPE = "outputtype"
+Const COUTPUT_TYPE_XLS = "xls"
+Const COUTPUT_TYPE_XML = "xml"
+Const COUTPUT_TYPE_BOTH = "both"
+Const CVERSION = "version"
+Const CDOPREPARE = "prepare"
+Const CTITLE = "title"
+Const CIGNORE_OLD_DOCS = "ignoreolddocuments"
+Const CISSUE_LIMIT = "issuesmonthlimit"
+Const CISSUE_LIMIT_DAW = 6
+Private mIssueLimit As Integer
+Const CDEFAULT_PASSWORD = "defaultpassword"
+Const CSTR_TEST_PASSWORD = "test"
+Private mDefaultPassword As String
+
+Const CLAST_CHECKPOINT As String = "LastCheckpoint"
+Const CNEXT_FILE As String = "NextFile"
+Const C_ABORT_ANALYSIS As String = "AbortAnalysis"
+
+Const CNUMBER_TOTAL_DOCS = "total_numberdocs"
+Const CNUMBER_DOCS_DOC = "numberdocs_doc"
+Const CNUMBER_TEMPLATES_DOT = "numbertemplates_dot"
+Const CNUMBER_DOCS_XLS = "numberdocs_xls"
+Const CNUMBER_TEMPLATES_XLT = "numbertemplates_xlt"
+Const CNUMBER_DOCS_PPT = "numberdocs_ppt"
+Const CNUMBER_TEMPLATES_POT = "numbertemplates_pot"
+Const CSTART_TIME = "start"
+Const CEND_TIME = "end"
+Const CELAPSED_TIME = "time_for_analysis"
+Const CWINVERSION = "win_version"
+Const CUSER_LOCALE_INFO = "user_locale"
+Const CSYS_LOCALE_INFO = "system_locale"
+Const CWORD_VERSION = "word_ver"
+Const CEXCEL_VERSION = "excel_ver"
+Const CPOWERPOINT_VERSION = "powerpoint_ver"
+Const CNOT_INSTALLED = "not installed"
+
+Const CRESULTS_FILE_EXTENSION = ".xls"
+Const CCONFIG_BACKUP_EXT = "_bak"
+Const CDEFAULT_README_NAME = "UserGuide"
+
+Const C_DOCS_LESS_3_MONTH = "DocumentsYoungerThan3Month"
+Const C_DOCS_LESS_6_MONTH = "DocumentsYoungerThan6Month"
+Const C_DOCS_LESS_12_MONTH = "DocumentsYoungerThan12Month"
+Const C_DOCS_MORE_12_MONTH = "DocumentsOlderThan12Month"
+
+'module level vars
+Dim mnCurStep As Integer
+Dim mbTrue As Boolean
+Dim mbFalse As Boolean
+Dim mLblSteps As String
+Dim mChbSubdirs As String
+
+Dim mWordDocCount As Long
+Dim mExcelDocCount As Long
+Dim mPPDocCount As Long
+
+Dim mWordTemplateCount As Long
+Dim mExcelTemplateCount As Long
+Dim mPPTemplateCount As Long
+Dim mTotalDocCount As Long
+Dim mIgnoredDocCount As Long
+
+Public VBInst As VBIDE.VBE
+Dim mbFinishOK As Boolean
+Dim mbAllowExit As Boolean
+Private mStrTrue As String
+Private mLogFilePath As String
+Private mDebugLevel As String
+Private mIniFilePath As String
+Private mbDocCountCurrent As Boolean
+Private mbDoPrepare As Boolean
+
+Dim mDocFiles As CollectedFiles
+
+Private Declare Sub InitCommonControls Lib "comctl32" ()
+Private Declare Function GetTickCount Lib "kernel32" () As Long
+Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
+
+Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
+
+Private Declare Function FormatMessage Lib "kernel32" Alias _
+ "FormatMessageA" (ByVal dwFlags As Long, lpSource As Long, _
+ ByVal dwMessageId As Long, ByVal dwLanguageId As Long, _
+ ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Any) As Long
+
+
+Private Const HKEY_CURRENT_USER As Long = &H80000001
+Private Const HKEY_LOCAL_MACHINE As Long = &H80000002
+
+Const WORD_APP = "word"
+Const EXCEL_APP = "excel"
+Const PP_APP = "pp"
+Const REG_KEY_APP_PATH = "Software\Microsoft\Windows\CurrentVersion\App Paths\"
+
+
+Function GetAppPath(myApp As String) As String
+ Dim myPath As String
+
+ If (myApp = WORD_APP) Then
+ myPath = GetRegistryInfo(HKEY_LOCAL_MACHINE, REG_KEY_APP_PATH & "winword.exe", "")
+ ElseIf (myApp = EXCEL_APP) Then
+ myPath = GetRegistryInfo(HKEY_LOCAL_MACHINE, REG_KEY_APP_PATH & "excel.exe", "")
+ ElseIf (myApp = PP_APP) Then
+ myPath = GetRegistryInfo(HKEY_LOCAL_MACHINE, REG_KEY_APP_PATH & "powerpnt.exe", "")
+ Else
+ MsgBox "Unknown application: " & myApp, vbCritical
+ Exit Function
+ End If
+
+ If (myPath = "") Then
+ If (myApp = WORD_APP) Then
+ myPath = GetRegistryInfo(HKEY_CURRENT_USER, REG_KEY_APP_PATH & "winword.exe", "")
+ ElseIf (myApp = EXCEL_APP) Then
+ myPath = GetRegistryInfo(HKEY_CURRENT_USER, REG_KEY_APP_PATH & "excel.exe", "")
+ ElseIf (myApp = PP_APP) Then
+ myPath = GetRegistryInfo(HKEY_CURRENT_USER, REG_KEY_APP_PATH & "powerpnt.exe", "")
+ End If
+ End If
+
+ GetAppPath = myPath
+End Function
+
+Function GetDriverDoc(myApp As String) As String
+ Dim myPath As String
+ Dim errStr As String
+ Dim fso As New FileSystemObject
+
+ If (myApp = WORD_APP) Then
+ myPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CWORD_DRIVER_FILE)
+ ElseIf (myApp = EXCEL_APP) Then
+ myPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CEXCEL_DRIVER_FILE)
+ ElseIf (myApp = PP_APP) Then
+ myPath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE)
+ Else
+ MsgBox "Unknown application: " & myApp, vbCritical
+ GoTo FinalExit
+ End If
+
+ If Not fso.FileExists(myPath) Then
+ errStr = ReplaceTopic2Tokens(GetResString(ERR_MISSING_WORD_DRIVER), _
+ TOPIC_STR, myPath, CR_STR, Chr(13))
+ WriteDebug errStr
+ MsgBox errStr, vbCritical
+ GoTo FinalExit
+ End If
+
+ GetDriverDoc = myPath
+
+FinalExit:
+ Set fso = Nothing
+End Function
+
+
+
+
+Private Function AutomationMessageText(lCode As Long) As String
+ Dim sRtrnCode As String
+ Dim lRet As Long
+
+ sRtrnCode = Space$(256)
+ lRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0&, lCode, 0&, _
+ sRtrnCode, 256&, 0&)
+ If lRet > 0 Then
+ AutomationMessageText = Left(sRtrnCode, lRet)
+ Else
+ AutomationMessageText = "Error not found."
+ End If
+
+End Function
+
+Private Sub btnBrowseDirInput_Click()
+ Dim folder As String
+ Dim StartDir As String
+
+ If Len(txtInputDir.Text) > 0 Then
+ StartDir = txtInputDir.Text
+ End If
+
+ folder = BrowseForFolder(Me, GetResString(BROWSE_FOR_DOC_DIR_ID), StartDir)
+ If Len(folder) = 0 Then
+ Exit Sub 'User Selected Cancel
+ End If
+ txtInputDir.Text = folder
+ txtInputDir.ToolTipText = folder
+
+ If Len(txtOutputDir.Text) = 0 Then
+ txtOutputDir.Text = folder
+ txtOutputDir.ToolTipText = folder
+ End If
+End Sub
+
+Private Sub btnBrowseDirOut_Click()
+ Dim folder As String
+ Dim StartDir As String
+
+ If Len(txtOutputDir.Text) > 0 Then
+ StartDir = txtOutputDir.Text
+ End If
+
+ folder = BrowseForFolder(Me, GetResString(BROWSE_FOR_RES_DIR_ID), StartDir)
+ If Len(folder) = 0 Then
+ Exit Sub 'User Selected Cancel
+ End If
+ txtOutputDir.Text = folder
+ txtOutputDir.ToolTipText = folder
+End Sub
+
+Private Sub btnPrepare_Click()
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "btnPrepare_Click"
+
+ mbDoPrepare = True
+ mbAllowExit = True
+
+ btnViewResults.Enabled = False
+ btnRunAnalysis.Enabled = False
+ btnPrepare.Enabled = False
+
+ cmdNav(BTN_CANCEL).Enabled = False
+ cmdNav(BTN_BACK).Enabled = False
+ cmdNav(BTN_NEXT).Enabled = False
+ cmdNav(BTN_FINISH).Enabled = False
+ btnPrepare.Caption = GetResString(RUNBTN_RUNNING_ID)
+
+ Dim str As String
+
+ If RunAnalysis(True) Then
+ cmdNav(BTN_FINISH).Enabled = True
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = True
+ btnPrepare.Enabled = True
+ btnViewResults.SetFocus
+ str = ReplaceTopic2Tokens(GetResString(RID_STR_ENG_OTHER_PREPARE_COMPLETED_PREP_ID), _
+ TOPIC_STR, getOutputDir, CR_STR, Chr(13))
+ MsgBox str, vbInformation
+ Else
+ cmdNav(BTN_FINISH).Enabled = False
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = False
+ btnPrepare.Enabled = False
+ End If
+
+FinalExit:
+ mbDoPrepare = False
+ cmdNav(BTN_CANCEL).Enabled = True
+ cmdNav(BTN_BACK).Enabled = True
+ cmdNav(BTN_NEXT).Enabled = False
+ btnPrepare.Caption = GetResString(PREPAREBTN_START_ID)
+ Exit Sub
+
+HandleErrors:
+ cmdNav(BTN_FINISH).Enabled = False
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = False
+ btnPrepare.Enabled = False
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+
+Private Sub cmdNav_Click(Index As Integer)
+ On Error GoTo HandleError
+ Dim currentFunctionName As String
+ currentFunctionName = "cmdNav_Click"
+ Dim nAltStep As Integer
+ Dim rc As Long
+ Dim fso As Scripting.FileSystemObject
+
+ Select Case Index
+ Case BTN_CANCEL
+ 'Copy backup configuration file over existing
+ If fso Is Nothing Then
+ Set fso = New Scripting.FileSystemObject
+ End If
+ If fso.FileExists(mIniFilePath & CCONFIG_BACKUP_EXT) Then
+ DeleteFile mIniFilePath
+ AttemptToCopyFile mIniFilePath & CCONFIG_BACKUP_EXT, mIniFilePath
+ End If
+ Set mDocFiles = Nothing
+
+ Unload Me
+
+ Case BTN_BACK
+ nAltStep = mnCurStep - 1
+ SetStep nAltStep, DIR_BACK
+
+ Case BTN_NEXT
+ nAltStep = mnCurStep + 1
+ SetStep nAltStep, DIR_NEXT
+
+ Case BTN_FINISH
+ If (Not mbAllowExit) Then
+ Dim str As String
+ Dim response As Integer
+
+ str = ReplaceTopicTokens(GetResString(RID_STR_ENG_ANALYSE_NOT_RUN), CR_STR, Chr(13))
+ response = MsgBox(str, vbOKCancel + vbInformation)
+ If response = vbOK Then ' User chose Ok.
+ mbAllowExit = True
+ End If
+ End If
+
+ If (mbAllowExit) Then
+ DeleteFile mIniFilePath & CCONFIG_BACKUP_EXT
+ Set mDocFiles = Nothing
+ Unload Me
+ End If
+ End Select
+
+FinalExit:
+ Set fso = Nothing
+ Exit Sub
+
+HandleError:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+
+ Resume FinalExit
+End Sub
+
+Private Sub btnRunAnalysis_Click()
+ On Error GoTo HandleErrors
+ Dim bViewResults As Boolean
+ Dim str As String
+ Dim response As Integer
+
+ btnViewResults.Enabled = False
+ btnRunAnalysis.Enabled = False
+ btnPrepare.Enabled = False
+ bViewResults = False
+ mbAllowExit = True
+
+ cmdNav(BTN_CANCEL).Enabled = False
+ cmdNav(BTN_BACK).Enabled = False
+ cmdNav(BTN_NEXT).Enabled = False
+ cmdNav(BTN_FINISH).Enabled = False
+ btnRunAnalysis.Caption = GetResString(RUNBTN_RUNNING_ID)
+
+ If RunAnalysis(False) Then
+ cmdNav(BTN_FINISH).Enabled = True
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = True
+ btnPrepare.Enabled = True
+ btnViewResults.SetFocus
+ btnRunAnalysis.Caption = GetResString(RUNBTN_START_ID)
+
+ str = ReplaceTopicTokens(GetResString(RID_STR_ENG_ANALYZE_COMPLETED_ID), CR_STR, Chr(13))
+ response = MsgBox(str, vbOKCancel + vbInformation)
+ If response = vbOK Then ' User chose Ok.
+ bViewResults = True
+ End If
+ Else
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = False
+ btnPrepare.Enabled = False
+ End If
+
+FinalExit:
+ cmdNav(BTN_CANCEL).Enabled = True
+ cmdNav(BTN_BACK).Enabled = True
+ cmdNav(BTN_NEXT).Enabled = False
+ btnRunAnalysis.Caption = GetResString(RUNBTN_START_ID)
+
+ If bViewResults Then
+ btnViewResults_Click
+ End If
+
+ Exit Sub
+
+HandleErrors:
+ cmdNav(BTN_FINISH).Enabled = False
+ btnRunAnalysis.Enabled = True
+ btnViewResults.Enabled = False
+ btnPrepare.Enabled = False
+ WriteDebug "Document Analysis: View Analysis Results" & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Sub btnViewResults_Click()
+ On Error GoTo HandleErrors
+ Dim resultsFile As String
+ Dim fso As New FileSystemObject
+ Dim str As String
+
+ mbAllowExit = True
+
+ resultsFile = getOutputDir & "\" & txtResultsName.Text
+
+ If GetIniSetting(COUTPUT_TYPE) = COUTPUT_TYPE_XML Or _
+ GetIniSetting(COUTPUT_TYPE) = COUTPUT_TYPE_BOTH Then
+
+ Dim base As String
+ Dim path As String
+ base = fso.GetParentFolderName(resultsFile) & "\" & fso.GetBaseName(txtResultsName.Text)
+ If CheckWordDocsToAnalyze Then
+ path = base & "_" & CAPPNAME_WORD & "." & COUTPUT_TYPE_XML
+ End If
+ If CheckExcelDocsToAnalyze Then
+ If path <> "" Then path = path & vbLf
+ path = path & base & "_" & CAPPNAME_EXCEL & "." & COUTPUT_TYPE_XML
+ End If
+ If CheckPPDocsToAnalyze Then
+ If path <> "" Then path = path & vbLf
+ path = path & base & "_" & CAPPNAME_POWERPOINT & "." & COUTPUT_TYPE_XML
+ End If
+
+ str = ReplaceTopic2Tokens(GetResString(XML_RESULTS_ID), _
+ TOPIC_STR, path, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbInformation
+ If GetIniSetting(COUTPUT_TYPE) = COUTPUT_TYPE_XML Then
+ Resume FinalExit
+ End If
+ End If
+
+ If Not fso.FileExists(resultsFile) Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_RESULTS_DOC), _
+ TOPIC_STR, resultsFile, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ Resume FinalExit
+ End If
+
+ Dim xl As Excel.application
+ Set xl = New Excel.application
+ xl.Visible = True
+ xl.Workbooks.Open resultsFile
+
+FinalExit:
+ Set xl = Nothing
+ Set fso = Nothing
+
+ Exit Sub
+HandleErrors:
+ WriteDebug "Document Analysis: View Analysis Results" & Err.Number & " " & Err.Description & " " & Err.Source
+End Sub
+
+Private Sub Form_Activate()
+ Dim currentFunctionName As String
+ Dim missingFile As String
+ currentFunctionName = "Form_Activate"
+ On Error GoTo HandleErrors
+
+ If Not CheckNeededFiles(missingFile) Then
+ Dim str As String
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_WORD_DRIVER), _
+ TOPIC_STR, missingFile, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+
+ End 'Exit application - some needed files are missing
+ End If
+
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ GoTo FinalExit
+End Sub
+
+Private Sub Form_Initialize()
+ Dim currentFunctionName As String
+ currentFunctionName = "Form_Initialize"
+ On Error GoTo ErrorHandler
+ Call InitCommonControls 'Use Windows XP Visual Style
+
+FinalExit:
+ Exit Sub
+
+ErrorHandler:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ GoTo FinalExit
+End Sub
+
+Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
+ If KeyCode = vbKeyF1 Then
+ 'cmdNav_Click BTN_HELP
+ End If
+End Sub
+
+Private Sub Form_Load()
+ Const COS_CHECK = "oscheck"
+
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "Form_Load"
+
+ Dim fso As New FileSystemObject
+ Dim i As Integer
+ 'init all vars
+ mbFinishOK = False
+ mbTrue = True
+ mbFalse = False
+
+ mLogFilePath = GetLogFilePath
+ mIniFilePath = GetIniFilePath
+ mbDocCountCurrent = False
+ mbDoPrepare = False
+ mbAllowExit = False
+
+ 'Check OS before running
+ Dim bOSCheck As Boolean
+ bOSCheck = IIf(GetIniSetting(COS_CHECK) = "False", False, True)
+
+ If bOSCheck Then
+ If Not IsWin98Plus Then
+ Dim str As String
+ Dim winVer As RGB_WINVER
+ str = ReplaceTopic2Tokens(GetResString(ERR_SUPPORTED_OSVERSION), _
+ TOPIC_STR, GetWinVersion(winVer), CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+
+ End 'Exit application - unsupported OS
+ End If
+ Else
+ Err.Clear
+ WriteDebug "IsWin2000Plus OS Check bypassed by analysis.ini oscheck=False setting"
+ End If
+
+
+ For i = 0 To NUM_STEPS - 1
+ fraStep(i).Left = -10000
+ Next
+
+ 'Load All string info for Form
+ LoadResStrings Me
+
+ frmWizard.Caption = ReplaceTopicTokens(GetResString(TITLE_ID), CPRODUCTNAME_STR, _
+ GetResString(PRODUCTNAME_ID))
+ lblIntroduction1.Caption = ReplaceTopicTokens(GetResString(INTRO1_ID), CPRODUCTNAME_STR, _
+ GetResString(PRODUCTNAME_ID))
+ mLblSteps = GetResString(LBL_STEPS_ID)
+ mChbSubdirs = GetResString(CHK_SUBDIRS_ID)
+
+ ' Setup Doc Preparation specific strings
+ If gBoolPreparation Then
+ ' Steps
+ lblStep1_4.Caption = GetResString(RID_STR_ENG_SIDEBAR_ANALYZE_PREP_ID)
+ lblStep2_4.Caption = GetResString(RID_STR_ENG_SIDEBAR_ANALYZE_PREP_ID)
+ lblStep3_4.Caption = GetResString(RID_STR_ENG_SIDEBAR_ANALYZE_PREP_ID)
+ lblStep4_4.Caption = GetResString(RID_STR_ENG_SIDEBAR_ANALYZE_PREP_ID)
+
+ ' Preparation - Step 1. Introduction
+ lblIntroduction1.Caption = ReplaceTopicTokens(GetResString(RID_STR_ENG_INTRODUCTION_INTRO1_PREP_ID), CPRODUCTNAME_STR, _
+ GetResString(PRODUCTNAME_ID))
+ lblIntroduction2.Caption = GetResString(RID_STR_ENG_INTRODUCTION_INTRO2_PREP_ID)
+ lblIntroduction3.Caption = GetResString(RID_STR_ENG_INTRODUCTION_INTRO3_PREP_ID)
+
+ ' Preparation - Step 2. Documents
+ lblChooseDocs.Caption = GetResString(RID_STR_ENG_DOCUMENTS_CHOOSE_DOCUMENTS_PREP_ID)
+ lblDocTypes.Caption = GetResString(RID_STR_ENG_DOCUMENTS_CHOOSE_DOC_TYPES_PREP_ID)
+ 'mChbSubdirs = GetResString(RID_STR_ENG_DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP_ID)
+ chkIgnoreOld.Caption = GetResString(RID_STR_IGNORE_OLDER_CB_ID)
+
+ cbIgnoreOld.Clear
+ cbIgnoreOld.AddItem (GetResString(RID_STR_IGNORE_OLDER_3_MONTHS_ID))
+ cbIgnoreOld.AddItem (GetResString(RID_STR_IGNORE_OLDER_6_MONTHS_ID))
+ cbIgnoreOld.AddItem (GetResString(RID_STR_IGNORE_OLDER_12_MONTHS_ID))
+ cbIgnoreOld.ListIndex = 0
+
+ ' Preparation - Step 3. Results
+ lblChooseResults.Caption = GetResString(RID_STR_ENG_RESULTS_CHOOSE_OPTIONS_PREP_ID)
+ txtResultsName.Text = GetResString(RID_STR_ENG_RESULTS_ANALYSIS_XLS_PREP_ID)
+
+ 'Show Append option
+ rdbResultsAppend.Visible = True
+
+ ' Preparation - Step 4. Analysis
+ lblSetupDone.Caption = GetResString(RID_STR_ENG_ANALYZE_SETUP_COMPLETE_PREP_ID)
+ btnPrepare.Visible = True
+ Else
+ ' The next line is a work around for a wrong translated string and should be removed
+ ' when RID_STR_ENG_RESULTS_CHOOSE_OPTIONS has been corrected
+ lblChooseResults.Caption = GetResString(RID_STR_ENG_RESULTS_CHOOSE_OPTIONS_PREP_ID)
+ mDefaultPassword = IIf(GetIniSetting(CDEFAULT_PASSWORD) = "", _
+ CSTR_TEST_PASSWORD, GetIniSetting(CDEFAULT_PASSWORD))
+ End If
+
+ SetStep 0, DIR_NEXT
+ Dim tmpStr As String
+
+ 'Setup Params
+ tmpStr = GetIniSetting(CINPUT_DIR)
+ If tmpStr <> "" Then
+ txtInputDir.Text = tmpStr
+ txtInputDir.ToolTipText = tmpStr
+ End If
+ tmpStr = GetIniSetting(COUTPUT_DIR)
+ If tmpStr <> "" Then
+ If Right(tmpStr, 1) = ":" And Len(tmpStr) = 2 Then
+ tmpStr = tmpStr & "\"
+ End If
+ txtOutputDir.Text = tmpStr
+ txtOutputDir.ToolTipText = tmpStr
+ End If
+ tmpStr = GetIniSetting(CRESULTS_FILE)
+ If tmpStr <> "" Then txtResultsName.Text = tmpStr
+
+ rdbResultsPrompt.value = False
+ rdbResultsOverwrite.value = False
+ rdbResultsAppend.value = False
+ Dim resultsSetting As String
+ resultsSetting = GetIniSetting(CRESULTS_EXIST)
+ If resultsSetting = CPROMPT_FILE Then
+ rdbResultsPrompt.value = True
+ ElseIf resultsSetting = CAPPEND_FILE Then
+ rdbResultsAppend.value = True
+ Else
+ rdbResultsOverwrite.value = True
+ End If
+
+ chkWordDoc.value = IIf(GetIniSetting(CTYPE_WORDDOC) = CStr(True), vbChecked, 0)
+ chkWordTemplate.value = IIf(GetIniSetting(CTYPE_WORDDOT) = CStr(True), vbChecked, 0)
+ chkExcelDoc.value = IIf(GetIniSetting(CTYPE_EXCELDOC) = CStr(True), vbChecked, 0)
+ chkExcelTemplate.value = IIf(GetIniSetting(CTYPE_EXCELDOT) = CStr(True), vbChecked, 0)
+ chkPPDoc.value = IIf(GetIniSetting(CTYPE_PPDOC) = CStr(True), vbChecked, 0)
+ chkPPTemplate.value = IIf(GetIniSetting(CTYPE_PPDOT) = CStr(True), vbChecked, 0)
+ chkIncludeSubdirs.value = IIf(GetIniSetting(CINCLUDE_SUBDIRS) = CStr(True), vbChecked, 0)
+ mDebugLevel = IIf(GetIniSetting(CDEBUG_LEVEL) = "", CDEBUG_LEVEL_DEFAULT, GetIniSetting(CDEBUG_LEVEL))
+ chkIgnoreOld.value = IIf(GetIniSetting(CIGNORE_OLD_DOCS) = CStr(True), vbChecked, 0)
+
+ mIssueLimit = IIf(GetIniSetting(CISSUE_LIMIT) = "", CISSUE_LIMIT_DAW, GetIniSetting(CISSUE_LIMIT))
+ If (mIssueLimit <= 3) Then
+ cbIgnoreOld.ListIndex = 0
+ ElseIf (mIssueLimit <= 6) Then
+ cbIgnoreOld.ListIndex = 1
+ Else
+ cbIgnoreOld.ListIndex = 2
+ End If
+
+ 'Always ensure at least one doc type is selected on startup
+ If (chkWordDoc.value <> vbChecked) And _
+ (chkWordTemplate.value <> vbChecked) And _
+ (chkExcelDoc.value <> vbChecked) And _
+ (chkExcelTemplate.value <> vbChecked) And _
+ (chkPPDoc.value <> vbChecked) And _
+ (chkPPTemplate.value <> vbChecked) Then
+
+ chkWordDoc.value = vbChecked
+ End If
+
+FinalExit:
+ Set fso = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Private Sub SetStep(nStep As Integer, nDirection As Integer)
+ On Error GoTo HandleError
+ Const driveTypeIsCDROM = 4
+ Dim val As String
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+ Dim drive
+
+
+ mbDocCountCurrent = False
+
+ Select Case nStep
+ Case STEP_INTRO
+ 'MsgBox "Enter Intro"
+ Case STEP_1
+ 'Leave Introduction
+ 'Workaround - resource bug for SubDir checkbox, have to set it explicitly
+ chkIncludeSubdirs.Caption = mChbSubdirs
+ Case STEP_2
+ 'Leave Documents
+
+ Set drive = fso.GetDrive(fso.GetDriveName(txtInputDir.Text))
+ If drive.DriveType = driveTypeIsCDROM Then
+ If Not drive.IsReady Then
+ MsgBox GetResString(ERR_CDROM_NOT_READY), vbCritical
+ Exit Sub
+ End If
+ End If
+
+ If txtInputDir.Text = "" Or Not fso.FolderExists(txtInputDir.Text) Then ' fso.FolderExists() has replaced dir()
+ MsgBox ReplaceTopicTokens(GetResString(ERR_NO_DOC_DIR), _
+ CR_STR, Chr(13)), vbCritical
+ Exit Sub
+ End If
+
+ If Not CheckUserChosenDocsToAnalyze Then
+ MsgBox GetResString(ERR_NO_DOC_TYPES), vbCritical
+ Exit Sub
+ End If
+ 'Expand directory name only without path to full path
+ txtInputDir.Text = fso.GetAbsolutePathName(txtInputDir.Text)
+
+ If txtOutputDir.Text = "" Then
+ txtOutputDir.Text = txtInputDir.Text
+ End If
+
+ mbFinishOK = False
+
+ 'Workaround - label resource bug for Steps, have to set it explicitly
+ Label12(0).Caption = mLblSteps
+ Label12(5).Caption = mLblSteps
+ Case STEP_FINISH
+ 'Leave Results
+ If Not CheckResultsDir(getOutputDir) Then
+ Exit Sub
+ End If
+
+ 'Expand directory name only without path to full path
+ txtOutputDir.Text = fso.GetAbsolutePathName(txtOutputDir)
+
+ 'Check Results file is there and has a valid extension
+ If fso.GetBaseName(txtResultsName.Text) = "" Then
+ txtResultsName.Text = GetResString(SETUP_ANALYSIS_XLS_ID)
+ End If
+ txtResultsName.Text = fso.GetBaseName(txtResultsName.Text) & CRESULTS_FILE_EXTENSION
+
+ Screen.MousePointer = vbHourglass
+ DeleteFile mLogFilePath
+ Set mDocFiles = Nothing
+ If Not CheckNumberDocsToAnalyze Then
+ Screen.MousePointer = vbDefault
+ Exit Sub
+ End If
+
+ Screen.MousePointer = vbDefault
+
+ btnRunAnalysis.Enabled = True
+
+ If GetNumberOfDocsToAnalyze = 0 Then
+ btnRunAnalysis.Enabled = False
+ End If
+
+ 'Backup configuration
+ If Not AttemptToCopyFile(mIniFilePath, mIniFilePath & CCONFIG_BACKUP_EXT) Then
+ Exit Sub
+ End If
+
+ 'Save current Wizard Settings
+ WriteWizardSettingsToLog mIniFilePath
+
+ 'If results file already exists, enable View and Prepare
+ If fso.FileExists(getOutputDir & "\" & txtResultsName.Text) Then
+ btnViewResults.Enabled = True
+ btnPrepare.Enabled = True
+ End If
+
+ mbFinishOK = True
+ End Select
+
+ 'move to new step
+ fraStep(mnCurStep).Enabled = False
+ fraStep(nStep).Left = 0
+ If nStep <> mnCurStep Then
+ fraStep(mnCurStep).Left = -10000
+ fraStep(mnCurStep).Enabled = False
+ End If
+ fraStep(nStep).Enabled = True
+
+ SetNavBtns nStep
+ Exit Sub
+
+FinalExit:
+ Set fso = Nothing
+ Set drive = Nothing
+ Exit Sub
+
+HandleError:
+ Screen.MousePointer = vbDefault
+ WriteDebug "Document Analysis: SetStep() " & Err.Number & " " & Err.Description & " " & Err.Source
+
+ Resume FinalExit
+End Sub
+
+Function CheckResultsDir(resultsDir As String) As Boolean
+ On Error GoTo HandleError
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+ Const driveTypeIsCDROM = 4
+ Const readOnlyFolderRemainder = 1
+ Dim drive
+ CheckResultsDir = False
+
+ If resultsDir = "" Then
+ MsgBox ReplaceTopicTokens(GetResString(ERR_NO_RESULTS_DIRECTORY), _
+ CR_STR, Chr(13)), vbCritical
+ CheckResultsDir = False
+ Exit Function
+ End If
+
+ Set drive = fso.GetDrive(fso.GetDriveName(resultsDir))
+ If drive.DriveType = driveTypeIsCDROM Then 'If CD-ROM Drive Then
+ Dim Msg1 As String
+ Msg1 = ReplaceTopic2Tokens(GetResString(ERR_CREATE_FILE), _
+ TOPIC_STR, txtResultsName.Text, CR_STR, Chr(13))
+ MsgBox Msg1, vbCritical
+ CheckResultsDir = False
+ Exit Function
+ End If
+
+
+ If Not fso.FolderExists(resultsDir) Then
+ Dim Msg, Style, response
+
+ Msg = ReplaceTopicTokens(GetResString(ERR_NO_RES_DIR), CR_STR, Chr(13))
+ Style = vbYesNo + vbQuestion + vbDefaultButton1 ' Define buttons.
+
+ response = MsgBox(Msg, Style)
+ If response = vbYes Then ' User chose Yes.
+ If Not CreateDir(getOutputDir) Then
+ CheckResultsDir = False
+ Exit Function
+ End If
+ Else ' User chose No.
+ CheckResultsDir = False
+ Exit Function
+ End If
+ End If
+
+ Dim testFile As String
+ testFile = resultsDir & "\" & fso.GetTempName
+ Do While fso.FileExists(testFile)
+ testFile = resultsDir & "\" & fso.GetTempName
+ Loop
+
+ On Error GoTo HandleReadOnly
+ Dim aText As TextStream
+ Set aText = fso.CreateTextFile(testFile, False, False)
+ aText.WriteLine ("Dies ist ein Test.")
+ aText.Close
+ fso.DeleteFile (testFile)
+
+' GetAttr doesn't work reliable ( returns read only for 'my Documents' and rw for read only network folder
+' If ((GetAttr(resultsDir) Mod 2) = readOnlyFolderRemainder) Then 'If the attribute is odd then the folder is read-only
+' MsgBox GetResString(ERR_NO_WRITE_TO_READ_ONLY_FOLDER), vbCritical
+' CheckResultsDir = False
+' Exit Function
+' End If
+
+ CheckResultsDir = True
+
+ Exit Function
+HandleError:
+ WriteDebug "Document Analysis: CheckResultsDir() " & Err.Number & " " & Err.Description & " " & Err.Source
+ CheckResultsDir = False
+ Exit Function
+HandleReadOnly:
+ Dim str As String
+ str = ReplaceTopic2Tokens(GetResString(ERR_CREATE_FILE), _
+ TOPIC_STR, txtResultsName.Text, CR_STR, Chr(13))
+ MsgBox str, vbCritical
+ CheckResultsDir = False
+ Exit Function
+End Function
+
+Function CheckUserChosenDocsToAnalyze() As Boolean
+ CheckUserChosenDocsToAnalyze = Not ((chkWordDoc.value <> vbChecked) And (chkWordTemplate.value <> vbChecked) And _
+ (chkExcelDoc.value <> vbChecked) And (chkExcelTemplate.value <> vbChecked) And _
+ (chkPPDoc.value <> vbChecked) And (chkPPTemplate.value <> vbChecked))
+End Function
+
+Function AttemptToCopyFile(Source As String, dest As String) As Boolean
+ On Error GoTo HandleErrors
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+
+ If fso.FileExists(Source) Then
+ fso.CopyFile Source, dest
+ End If
+
+ 'True if no source or copy succeded
+ AttemptToCopyFile = True
+
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ AttemptToCopyFile = False
+ Dim str As String
+ str = ReplaceTopic2Tokens(GetResString(ERR_CREATE_FILE), _
+ TOPIC_STR, mIniFilePath & CCONFIG_BACKUP_EXT, CR_STR, Chr(13))
+ Resume FinalExit
+
+End Function
+
+Function CreateDir(dir As String) As Boolean
+ On Error GoTo HandleErrors
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+
+ fso.CreateFolder (dir)
+
+ CreateDir = True
+
+FinalExit:
+ Set fso = Nothing
+ Exit Function
+
+HandleErrors:
+ Dim str As String
+ str = ReplaceTopic2Tokens(GetResString(ERR_CREATE_DIR), _
+ TOPIC_STR, dir, CR_STR, Chr(13))
+ Select Case Err.Number
+ Case 76
+ WriteDebug str
+ MsgBox str, vbCritical
+ CreateDir = False
+ Case 58
+ 'Don't care if it exists already
+ CreateDir = True
+ Case Else
+ WriteDebug str
+ MsgBox str, vbCritical
+ CreateDir = False
+ End Select
+ Resume FinalExit
+
+End Function
+Private Sub SetNavBtns(nStep As Integer)
+ mnCurStep = nStep
+
+ If mnCurStep = 0 Then
+ cmdNav(BTN_BACK).Enabled = False
+ cmdNav(BTN_NEXT).Enabled = True
+ ElseIf mnCurStep = NUM_STEPS - 1 Then
+ cmdNav(BTN_NEXT).Enabled = False
+ cmdNav(BTN_BACK).Enabled = True
+ Else
+ cmdNav(BTN_BACK).Enabled = True
+ cmdNav(BTN_NEXT).Enabled = True
+ End If
+
+ If mbFinishOK Then
+ cmdNav(BTN_FINISH).Enabled = True
+ Else
+ cmdNav(BTN_FINISH).Enabled = False
+ End If
+End Sub
+Function CheckForSupportedApp(app As String, lowerVerLimit As Long) As Boolean
+ Dim appRegStr As String
+ Dim appVer As Long
+ appRegStr = GetRegistryInfo(HKEY_CLASSES_ROOT, app & ".Application\CurVer", "")
+ appVer = val(Right(appRegStr, Len(appRegStr) - Len(app & ".Application.")))
+ If appVer >= lowerVerLimit Then
+ CheckForSupportedApp = True
+ Else
+ CheckForSupportedApp = False
+ End If
+End Function
+Function GetAppVersion(app As String) As Long
+ Dim appRegStr As String
+ Dim appVer As Long
+ appRegStr = GetRegistryInfo(HKEY_CLASSES_ROOT, app & ".Application\CurVer", "")
+ GetAppVersion = val(Right(appRegStr, Len(appRegStr) - Len(app & ".Application.")))
+End Function
+Function GetInstalledApp(app As String) As String
+ GetInstalledApp = GetRegistryInfo(HKEY_CLASSES_ROOT, app & ".Application\CurVer", "")
+End Function
+
+Sub WriteInfoToApplicationLog(wordAppStr As String, excelAppStr As String, ppAppStr As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteInfoToApplicationLog"
+
+ Dim userLCID As Long
+ userLCID = GetUserDefaultLCID()
+ Dim sysLCID As Long
+ sysLCID = GetSystemDefaultLCID()
+
+ WriteToLog CWORD_VERSION, IIf(wordAppStr <> "", wordAppStr, CNOT_INSTALLED)
+ WriteToLog CEXCEL_VERSION, IIf(excelAppStr <> "", excelAppStr, CNOT_INSTALLED)
+ WriteToLog CPOWERPOINT_VERSION, IIf(ppAppStr <> "", ppAppStr, CNOT_INSTALLED)
+
+ WriteToLog CUSER_LOCALE_INFO, _
+ "langid: " & GetUserLocaleInfo(userLCID, LOCALE_ILANGUAGE) & ": " & _
+ GetUserLocaleInfo(userLCID, LOCALE_SENGLANGUAGE) & _
+ "-" & GetUserLocaleInfo(userLCID, LOCALE_SENGCOUNTRY) & _
+ " abrv: " & GetUserLocaleInfo(userLCID, LOCALE_SISO639LANGNAME) & _
+ "-" & GetUserLocaleInfo(userLCID, LOCALE_SISO3166CTRYNAME) & _
+ " sdate: " & GetUserLocaleInfo(userLCID, LOCALE_SSHORTDATE)
+
+ WriteToLog CSYS_LOCALE_INFO, _
+ "langid: " & GetUserLocaleInfo(sysLCID, LOCALE_ILANGUAGE) & ": " & _
+ GetUserLocaleInfo(sysLCID, LOCALE_SENGLANGUAGE) & _
+ "-" & GetUserLocaleInfo(sysLCID, LOCALE_SENGCOUNTRY) & _
+ " abrv: " & GetUserLocaleInfo(sysLCID, LOCALE_SISO639LANGNAME) & _
+ "-" & GetUserLocaleInfo(sysLCID, LOCALE_SISO3166CTRYNAME) & _
+ " sdate: " & GetUserLocaleInfo(userLCID, LOCALE_SSHORTDATE)
+
+ Dim myWinVer As RGB_WINVER
+ GetWinVersion myWinVer
+ WriteToLog CWINVERSION, myWinVer.VersionName & " " & myWinVer.VersionNo & _
+ " " & myWinVer.ServicePack & _
+ " build " & myWinVer.BuildNo
+ WriteToLog CNUMBER_TOTAL_DOCS, CStr(mTotalDocCount)
+ WriteToLog CNUMBER_DOCS_DOC, CStr(mWordDocCount)
+ WriteToLog CNUMBER_TEMPLATES_DOT, CStr(mWordTemplateCount)
+ WriteToLog CNUMBER_DOCS_XLS, CStr(mExcelDocCount)
+ WriteToLog CNUMBER_TEMPLATES_XLT, CStr(mExcelTemplateCount)
+ WriteToLog CNUMBER_DOCS_PPT, CStr(mPPDocCount)
+ WriteToLog CNUMBER_TEMPLATES_POT, CStr(mPPTemplateCount)
+FinalExit:
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Function CheckTemplatePath(sMigrationResultsTemplatePath As String, fso As FileSystemObject) As Boolean
+ If Not fso.FileExists(sMigrationResultsTemplatePath) Then
+ Dim str As String
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_RESULTS_TEMPLATE), _
+ TOPIC_STR, sMigrationResultsTemplatePath, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ CheckTemplatePath = False
+ Else
+ CheckTemplatePath = True
+ End If
+End Function
+
+Function RunAnalysis(bDoPrepare) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "RunAnalysis"
+ Dim tstart As Single 'timer var for this routine only
+ Dim tend As Single 'timer var for this routine only
+ Dim fso As New FileSystemObject
+ Dim wordAppStr As String
+ Dim excelAppStr As String
+ Dim ppAppStr As String
+ Dim sMigrationResultsTemplatePath As String
+ Dim startDate As Variant
+ Dim bSuccess
+
+ bSuccess = True
+ startDate = Now
+ tstart = GetTickCount()
+
+ app.OleRequestPendingMsgText = GetResString(RUNBTN_RUNNING_ID)
+ app.OleRequestPendingMsgTitle = frmWizard.Caption
+
+ wordAppStr = GetInstalledApp(CAPPNAME_WORD)
+ excelAppStr = GetInstalledApp(CAPPNAME_EXCEL)
+ ppAppStr = GetInstalledApp(CAPPNAME_POWERPOINT)
+ 'Write locale, version info and settings to the Application log
+ WriteInfoToApplicationLog wordAppStr, excelAppStr, ppAppStr
+
+ 'Check for template
+ sMigrationResultsTemplatePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CRESULTS_TEMPLATE_FILE)
+ If Not CheckTemplatePath(sMigrationResultsTemplatePath, fso) Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ 'Check for installed Apps
+ If Not CheckInstalledApps(wordAppStr, excelAppStr, ppAppStr) Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ If bDoPrepare Then
+ 'Show MsgBox ( to give apps some time to quit )
+ Dim strMsgBox As String
+ Dim response As Integer
+
+ strMsgBox = ReplaceTopic2Tokens(GetResString(RID_STR_ENG_OTHER_PREPARE_PROMPT_PREP_ID), _
+ TOPIC_STR, getOutputDir & "\" & txtResultsName.Text, TOPIC2_STR, getOutputDir)
+ strMsgBox = ReplaceTopicTokens(strMsgBox, CR_STR, Chr(13))
+ response = MsgBox(strMsgBox, Buttons:=vbOKCancel + vbInformation)
+
+ If response <> vbOK Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+ End If
+
+ 'Write Wizard Setting to Application log
+ WriteWizardSettingsToLog mLogFilePath
+
+ 'Write to Analysis ini file - used by driver docs
+ WriteCommonParamsToLog sMigrationResultsTemplatePath, mLogFilePath, mIniFilePath, fso
+
+ Screen.MousePointer = vbHourglass
+ ' Doc Counts are setup by CheckNumberDocsToAnalyze() when user moves to Analysis Panel
+ ' Takes account of user Options selected and inspects source directory
+ Dim analysisAborted As Boolean
+ analysisAborted = False
+
+ SetupInputVariables mLogFilePath, fso
+
+ Load ShowProgress
+ Call ShowProgress.SP_Init(mDocFiles.WordFiles.count + _
+ mDocFiles.ExcelFiles.count + _
+ mDocFiles.PowerPointFiles.count)
+
+ Dim myOffset As Long
+ myOffset = 0
+ If (mDocFiles.WordFiles.count > 0) Then
+ bSuccess = AnalyseList(mDocFiles.WordFiles, "word", mIniFilePath, myOffset, analysisAborted)
+ 'bSuccess = RunWordAnalysis(sMigrationResultsTemplatePath, mLogFilePath, fso)
+ End If
+
+ myOffset = mDocFiles.WordFiles.count
+ If ((mDocFiles.ExcelFiles.count > 0) And (Not analysisAborted)) Then
+ bSuccess = bSuccess And _
+ AnalyseList(mDocFiles.ExcelFiles, "excel", mIniFilePath, myOffset, analysisAborted)
+ 'bSuccess = RunExcelAnalysis(sMigrationResultsTemplatePath, mLogFilePath, fso)
+ End If
+
+ myOffset = myOffset + mDocFiles.ExcelFiles.count
+ If ((mDocFiles.PowerPointFiles.count > 0) And (Not analysisAborted)) Then
+ bSuccess = bSuccess And _
+ AnalyseList(mDocFiles.PowerPointFiles, "pp", mIniFilePath, myOffset, analysisAborted)
+ 'bSuccess = RunPPAnalysis(sMigrationResultsTemplatePath, mLogFilePath, fso)
+ End If
+
+ SetupInputVariables mLogFilePath, fso
+
+ tend = GetTickCount()
+ WriteToLog CELAPSED_TIME, (FormatNumber((tend - tstart) / 1000, 0) & " seconds: ") & _
+ (FormatNumber((tend - tstart), 0) & " miliseconds")
+
+FinalExit:
+ Unload ShowProgress
+ Screen.MousePointer = vbDefault
+ WriteToLog CSTART_TIME, CDate(startDate)
+ WriteToLog CEND_TIME, Now
+ Set fso = Nothing
+
+ RunAnalysis = bSuccess
+ Exit Function
+
+HandleErrors:
+ bSuccess = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function CheckInstalledApps(wordAppStr As String, excelAppStr As String, ppAppStr As String) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ Dim str As String
+ currentFunctionName = "CheckInstalledApps"
+
+ Dim missingInstalledApps As String
+ Dim unsupportedApps As String
+ Dim runningApps As String
+ Dim bSuccess As Boolean
+
+ bSuccess = False
+
+ If mWordDocCount > 0 Or mWordTemplateCount > 0 Then
+ If wordAppStr = "" Then 'Word not installed
+ missingInstalledApps = CAPPNAME_WORD
+ ElseIf Not CheckForSupportedApp(CAPPNAME_WORD, CSUPPORTED_VERSION) Then
+ unsupportedApps = CAPPNAME_WORD
+ ElseIf IsOfficeAppRunning(CAPPNAME_WORD) Then
+ runningApps = CAPPNAME_WORD
+ End If
+ End If
+
+ If excelAppStr = "" Then
+ If missingInstalledApps <> "" Then missingInstalledApps = missingInstalledApps & ", "
+ missingInstalledApps = missingInstalledApps & CAPPNAME_EXCEL
+ ElseIf Not CheckForSupportedApp(CAPPNAME_EXCEL, CSUPPORTED_VERSION) Then
+ If unsupportedApps <> "" Then unsupportedApps = unsupportedApps & ", "
+ unsupportedApps = unsupportedApps & CAPPNAME_EXCEL
+ ElseIf IsOfficeAppRunning(CAPPNAME_EXCEL) Then
+ If runningApps <> "" Then runningApps = runningApps & ", "
+ runningApps = runningApps & CAPPNAME_EXCEL
+ End If
+
+ If mPPDocCount > 0 Or mPPTemplateCount > 0 Then
+ If ppAppStr = "" Then 'PP not installed
+ If missingInstalledApps <> "" Then missingInstalledApps = missingInstalledApps & ", "
+ missingInstalledApps = missingInstalledApps & CAPPNAME_POWERPOINT
+ ElseIf Not CheckForSupportedApp(CAPPNAME_POWERPOINT, CSUPPORTED_VERSION) Then
+ If unsupportedApps <> "" Then unsupportedApps = unsupportedApps & ", "
+ unsupportedApps = unsupportedApps & CAPPNAME_POWERPOINT
+ ElseIf IsOfficeAppRunning(CAPPNAME_POWERPOINT) Then
+ If runningApps <> "" Then runningApps = runningApps & ", "
+ runningApps = runningApps & CAPPNAME_POWERPOINT
+ End If
+ End If
+
+ If missingInstalledApps <> "" Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_NOT_INSTALLED), _
+ TOPIC_STR, missingInstalledApps, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ GoTo FinalExit
+ End If
+
+ If unsupportedApps <> "" Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_SUPPORTED_VERSION), _
+ TOPIC_STR, unsupportedApps, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ GoTo FinalExit
+ End If
+
+ If runningApps <> "" Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_APPLICATION_IN_USE), _
+ TOPIC_STR, runningApps, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ GoTo FinalExit
+ End If
+
+ 'Check for Excel automation server
+ If CheckForExcel Then
+ str = ReplaceTopicTokens(GetResString(ERR_EXCEL_OPEN), _
+ CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ bSuccess = True
+
+FinalExit:
+ CheckInstalledApps = bSuccess
+ Exit Function
+
+HandleErrors:
+ bSuccess = False
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function RunPPAnalysis(resultsTemplate As String, logFile As String, fsObject As FileSystemObject) As Boolean
+'DV: do we need this? get some error handling ideas here
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "RunPPAnalysis"
+ Const APP_PP = "PowerPoint"
+ Dim str As String
+ Dim bSuccess
+ bSuccess = False
+
+ If (chkPPDoc.value <> vbChecked) And (chkPPTemplate.value <> vbChecked) Then
+ RunPPAnalysis = True
+ Exit Function
+ End If
+
+ Dim sPPDriverDocPath As String
+
+ sPPDriverDocPath = fsObject.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE)
+ If Not fsObject.FileExists(sPPDriverDocPath) Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_PP_DRIVER), _
+ TOPIC_STR, sPPDriverDocPath, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ Dim pp As PowerPoint.application
+ Dim po As Object
+ Dim aPres As PowerPoint.Presentation
+ Dim RegValue As Long
+ Set po = GetObject(sPPDriverDocPath)
+ Set pp = po.application
+
+ If val(pp.Version) < CSUPPORTED_VERSION Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_SUPPORTED_VERSION), _
+ TOPIC_STR, pp.Version, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ If Not CheckForAccesToPPVBProject(pp, aPres) Then
+ RegValue = -1
+ If Not GiveAccessToMacroProject(APP_PP, pp.Version, RegValue) Then
+ Dim Style, response
+ str = ReplaceTopic2Tokens(GetResString(ERR_NO_ACCESS_TO_VBPROJECT), _
+ TOPIC_STR, CAPPNAME_POWERPOINT, CR_STR, Chr(13))
+ WriteDebug str
+ Style = vbYesNo + vbQuestion + vbDefaultButton1
+
+ response = MsgBox(str, Style)
+ If response <> vbYes Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+ End If
+ End If
+
+ Set aPres = pp.Presentations(1)
+ Dim ppSlideHidden As PowerPoint.Slide
+ Set ppSlideHidden = aPres.Slides(2)
+
+ 'Setup Input Variables
+ 'SetupInputVariables resultsTemplate, logFile, fsObject, CAPPNAME_POWERPOINT
+
+ 'Run PowerPoint Analysis
+ pp.Run (fsObject.GetFileName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE) & "!AnalysisDriver.AnalyseDirectory")
+
+ bSuccess = True
+
+FinalExit:
+ 'Cannot seem to close it down from VB
+ 'Workaround is to close it in macro
+ '
+ 'If Not aPres Is Nothing Then
+ ' aPres.Saved = msoTrue
+ 'End If
+ 'If Not pp Is Nothing Then pp.Quit
+
+ 'Swallow error as we are closing down PP from macro
+ 'Does not seem to be possible to close it down from VB
+ On Error Resume Next
+ If RegValue <> -1 Then
+ SetDefaultRegValue APP_PP, pp.Version, RegValue
+ End If
+ If RegValue = 0 Then
+ DeleteRegValue APP_PP, pp.Version
+ End If
+
+ If Not pp Is Nothing Then
+ pp.Run (fsObject.GetFileName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE) & "!ApplicationSpecific.QuitPowerPoint")
+ End If
+
+
+ Set aPres = Nothing
+ Set pp = Nothing
+ Set po = Nothing
+
+ RunPPAnalysis = bSuccess
+ Exit Function
+
+HandleErrors:
+ bSuccess = False
+ Set pp = Nothing
+ Dim failedDoc As String
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+
+ failedDoc = GetDebug(CAPPNAME_POWERPOINT, CANALYZING)
+ If failedDoc = "" Or failedDoc = CSTR_ANALYSIS_LOG_DONE Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_AUTOMATION_FAILURE), _
+ TOPIC_STR, CAPPNAME_POWERPOINT, CR_STR, Chr(13))
+ Else
+ str = ReplaceTopic2Tokens(GetResString(ERR_PP_DRIVER_CRASH), _
+ TOPIC_STR, failedDoc, CR_STR, Chr(13))
+ End If
+
+ WriteDebug str
+ MsgBox str, vbCritical
+
+ Resume FinalExit
+End Function
+
+Sub SetupInputVariables(logFile As String, fso As FileSystemObject)
+ Dim bNewResultsFile As Boolean
+
+ bNewResultsFile = CheckCreateNewResultsFile(fso)
+
+ WriteToLog CNEW_RESULTS_FILE, IIf(bNewResultsFile, "True", "False"), mIniFilePath
+ WriteToLog CNEW_RESULTS_FILE, IIf(bNewResultsFile, "True", "False"), logFile
+End Sub
+
+
+
+Function RunExcelAnalysis(resultsTemplate As String, logFile As String, fsObject As FileSystemObject) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "RunExcelAnalysis"
+ Const APP_EXCEL = "Excel"
+ Dim str As String
+ Dim bSuccess
+ bSuccess = False
+
+ If (chkExcelDoc.value <> vbChecked) And (chkExcelTemplate.value <> vbChecked) Then
+ RunExcelAnalysis = True
+ Exit Function
+ End If
+
+ Dim xl As Excel.application
+ Dim aWb As Excel.Workbook
+ Dim sExcelDriverDocPath As String
+ Dim RegValue As Long
+
+ sExcelDriverDocPath = fsObject.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CEXCEL_DRIVER_FILE)
+ If Not fsObject.FileExists(sExcelDriverDocPath) Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_EXCEL_DRIVER), _
+ TOPIC_STR, sExcelDriverDocPath, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ Set xl = GetExcelInstance
+ If val(xl.Version) < CSUPPORTED_VERSION Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_SUPPORTED_VERSION), _
+ TOPIC_STR, xl.Version, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ If Not CheckForAccesToExcelVBProject(xl) Then
+ RegValue = -1
+ If Not GiveAccessToMacroProject(APP_EXCEL, xl.Version, RegValue) Then
+ Dim Style, response
+ str = ReplaceTopic2Tokens(GetResString(ERR_NO_ACCESS_TO_VBPROJECT), _
+ TOPIC_STR, CAPPNAME_EXCEL, CR_STR, Chr(13))
+ WriteDebug str
+ Style = vbYesNo + vbQuestion + vbDefaultButton1
+
+ response = MsgBox(str, Style)
+ If response <> vbYes Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+ End If
+ End If
+
+ Set aWb = xl.Workbooks.Open(fileName:=sExcelDriverDocPath)
+ 'Setup Input Variables
+ 'SetupInputVariables resultsTemplate, logFile, fsObject, CAPPNAME_EXCEL
+
+ 'Run Excel Analysis
+ xl.Run ("AnalysisTool.AnalysisDriver.AnalyseDirectory")
+
+ bSuccess = True
+FinalExit:
+ If RegValue <> -1 Then
+ SetDefaultRegValue APP_EXCEL, xl.Version, RegValue
+ End If
+ If RegValue = 0 Then
+ DeleteRegValue APP_EXCEL, xl.Version
+ End If
+
+ If Not aWb Is Nothing Then
+ If xl.Workbooks.count = 1 Then
+ xl.Visible = False
+ End If
+ aWb.Close (False)
+ End If
+ Set aWb = Nothing
+
+ If Not xl Is Nothing Then
+ If xl.Workbooks.count = 0 Then
+ xl.Quit
+ End If
+ End If
+
+ Set xl = Nothing
+
+ RunExcelAnalysis = bSuccess
+ Exit Function
+
+HandleErrors:
+ bSuccess = False
+ Set aWb = Nothing
+ Set xl = Nothing
+ Dim failedDoc As String
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+
+ failedDoc = GetDebug(CAPPNAME_EXCEL, CANALYZING)
+ If failedDoc = "" Or failedDoc = CSTR_ANALYSIS_LOG_DONE Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_AUTOMATION_FAILURE), _
+ TOPIC_STR, CAPPNAME_EXCEL, CR_STR, Chr(13))
+ Else
+ str = ReplaceTopic2Tokens(GetResString(ERR_EXCEL_DRIVER_CRASH), _
+ TOPIC_STR, failedDoc, CR_STR, Chr(13))
+ End If
+
+ WriteDebug str
+ MsgBox str, vbCritical
+
+ On Error Resume Next
+ Resume FinalExit
+End Function
+
+Sub WriteWizardSettingsToLog(path As String)
+ '### DO NOT USE Boolean True/ False it is loaclised by the OS - use "True"/ "False"
+ WriteToLog CINPUT_DIR, getInputDir, path
+ WriteToLog CINCLUDE_SUBDIRS, IIf(chkIncludeSubdirs.value, "True", "False"), path
+ WriteToLog COUTPUT_DIR, getOutputDir, path
+ WriteToLog CRESULTS_FILE, txtResultsName.Text, path
+
+ WriteToLog CTYPE_WORDDOC, IIf(chkWordDoc.value, "True", "False"), path
+ WriteToLog CTYPE_WORDDOT, IIf(chkWordTemplate.value, "True", "False"), path
+ WriteToLog CTYPE_EXCELDOC, IIf(chkExcelDoc.value, "True", "False"), path
+ WriteToLog CTYPE_EXCELDOT, IIf(chkExcelTemplate.value, "True", "False"), path
+ WriteToLog CTYPE_PPDOC, IIf(chkPPDoc.value, "True", "False"), path
+ WriteToLog CTYPE_PPDOT, IIf(chkPPTemplate.value, "True", "False"), path
+
+ Dim resultsSetting As String
+ If rdbResultsPrompt.value Then
+ resultsSetting = CPROMPT_FILE
+ ElseIf rdbResultsAppend.value Then
+ resultsSetting = CAPPEND_FILE
+ Else
+ resultsSetting = COVERWRITE_FILE
+ End If
+ WriteToLog CRESULTS_EXIST, resultsSetting, path
+
+ WriteToLog CIGNORE_OLD_DOCS, IIf(chkIgnoreOld.value, "True", "False"), path
+ WriteToLog CISSUE_LIMIT, CStr(mIssueLimit), path
+
+ 'WriteToLog CVERSION, Version, path
+End Sub
+
+Sub WriteCommonParamsToLog(resultsTemplate As String, logFile As String, path As String, fso As Scripting.FileSystemObject)
+ WriteToLog CLOG_FILE, logFile, path
+ WriteToLog CRESULTS_TEMPLATE, resultsTemplate, path
+ WriteToLog CDEBUG_LEVEL, CLng(mDebugLevel), path
+ WriteToLog CDOPREPARE, IIf(mbDoPrepare, "True", "False"), path
+ WriteToLog CTITLE, frmWizard.Caption, path
+ WriteToLog CLAST_CHECKPOINT, ""
+ WriteToLog CNEXT_FILE, ""
+ WriteToLog C_ABORT_ANALYSIS, ""
+End Sub
+
+Function GetNumberOfDocsToAnalyze() As Long
+ Dim count As Long
+
+ count = 0
+
+ If CheckWordDocsToAnalyze Then
+ count = mWordDocCount + mWordTemplateCount
+ End If
+ If CheckExcelDocsToAnalyze Then
+ count = count + mExcelDocCount + mExcelTemplateCount
+ End If
+ If CheckPPDocsToAnalyze Then
+ count = count + mPPDocCount + mPPTemplateCount
+ End If
+
+ GetNumberOfDocsToAnalyze = count
+End Function
+
+Function CheckWordDocsToAnalyze() As Boolean
+
+ CheckWordDocsToAnalyze = mbDocCountCurrent And (chkWordDoc.value = vbChecked And mWordDocCount > 0) Or _
+ (chkWordTemplate.value = vbChecked And mWordTemplateCount > 0)
+End Function
+
+Function CheckExcelDocsToAnalyze() As Boolean
+ CheckExcelDocsToAnalyze = mbDocCountCurrent And (chkExcelDoc.value = vbChecked And mExcelDocCount > 0) Or _
+ (chkExcelTemplate.value = vbChecked And mExcelTemplateCount > 0)
+End Function
+
+Function CheckPPDocsToAnalyze() As Boolean
+ CheckPPDocsToAnalyze = mbDocCountCurrent And (chkPPDoc.value = vbChecked And mPPDocCount > 0) Or _
+ (chkPPTemplate.value = vbChecked And mPPTemplateCount > 0)
+End Function
+
+Function CheckNumberDocsToAnalyze() As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckNumberDocsToAnalyze"
+
+ Set mDocFiles = New CollectedFiles
+
+ Dim docSearchTypes As Collection
+ Set docSearchTypes = New Collection
+
+ mbDocCountCurrent = False
+
+ SetupDocSearchTypes docSearchTypes
+
+ If (cbIgnoreOld.ListIndex = 0) Then
+ mIssueLimit = 3
+ ElseIf (cbIgnoreOld.ListIndex = 1) Then
+ mIssueLimit = 6
+ Else
+ mIssueLimit = 12
+ End If
+
+ If Not mDocFiles.Search(rootDir:=getInputDir, FileSpecs:=docSearchTypes, _
+ IncludeSubdirs:=IIf(chkIncludeSubdirs.value, mbTrue, mbFalse), _
+ ignoreOld:=IIf(chkIgnoreOld.value, mbTrue, mbFalse), Months:=mIssueLimit) Then
+ CheckNumberDocsToAnalyze = False
+ GoTo FinalExit
+ End If
+
+ SetDocCountsFromFileSearch mDocFiles
+ WriteFileDateCountsToLog mDocFiles
+
+ 'WriteDocsToAnalyzeToLog mDocFiles 'UNCOMMENT Recovery - want to list out files to analyze
+
+ mbDocCountCurrent = True
+
+ lblNumDocs.Caption = ReplaceTopicTokens(GetResString(ANALYZE_DOCUMENTS_ID), TOPIC_STR, _
+ CStr(mWordDocCount))
+ lblNumTemplates.Caption = ReplaceTopicTokens(GetResString(ANALYZE_TEMPLATES_ID), TOPIC_STR, _
+ CStr(mWordTemplateCount))
+
+ lblNumXLS.Caption = ReplaceTopicTokens(GetResString(ANALYZE_DOCUMENTS_XLS_ID), TOPIC_STR, _
+ CStr(mExcelDocCount))
+ lblNumXLT.Caption = ReplaceTopicTokens(GetResString(ANALYZE_TEMPLATES_ID), TOPIC_STR, _
+ CStr(mExcelTemplateCount))
+
+ lblNumPPT.Caption = ReplaceTopicTokens(GetResString(ANALYZE_DOCUMENTS_PPT_ID), TOPIC_STR, _
+ CStr(mPPDocCount))
+ lblNumPOT.Caption = ReplaceTopicTokens(GetResString(ANALYZE_TEMPLATES_ID), TOPIC_STR, _
+ CStr(mPPTemplateCount))
+
+ lblTotalNumDocs.Caption = ReplaceTopicTokens(GetResString(ANALYZE_TOTAL_NUM_DOCS_ID), TOPIC_STR, _
+ CStr(mTotalDocCount))
+
+ If (mIgnoredDocCount > 0) Then
+ lblSkippedOld.Caption = ReplaceTopicTokens(GetResString(RID_STR_ENG_ANALYZE_IGNORED_DOCS_ID), _
+ TOPIC_STR, CStr(mIgnoredDocCount))
+ lblSkippedOld.Visible = True
+ Else
+ lblSkippedOld.Visible = False
+ End If
+
+ CheckNumberDocsToAnalyze = True
+
+FinalExit:
+ Set docSearchTypes = Nothing
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Sub SetDocCountsFromFileSearch(myDocFiles As CollectedFiles)
+ 'No Error handling required
+ mWordDocCount = myDocFiles.DocCount
+ mWordTemplateCount = myDocFiles.DotCount
+ mExcelDocCount = myDocFiles.XlsCount
+ mExcelTemplateCount = myDocFiles.XltCount
+ mPPDocCount = myDocFiles.PptCount
+ mPPTemplateCount = myDocFiles.PotCount
+ mTotalDocCount = mWordDocCount + mWordTemplateCount + mExcelDocCount + mExcelTemplateCount + _
+ mPPDocCount + mPPTemplateCount
+ mIgnoredDocCount = myDocFiles.IgnoredDocCount
+End Sub
+
+Sub SetupDocSearchTypes(docSearchTypes As Collection)
+ 'No Error handling required
+ If chkWordDoc.value Then docSearchTypes.add ("*.doc")
+ If chkWordTemplate.value Then docSearchTypes.add ("*.dot")
+ If chkExcelDoc.value Then docSearchTypes.add ("*.xls")
+ If chkExcelTemplate.value Then docSearchTypes.add ("*.xlt")
+ If chkPPDoc.value Then docSearchTypes.add ("*.ppt")
+ If chkPPTemplate.value Then docSearchTypes.add ("*.pot")
+End Sub
+
+Sub WriteDocsToAnalyzeToLog(myDocFiles As CollectedFiles)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteDocsToAnalyzeToLog"
+
+ Dim vFileName As Variant
+ Dim Index As Long
+ Dim limit As Long
+ limit = myDocFiles.WordFiles.count
+ For Index = 1 To limit
+ vFileName = myDocFiles.WordFiles(Index)
+ WriteToLog "Doc" & Index, CStr(vFileName), section:=(WIZARD_NAME & "ListFor" & CAPPNAME_WORD)
+ Next
+ limit = myDocFiles.ExcelFiles.count
+ For Index = 1 To limit
+ vFileName = myDocFiles.ExcelFiles(Index)
+ WriteToLog "Doc" & Index, CStr(vFileName), section:=(WIZARD_NAME & "ListFor" & CAPPNAME_EXCEL)
+ Next
+ limit = myDocFiles.PowerPointFiles.count
+ For Index = 1 To limit
+ vFileName = myDocFiles.PowerPointFiles(Index)
+ WriteToLog "Doc" & Index, CStr(vFileName), section:=(WIZARD_NAME & "ListFor" & CAPPNAME_POWERPOINT)
+ Next
+
+FinalExit:
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Sub WriteFileDateCountsToLog(myDocFiles As CollectedFiles)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "WriteFileDateCountsToLog"
+
+ WriteToLog C_DOCS_LESS_3_MONTH, CStr(myDocFiles.DocsLessThan3Months), mIniFilePath
+ WriteToLog C_DOCS_LESS_6_MONTH, CStr(myDocFiles.DocsLessThan6Months), mIniFilePath
+ WriteToLog C_DOCS_LESS_12_MONTH, CStr(myDocFiles.DocsLessThan12Months), mIniFilePath
+ WriteToLog C_DOCS_MORE_12_MONTH, CStr(myDocFiles.DocsMoreThan12Months), mIniFilePath
+
+FinalExit:
+ Exit Sub
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+
+Function RunWordAnalysis(resultsTemplate As String, logFile As String, fsObject As FileSystemObject) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "RunWordAnalysis"
+ Const APP_WORD = "Word"
+ Dim str As String
+ Dim bSuccess
+ bSuccess = False
+
+ Dim wrd As Word.application
+ Dim aDoc As Word.Document
+ Dim sWordDriverDocPath As String
+ Dim RegValue As Long
+
+ If (chkWordDoc.value <> vbChecked) And (chkWordTemplate.value <> vbChecked) Then
+ 'No Word doc filters selected
+ RunWordAnalysis = True
+ Exit Function
+ End If
+
+ sWordDriverDocPath = fsObject.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CWORD_DRIVER_FILE)
+ If Not fsObject.FileExists(sWordDriverDocPath) Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_MISSING_WORD_DRIVER), _
+ TOPIC_STR, sWordDriverDocPath, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ Set wrd = New Word.application
+ If val(wrd.Version) < CSUPPORTED_VERSION Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_SUPPORTED_VERSION), _
+ TOPIC_STR, wrd.Version, CR_STR, Chr(13))
+ WriteDebug str
+ MsgBox str, vbCritical
+ bSuccess = False
+ GoTo FinalExit
+ End If
+
+ If Not CheckForAccesToWordVBProject(wrd) Then
+ RegValue = -1
+ If Not GiveAccessToMacroProject(APP_WORD, wrd.Version, RegValue) Then
+ Dim Style, response
+ str = ReplaceTopic2Tokens(GetResString(ERR_NO_ACCESS_TO_VBPROJECT), _
+ TOPIC_STR, CAPPNAME_WORD, CR_STR, Chr(13))
+ WriteDebug str
+ Style = vbYesNo + vbQuestion + vbDefaultButton1
+
+ response = MsgBox(str, Style)
+ If response <> vbYes Then
+ bSuccess = False
+ GoTo FinalExit
+ End If
+ End If
+ End If
+
+ Set aDoc = wrd.Documents.Open(fileName:=sWordDriverDocPath)
+ 'Clear out any doc vars
+ Dim MyObj As Variable
+ For Each MyObj In aDoc.Variables
+ MyObj.Delete
+ Next
+
+ 'Setup Input Variables
+ 'SetupInputVariables resultsTemplate, logFile, fsObject, CAPPNAME_WORD
+
+ wrd.Run ("AnalysisTool.AnalysisDriver.AnalyseDirectory")
+
+ wrd.Visible = False
+ bSuccess = True
+
+FinalExit:
+ If RegValue <> -1 Then
+ SetDefaultRegValue APP_WORD, wrd.Version, RegValue
+ End If
+ If RegValue = 0 Then
+ DeleteRegValue APP_WORD, wrd.Version
+ End If
+ If Not aDoc Is Nothing Then aDoc.Close (False)
+ Set aDoc = Nothing
+
+ If Not wrd Is Nothing Then wrd.Quit (False)
+ Set wrd = Nothing
+
+ RunWordAnalysis = bSuccess
+ Exit Function
+
+HandleErrors:
+ On Error Resume Next
+
+ bSuccess = False
+ Set aDoc = Nothing
+ Set wrd = Nothing
+
+ Dim failedDoc As String
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+
+ failedDoc = GetDebug(CAPPNAME_WORD, CANALYZING)
+ If failedDoc = "" Or failedDoc = CSTR_ANALYSIS_LOG_DONE Then
+ str = ReplaceTopic2Tokens(GetResString(ERR_AUTOMATION_FAILURE), _
+ TOPIC_STR, CAPPNAME_WORD, CR_STR, Chr(13))
+ Else
+ str = ReplaceTopic2Tokens(GetResString(ERR_WORD_DRIVER_CRASH), _
+ TOPIC_STR, failedDoc, CR_STR, Chr(13))
+ End If
+
+ WriteDebug str
+ MsgBox str, vbCritical
+
+ Resume FinalExit
+End Function
+
+Function stripLastBackslash(inputStr As String) As String
+ Const MIN_DIR_SIZE = 3
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "stripLastBackslash"
+
+ If Len(inputStr) > MIN_DIR_SIZE Then
+ Dim lastStrChar As String
+ lastStrChar = Right(inputStr, 1)
+ If lastStrChar = "\" Then
+ inputStr = Left(inputStr, Len(inputStr) - 1)
+ End If
+ End If
+ stripLastBackslash = inputStr
+
+ Exit Function
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ stripLastBackslash = inputStr
+End Function
+
+Function getInputDir() As String
+ getInputDir = stripLastBackslash(txtInputDir.Text)
+End Function
+
+Function getOutputDir() As String
+ Dim tmpStr As String
+
+ tmpStr = stripLastBackslash(txtOutputDir.Text)
+
+ 'Bug when specifying C:\
+ If tmpStr <> "" Then
+ If Right(tmpStr, 1) = "\" Then
+ tmpStr = Left(tmpStr, Len(tmpStr) - 1)
+ End If
+ End If
+ getOutputDir = tmpStr
+End Function
+
+Function CheckCreateNewResultsFile(fsObject As FileSystemObject) As Boolean
+ If Not fsObject.FileExists(getOutputDir & "\" & txtResultsName.Text) Then
+ 'No Results File - Create it
+ CheckCreateNewResultsFile = True
+ ElseIf rdbResultsAppend.value Then
+ 'Results File exists and user wants to append to it
+ CheckCreateNewResultsFile = False
+ Else
+ 'Results File exists and user has elected not to append
+ CheckCreateNewResultsFile = True
+ End If
+End Function
+
+Sub DeleteFile(file As String)
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "DeleteFile"
+ Dim fso As Scripting.FileSystemObject
+ Set fso = New Scripting.FileSystemObject
+ Dim filePath As String
+
+ filePath = fso.GetAbsolutePathName(file)
+ If fso.FileExists(filePath) Then
+ fso.DeleteFile filePath, True
+ End If
+
+FinalExit:
+ Set fso = Nothing
+ Exit Sub
+
+HandleErrors:
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Sub
+
+Public Property Get Version() As String
+ Version = app.Major & "." & app.Minor & "." & app.Revision
+End Property
+
+Function GetExcelInstance() As Excel.application
+ Dim xl As Excel.application
+ On Error Resume Next
+ 'Try and get an existing instance
+ Set xl = GetObject(, "Excel.Application")
+ If Err.Number = 429 Then
+ Set xl = CreateObject("Excel.Application")
+ ElseIf Err.Number <> 0 Then
+ Set xl = Nothing
+ MsgBox "Error: " & Err.Description
+ Exit Function
+ End If
+ Set GetExcelInstance = xl
+ Set xl = Nothing
+End Function
+
+Function CheckForAnalysisResultsWorkbook(analysisResultsName As String) As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckForAnalysisResultsWorkbook"
+
+ CheckForAnalysisResultsWorkbook = False
+
+ Dim xl As Excel.application
+ Set xl = GetExcelInstance
+
+ Dim aWb As Excel.Workbook
+ For Each aWb In xl.Workbooks
+
+ If aWb.Name = analysisResultsName Then
+ CheckForAnalysisResultsWorkbook = True
+ Exit For
+ End If
+ Next aWb
+
+FinalExit:
+ If Not xl Is Nothing Then
+ If xl.Workbooks.count = 0 Then
+ xl.Quit
+ End If
+ End If
+
+ Set xl = Nothing
+
+ Exit Function
+
+HandleErrors:
+ Set xl = Nothing
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Function CheckForExcel() As Boolean
+ On Error GoTo HandleErrors
+ Dim currentFunctionName As String
+ currentFunctionName = "CheckForExcel"
+
+ CheckForExcel = False
+
+ Dim xl As Excel.application
+ Set xl = GetExcelInstance
+
+
+ If xl.Workbooks.count > 0 Then
+ CheckForExcel = True
+ End If
+
+FinalExit:
+ If Not xl Is Nothing Then
+ If xl.Workbooks.count = 0 Then
+ xl.Quit
+ End If
+ End If
+
+ Set xl = Nothing
+
+ Exit Function
+
+HandleErrors:
+ Set xl = Nothing
+
+ WriteDebug currentFunctionName & " : " & Err.Number & " " & Err.Description & " " & Err.Source
+ Resume FinalExit
+End Function
+
+Public Function GetIniSetting(key As String) As String
+
+ If mIniFilePath = "" Or key = "" Then Exit Function
+
+ GetIniSetting = ProfileGetItem(WIZARD_NAME, key, "", mIniFilePath)
+End Function
+
+Sub WriteIniSetting(key As String, value As String)
+
+ If mIniFilePath = "" Or key = "" Then Exit Sub
+
+ Call WritePrivateProfileString(WIZARD_NAME, key, value, mIniFilePath)
+End Sub
+
+Private Sub lblSetupComplete_Click(Index As Integer)
+
+End Sub
+
+Private Function CheckNeededFiles(missingFile As String) As Boolean
+
+ Dim fso As New FileSystemObject
+ Dim filePath As String
+
+ CheckNeededFiles = False
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CWORD_DRIVER_FILE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CEXCEL_DRIVER_FILE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CPP_DRIVER_FILE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CLAUNCH_DRIVERS_EXE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CMSO_KILL_EXE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CRESULTS_TEMPLATE_FILE)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ filePath = fso.GetAbsolutePathName(CBASE_RESOURCE_DIR & "\" & CRESOURCE_DLL)
+ If Not fso.FileExists(filePath) Then
+ missingFile = filePath
+ Exit Function
+ End If
+
+ CheckNeededFiles = True
+End Function
diff --git a/migrationanalysis/src/wizard/makefile.mk b/migrationanalysis/src/wizard/makefile.mk
new file mode 100644
index 000000000000..38aaa38a7f94
--- /dev/null
+++ b/migrationanalysis/src/wizard/makefile.mk
@@ -0,0 +1,118 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=migrationanalysis
+TARGET=wizard
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+PAW_APPSDEST:=$(BIN)$/ProAnalysisWizard
+ALTERNATE_SRC:=..$/exe
+
+PAW_DATDEST:=$(PAW_APPSDEST)$/Resources
+
+PROJECTDEST:=$(BIN)$/ProAnalysisWizard
+RCFILES:=$(RES)$/$(TARGET).rc
+RESFILE:=$(RES)$/$(TARGET).res
+ULFFILES:=$(TARGET).ulf
+.IF "$(WITH_LANG)"!=""
+ULFDIR:=$(COMMONMISC)$/$(TARGET)
+.ELSE # "$(WITH_LANG)"!=""
+ULFDIR:=.
+.ENDIF # "$(WITH_LANG)"!=""
+MANIFEST:=$(RES)$/DocAnalysisWizard.exe.manifest
+
+LAUNCHER_APP:= $(BIN)$/LaunchDrivers.exe
+
+BASIC_APPS:= \
+ $(LAUNCHER_APP) \
+ $(PAW_APPSDEST)$/ProAnalysisWizard.exe
+
+BASIC_VBP:= \
+ $(BIN)$/LaunchDrivers.vbp \
+ $(PAW_APPSDEST)$/ProAnalysisWizard.vbp
+
+PAW_RES_DLLS:=$(PAW_DATDEST)$/Resources.dll
+PAW_LAUNCHER:=$(PAW_DATDEST)$/LaunchDrivers.exe
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : $(BASIC_APPS) $(PAW_RES_DLLS) $(PAW_LAUNCHER)
+
+$(MANIFEST) : $$(@:f)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
+
+.IF "$(VB6_LOCATION)" != ""
+
+$(BASIC_VBP) : $$(@:b).vbp
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(@:f) $@
+
+$(BASIC_APPS) : $(BASIC_VBP)
+ -$(MKDIRHIER) $(@:d)
+ cd $(@:d) && "$(VB6_LOCATION)$/vb6.exe" /m $(@:b).vbp
+
+$(PAW_LAUNCHER) : $(LAUNCHER_APP)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(LAUNCHER_APP) $@
+
+.ELSE # "$(VB6_LOCATION)" != ""
+
+$(BASIC_APPS) : $(ALTERNATE_SRC)$/$$(@:f)
+ @echo "------------------------------------"
+ @echo "No VB6 found: using prebuild wizards"
+ @echo "------------------------------------"
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(ALTERNATE_SRC)$/$(@:f) $@
+
+$(PAW_LAUNCHER) : $(ALTERNATE_SRC)$/$$(@:f)
+ -$(MKDIRHIER) $(@:d)
+ $(COPY) $(ALTERNATE_SRC)$/$(@:f) $@
+
+.ENDIF # "$(VB6_LOCATION)" != ""
+
+# Generate the native Windows resource file
+# using lngconvex.exe
+
+$(RCFILES) : $(MANIFEST) $(ULFDIR)$/$(TARGET).ulf makefile.mk rcfooter.txt rcheader.txt rctmpl.txt
+ $(WRAPCMD) lngconvex.exe -ulf $(ULFDIR)$/$(TARGET).ulf -rc $(RES)$/$(TARGET).rc -rct rctmpl.txt -rch rcheader.txt -rcf rcfooter.txt
+
+$(PAW_RES_DLLS) : $(RCFILES)
+ -$(MKDIRHIER) $(@:d)
+ link /NOENTRY /DLL /MACHINE:X86 /OUT:$@ $(RESFILE)
+
diff --git a/migrationanalysis/src/wizard/rcfooter.txt b/migrationanalysis/src/wizard/rcfooter.txt
new file mode 100644
index 000000000000..d3f5a12faa99
--- /dev/null
+++ b/migrationanalysis/src/wizard/rcfooter.txt
@@ -0,0 +1 @@
+
diff --git a/migrationanalysis/src/wizard/rcheader.txt b/migrationanalysis/src/wizard/rcheader.txt
new file mode 100644
index 000000000000..63c805d26604
--- /dev/null
+++ b/migrationanalysis/src/wizard/rcheader.txt
@@ -0,0 +1,17 @@
+//_START_OF_HEADER
+/////////////////////////////////////////////////////////////////////////////
+//
+// Document Analysis Wizard - Resources
+//
+
+#include "res_defines.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Required for Windows XP look and feel support
+//
+#define RT_MANIFEST 24
+
+1 RT_MANIFEST "DocAnalysisWizard.exe.manifest"
+
+
diff --git a/migrationanalysis/src/wizard/rctmpl.txt b/migrationanalysis/src/wizard/rctmpl.txt
new file mode 100644
index 000000000000..147db9f68378
--- /dev/null
+++ b/migrationanalysis/src/wizard/rctmpl.txt
@@ -0,0 +1,126 @@
+// String Table
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ RID_STR_ANALYZE_NUM_DOCS %ANALYZE_NUM_DOCS%
+ RID_STR_ANALYZE_RUN_TOOL %ANALYZE_RUN_TOOL%
+ RID_STR_ANALYZE_SETUP_COMPLETE %ANALYZE_SETUP_COMPLETE%
+ RID_STR_ANALYZE_VIEW_RESULTS %ANALYZE_VIEW_RESULTS%
+ RID_STR_ANALYZE_PREPARE_DOCS %ANALYZE_PREPARE_DOCS%
+ RID_STR_ANALYZE_START %ANALYZE_START%
+ RID_STR_ANALYZE_COMPLETED %ANALYZE_COMPLETED%
+ RID_STR_ANALYZE_VIEW_NOW %ANALYZE_VIEW_NOW%
+ RID_STR_ANALYZE_VIEW_LATER %ANALYZE_VIEW_LATER%
+ RID_STR_ANALYSE_NOT_RUN %ANALYSE_NOT_RUN%
+ RID_STR_ANALYZE_DOCUMENTS %ANALYZE_DOCUMENTS%
+ RID_STR_ANALYZE_TEMPLATES %ANALYZE_TEMPLATES%
+ RID_STR_ANALYZE_DOCUMENTS_XLS %ANALYZE_DOCUMENTS_XLS%
+ RID_STR_ANALYZE_DOCUMENTS_PPT %ANALYZE_DOCUMENTS_PPT%
+ RID_STR_ERROR_AUTOMATION_SERVER_FAILED %ERROR_AUTOMATION_SERVER_FAILED%
+ RID_STR_ERROR_CANNOT_CREATE_RESULTS_DIRECTORY %ERROR_CANNOT_CREATE_RESULTS_DIRECTORY%
+ RID_STR_ERROR_CHOOSE_DOCUMENT_TYPE %ERROR_CHOOSE_DOCUMENT_TYPE%
+ RID_STR_ERROR_CREATE_FILE %ERROR_CREATE_FILE%
+ RID_STR_ERROR_EXCEL_ANALYSIS_FAILED %ERROR_EXCEL_ANALYSIS_FAILED%
+ RID_STR_ERROR_EXCEL_OPEN %ERROR_EXCEL_OPEN%
+ RID_STR_ERROR_MACRO_SECURITY_SET %ERROR_MACRO_SECURITY_SET%
+ RID_STR_ERROR_MISSING_DOCUMENTS_DIRECTORY %ERROR_MISSING_DOCUMENTS_DIRECTORY%
+ RID_STR_ERROR_MISSING_EXCEL_DRIVER %ERROR_MISSING_EXCEL_DRIVER%
+ RID_STR_ERROR_MISSING_ISSUES_LIST %ERROR_MISSING_ISSUES_LIST%
+ RID_STR_ERROR_MISSING_MIGRATION_RESULTS %ERROR_MISSING_MIGRATION_RESULTS%
+ RID_STR_ERROR_MISSING_POWERPOINT_DRIVER %ERROR_MISSING_POWERPOINT_DRIVER%
+ RID_STR_ERROR_MISSING_README %ERROR_MISSING_README%
+ RID_STR_ERROR_MISSING_RESULTS_TEMPLATE %ERROR_MISSING_RESULTS_TEMPLATE%
+ RID_STR_ERROR_MISSING_WORD_DRIVER %ERROR_MISSING_WORD_DRIVER%
+ RID_STR_ERROR_MSOFFICE_9_REQUIRED %ERROR_MSOFFICE_9_REQUIRED%
+ RID_STR_ERROR_NO_RESULTS_DIRECTORY %ERROR_NO_RESULTS_DIRECTORY%
+ RID_STR_ERROR_POWERPOINT_ANALYSIS_FAILED %ERROR_POWERPOINT_ANALYSIS_FAILED%
+ RID_STR_ERROR_RESULTS_DIRECTORY_DOES_NOT_EXIST %ERROR_RESULTS_DIRECTORY_DOES_NOT_EXIST%
+ RID_STR_ERROR_RESULTS_SPREADSHEET_OPEN %ERROR_RESULTS_SPREADSHEET_OPEN%
+ RID_STR_ERROR_VERSION_MISMATCH %ERROR_VERSION_MISMATCH%
+ RID_STR_ERROR_WIN2000_REQUIRED %ERROR_WIN2000_REQUIRED%
+ RID_STR_ERROR_WORD_ANALYSIS_FAILED %ERROR_WORD_ANALYSIS_FAILED%
+ RID_STR_ERROR_APP_NOT_INSTALLED %ERROR_APP_NOT_INSTALLED%
+ RID_STR_ERROR_CDROM_NOT_ALLOWED %ERROR_CDROM_NOT_ALLOWED%
+ RID_STR_ERROR_CDROM_NOT_READY %ERROR_CDROM_NOT_READY%
+ RID_STR_ERROR_NO_WRITE_TO_READ_ONLY_FOLDER %ERROR_NO_WRITE_TO_READ_ONLY_FOLDER%
+ RID_STR_ERROR_APPLICATION_STILL_RUNNING %ERROR_APPLICATION_STILL_RUNNING%
+ RID_STR_ERROR_MISSING_IMPORTANT_FILE %ERROR_MISSING_IMPORTANT_FILE%
+ RID_STR_INTRODUCTION %INTRODUCTION%
+ RID_STR_INTRODUCTION_INTRO1 %INTRODUCTION_INTRO1%
+ RID_STR_INTRODUCTION_INTRO2 %INTRODUCTION_INTRO2%
+ RID_STR_INTRODUCTION_INTRO3 %INTRODUCTION_INTRO3%
+ RID_STR_NAVBAR_BACK_BTN %NAVBAR_BACK_BTN%
+ RID_STR_NAVBAR_EXIT_BTN %NAVBAR_EXIT_BTN%
+ RID_STR_NAVBAR_FINISH_BTN %NAVBAR_FINISH_BTN%
+ RID_STR_NAVBAR_HELP_BTN %NAVBAR_HELP_BTN%
+ RID_STR_NAVBAR_NEXT_BTN %NAVBAR_NEXT_BTN%
+ RID_STR_OTHER_APPLICATON_LOG_PATH %OTHER_APPLICATON_LOG_PATH%
+ RID_STR_OTHER_README_PATH %OTHER_README_PATH%
+ RID_STR_OTHER_RUNNING %OTHER_RUNNING%
+ RID_STR_OTHER_SELECT_ANALYZE_DIRECTORY %OTHER_SELECT_ANALYZE_DIRECTORY%
+ RID_STR_OTHER_SELECT_RESULTS_DIRECTORY %OTHER_SELECT_RESULTS_DIRECTORY%
+ RID_STR_OTHER_XML_RESULTS %OTHER_XML_RESULTS%
+ RID_STR_DOCUMENTS_CHOOSE_DOCUMENTS %DOCUMENTS_CHOOSE_DOCUMENTS%
+ RID_STR_DOCUMENTS_DOCUMENTS_DIRECTORY %DOCUMENTS_DOCUMENTS_DIRECTORY%
+ RID_STR_DOCUMENTS_INCLUDE_SUBDIRECTORIES %DOCUMENTS_INCLUDE_SUBDIRECTORIES%
+ RID_STR_DOCUMENTS_ROOT_C %DOCUMENTS_ROOT_C%
+ RID_STR_DOCUMENTS_CHOOSE_DOC_TYPES %DOCUMENTS_CHOOSE_DOC_TYPES%
+ RID_STR_DOCUMENTS_CHOOSE_DOC %DOCUMENTS_CHOOSE_DOC%
+ RID_STR_DOCUMENTS_CHOOSE_DOT %DOCUMENTS_CHOOSE_DOT%
+ RID_STR_DOCUMENTS_CHOOSE_EXCEL %DOCUMENTS_CHOOSE_EXCEL%
+ RID_STR_DOCUMENTS_CHOOSE_POT %DOCUMENTS_CHOOSE_POT%
+ RID_STR_DOCUMENTS_CHOOSE_POWERPOINT %DOCUMENTS_CHOOSE_POWERPOINT%
+ RID_STR_DOCUMENTS_CHOOSE_PPT %DOCUMENTS_CHOOSE_PPT%
+ RID_STR_DOCUMENTS_CHOOSE_WORD %DOCUMENTS_CHOOSE_WORD%
+ RID_STR_DOCUMENTS_CHOOSE_XLS %DOCUMENTS_CHOOSE_XLS%
+ RID_STR_DOCUMENTS_CHOOSE_XLT %DOCUMENTS_CHOOSE_XLT%
+ RID_STR_RESULTS_CHOOSE_OPTIONS %RESULTS_CHOOSE_OPTIONS%
+ RID_STR_RESULTS_RESULTS_SPREADSHEET %RESULTS_RESULTS_SPREADSHEET%
+ RID_STR_RESULTS_ANALYSIS_XLS %RESULTS_ANALYSIS_XLS%
+ RID_STR_RESULTS_RESULTS_DIRECTORY %RESULTS_RESULTS_DIRECTORY%
+ RID_STR_RESULTS_CHOOSE_SAVE_OPTIONS %RESULTS_CHOOSE_SAVE_OPTIONS%
+ RID_STR_RESULTS_CHOOSE_PROMPT %RESULTS_CHOOSE_PROMPT%
+ RID_STR_RESULTS_CHOOSE_OVERWRITE %RESULTS_CHOOSE_OVERWRITE%
+ RID_STR_RESULTS_CHOOSE_APPEND %RESULTS_CHOOSE_APPEND%
+ RID_STR_SIDEBAR_INTRODUCTION %SIDEBAR_INTRODUCTION%
+ RID_STR_SIDEBAR_DOCUMENTS %SIDEBAR_DOCUMENTS%
+ RID_STR_SIDEBAR_RESULTS %SIDEBAR_RESULTS%
+ RID_STR_SIDEBAR_ANALYZE %SIDEBAR_ANALYZE%
+ RID_STR_SIDEBAR_STEPS %SIDEBAR_STEPS%
+ RID_STR_TITLE %TITLE%
+ RID_STR_PRODUCTNAME %PRODUCTNAME%
+ RID_STR_TITLE_PREP %TITLE_PREP%
+ RID_STR_SIDEBAR_ANALYZE_PREP %SIDEBAR_ANALYZE_PREP%
+ RID_STR_INTRODUCTION_INTRO1_PREP %INTRODUCTION_INTRO1_PREP%
+ RID_STR_INTRODUCTION_INTRO2_PREP %INTRODUCTION_INTRO2_PREP%
+ RID_STR_INTRODUCTION_INTRO3_PREP %INTRODUCTION_INTRO3_PREP%
+ RID_STR_DOCUMENTS_CHOOSE_DOCUMENTS_PREP %DOCUMENTS_CHOOSE_DOCUMENTS_PREP%
+ RID_STR_DOCUMENTS_CHOOSE_DOC_TYPES_PREP %DOCUMENTS_CHOOSE_DOC_TYPES_PREP%
+ RID_STR_DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP %DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP%
+ RID_STR_IGNORE_OLDER_CB_ID %IGNORE_OLDER_CB_LABEL%
+ RID_STR_IGNORE_OLDER_3_MONTHS_ID %IGNORE_OLDER_3_MONTHS_TEXT%
+ RID_STR_IGNORE_OLDER_6_MONTHS_ID %IGNORE_OLDER_6_MONTHS_TEXT%
+ RID_STR_IGNORE_OLDER_12_MONTHS_ID %IGNORE_OLDER_12_MONTHS_TEXT%
+ RID_STR_RESULTS_CHOOSE_OPTIONS_PREP %RESULTS_CHOOSE_OPTIONS_PREP%
+ RID_STR_RESULTS_ANALYSIS_XLS_PREP %RESULTS_ANALYSIS_XLS_PREP%
+ RID_STR_ANALYZE_IGNORED_DOCS %ANALYZE_IGNORED_DOCS%
+ RID_STR_ANALYZE_NUM_DOCS_PREP %ANALYZE_NUM_DOCS_PREP%
+ RID_STR_ANALYZE_SETUP_COMPLETE_PREP %ANALYZE_SETUP_COMPLETE_PREP%
+ RID_STR_OTHER_PLEASE_REFER_TO_README_PREP %OTHER_PLEASE_REFER_TO_README_PREP%
+ RID_STR_OTHER_XML_RESULTS_PREP %OTHER_XML_RESULTS_PREP%
+ RID_STR_OTHER_PREPARE_PROMPT_PREP %OTHER_PREPARE_PROMPT_PREP%
+ RID_STR_OTHER_PREPARE_COMPLETED_PREP %OTHER_PREPARE_COMPLETED_PREP%
+ RID_STR_PROGRESS_CAPTION %PROGRESS_CAPTION%
+ RID_STR_PROGRESS_ABORTING %PROGRESS_ABORTING%
+ RID_STR_PROGRESS_PATH_LABEL %PROGRESS_PATH_LABEL%
+ RID_STR_PROGRESS_FILE_LABEL %PROGRESS_FILE_LABEL%
+ RID_STR_PROGRESS_INFO_LABEL %PROGRESS_INFO_LABEL%
+ RID_STR_PROGRESS_WAIT_LABEL %PROGRESS_WAIT_LABEL%
+ RID_STR_SEARCH_CAPTION %SEARCH_CAPTION%
+ RID_STR_SEARCH_INFO_LABEL %SEARCH_INFO_LABEL%
+ RID_STR_SEARCH_FOUND_LABEL %SEARCH_FOUND_LABEL%
+ RID_STR_TERMINATE_CAPTION %TERMINATE_CAPTION%
+ RID_STR_TERMINATE_INFO %TERMINATE_INFO%
+ RID_STR_TERMINATE_YES %TERMINATE_YES%
+ RID_STR_TERMINATE_NO %TERMINATE_NO%
+END
diff --git a/migrationanalysis/src/wizard/res_defines.h b/migrationanalysis/src/wizard/res_defines.h
new file mode 100644
index 000000000000..a3e14d3a3b9b
--- /dev/null
+++ b/migrationanalysis/src/wizard/res_defines.h
@@ -0,0 +1,150 @@
+#ifndef RES_DEFINES_H_INCLUDED
+#define RES_DEFINES_H_INCLUDED
+
+#define RID_STR_ANALYZE_SETUP_COMPLETE 1400
+#define RID_STR_ANALYZE_NUM_DOCS 1401
+#define RID_STR_ANALYZE_RUN_TOOL 1404
+#define RID_STR_ANALYZE_VIEW_RESULTS 1406
+#define RID_STR_ANALYZE_COMPLETED 1412
+#define RID_STR_ANALYZE_START 1413
+#define RID_STR_ANALYZE_VIEW_NOW 1414
+#define RID_STR_ANALYZE_VIEW_LATER 1415
+#define RID_STR_ANALYSE_NOT_RUN 1416
+
+#define RID_STR_ANALYZE_PREPARE_DOCS 1411
+
+#define RID_STR_ANALYZE_DOCUMENTS 1402
+#define RID_STR_ANALYZE_TEMPLATES 1403
+#define RID_STR_ANALYZE_DOCUMENTS_XLS 1408
+#define RID_STR_ANALYZE_DOCUMENTS_PPT 1409
+
+#define RID_STR_ERROR_AUTOMATION_SERVER_FAILED 1920
+#define RID_STR_ERROR_CANNOT_CREATE_RESULTS_DIRECTORY 1904
+#define RID_STR_ERROR_CHOOSE_DOCUMENT_TYPE 1902
+#define RID_STR_ERROR_CREATE_FILE 1922
+#define RID_STR_ERROR_EXCEL_ANALYSIS_FAILED 1907
+#define RID_STR_ERROR_EXCEL_OPEN 1918
+#define RID_STR_ERROR_MACRO_SECURITY_SET 1919
+#define RID_STR_ERROR_MISSING_DOCUMENTS_DIRECTORY 1901
+#define RID_STR_ERROR_MISSING_EXCEL_DRIVER 1906
+#define RID_STR_ERROR_MISSING_ISSUES_LIST 1915
+#define RID_STR_ERROR_MISSING_MIGRATION_RESULTS 1900
+#define RID_STR_ERROR_MISSING_POWERPOINT_DRIVER 1911
+#define RID_STR_ERROR_MISSING_README 1910
+#define RID_STR_ERROR_MISSING_RESULTS_TEMPLATE 1905
+#define RID_STR_ERROR_MISSING_WORD_DRIVER 1908
+#define RID_STR_ERROR_MSOFFICE_9_REQUIRED 1913
+#define RID_STR_ERROR_NO_RESULTS_DIRECTORY 1921
+#define RID_STR_ERROR_POWERPOINT_ANALYSIS_FAILED 1912
+#define RID_STR_ERROR_RESULTS_DIRECTORY_DOES_NOT_EXIST 1903
+#define RID_STR_ERROR_RESULTS_SPREADSHEET_OPEN 1917
+#define RID_STR_ERROR_VERSION_MISMATCH 1914
+#define RID_STR_ERROR_WIN2000_REQUIRED 1916
+#define RID_STR_ERROR_WORD_ANALYSIS_FAILED 1909
+#define RID_STR_ERROR_APP_NOT_INSTALLED 1924
+#define RID_STR_ERROR_CDROM_NOT_ALLOWED 1925
+#define RID_STR_ERROR_CDROM_NOT_READY 1926
+#define RID_STR_ERROR_NO_WRITE_TO_READ_ONLY_FOLDER 1927
+#define RID_STR_ERROR_APPLICATION_STILL_RUNNING 1928
+#define RID_STR_ERROR_MISSING_IMPORTANT_FILE 1929
+
+
+#define RID_STR_INTRODUCTION 1100
+#define RID_STR_INTRODUCTION_INTRO1 1101
+#define RID_STR_INTRODUCTION_INTRO2 1102
+#define RID_STR_INTRODUCTION_INTRO3 1104
+
+#define RID_STR_NAVBAR_BACK_BTN 1021
+#define RID_STR_NAVBAR_EXIT_BTN 1024
+#define RID_STR_NAVBAR_FINISH_BTN 1023
+#define RID_STR_NAVBAR_HELP_BTN 1020
+#define RID_STR_NAVBAR_NEXT_BTN 1022
+
+
+#define RID_STR_RESULTS_CHOOSE_OPTIONS 1300
+#define RID_STR_RESULTS_RESULTS_SPREADSHEET 1301
+#define RID_STR_RESULTS_ANALYSIS_XLS 1302
+#define RID_STR_RESULTS_RESULTS_DIRECTORY 1304
+#define RID_STR_RESULTS_CHOOSE_SAVE_OPTIONS 1311
+#define RID_STR_RESULTS_CHOOSE_PROMPT 1312
+#define RID_STR_RESULTS_CHOOSE_OVERWRITE 1313
+#define RID_STR_RESULTS_CHOOSE_APPEND 1314
+
+#define RID_STR_OTHER_APPLICATON_LOG_PATH 1812
+#define RID_STR_OTHER_RUNNING 1810
+#define RID_STR_OTHER_SELECT_ANALYZE_DIRECTORY 1806
+#define RID_STR_OTHER_SELECT_RESULTS_DIRECTORY 1807
+#define RID_STR_OTHER_XML_RESULTS 1815
+#define RID_STR_OTHER_README_PATH 1805
+
+#define RID_STR_DOCUMENTS_CHOOSE_DOCUMENTS 1200
+#define RID_STR_DOCUMENTS_DOCUMENTS_DIRECTORY 1201
+#define RID_STR_DOCUMENTS_INCLUDE_SUBDIRECTORIES 1202
+#define RID_STR_DOCUMENTS_ROOT_C 1205
+#define RID_STR_DOCUMENTS_CHOOSE_DOC_TYPES 1206
+#define RID_STR_DOCUMENTS_CHOOSE_WORD 1207
+#define RID_STR_DOCUMENTS_CHOOSE_DOC 1208
+#define RID_STR_DOCUMENTS_CHOOSE_DOT 1209
+#define RID_STR_DOCUMENTS_CHOOSE_EXCEL 1210
+#define RID_STR_DOCUMENTS_CHOOSE_XLS 1211
+#define RID_STR_DOCUMENTS_CHOOSE_XLT 1212
+#define RID_STR_DOCUMENTS_CHOOSE_POWERPOINT 1213
+#define RID_STR_DOCUMENTS_CHOOSE_PPT 1214
+#define RID_STR_DOCUMENTS_CHOOSE_POT 1215
+
+#define RID_STR_SIDEBAR_STEPS 1040
+#define RID_STR_SIDEBAR_INTRODUCTION 1041
+#define RID_STR_SIDEBAR_DOCUMENTS 1042
+#define RID_STR_SIDEBAR_RESULTS 1043
+#define RID_STR_SIDEBAR_ANALYZE 1044
+
+#define RID_STR_TITLE 1000
+#define RID_STR_PRODUCTNAME 1001
+
+
+// Preparation
+#define RID_STR_SIDEBAR_ANALYZE_PREP 1074
+#define RID_STR_TITLE_PREP 1030
+
+#define RID_STR_INTRODUCTION_INTRO1_PREP 1131
+#define RID_STR_INTRODUCTION_INTRO2_PREP 1132
+#define RID_STR_INTRODUCTION_INTRO3_PREP 1134
+
+#define RID_STR_DOCUMENTS_CHOOSE_DOCUMENTS_PREP 1230
+#define RID_STR_DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP 1232
+#define RID_STR_DOCUMENTS_CHOOSE_DOC_TYPES_PREP 1236
+
+#define RID_STR_IGNORE_OLDER_CB_ID 1231
+#define RID_STR_IGNORE_OLDER_3_MONTHS_ID 1233
+#define RID_STR_IGNORE_OLDER_6_MONTHS_ID 1234
+#define RID_STR_IGNORE_OLDER_12_MONTHS_ID 1235
+
+#define RID_STR_RESULTS_CHOOSE_OPTIONS_PREP 1330
+#define RID_STR_RESULTS_ANALYSIS_XLS_PREP 1332
+
+#define RID_STR_ANALYZE_NUM_DOCS_PREP 1431
+#define RID_STR_ANALYZE_SETUP_COMPLETE_PREP 1430
+#define RID_STR_ANALYZE_IGNORED_DOCS 1435
+
+#define RID_STR_OTHER_PLEASE_REFER_TO_README_PREP 1838
+#define RID_STR_OTHER_XML_RESULTS_PREP 1845
+#define RID_STR_OTHER_PREPARE_PROMPT_PREP 1846
+#define RID_STR_OTHER_PREPARE_COMPLETED_PREP 1847
+
+// Progress
+#define RID_STR_PROGRESS_CAPTION 1820
+#define RID_STR_PROGRESS_ABORTING 1821
+#define RID_STR_PROGRESS_PATH_LABEL 1822
+#define RID_STR_PROGRESS_FILE_LABEL 1823
+#define RID_STR_PROGRESS_INFO_LABEL 1824
+#define RID_STR_PROGRESS_WAIT_LABEL 1825
+
+#define RID_STR_SEARCH_CAPTION 1826
+#define RID_STR_SEARCH_INFO_LABEL 1827
+#define RID_STR_SEARCH_FOUND_LABEL 1828
+
+#define RID_STR_TERMINATE_CAPTION 1830
+#define RID_STR_TERMINATE_INFO 1831
+#define RID_STR_TERMINATE_YES 1832
+#define RID_STR_TERMINATE_NO 1833
+#endif
diff --git a/migrationanalysis/src/wizard/wizard.ulf b/migrationanalysis/src/wizard/wizard.ulf
new file mode 100644
index 000000000000..116b1b61b7b9
--- /dev/null
+++ b/migrationanalysis/src/wizard/wizard.ulf
@@ -0,0 +1,352 @@
+[%ANALYZE_NUM_DOCS%]
+en-US = "A total of <TOPIC> documents will be analyzed:"
+
+[%ANALYZE_RUN_TOOL%]
+en-US = "Run analysis"
+
+[%ANALYZE_SETUP_COMPLETE%]
+en-US = "Run the analysis and view the results"
+
+[%ANALYZE_VIEW_RESULTS%]
+en-US = "View results"
+
+[%ANALYZE_PREPARE_DOCS%]
+en-US = "Prepare Documents for Migration"
+
+[%ANALYZE_START%]
+en-US = "The analysis will now be carried out on <TOPIC> documents.<CR><CR>Please note this may take some time as each document must be opened<CR>in order to analyze it.<CR><CR>A message will appear when the analysis is complete."
+
+[%ANALYZE_COMPLETED%]
+en-US = "The analysis has been completed successfully.<CR><CR>Click on OK to see the results now."
+
+[%ANALYZE_VIEW_NOW%]
+en-US = "View Now"
+
+[%ANALYZE_VIEW_LATER%]
+en-US = "View Later"
+
+[%ANALYSE_NOT_RUN%]
+en-US = "The document analysis has not been run yet.<CR><CR>Click on OK to leave wizard now.<CR>Press 'Cancel' button to return to the Wizard. Then press 'Run Analysis' button to start the analysis."
+
+[%ANALYZE_DOCUMENTS%]
+en-US = "<TOPIC> Documents"
+
+[%ANALYZE_TEMPLATES%]
+en-US = "<TOPIC> Templates"
+
+[%ANALYZE_DOCUMENTS_XLS%]
+en-US = "<TOPIC> Spreadsheets"
+
+[%ANALYZE_DOCUMENTS_PPT%]
+en-US = "<TOPIC> Presentations"
+
+[%ERROR_AUTOMATION_SERVER_FAILED%]
+en-US = "<TOPIC> The analysis failed to connect to the <TOPIC> automation server.<CR><CR>Please ensure that all instances of <TOPIC> are closed before rerunning the analysis<CR>and check that the machine has sufficient free memory to run the analysis.<CR><CR>If necessary use the Task Manager to remove any frozen instances of <TOPIC>,<CR>using the Applications Tab - End Task"
+
+[%ERROR_CANNOT_CREATE_RESULTS_DIRECTORY%]
+en-US = "Can't create the directory: <CR><TOPIC><CR><CR>Check that you are creating only a single directory at the lowest level and <CR>that you can write to this disk and <CR>that it is not full."
+
+[%ERROR_CHOOSE_DOCUMENT_TYPE%]
+en-US = "Please choose at least one document type to analyze."
+
+[%ERROR_CREATE_FILE%]
+en-US = "Can't create the file: <CR><TOPIC><CR><CR>Please check that you have write permission to this directory."
+
+[%ERROR_EXCEL_ANALYSIS_FAILED%]
+en-US = "Excel Analysis Failed on document: <CR><CR><TOPIC><CR><CR>Please remove this file from the Documents Directory and ensure that all instances of Excel<CR>are closed before rerunning the analysis<CR><CR>If necessary use the Task Manager to remove any frozen instances of Excel,<CR>using the Applications Tab - End Task"
+
+[%ERROR_EXCEL_OPEN%]
+en-US = "The wizard cannot run the analysis if Excel is open. The wizard needs<CR>exclusive access to Excel in order to create the results spreadsheet.<CR><CR>Please close Excel so the analysis can be run."
+
+[%ERROR_MACRO_SECURITY_SET%]
+en-US = "Unable to detect or analyze <TOPIC> macros due to the following <TOPIC> macro security setting:<CR> <TOPIC> main menu:<CR> Tools-> Macro-> Security...<CR> Trusted Sources tab:<CR> Trust access to Visual Basic Project - unchecked<CR>To analyze macros you must check this checkbox before running the analysis.<CR><CR>Do you wish to continue the analysis without detecting and analyzing <TOPIC> macros?"
+
+[%ERROR_MISSING_DOCUMENTS_DIRECTORY%]
+en-US = "Documents Directory does not exist.<CR><CR>Please choose another directory."
+
+[%ERROR_MISSING_EXCEL_DRIVER%]
+en-US = "Missing Excel Analysis Driver Spreadsheet: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MISSING_ISSUES_LIST%]
+en-US = "Missing issues list:<CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MISSING_MIGRATION_RESULTS%]
+en-US = "Missing Analysis Results Document: <CR><TOPIC><CR><CR>Please check that you have write permissions on the <CR>results directory and rerun the analysis.<CR>"
+
+[%ERROR_MISSING_POWERPOINT_DRIVER%]
+en-US = "Missing PowerPoint Analysis Driver Document: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MISSING_README%]
+en-US = "Missing Help Documentation: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MISSING_RESULTS_TEMPLATE%]
+en-US = "Missing Results Template: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MISSING_WORD_DRIVER%]
+en-US = "Missing Word Analysis Driver Document: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%ERROR_MSOFFICE_9_REQUIRED%]
+en-US = "The wizard requires Microsoft Office version 9.0 or above to be installed.<CR><CR>The currently installed version <TOPIC> is not supported."
+
+[%ERROR_NO_RESULTS_DIRECTORY%]
+en-US = "Results Directory has not been specified.<CR><CR>Please enter a results directory."
+
+[%ERROR_POWERPOINT_ANALYSIS_FAILED%]
+en-US = "PowerPoint Analysis Failed on document: <CR><CR><TOPIC><CR><CR>Please remove this file from the Documents Directory and ensure that all instances of PowerPoint<CR>are closed before rerunning the analysis<CR><CR>If necessary use the Task Manager to remove any frozen instances of PowerPoint,<CR>using the Applications Tab - End Task"
+
+[%ERROR_RESULTS_DIRECTORY_DOES_NOT_EXIST%]
+en-US = "Results Directory does not exist.<CR><CR>Do you want to create the directory?"
+
+[%ERROR_RESULTS_SPREADSHEET_OPEN%]
+en-US = "The wizard needs to write to the results spreadsheet:<CR><TOPIC><CR><CR>Excel currently has this spreadsheet open. It must be closed before the analysis can be run.<CR><CR>If Excel does not appear to be running please check the Task Manager and remove any Excel.exe processes."
+
+[%ERROR_VERSION_MISMATCH%]
+en-US = "There is a version mismatch between the Wizard [<TOPIC>] and the Issues list [<TOPIC2>]<CR>used to cutomize the reporting of minor issues.<CR><CR>Please contact support."
+
+[%ERROR_WIN2000_REQUIRED%]
+en-US = "To run this wizard, Windows 2000 or newer is required.<CR><CR>The current operating system <TOPIC> is not supported."
+
+[%ERROR_WORD_ANALYSIS_FAILED%]
+en-US = "Word Analysis Failed on document: <CR><CR><TOPIC><CR><CR>Please remove this file from the Documents Directory and ensure that all instances of Word<CR>are closed before rerunning the analysis<CR><CR>If necessary use the Task Manager to remove any frozen instances of Word,<CR>using the Applications Tab - End Task"
+
+[%ERROR_APP_NOT_INSTALLED%]
+en-US = "The wizard requires Microsoft <TOPIC> version 9.0 or above to be installed.<CR><CR>Please install and rerun the analysis."
+
+[%ERROR_APPLICATION_STILL_RUNNING%]
+en-US = "The following applications are still running: <TOPIC>.<CR><CR>Please ensure that all instances of <TOPIC> are closed before rerunning the analysis.<CR><CR>If necessary use the Task Manager to remove any frozen instances of <TOPIC>,<CR>using the Applications Tab - End Task"
+
+[%ERROR_MISSING_IMPORTANT_FILE%]
+en-US = "A file needed for analyzing is missing: <CR><TOPIC><CR><CR>Please reinstall the application."
+
+[%INTRODUCTION%]
+en-US = "Introduction"
+
+[%INTRODUCTION_INTRO1%]
+en-US = "The <PRODUCTNAME> Document Analysis Wizard is for you to use to automatically analyze a collection of Microsoft Office documents for issues relevant to a migration to <PRODUCTNAME>."
+
+[%INTRODUCTION_INTRO2%]
+en-US = "You will be able to select which documents you want to analyze as well as where you want the results of the analysis to be saved."
+
+[%INTRODUCTION_INTRO3%]
+en-US = "The wizard will remain on screen while the analysis is carried out."
+
+[%NAVBAR_BACK_BTN%]
+en-US = "<< Back"
+
+[%NAVBAR_EXIT_BTN%]
+en-US = "Cancel"
+
+[%NAVBAR_FINISH_BTN%]
+en-US = "Finish"
+
+[%NAVBAR_HELP_BTN%]
+en-US = "Help"
+
+[%NAVBAR_NEXT_BTN%]
+en-US = "Next >>"
+
+[%OTHER_README_PATH%]
+en-US = "UserGuide_en-US.pdf"
+
+[%OTHER_RUNNING%]
+en-US = "Running ..."
+
+[%OTHER_SELECT_ANALYZE_DIRECTORY%]
+en-US = "Select a Directory to Analyze"
+
+[%OTHER_SELECT_RESULTS_DIRECTORY%]
+en-US = "Select a Directory for Analysis Results"
+
+[%OTHER_XML_RESULTS%]
+en-US = "Analysis Results have been output in XML format to: <CR><TOPIC>"
+
+[%DOCUMENTS_CHOOSE_DOCUMENTS%]
+en-US = "Choose the documents you want to analyze"
+
+[%DOCUMENTS_DOCUMENTS_DIRECTORY%]
+en-US = "Location of Microsoft Office documents"
+
+[%DOCUMENTS_INCLUDE_SUBDIRECTORIES%]
+en-US = "Include subdirectories in the analysis"
+
+[%DOCUMENTS_ROOT_C%]
+en-US = "C:\\"
+
+[%DOCUMENTS_CHOOSE_DOC_TYPES%]
+en-US = "Document types to analyze:"
+
+[%DOCUMENTS_CHOOSE_DOC%]
+en-US = "Documents (*.doc)"
+
+[%DOCUMENTS_CHOOSE_DOT%]
+en-US = "Templates (*.dot)"
+
+[%DOCUMENTS_CHOOSE_EXCEL%]
+en-US = "Excel"
+
+[%DOCUMENTS_CHOOSE_POT%]
+en-US = "Templates (*.pot)"
+
+[%DOCUMENTS_CHOOSE_POWERPOINT%]
+en-US = "PowerPoint"
+
+[%DOCUMENTS_CHOOSE_PPT%]
+en-US = "Presentations (*.ppt)"
+
+[%DOCUMENTS_CHOOSE_WORD%]
+en-US = "Word"
+
+[%DOCUMENTS_CHOOSE_XLS%]
+en-US = "Spreadsheets (*.xls)"
+
+[%DOCUMENTS_CHOOSE_XLT%]
+en-US = "Templates (*.xlt)"
+
+[%RESULTS_CHOOSE_OPTIONS%]
+en-US = "Choose where and how to save the results"
+
+[%RESULTS_RESULTS_SPREADSHEET%]
+en-US = "File name for the results spreadsheet"
+
+[%RESULTS_ANALYSIS_XLS%]
+en-US = "Analysis Results.xls"
+
+[%RESULTS_RESULTS_DIRECTORY%]
+en-US = "Location"
+
+[%RESULTS_CHOOSE_SAVE_OPTIONS%]
+en-US = "If results already exist under the same name and location:"
+
+[%RESULTS_CHOOSE_PROMPT%]
+en-US = "Ask me before overwriting"
+
+[%RESULTS_CHOOSE_OVERWRITE%]
+en-US = "Overwrite without asking me"
+
+[%RESULTS_CHOOSE_APPEND%]
+en-US = "Append the new results to the existing results"
+
+[%SIDEBAR_INTRODUCTION%]
+en-US = "1. Introduction"
+
+[%SIDEBAR_DOCUMENTS%]
+en-US = "2. Documents"
+
+[%SIDEBAR_RESULTS%]
+en-US = "3. Results"
+
+[%SIDEBAR_ANALYZE%]
+en-US = "4. Analysis"
+
+[%SIDEBAR_STEPS%]
+en-US = "Steps"
+
+[%TITLE%]
+en-US = "<PRODUCTNAME> Document Analysis Wizard"
+
+[%PRODUCTNAME%]
+en-US = "OpenOffice.org"
+
+[%TITLE_PREP%]
+en-US = "<PRODUCTNAME> Professional Analysis Wizard"
+
+[%SIDEBAR_ANALYZE_PREP%]
+en-US = "4. Analysis"
+
+[%INTRODUCTION_INTRO1_PREP%]
+en-US = "The <PRODUCTNAME> Professional Analysis Wizard is for you to use to automatically analyze a collection of Microsoft Office documents for issues relevant to a migration to <PRODUCTNAME>."
+
+[%INTRODUCTION_INTRO2_PREP%]
+en-US = "You will be able to select which documents you want to analyze as well as where you want the results of the analysis to be saved."
+
+[%INTRODUCTION_INTRO3_PREP%]
+en-US = "Where a workaround is available for a migration issue, the wizard will enable you to prepare a modified copy of the original document in which the migration issue has been resolved."
+
+[%DOCUMENTS_CHOOSE_DOCUMENTS_PREP%]
+en-US = "Choose the documents you want to analyze"
+
+[%DOCUMENTS_CHOOSE_DOC_TYPES_PREP%]
+en-US = "Document types to analyze:"
+
+[%IGNORE_OLDER_CB_LABEL%]
+en-US = "Ignore documents older than:"
+
+[%IGNORE_OLDER_3_MONTHS_TEXT%]
+en-US = "3 months"
+
+[%IGNORE_OLDER_6_MONTHS_TEXT%]
+en-US = "6 months"
+
+[%IGNORE_OLDER_12_MONTHS_TEXT%]
+en-US = "12 months"
+
+[%DOCUMENTS_INCLUDE_SUBDIRECTORIES_PREP%]
+en-US = "Include subdirectories in the analysis"
+
+[%RESULTS_CHOOSE_OPTIONS_PREP%]
+en-US = "Choose where and how to save the results"
+
+[%RESULTS_ANALYSIS_XLS_PREP%]
+en-US = "Analysis Results.xls"
+
+[%ANALYZE_NUM_DOCS_PREP%]
+en-US = "A total of <TOPIC> documents will be analyzed:"
+
+[%ANALYZE_IGNORED_DOCS%]
+en-US = "Skipped <TOPIC> documents because they were to old."
+
+[%ANALYZE_SETUP_COMPLETE_PREP%]
+en-US = "Run the analysis and view the results"
+
+[%OTHER_PLEASE_REFER_TO_README_PREP%]
+en-US = "<PRODUCTNAME> Professional Analysis Wizard <TOPIC><CR><CR>For help please refer to the User Guide in<CR>the install directory."
+
+[%OTHER_XML_RESULTS_PREP%]
+en-US = "Analysis Results have been output in XML format to: <CR><TOPIC>"
+
+[%OTHER_PREPARE_PROMPT_PREP%]
+en-US = "Prepare any documents that have Preparable Document Issues, listed in the results spreadsheet:<CR> <TOPIC><CR><CR>Prepared documents will be saved under:<CR> <TOPIC2>\prepared<CR><CR>Source documents will not be modified."
+
+[%OTHER_PREPARE_COMPLETED_PREP%]
+en-US = "Preparation completed successfully.<CR><CR>Prepared documents have been saved under:<CR><TOPIC>\prepared"
+
+[%PROGRESS_CAPTION%]
+en-US = "Analysing Microsoft Office Documents"
+
+[%PROGRESS_ABORTING%]
+en-US = "Aborting"
+
+[%PROGRESS_PATH_LABEL%]
+en-US = "Path:"
+
+[%PROGRESS_FILE_LABEL%]
+en-US = "File:"
+
+[%PROGRESS_INFO_LABEL%]
+en-US = "Please wait while wizard is analysing Microsoft Office documents."
+
+[%PROGRESS_WAIT_LABEL%]
+en-US = "Please wait while wizard is aborting the analysis."
+
+[%SEARCH_CAPTION%]
+en-US = "Scanning for Microsoft Office Documents"
+
+[%SEARCH_INFO_LABEL%]
+en-US = "Please wait while wizard is scanning for Microsoft Office documents."
+
+[%SEARCH_FOUND_LABEL%]
+en-US = "Documents found:"
+
+[%TERMINATE_CAPTION%]
+en-US = "Application not Responding"
+
+[%TERMINATE_INFO%]
+en-US = "The Microsoft Office application, used for the analysis, is currently not responding and could not be closed. Microsoft Office needs to be closed before the Wizard could start a new analysis.<CR><CR>Do you want to abort this application?<CR><CR>Please note that unsaved data of this application will be lost."
+
+[%TERMINATE_YES%]
+en-US = "Yes"
+
+[%TERMINATE_NO%]
+en-US = "No"
+
+
diff --git a/migrationanalysis/util/delzip b/migrationanalysis/util/delzip
new file mode 100644
index 000000000000..e2b3a64d3ade
--- /dev/null
+++ b/migrationanalysis/util/delzip
@@ -0,0 +1 @@
+ECHO is off
diff --git a/migrationanalysis/util/makefile.mk b/migrationanalysis/util/makefile.mk
new file mode 100644
index 000000000000..e00e4db30acc
--- /dev/null
+++ b/migrationanalysis/util/makefile.mk
@@ -0,0 +1,84 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=migrationanalysis
+TARGET=paw
+
+no_common_build_zip=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+ZIPFLAGS =
+ZIP1DIR = $(BIN)$/ProAnalysisWizard
+ZIP1TARGET = MigrationAnalysis
+ZIP1LIST = ProAnalysisWizard.exe Resources$/* Resources$/lang$/*
+
+ZIP2DIR = $(BIN)$/ProAnalysisWizard
+ZIP2TARGET = ProAnalysisWizard
+ZIP2LIST = Resources$/* Resources$/lang$/*
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+