1VERSION 1.0 CLASS
2BEGIN
3  MultiUse = -1  'True
4END
5Attribute VB_Name = "DocumentAnalysis"
6Attribute VB_GlobalNameSpace = False
7Attribute VB_Creatable = False
8Attribute VB_PredeclaredId = False
9Attribute VB_Exposed = False
10'/*************************************************************************
11' *
12' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
13'
14' Copyright 2000, 2010 Oracle and/or its affiliates.
15'
16' OpenOffice.org - a multi-platform office productivity suite
17'
18' This file is part of OpenOffice.org.
19'
20' OpenOffice.org is free software: you can redistribute it and/or modify
21' it under the terms of the GNU Lesser General Public License version 3
22' only, as published by the Free Software Foundation.
23'
24' OpenOffice.org is distributed in the hope that it will be useful,
25' but WITHOUT ANY WARRANTY; without even the implied warranty of
26' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27' GNU Lesser General Public License version 3 for more details
28' (a copy is included in the LICENSE file that accompanied this code).
29'
30' You should have received a copy of the GNU Lesser General Public License
31' version 3 along with OpenOffice.org.  If not, see
32' <http://www.openoffice.org/license.html>
33' for a copy of the LGPLv3 License.
34'
35' ************************************************************************/
36Option Explicit
37
38Const CMAX_NUM_ISSUETYPES = 100
39
40Private mName As String
41Private mApplication As String
42Private mPageCount As Long
43Private mCreated As Date
44Private mModified As Date
45Private mAccessed As Date
46Private mPrinted As Date
47Private mSavedBy As String
48Private mRevision As Long
49Private mTemplate As String
50Private mHasMacros As Boolean
51
52Private mDocIssuesCosts As Long
53Private mPreparableIssuesCosts As Long
54Private mMacroCosts As Long
55
56Private mReferences As Collection
57Private mIssues As Collection
58Private mIssuesCountArray(1 To CMAX_NUM_ISSUETYPES) As Long
59Private mTotalIssueTypes As Long
60Private mMinorIssuesCount As Long
61Private mMacroIssuesCount As Long
62Private mPreparableIssuesCount As Long
63
64Private mDocOverallIssueClass As EnumDocOverallIssueClass
65
66Private mMacroTotalNumLines As Long
67Private mMacroNumUserForms As Long
68Private mMacroNumUserFormControls As Long
69Private mMacroNumUserFormControlTypes As Long
70Private mMacroNumOLEControls As Long
71Private mMacroNumFieldsUsingMacros As Long
72Private mMacroNumExternalRefs As Long
73Private mMacroOverallClass As EnumDocOverallMacroClass
74Private mbBelowIssuesLimit As Boolean
75
76Public Property Get BelowIssuesLimit() As Boolean
77    BelowIssuesLimit = mbBelowIssuesLimit
78End Property
79Public Property Let BelowIssuesLimit(vNewValue As Boolean)
80    mbBelowIssuesLimit = vNewValue
81End Property
82
83Public Property Get MacroOverallClass() As EnumDocOverallMacroClass
84    MacroOverallClass = mMacroOverallClass
85End Property
86Public Property Let MacroOverallClass(vNewValue As EnumDocOverallMacroClass)
87    mMacroOverallClass = vNewValue
88End Property
89
90Public Property Get MacroNumExternalRefs() As Long
91    MacroNumExternalRefs = mMacroNumExternalRefs
92End Property
93Public Property Let MacroNumExternalRefs(vNewValue As Long)
94    mMacroNumExternalRefs = vNewValue
95End Property
96
97Public Property Get MacroNumFieldsUsingMacros() As Long
98    MacroNumFieldsUsingMacros = mMacroNumFieldsUsingMacros
99End Property
100Public Property Let MacroNumFieldsUsingMacros(vNewValue As Long)
101    mMacroNumFieldsUsingMacros = vNewValue
102End Property
103
104Public Property Get MacroNumOLEControls() As Long
105    MacroNumOLEControls = mMacroNumOLEControls
106End Property
107Public Property Let MacroNumOLEControls(vNewValue As Long)
108    mMacroNumOLEControls = vNewValue
109End Property
110
111Public Property Get MacroNumUserFormControlTypes() As Long
112    MacroNumUserFormControlTypes = mMacroNumUserFormControlTypes
113End Property
114Public Property Let MacroNumUserFormControlTypes(vNewValue As Long)
115    mMacroNumUserFormControlTypes = vNewValue
116End Property
117
118Public Property Get MacroNumUserFormControls() As Long
119    MacroNumUserFormControls = mMacroNumUserFormControls
120End Property
121Public Property Let MacroNumUserFormControls(vNewValue As Long)
122    mMacroNumUserFormControls = vNewValue
123End Property
124
125Public Property Get MacroNumUserForms() As Long
126    MacroNumUserForms = mMacroNumUserForms
127End Property
128Public Property Let MacroNumUserForms(vNewValue As Long)
129    mMacroNumUserForms = vNewValue
130End Property
131
132Public Property Get MacroTotalNumLines() As Long
133    MacroTotalNumLines = mMacroTotalNumLines
134End Property
135Public Property Let MacroTotalNumLines(vNewValue As Long)
136    mMacroTotalNumLines = vNewValue
137End Property
138
139Public Property Get MacroCosts() As Long
140    MacroCosts = mMacroCosts
141End Property
142Public Property Let MacroCosts(vNewValue As Long)
143    mMacroCosts = vNewValue
144End Property
145
146Public Property Get DocIssuesCosts() As Long
147    DocIssuesCosts = mDocIssuesCosts
148End Property
149Public Property Let DocIssuesCosts(vNewValue As Long)
150    mDocIssuesCosts = vNewValue
151End Property
152
153Public Property Get PreparableIssuesCosts() As Long
154    PreparableIssuesCosts = mPreparableIssuesCosts
155End Property
156Public Property Let PreparableIssuesCosts(vNewValue As Long)
157    mPreparableIssuesCosts = vNewValue
158End Property
159
160Public Property Get DocOverallIssueClass() As EnumDocOverallIssueClass
161    DocOverallIssueClass = mDocOverallIssueClass
162End Property
163
164Public Property Let DocOverallIssueClass(ByVal vNewValue As EnumDocOverallIssueClass)
165    mDocOverallIssueClass = vNewValue
166End Property
167
168Public Property Get TotalIssueTypes() As Long
169    TotalIssueTypes = mTotalIssueTypes
170End Property
171
172Public Property Let TotalIssueTypes(ByVal vNewValue As Long)
173    mTotalIssueTypes = vNewValue
174End Property
175Public Property Get name() As String
176    name = mName
177End Property
178
179Public Property Let name(ByVal vNewValue As String)
180    mName = vNewValue
181End Property
182
183Public Property Get Application() As String
184    Application = mApplication
185End Property
186
187Public Property Let Application(ByVal vNewValue As String)
188    mApplication = vNewValue
189End Property
190Public Property Get PageCount() As Long
191    PageCount = mPageCount
192End Property
193
194Public Property Let PageCount(ByVal vNewValue As Long)
195    mPageCount = vNewValue
196End Property
197
198Public Property Get Created() As Date
199    Created = mCreated
200End Property
201
202Public Property Let Created(ByVal vNewValue As Date)
203    mCreated = vNewValue
204End Property
205
206Public Property Get Modified() As Date
207    Modified = mModified
208End Property
209
210Public Property Let Modified(ByVal vNewValue As Date)
211    mModified = vNewValue
212End Property
213
214Public Property Get Accessed() As Date
215    Accessed = mAccessed
216End Property
217
218Public Property Let Accessed(ByVal vNewValue As Date)
219    mAccessed = vNewValue
220End Property
221Public Property Get Printed() As Date
222    Printed = mPrinted
223End Property
224
225Public Property Let Printed(ByVal vNewValue As Date)
226    mPrinted = vNewValue
227End Property
228
229Public Property Get SavedBy() As String
230    SavedBy = mSavedBy
231End Property
232
233Public Property Let SavedBy(ByVal vNewValue As String)
234    mSavedBy = vNewValue
235End Property
236
237Public Property Get Revision() As Long
238    Revision = mRevision
239End Property
240
241Public Property Let Revision(ByVal vNewValue As Long)
242    mRevision = vNewValue
243End Property
244
245Public Property Get Template() As String
246    Template = mTemplate
247End Property
248
249Public Property Let Template(ByVal vNewValue As String)
250    mTemplate = vNewValue
251End Property
252Public Property Get HasMacros() As Boolean
253    HasMacros = mHasMacros
254End Property
255
256Public Property Let HasMacros(ByVal vNewValue As Boolean)
257    mHasMacros = vNewValue
258End Property
259
260Public Property Get References() As Collection
261    Set References = mReferences
262End Property
263
264Public Property Let References(ByVal vNewValue As Collection)
265    Set mReferences = vNewValue
266End Property
267
268Public Property Get Issues() As Collection
269    Set Issues = mIssues
270End Property
271
272Public Property Let Issues(ByVal vNewValue As Collection)
273    Set mIssues = vNewValue
274End Property
275
276Public Property Get IssuesCountArray(ByVal index As Integer) As Long
277    If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
278        IssuesCountArray = mIssuesCountArray(index)
279    Else
280        IssuesCountArray = Null
281    End If
282End Property
283
284Public Property Let IssuesCountArray(ByVal index As Integer, ByVal vNewValue As Long)
285    If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
286        mIssuesCountArray(index) = vNewValue
287    End If
288End Property
289
290Public Property Get IssuesCount() As Long
291    IssuesCount = mIssues.count
292End Property
293
294Public Property Get ComplexIssuesCount() As Long
295    Dim complexCount As Long
296    complexCount = mIssues.count - mMinorIssuesCount - mMacroIssuesCount
297    ComplexIssuesCount = IIf(complexCount > 0, complexCount, 0)
298End Property
299
300Public Property Get MacroIssuesCount() As Long
301    MacroIssuesCount = mMacroIssuesCount
302End Property
303
304Public Property Let MacroIssuesCount(ByVal vNewValue As Long)
305    mMacroIssuesCount = vNewValue
306End Property
307
308Public Property Get MinorIssuesCount() As Long
309    MinorIssuesCount = mMinorIssuesCount
310End Property
311
312Public Property Let MinorIssuesCount(ByVal vNewValue As Long)
313    mMinorIssuesCount = vNewValue
314End Property
315
316Public Property Get PreparableIssuesCount() As Long
317    PreparableIssuesCount = mPreparableIssuesCount
318End Property
319
320Public Property Let PreparableIssuesCount(ByVal vNewValue As Long)
321    mPreparableIssuesCount = vNewValue
322End Property
323
324Private Sub Class_Initialize()
325    mApplication = ""
326    mTotalIssueTypes = 0
327    mHasMacros = False
328    Set mIssues = New Collection
329    Set mReferences = New Collection
330    mPreparableIssuesCount = 0
331    mMacroOverallClass = enNone
332    mDocOverallIssueClass = enNone
333    mDocIssuesCosts = 0
334    mPreparableIssuesCosts = 0
335    mMacroCosts = 0
336    mbBelowIssuesLimit = False
337End Sub
338Private Sub Class_Terminate()
339    Set mIssues = Nothing
340    Set mReferences = Nothing
341End Sub
342
343