-
Notifications
You must be signed in to change notification settings - Fork 3
/
ZtConfigUser.cls
133 lines (90 loc) · 4.95 KB
/
ZtConfigUser.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ZtConfigUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Class ZtConfigUser.
' It preserves user configuration informations and methods to read them from ZtConfig.xml.
' It distributes these informations and work to the other ZtConfigUser... classes.
'
' Zotero Tools.
' This software is under Revised ('New') BSD license.
' Copyright © 2019, Olaf Ahrens. All rights reserved.
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Private variables.
Private pvtConfig As ZtConfig
Private pvtXml As MSXML2.DOMDocument60
Private pvtBackwardLinking As ZtConfigUserBackwardLinking
Private pvtCitation As ZtConfigUserCitation
Private pvtCitationGroup As ZtConfigUserCitationGroup
Private pvtMacro As ZtConfigUserMacro
Private pvtPunctuation As ZtConfigUserPunctuation
Private pvtReference As ZtConfigUserReference
Private pvtResolveCitation As ZtConfigUserResolveCitation
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Constructor.
Private Sub Class_Initialize()
Set pvtMacro = New ZtConfigUserMacro
End Sub
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Friend/Public procedures and properties.
' All members that should be callable by CallByName procedure must be public.
Friend Sub Initialize(ByVal valConfig As ZtConfig, ByVal valXml As MSXML2.DOMDocument60)
Set pvtConfig = valConfig
Set pvtXml = valXml
pvtMacro.Initialize pvtConfig, pvtXml
End Sub
Friend Sub KeepUserStyles(ByVal valStylePresetName As String)
Dim locPreset As ZtConfigUserStylePreset
pvtMacro.StylePresetName = valStylePresetName
Set locPreset = pvtConfig.UserStylePresets.Item(pvtMacro.StylePresetName)
' Read citation group style.
Set pvtCitationGroup = New ZtConfigUserCitationGroup
pvtCitationGroup.Initialize pvtConfig, pvtXml, locPreset.CitationGroupStyle
' Read citation group punctuation style.
Set pvtPunctuation = New ZtConfigUserPunctuation
pvtPunctuation.Initialize pvtConfig, pvtXml, locPreset.PunctuationStyle
' Read citation style.
Set pvtCitation = New ZtConfigUserCitation
pvtCitation.Initialize pvtConfig, pvtXml, locPreset.CitationStyle
' Read resolve citation style.
Set pvtResolveCitation = New ZtConfigUserResolveCitation
pvtResolveCitation.Initialize pvtConfig, pvtXml, locPreset.ResolveCitationStyle
' Read reference style.
Set pvtReference = New ZtConfigUserReference
pvtReference.Initialize pvtConfig, pvtXml, locPreset.ReferenceStyle
' Read backward linking style.
Set pvtBackwardLinking = New ZtConfigUserBackwardLinking
pvtBackwardLinking.Initialize pvtConfig, pvtXml, locPreset.BackwardLinkingStyle
End Sub
Public Property Get BackwardLinkingStyle() As ZtConfigUserBackwardLinking
Set BackwardLinkingStyle = pvtBackwardLinking
End Property
Public Property Get CitationStyle() As ZtConfigUserCitation
Set CitationStyle = pvtCitation
End Property
Public Property Get CitationGroupStyle() As ZtConfigUserCitationGroup
Set CitationGroupStyle = pvtCitationGroup
End Property
Public Property Get Macro() As ZtConfigUserMacro
Set Macro = pvtMacro
End Property
Public Property Get PunctuationStyle() As ZtConfigUserPunctuation
Set PunctuationStyle = pvtPunctuation
End Property
Public Property Get ResolveCitationStyle() As ZtConfigUserResolveCitation
Set ResolveCitationStyle = pvtResolveCitation
End Property
Public Property Get ReferenceStyle() As ZtConfigUserReference
Set ReferenceStyle = pvtReference
End Property
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *