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