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