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