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*cdf0e10cSrcweir 29*cdf0e10cSrcweirOption Explicit 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir'*** Do NOT add any new categories - use those listed below or else the results spreadsheet and 32*cdf0e10cSrcweir'*** issues list will be out of sync 33*cdf0e10cSrcweirPublic Const GlbPowerPoint = True 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir'** Issue Categories 36*cdf0e10cSrcweirPublic Const CID_INFORMATION_REFS = 0 37*cdf0e10cSrcweirPublic Const CID_ACTION_SETTINGS = 1 38*cdf0e10cSrcweirPublic Const CID_CONTENT_AND_DOCUMENT_PROPERTIES = 2 39*cdf0e10cSrcweirPublic Const CID_FIELDS = 3 40*cdf0e10cSrcweirPublic Const CID_FORMAT = 4 41*cdf0e10cSrcweirPublic Const CID_NOTES_AND_HANDOUTS = 5 42*cdf0e10cSrcweirPublic Const CID_OBJECTS_GRAPHICS_TEXTBOXES = 6 43*cdf0e10cSrcweirPublic Const CID_PORTABILITY = 7 44*cdf0e10cSrcweirPublic Const CID_VBA_MACROS = 8 45*cdf0e10cSrcweirPublic Const CTOTAL_CATEGORIES = 8 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir'** PP - XML Issue and SubIssue strings 48*cdf0e10cSrcweirPublic Const CSTR_ISSUE_OBJECTS_GRAPHICS_AND_TEXTBOXES = "ObjectsGraphicsAndTextboxes" 49*cdf0e10cSrcweir 50*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_COMMENT = "Comment" 51*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_MOVIE = "Movie" 52*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_BACKGROUND = "Background" 53*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_NUMBERING = "Numbering" 54*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_HYPERLINK = "Hyperlink" 55*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_HYPERLINK_SPLIT = "HyperlinkSplit" 56*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_TEMPLATE = "Template" 57*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_TABSTOP = "Tabstop" 58*cdf0e10cSrcweirPublic Const CSTR_SUBISSUE_FONTS = "Fonts" 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir'** END PP - XML Issue and SubIssue strings 61*cdf0e10cSrcweir 62*cdf0e10cSrcweirPublic Const CAPPNAME_WORD = "Word" 63*cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOC = ".doc" 64*cdf0e10cSrcweir'Public Const CAPPNAME_WORD_DOT = ".dot" 65*cdf0e10cSrcweir 66*cdf0e10cSrcweirPublic Const CAPPNAME_EXCEL = "Excel" 67*cdf0e10cSrcweir'Public Const CAPPNAME_EXCEL_DOC = ".xls" 68*cdf0e10cSrcweir'Public Const CAPPNAME_EXCEL_DOT = ".xlt" 69*cdf0e10cSrcweir 70*cdf0e10cSrcweirPublic Const CAPPNAME_POWERPOINT = "PowerPoint" 71*cdf0e10cSrcweirPublic Const CAPPNAME_PP_DOC = ".ppt" 72*cdf0e10cSrcweirPublic Const CAPPNAME_PP_DOT = ".pot" 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Document" 75*cdf0e10cSrcweir'Public Const CAPP_DOCPROP_LOCATION = "Workbook" 76*cdf0e10cSrcweirPublic CAPP_DOCPROP_LOCATION As String 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Document" 80*cdf0e10cSrcweir'Public Const CAPP_XMLDOCPROP_LOCATION = "Workbook" 81*cdf0e10cSrcweirPublic Const CAPP_XMLDOCPROP_LOCATION = "Presentation" 82*cdf0e10cSrcweir 83*cdf0e10cSrcweirPublic Const CTHIS_DOCUMENT = "ThisDocument" 84*cdf0e10cSrcweirPublic Const CTOPLEVEL_PROJECT = "Project" 85*cdf0e10cSrcweir 86*cdf0e10cSrcweirConst CSTART_DIR = 1 87*cdf0e10cSrcweirConst CSTORE_TO_DIR = 2 88*cdf0e10cSrcweirConst CRESULTS_FILE = 3 89*cdf0e10cSrcweirConst CRESULTS_TEMPALTE = 4 90*cdf0e10cSrcweirConst COVERWRITE_FILE = 5 91*cdf0e10cSrcweirConst CNEW_RESULTS_FILE = 6 92*cdf0e10cSrcweirConst CDOCUMENT = 7 93*cdf0e10cSrcweirConst CTEMPLATE = 8 94*cdf0e10cSrcweirConst CINCLUDE_SUBDIRS = 9 95*cdf0e10cSrcweirConst CLOG_FILE = 10 96*cdf0e10cSrcweirConst CDEBUG_LEVEL = 11 97*cdf0e10cSrcweir 98*cdf0e10cSrcweirPublic Function getAppSpecificDocExt() As String 99*cdf0e10cSrcweir getAppSpecificDocExt = CAPPNAME_PP_DOC 100*cdf0e10cSrcweirEnd Function 101*cdf0e10cSrcweirPublic Function getAppSpecificTemplateExt() As String 102*cdf0e10cSrcweir getAppSpecificTemplateExt = CAPPNAME_PP_DOT 103*cdf0e10cSrcweirEnd Function 104*cdf0e10cSrcweir 105*cdf0e10cSrcweirPublic Function getAppSpecificPath() As String 106*cdf0e10cSrcweir getAppSpecificPath = ActivePresentation.path 107*cdf0e10cSrcweirEnd Function 108*cdf0e10cSrcweirPublic Function getAppSpecificApplicationName() As String 109*cdf0e10cSrcweir getAppSpecificApplicationName = CAPPNAME_POWERPOINT 110*cdf0e10cSrcweirEnd Function 111*cdf0e10cSrcweir 112*cdf0e10cSrcweirPublic Function getAppSpecificCustomDocProperties(currDoc As Presentation) As DocumentProperties 113*cdf0e10cSrcweir Set getAppSpecificCustomDocProperties = currDoc.CustomDocumentProperties 114*cdf0e10cSrcweirEnd Function 115*cdf0e10cSrcweirPublic Function getAppSpecificCommentBuiltInDocProperty(currDoc As Presentation) As DocumentProperty 116*cdf0e10cSrcweir Set getAppSpecificCommentBuiltInDocProperty = currDoc.BuiltInDocumentProperties("Comments") 117*cdf0e10cSrcweirEnd Function 118*cdf0e10cSrcweir 119*cdf0e10cSrcweirPublic Function getAppSpecificVBProject(currDoc as Presentation) As VBProject 120*cdf0e10cSrcweir Set getAppSpecificVBProject = currDoc.VBProject 121*cdf0e10cSrcweirEnd Function 122*cdf0e10cSrcweir 123*cdf0e10cSrcweirPublic Function getAppSpecificOLEClassType(aShape As Shape) As String 124*cdf0e10cSrcweir getAppSpecificOLEClassType = aShape.OLEFormat.ProgID 125*cdf0e10cSrcweirEnd Function 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir' Workaround as it does not seem to be possible to shut down PP 128*cdf0e10cSrcweir' from VB app 129*cdf0e10cSrcweirPublic Sub QuitPowerPoint() 130*cdf0e10cSrcweir Dim I As Integer 131*cdf0e10cSrcweir On Error Resume Next 132*cdf0e10cSrcweir With Application.Presentations 133*cdf0e10cSrcweir For I = .count To 1 Step -1 134*cdf0e10cSrcweir .item(I).Close 135*cdf0e10cSrcweir Next 136*cdf0e10cSrcweir End With 137*cdf0e10cSrcweir Application.Quit 138*cdf0e10cSrcweirEnd Sub 139*cdf0e10cSrcweir 140*cdf0e10cSrcweirPublic Sub SetAppToMinimized() 141*cdf0e10cSrcweir Application.WindowState = ppWindowMinimized 142*cdf0e10cSrcweirEnd Sub 143*cdf0e10cSrcweir 144*cdf0e10cSrcweirPublic Sub LocalizeResources() 145*cdf0e10cSrcweir On Error GoTo ErrorHandler 146*cdf0e10cSrcweir Dim ppStrings As StringDataManager 147*cdf0e10cSrcweir Set ppStrings = New StringDataManager 148*cdf0e10cSrcweir Dim aPres As Presentation 149*cdf0e10cSrcweir Set aPres = Presentations("_OOoDocAnalysisPPTDriver.ppt") 150*cdf0e10cSrcweir ppStrings.InitStringData (GetResourceDataFileName(aPres.path)) 151*cdf0e10cSrcweir LoadCommonStrings ppStrings 152*cdf0e10cSrcweir LoadPPStrings ppStrings 153*cdf0e10cSrcweir LoadResultsStrings ppStrings 154*cdf0e10cSrcweir Set ppStrings = Nothing 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir SetPPDriverText 157*cdf0e10cSrcweirFinalExit: 158*cdf0e10cSrcweir Exit Sub 159*cdf0e10cSrcweirErrorHandler: 160*cdf0e10cSrcweir WriteDebug "Presentation_Open : " & Err.Number & " : " & Err.Description 161*cdf0e10cSrcweir GoTo FinalExit 162*cdf0e10cSrcweirEnd Sub 163*cdf0e10cSrcweir 164*cdf0e10cSrcweirSub SetPPDriverText() 165*cdf0e10cSrcweir On Error Resume Next 166*cdf0e10cSrcweir CAPP_DOCPROP_LOCATION = RID_STR_COMMON_RESULTS_LOCATION_TYPE_PRESENTATION 167*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT2").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT2 168*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT3").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT3 169*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT4").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT4 170*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT5").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT5 171*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT6").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT6 172*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT7").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT7 173*cdf0e10cSrcweir ActivePresentation.Slides.item(1).Shapes.item("RID_STR_DVR_PP_TXT8").OLEFormat.Object.Text = RID_STR_DVR_PP_TXT8 174*cdf0e10cSrcweirEnd Sub 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir 177