1cdf0e10cSrcweirAttribute VB_Name = "ApplicationSpecific" 2*e76eebc6SAndrew Rist'************************************************************************* 3*e76eebc6SAndrew Rist' 4*e76eebc6SAndrew Rist' Licensed to the Apache Software Foundation (ASF) under one 5*e76eebc6SAndrew Rist' or more contributor license agreements. See the NOTICE file 6*e76eebc6SAndrew Rist' distributed with this work for additional information 7*e76eebc6SAndrew Rist' regarding copyright ownership. The ASF licenses this file 8*e76eebc6SAndrew Rist' to you under the Apache License, Version 2.0 (the 9*e76eebc6SAndrew Rist' "License"); you may not use this file except in compliance 10*e76eebc6SAndrew Rist' with the License. You may obtain a copy of the License at 11*e76eebc6SAndrew Rist' 12*e76eebc6SAndrew Rist' http://www.apache.org/licenses/LICENSE-2.0 13*e76eebc6SAndrew Rist' 14*e76eebc6SAndrew Rist' Unless required by applicable law or agreed to in writing, 15*e76eebc6SAndrew Rist' software distributed under the License is distributed on an 16*e76eebc6SAndrew Rist' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17*e76eebc6SAndrew Rist' KIND, either express or implied. See the License for the 18*e76eebc6SAndrew Rist' specific language governing permissions and limitations 19*e76eebc6SAndrew Rist' under the License. 20*e76eebc6SAndrew Rist' 21*e76eebc6SAndrew Rist'************************************************************************* 22cdf0e10cSrcweirOption Explicit 23cdf0e10cSrcweir 24cdf0e10cSrcweir'** Issue Categories 25cdf0e10cSrcweirPublic Const CID_INFORMATION_REFS = 0 26cdf0e10cSrcweirPublic Const CID_CHANGES_AND_REVIEWING = 1 27cdf0e10cSrcweirPublic Const CID_CHARTS_TABLES = 2 28cdf0e10cSrcweirPublic Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 3 29cdf0e10cSrcweirPublic Const CID_CONTROLS = 4 30cdf0e10cSrcweirPublic Const CID_FILTERS = 5 31cdf0e10cSrcweirPublic Const CID_FORMAT = 6 32cdf0e10cSrcweirPublic Const CID_FUNCTIONS = 7 33cdf0e10cSrcweirPublic Const CID_OBJECTS_GRAPHICS = 8 34cdf0e10cSrcweirPublic Const CID_PORTABILITY = 9 35cdf0e10cSrcweirPublic Const CID_VBA_MACROS = 10 36cdf0e10cSrcweirPublic Const CTOTAL_CATEGORIES = 10 37cdf0e10cSrcweir 38cdf0e10cSrcweir'** Excel - XML Issue and SubIssue strings 39cdf0e10cSrcweirPublic Const CSTR_ISSUE_CHANGES_AND_REVIEWING = "ChangesAndReviewing" 40cdf0e10cSrcweirPublic Const CSTR_ISSUE_CHARTS_TABLES = "ChartsAndTables" 41cdf0e10cSrcweirPublic Const CSTR_ISSUE_CONTROLS = "Controls" 42cdf0e10cSrcweirPublic Const CSTR_ISSUE_FUNCTIONS = "Functions" 43cdf0e10cSrcweirPublic Const CSTR_ISSUE_OBJECTS_GRAPHICS = "ObjectsAndGraphics" 44cdf0e10cSrcweir 45cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ATTRIBUTES = "CellAttributes" 46cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_DATEDIF = "DATEDIF" 47cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_EMBEDDED_CHART = "EmbeddedChart" 48cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ERROR_TYPE = "ERROR.TYPE" 49cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_EXTERNAL = "External" 50cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_INFO = "INFO" 51cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_MAX_ROWS_EXCEEDED = "MaximumRowsExceeded" 52cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_MAX_SHEETS_EXCEEDED = "MaximumSheetsExceeded" 53cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PAGE_SETUP = "PageSetup" 54cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PASSWORD_PROTECTION = "PasswordProtection" 55cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PHONETIC = "PHONETIC" 56cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_SHEET_CHART = "SheetChart" 57cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_WORKBOOK_PROTECTION = "WorkbookProtection" 58cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ZOOM = "Zoom" 59cdf0e10cSrcweir 60cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_COMPLEX = "ChartIssuesComplex" 61cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_MINOR = "ChartIssuesMinor" 62cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_PIVOT = "Pivot" 63cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_INVALID_WORKSHEET_NAME = "InvalidWorksheetName" 64cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_DB_QUERY = "DBQuery" 65cdf0e10cSrcweir 66cdf0e10cSrcweir'** END Excel - XML Issue and SubIssue strings 67cdf0e10cSrcweir 68cdf0e10cSrcweir 69cdf0e10cSrcweirPublic Const CAPPNAME_WORD = "Word" 70cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOC = ".doc" 71cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOT = ".dot" 72cdf0e10cSrcweir 73cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL = "Excel" 74cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL_DOC = ".xls" 75cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL_DOT = ".xlt" 76cdf0e10cSrcweir 77cdf0e10cSrcweirPublic Const CAPPNAME_POWERPOINT = "PowerPoint" 78cdf0e10cSrcweir'Public Const CAPPNAME_PP_DOC = ".ppt" 79cdf0e10cSrcweir'Public Const CAPPNAME_PP_DOT = ".pot" 80cdf0e10cSrcweir 81cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Document" 82cdf0e10cSrcweirPublic CAPP_DOCPROP_LOCATION As String 83cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Presentation" 84cdf0e10cSrcweir 85cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Document" 86cdf0e10cSrcweirPublic Const CAPP_XMLDOCPROP_LOCATION = "Workbook" 87cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Presentation" 88cdf0e10cSrcweir 89cdf0e10cSrcweirPublic Const CTHIS_DOCUMENT = "ThisWorkbook" 90cdf0e10cSrcweirPublic Const CTOPLEVEL_PROJECT = "VBAProject" 91cdf0e10cSrcweir 92cdf0e10cSrcweirPublic Function getAppSpecificDocExt() As String 93cdf0e10cSrcweir getAppSpecificDocExt = CAPPNAME_EXCEL_DOC 94cdf0e10cSrcweirEnd Function 95cdf0e10cSrcweirPublic Function getAppSpecificTemplateExt() As String 96cdf0e10cSrcweir getAppSpecificTemplateExt = CAPPNAME_EXCEL_DOT 97cdf0e10cSrcweirEnd Function 98cdf0e10cSrcweir 99cdf0e10cSrcweirPublic Function getAppSpecificPath() As String 100cdf0e10cSrcweir getAppSpecificPath = ActiveWorkbook.path 101cdf0e10cSrcweirEnd Function 102cdf0e10cSrcweirPublic Function getAppSpecificApplicationName() As String 103cdf0e10cSrcweir getAppSpecificApplicationName = CAPPNAME_EXCEL 104cdf0e10cSrcweirEnd Function 105cdf0e10cSrcweir 106cdf0e10cSrcweirPublic Function getAppSpecificCustomDocProperties(currDoc As Workbook) As DocumentProperties 107cdf0e10cSrcweir Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties 108cdf0e10cSrcweirEnd Function 109cdf0e10cSrcweirPublic Function getAppSpecificCommentBuiltInDocProperty(currDoc As Workbook) As DocumentProperty 110cdf0e10cSrcweir Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltinDocumentProperties("Comments") 111cdf0e10cSrcweirEnd Function 112cdf0e10cSrcweir 113cdf0e10cSrcweirPublic Function getAppSpecificVBProject(currDoc As Workbook) As VBProject 114cdf0e10cSrcweir Set getAppSpecificVBProject = currDoc.VBProject 115cdf0e10cSrcweirEnd Function 116cdf0e10cSrcweir 117cdf0e10cSrcweirPublic Function getAppSpecificOLEClassType(aShape As Shape) As String 118cdf0e10cSrcweir Dim objType As String 119cdf0e10cSrcweir 120cdf0e10cSrcweir If aShape.OLEFormat.ProgID = "" Then 121cdf0e10cSrcweir objType = aShape.OLEFormat.ClassType 122cdf0e10cSrcweir Else 123cdf0e10cSrcweir objType = aShape.OLEFormat.ProgID 124cdf0e10cSrcweir End If 125cdf0e10cSrcweir 126cdf0e10cSrcweir getAppSpecificOLEClassType = objType 127cdf0e10cSrcweirEnd Function 128cdf0e10cSrcweir 129cdf0e10cSrcweirPublic Sub SetAppToMinimized() 130cdf0e10cSrcweir Application.WindowState = xlMinimized 131cdf0e10cSrcweir Application.Visible = False 132cdf0e10cSrcweirEnd Sub 133cdf0e10cSrcweir 134cdf0e10cSrcweirPublic Sub LocalizeResources() 135cdf0e10cSrcweir Dim xlStrings As StringDataManager 136cdf0e10cSrcweir Set xlStrings = New StringDataManager 137cdf0e10cSrcweir 138cdf0e10cSrcweir xlStrings.InitStringData (GetResourceDataFileName(ThisWorkbook.path)) 139cdf0e10cSrcweir LoadCommonStrings xlStrings 140cdf0e10cSrcweir LoadExcelStrings xlStrings 141cdf0e10cSrcweir LoadResultsStrings xlStrings 142cdf0e10cSrcweir Set xlStrings = Nothing 143cdf0e10cSrcweir 144cdf0e10cSrcweir SetWBDriverText 145cdf0e10cSrcweirEnd Sub 146cdf0e10cSrcweir 147cdf0e10cSrcweirPublic Sub SetWBDriverText() 148cdf0e10cSrcweir On Error Resume Next 149cdf0e10cSrcweir CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT 150cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_EXCEL_DRIVER").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_EXCEL_DRIVER 151cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_ISSUES").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_ISSUES 152cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_PURPOSE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_PURPOSE 153cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_READ_README").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_READ_README 154cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_THE_MACROS").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THE_MACROS 155cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_THIS_DOC").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THIS_DOC 156cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_TITLE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_TITLE 157cdf0e10cSrcweirEnd Sub 158cdf0e10cSrcweir 159