summaryrefslogtreecommitdiff
path: root/migrationanalysis/src/driver_docs/sources/powerpoint
diff options
context:
space:
mode:
Diffstat (limited to 'migrationanalysis/src/driver_docs/sources/powerpoint')
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas176
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas62
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls824
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas41
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls54
-rw-r--r--migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas107
6 files changed, 1264 insertions, 0 deletions
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..c91444949a03
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/ApplicationSpecific.bas
@@ -0,0 +1,176 @@
+Attribute VB_Name = "ApplicationSpecific"
+'/*************************************************************************
+' *
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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..9ffc880ce9ae
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Loader.bas
@@ -0,0 +1,62 @@
+Attribute VB_Name = "Loader"
+'/*************************************************************************
+' *
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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..195f87d439a9
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/MigrationAnalyser.cls
@@ -0,0 +1,824 @@
+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 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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..40454eb0bdd7
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Preparation.bas
@@ -0,0 +1,41 @@
+Attribute VB_Name = "Preparation"
+'/*************************************************************************
+' *
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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..9f6d4bd13752
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/Slide1.cls
@@ -0,0 +1,54 @@
+'/*************************************************************************
+' *
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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..cddc6e508e22
--- /dev/null
+++ b/migrationanalysis/src/driver_docs/sources/powerpoint/powerpoint_res.bas
@@ -0,0 +1,107 @@
+Attribute VB_Name = "powerpoint_res"
+'/*************************************************************************
+' *
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' 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