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'  Licensed to the Apache Software Foundation (ASF) under one
13'  or more contributor license agreements.  See the NOTICE file
14'  distributed with this work for additional information
15'  regarding copyright ownership.  The ASF licenses this file
16'  to you under the Apache License, Version 2.0 (the
17'  "License"); you may not use this file except in compliance
18'  with the License.  You may obtain a copy of the License at
19'
20'    http://www.apache.org/licenses/LICENSE-2.0
21'
22'  Unless required by applicable law or agreed to in writing,
23'  software distributed under the License is distributed on an
24'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
25'  KIND, either express or implied.  See the License for the
26'  specific language governing permissions and limitations
27'  under the License.
28'
29'*************************************************************************
30Option Explicit
31
32Const CMAX_NUM_ISSUETYPES = 100
33
34Private mName As String
35Private mApplication As String
36Private mPageCount As Long
37Private mCreated As Date
38Private mModified As Date
39Private mAccessed As Date
40Private mPrinted As Date
41Private mSavedBy As String
42Private mRevision As Long
43Private mTemplate As String
44Private mHasMacros As Boolean
45
46Private mDocIssuesCosts As Long
47Private mPreparableIssuesCosts As Long
48Private mMacroCosts As Long
49
50Private mReferences As Collection
51Private mIssues As Collection
52Private mIssuesCountArray(1 To CMAX_NUM_ISSUETYPES) As Long
53Private mTotalIssueTypes As Long
54Private mMinorIssuesCount As Long
55Private mMacroIssuesCount As Long
56Private mPreparableIssuesCount As Long
57
58Private mDocOverallIssueClass As EnumDocOverallIssueClass
59
60Private mMacroTotalNumLines As Long
61Private mMacroNumUserForms As Long
62Private mMacroNumUserFormControls As Long
63Private mMacroNumUserFormControlTypes As Long
64Private mMacroNumOLEControls As Long
65Private mMacroNumFieldsUsingMacros As Long
66Private mMacroNumExternalRefs As Long
67Private mMacroOverallClass As EnumDocOverallMacroClass
68Private mbBelowIssuesLimit As Boolean
69
70Public Property Get BelowIssuesLimit() As Boolean
71    BelowIssuesLimit = mbBelowIssuesLimit
72End Property
73Public Property Let BelowIssuesLimit(vNewValue As Boolean)
74    mbBelowIssuesLimit = vNewValue
75End Property
76
77Public Property Get MacroOverallClass() As EnumDocOverallMacroClass
78    MacroOverallClass = mMacroOverallClass
79End Property
80Public Property Let MacroOverallClass(vNewValue As EnumDocOverallMacroClass)
81    mMacroOverallClass = vNewValue
82End Property
83
84Public Property Get MacroNumExternalRefs() As Long
85    MacroNumExternalRefs = mMacroNumExternalRefs
86End Property
87Public Property Let MacroNumExternalRefs(vNewValue As Long)
88    mMacroNumExternalRefs = vNewValue
89End Property
90
91Public Property Get MacroNumFieldsUsingMacros() As Long
92    MacroNumFieldsUsingMacros = mMacroNumFieldsUsingMacros
93End Property
94Public Property Let MacroNumFieldsUsingMacros(vNewValue As Long)
95    mMacroNumFieldsUsingMacros = vNewValue
96End Property
97
98Public Property Get MacroNumOLEControls() As Long
99    MacroNumOLEControls = mMacroNumOLEControls
100End Property
101Public Property Let MacroNumOLEControls(vNewValue As Long)
102    mMacroNumOLEControls = vNewValue
103End Property
104
105Public Property Get MacroNumUserFormControlTypes() As Long
106    MacroNumUserFormControlTypes = mMacroNumUserFormControlTypes
107End Property
108Public Property Let MacroNumUserFormControlTypes(vNewValue As Long)
109    mMacroNumUserFormControlTypes = vNewValue
110End Property
111
112Public Property Get MacroNumUserFormControls() As Long
113    MacroNumUserFormControls = mMacroNumUserFormControls
114End Property
115Public Property Let MacroNumUserFormControls(vNewValue As Long)
116    mMacroNumUserFormControls = vNewValue
117End Property
118
119Public Property Get MacroNumUserForms() As Long
120    MacroNumUserForms = mMacroNumUserForms
121End Property
122Public Property Let MacroNumUserForms(vNewValue As Long)
123    mMacroNumUserForms = vNewValue
124End Property
125
126Public Property Get MacroTotalNumLines() As Long
127    MacroTotalNumLines = mMacroTotalNumLines
128End Property
129Public Property Let MacroTotalNumLines(vNewValue As Long)
130    mMacroTotalNumLines = vNewValue
131End Property
132
133Public Property Get MacroCosts() As Long
134    MacroCosts = mMacroCosts
135End Property
136Public Property Let MacroCosts(vNewValue As Long)
137    mMacroCosts = vNewValue
138End Property
139
140Public Property Get DocIssuesCosts() As Long
141    DocIssuesCosts = mDocIssuesCosts
142End Property
143Public Property Let DocIssuesCosts(vNewValue As Long)
144    mDocIssuesCosts = vNewValue
145End Property
146
147Public Property Get PreparableIssuesCosts() As Long
148    PreparableIssuesCosts = mPreparableIssuesCosts
149End Property
150Public Property Let PreparableIssuesCosts(vNewValue As Long)
151    mPreparableIssuesCosts = vNewValue
152End Property
153
154Public Property Get DocOverallIssueClass() As EnumDocOverallIssueClass
155    DocOverallIssueClass = mDocOverallIssueClass
156End Property
157
158Public Property Let DocOverallIssueClass(ByVal vNewValue As EnumDocOverallIssueClass)
159    mDocOverallIssueClass = vNewValue
160End Property
161
162Public Property Get TotalIssueTypes() As Long
163    TotalIssueTypes = mTotalIssueTypes
164End Property
165
166Public Property Let TotalIssueTypes(ByVal vNewValue As Long)
167    mTotalIssueTypes = vNewValue
168End Property
169Public Property Get name() As String
170    name = mName
171End Property
172
173Public Property Let name(ByVal vNewValue As String)
174    mName = vNewValue
175End Property
176
177Public Property Get Application() As String
178    Application = mApplication
179End Property
180
181Public Property Let Application(ByVal vNewValue As String)
182    mApplication = vNewValue
183End Property
184Public Property Get PageCount() As Long
185    PageCount = mPageCount
186End Property
187
188Public Property Let PageCount(ByVal vNewValue As Long)
189    mPageCount = vNewValue
190End Property
191
192Public Property Get Created() As Date
193    Created = mCreated
194End Property
195
196Public Property Let Created(ByVal vNewValue As Date)
197    mCreated = vNewValue
198End Property
199
200Public Property Get Modified() As Date
201    Modified = mModified
202End Property
203
204Public Property Let Modified(ByVal vNewValue As Date)
205    mModified = vNewValue
206End Property
207
208Public Property Get Accessed() As Date
209    Accessed = mAccessed
210End Property
211
212Public Property Let Accessed(ByVal vNewValue As Date)
213    mAccessed = vNewValue
214End Property
215Public Property Get Printed() As Date
216    Printed = mPrinted
217End Property
218
219Public Property Let Printed(ByVal vNewValue As Date)
220    mPrinted = vNewValue
221End Property
222
223Public Property Get SavedBy() As String
224    SavedBy = mSavedBy
225End Property
226
227Public Property Let SavedBy(ByVal vNewValue As String)
228    mSavedBy = vNewValue
229End Property
230
231Public Property Get Revision() As Long
232    Revision = mRevision
233End Property
234
235Public Property Let Revision(ByVal vNewValue As Long)
236    mRevision = vNewValue
237End Property
238
239Public Property Get Template() As String
240    Template = mTemplate
241End Property
242
243Public Property Let Template(ByVal vNewValue As String)
244    mTemplate = vNewValue
245End Property
246Public Property Get HasMacros() As Boolean
247    HasMacros = mHasMacros
248End Property
249
250Public Property Let HasMacros(ByVal vNewValue As Boolean)
251    mHasMacros = vNewValue
252End Property
253
254Public Property Get References() As Collection
255    Set References = mReferences
256End Property
257
258Public Property Let References(ByVal vNewValue As Collection)
259    Set mReferences = vNewValue
260End Property
261
262Public Property Get Issues() As Collection
263    Set Issues = mIssues
264End Property
265
266Public Property Let Issues(ByVal vNewValue As Collection)
267    Set mIssues = vNewValue
268End Property
269
270Public Property Get IssuesCountArray(ByVal index As Integer) As Long
271    If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
272        IssuesCountArray = mIssuesCountArray(index)
273    Else
274        IssuesCountArray = Null
275    End If
276End Property
277
278Public Property Let IssuesCountArray(ByVal index As Integer, ByVal vNewValue As Long)
279    If index >= LBound(mIssuesCountArray) And index <= UBound(mIssuesCountArray) Then
280        mIssuesCountArray(index) = vNewValue
281    End If
282End Property
283
284Public Property Get IssuesCount() As Long
285    IssuesCount = mIssues.count
286End Property
287
288Public Property Get ComplexIssuesCount() As Long
289    Dim complexCount As Long
290    complexCount = mIssues.count - mMinorIssuesCount - mMacroIssuesCount
291    ComplexIssuesCount = IIf(complexCount > 0, complexCount, 0)
292End Property
293
294Public Property Get MacroIssuesCount() As Long
295    MacroIssuesCount = mMacroIssuesCount
296End Property
297
298Public Property Let MacroIssuesCount(ByVal vNewValue As Long)
299    mMacroIssuesCount = vNewValue
300End Property
301
302Public Property Get MinorIssuesCount() As Long
303    MinorIssuesCount = mMinorIssuesCount
304End Property
305
306Public Property Let MinorIssuesCount(ByVal vNewValue As Long)
307    mMinorIssuesCount = vNewValue
308End Property
309
310Public Property Get PreparableIssuesCount() As Long
311    PreparableIssuesCount = mPreparableIssuesCount
312End Property
313
314Public Property Let PreparableIssuesCount(ByVal vNewValue As Long)
315    mPreparableIssuesCount = vNewValue
316End Property
317
318Private Sub Class_Initialize()
319    mApplication = ""
320    mTotalIssueTypes = 0
321    mHasMacros = False
322    Set mIssues = New Collection
323    Set mReferences = New Collection
324    mPreparableIssuesCount = 0
325    mMacroOverallClass = enNone
326    mDocOverallIssueClass = enNone
327    mDocIssuesCosts = 0
328    mPreparableIssuesCosts = 0
329    mMacroCosts = 0
330    mbBelowIssuesLimit = False
331End Sub
332Private Sub Class_Terminate()
333    Set mIssues = Nothing
334    Set mReferences = Nothing
335End Sub
336
337