-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathZtConfigUserMacro.cls
109 lines (69 loc) · 3.88 KB
/
ZtConfigUserMacro.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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ZtConfigUserMacro"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Class ZtConfigUserMacro.
' It preserves a part of the user configuration informations and methods to read them from ZtConfig.xml.
'
' Zotero Tools.
' This software is under Revised ('New') BSD license.
' Copyright © 2019, Olaf Ahrens. All rights reserved.
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Private variables.
Private pvtWordIsInvisibleWhileOperation As Boolean
Private pvtDebugging As Boolean
Private pvtCitationInsertZeroWidthSpace As Boolean
Private pvtWithBackwardLinking As Boolean
Private pvtStylePresetName As String
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' 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)
Dim locNode As MSXML2.IXMLDOMNode
Set locNode = valXml.SelectSingleNode("/zoteroTools/user/macro")
pvtStylePresetName = valConfig.ResolveTextElement(locNode.SelectSingleNode("stylePresetName"))
pvtWordIsInvisibleWhileOperation = CBool(locNode.SelectSingleNode("wordIsInvisibleWhileOperation").Text)
pvtCitationInsertZeroWidthSpace = CBool(locNode.SelectSingleNode("citationInsertZeroWidthSpace").Text)
pvtWithBackwardLinking = CBool(locNode.SelectSingleNode("withBackwardLinking").Text)
pvtDebugging = CBool(locNode.SelectSingleNode("debugging").Text)
End Sub
Public Property Let WordIsInvisibleWhileOperation(ByVal valVisible As Boolean)
pvtWordIsInvisibleWhileOperation = valVisible
End Property
Public Property Get WordIsInvisibleWhileOperation() As Boolean
WordIsInvisibleWhileOperation = pvtWordIsInvisibleWhileOperation
End Property
Public Property Let Debugging(ByVal valDebugging As Boolean)
pvtDebugging = valDebugging
End Property
Public Property Get Debugging() As Boolean
Debugging = pvtDebugging
End Property
Public Property Let CitationInsertZeroWidthSpace(ByVal valInsert As Boolean)
pvtCitationInsertZeroWidthSpace = valInsert
End Property
Public Property Get CitationInsertZeroWidthSpace() As Boolean
CitationInsertZeroWidthSpace = pvtCitationInsertZeroWidthSpace
End Property
Public Property Let WithBackwardLinking(ByVal valWithLinking As Boolean)
pvtWithBackwardLinking = valWithLinking
End Property
Public Property Get WithBackwardLinking() As Boolean
WithBackwardLinking = pvtWithBackwardLinking
End Property
Public Property Let StylePresetName(ByVal valName As String)
pvtStylePresetName = valName
End Property
Public Property Get StylePresetName() As String
StylePresetName = pvtStylePresetName
End Property
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *