1*cdf0e10cSrcweirAttribute VB_Name = "ApplicationSpecific" 2*cdf0e10cSrcweir'/************************************************************************* 3*cdf0e10cSrcweir' * 4*cdf0e10cSrcweir' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5*cdf0e10cSrcweir' 6*cdf0e10cSrcweir' Copyright 2000, 2010 Oracle and/or its affiliates. 7*cdf0e10cSrcweir' 8*cdf0e10cSrcweir' OpenOffice.org - a multi-platform office productivity suite 9*cdf0e10cSrcweir' 10*cdf0e10cSrcweir' This file is part of OpenOffice.org. 11*cdf0e10cSrcweir' 12*cdf0e10cSrcweir' OpenOffice.org is free software: you can redistribute it and/or modify 13*cdf0e10cSrcweir' it under the terms of the GNU Lesser General Public License version 3 14*cdf0e10cSrcweir' only, as published by the Free Software Foundation. 15*cdf0e10cSrcweir' 16*cdf0e10cSrcweir' OpenOffice.org is distributed in the hope that it will be useful, 17*cdf0e10cSrcweir' but WITHOUT ANY WARRANTY; without even the implied warranty of 18*cdf0e10cSrcweir' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19*cdf0e10cSrcweir' GNU Lesser General Public License version 3 for more details 20*cdf0e10cSrcweir' (a copy is included in the LICENSE file that accompanied this code). 21*cdf0e10cSrcweir' 22*cdf0e10cSrcweir' You should have received a copy of the GNU Lesser General Public License 23*cdf0e10cSrcweir' version 3 along with OpenOffice.org. If not, see 24*cdf0e10cSrcweir' <http://www.openoffice.org/license.html> 25*cdf0e10cSrcweir' for a copy of the LGPLv3 License. 26*cdf0e10cSrcweir' 27*cdf0e10cSrcweir' ************************************************************************/ 28*cdf0e10cSrcweirOption Explicit 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir'** Issue Categories 31*cdf0e10cSrcweirPublic Const CID_INFORMATION_REFS = 0 32*cdf0e10cSrcweirPublic Const CID_CHANGES_AND_REVIEWING = 1 33*cdf0e10cSrcweirPublic Const CID_CHARTS_TABLES = 2 34*cdf0e10cSrcweirPublic Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 3 35*cdf0e10cSrcweirPublic Const CID_CONTROLS = 4 36*cdf0e10cSrcweirPublic Const CID_FILTERS = 5 37*cdf0e10cSrcweirPublic Const CID_FORMAT = 6 38*cdf0e10cSrcweirPublic Const CID_FUNCTIONS = 7 39*cdf0e10cSrcweirPublic Const CID_OBJECTS_GRAPHICS = 8 40*cdf0e10cSrcweirPublic Const CID_PORTABILITY = 9 41*cdf0e10cSrcweirPublic Const CID_VBA_MACROS = 10 42*cdf0e10cSrcweirPublic Const CTOTAL_CATEGORIES = 10 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir'** Excel - XML Issue and SubIssue strings 45*cdf0e10cSrcweirPublic Const CSTR_ISSUE_CHANGES_AND_REVIEWING = "ChangesAndReviewing" 46*cdf0e10cSrcweirPublic Const CSTR_ISSUE_CHARTS_TABLES = "ChartsAndTables" 47*cdf0e10cSrcweirPublic Const CSTR_ISSUE_CONTROLS = "Controls" 48*cdf0e10cSrcweirPublic Const CSTR_ISSUE_FUNCTIONS = "Functions" 49*cdf0e10cSrcweirPublic Const CSTR_ISSUE_OBJECTS_GRAPHICS = "ObjectsAndGraphics" 50*cdf0e10cSrcweir 51*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ATTRIBUTES = "CellAttributes" 52*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_DATEDIF = "DATEDIF" 53*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_EMBEDDED_CHART = "EmbeddedChart" 54*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ERROR_TYPE = "ERROR.TYPE" 55*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_EXTERNAL = "External" 56*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_INFO = "INFO" 57*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_MAX_ROWS_EXCEEDED = "MaximumRowsExceeded" 58*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_MAX_SHEETS_EXCEEDED = "MaximumSheetsExceeded" 59*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PAGE_SETUP = "PageSetup" 60*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PASSWORD_PROTECTION = "PasswordProtection" 61*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_PHONETIC = "PHONETIC" 62*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_SHEET_CHART = "SheetChart" 63*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_WORKBOOK_PROTECTION = "WorkbookProtection" 64*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_ZOOM = "Zoom" 65*cdf0e10cSrcweir 66*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_COMPLEX = "ChartIssuesComplex" 67*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_MINOR = "ChartIssuesMinor" 68*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_CHART_PIVOT = "Pivot" 69*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_INVALID_WORKSHEET_NAME = "InvalidWorksheetName" 70*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_DB_QUERY = "DBQuery" 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir'** END Excel - XML Issue and SubIssue strings 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir 75*cdf0e10cSrcweirPublic Const CAPPNAME_WORD = "Word" 76*cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOC = ".doc" 77*cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOT = ".dot" 78*cdf0e10cSrcweir 79*cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL = "Excel" 80*cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL_DOC = ".xls" 81*cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL_DOT = ".xlt" 82*cdf0e10cSrcweir 83*cdf0e10cSrcweirPublic Const CAPPNAME_POWERPOINT = "PowerPoint" 84*cdf0e10cSrcweir'Public Const CAPPNAME_PP_DOC = ".ppt" 85*cdf0e10cSrcweir'Public Const CAPPNAME_PP_DOT = ".pot" 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Document" 88*cdf0e10cSrcweirPublic CAPP_DOCPROP_LOCATION As String 89*cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Presentation" 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Document" 92*cdf0e10cSrcweirPublic Const CAPP_XMLDOCPROP_LOCATION = "Workbook" 93*cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Presentation" 94*cdf0e10cSrcweir 95*cdf0e10cSrcweirPublic Const CTHIS_DOCUMENT = "ThisWorkbook" 96*cdf0e10cSrcweirPublic Const CTOPLEVEL_PROJECT = "VBAProject" 97*cdf0e10cSrcweir 98*cdf0e10cSrcweirPublic Function getAppSpecificDocExt() As String 99*cdf0e10cSrcweir getAppSpecificDocExt = CAPPNAME_EXCEL_DOC 100*cdf0e10cSrcweirEnd Function 101*cdf0e10cSrcweirPublic Function getAppSpecificTemplateExt() As String 102*cdf0e10cSrcweir getAppSpecificTemplateExt = CAPPNAME_EXCEL_DOT 103*cdf0e10cSrcweirEnd Function 104*cdf0e10cSrcweir 105*cdf0e10cSrcweirPublic Function getAppSpecificPath() As String 106*cdf0e10cSrcweir getAppSpecificPath = ActiveWorkbook.path 107*cdf0e10cSrcweirEnd Function 108*cdf0e10cSrcweirPublic Function getAppSpecificApplicationName() As String 109*cdf0e10cSrcweir getAppSpecificApplicationName = CAPPNAME_EXCEL 110*cdf0e10cSrcweirEnd Function 111*cdf0e10cSrcweir 112*cdf0e10cSrcweirPublic Function getAppSpecificCustomDocProperties(currDoc As Workbook) As DocumentProperties 113*cdf0e10cSrcweir Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties 114*cdf0e10cSrcweirEnd Function 115*cdf0e10cSrcweirPublic Function getAppSpecificCommentBuiltInDocProperty(currDoc As Workbook) As DocumentProperty 116*cdf0e10cSrcweir Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltinDocumentProperties("Comments") 117*cdf0e10cSrcweirEnd Function 118*cdf0e10cSrcweir 119*cdf0e10cSrcweirPublic Function getAppSpecificVBProject(currDoc As Workbook) As VBProject 120*cdf0e10cSrcweir Set getAppSpecificVBProject = currDoc.VBProject 121*cdf0e10cSrcweirEnd Function 122*cdf0e10cSrcweir 123*cdf0e10cSrcweirPublic Function getAppSpecificOLEClassType(aShape As Shape) As String 124*cdf0e10cSrcweir Dim objType As String 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir If aShape.OLEFormat.ProgID = "" Then 127*cdf0e10cSrcweir objType = aShape.OLEFormat.ClassType 128*cdf0e10cSrcweir Else 129*cdf0e10cSrcweir objType = aShape.OLEFormat.ProgID 130*cdf0e10cSrcweir End If 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir getAppSpecificOLEClassType = objType 133*cdf0e10cSrcweirEnd Function 134*cdf0e10cSrcweir 135*cdf0e10cSrcweirPublic Sub SetAppToMinimized() 136*cdf0e10cSrcweir Application.WindowState = xlMinimized 137*cdf0e10cSrcweir Application.Visible = False 138*cdf0e10cSrcweirEnd Sub 139*cdf0e10cSrcweir 140*cdf0e10cSrcweirPublic Sub LocalizeResources() 141*cdf0e10cSrcweir Dim xlStrings As StringDataManager 142*cdf0e10cSrcweir Set xlStrings = New StringDataManager 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir xlStrings.InitStringData (GetResourceDataFileName(ThisWorkbook.path)) 145*cdf0e10cSrcweir LoadCommonStrings xlStrings 146*cdf0e10cSrcweir LoadExcelStrings xlStrings 147*cdf0e10cSrcweir LoadResultsStrings xlStrings 148*cdf0e10cSrcweir Set xlStrings = Nothing 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir SetWBDriverText 151*cdf0e10cSrcweirEnd Sub 152*cdf0e10cSrcweir 153*cdf0e10cSrcweirPublic Sub SetWBDriverText() 154*cdf0e10cSrcweir On Error Resume Next 155*cdf0e10cSrcweir CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_DOCUMENT 156*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_EXCEL_DRIVER").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_EXCEL_DRIVER 157*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_ISSUES").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_ISSUES 158*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_PURPOSE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_PURPOSE 159*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_READ_README").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_READ_README 160*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_THE_MACROS").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THE_MACROS 161*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_THIS_DOC").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_THIS_DOC 162*cdf0e10cSrcweir ThisWorkbook.Names("RID_STR_DVR_XL_TITLE").RefersToRange.Cells(1, 1) = RID_STR_DVR_XL_TITLE 163*cdf0e10cSrcweirEnd Sub 164*cdf0e10cSrcweir 165