├── .gitignore
├── .gitmodules
├── .travis.yml
├── COPYING
├── README.md
├── build
├── template
│ ├── Zotero.dotm
│ │ ├── customUI
│ │ │ ├── customUI.xml
│ │ │ └── images
│ │ │ │ ├── addEditZoteroBibliography-small.png
│ │ │ │ ├── addEditZoteroBibliography.png
│ │ │ │ ├── addEditZoteroCitation-small.png
│ │ │ │ ├── addEditZoteroCitation0.png
│ │ │ │ ├── addZoteroNote.png
│ │ │ │ ├── setZoteroDocPrefs-small.png
│ │ │ │ ├── setZoteroDocPrefs.png
│ │ │ │ └── zotero-z-16.png
│ │ └── word
│ │ │ └── vbaProject.bin
│ │ │ ├── ThisDocument.cls
│ │ │ ├── Zotero.bas
│ │ │ └── ZoteroRibbon.bas
│ ├── check_template_src.sh
│ └── unpack_templates.sh
└── zoteroWinWordIntegration
│ ├── CApplication.h
│ ├── CBookmark0.h
│ ├── CBookmarks.h
│ ├── CCustomProperties.h
│ ├── CCustomProperty.h
│ ├── CDocument0.h
│ ├── CEndnote.h
│ ├── CEndnoteOptions.h
│ ├── CEndnotes.h
│ ├── CField.h
│ ├── CFields.h
│ ├── CFont0.h
│ ├── CFootnote.h
│ ├── CFootnoteOptions.h
│ ├── CFootnotes.h
│ ├── CHyperlink.h
│ ├── CHyperlinks.h
│ ├── CParagraphFormat.h
│ ├── CRange.h
│ ├── CRevisionsFilter.h
│ ├── CSelection.h
│ ├── CStoryRanges.h
│ ├── CStyle.h
│ ├── CStyles.h
│ ├── CTabStop.h
│ ├── CTabStops.h
│ ├── CUndoRecord.h
│ ├── CView0.h
│ ├── CWindow0.h
│ ├── document.cpp
│ ├── field.cpp
│ ├── stdafx.h
│ ├── targetver.h
│ ├── utilities.cpp
│ ├── zoteroWinWordIntegration.h
│ ├── zoteroWinWordIntegration.sln
│ ├── zoteroWinWordIntegration.suo
│ ├── zoteroWinWordIntegration.vcxproj
│ └── zoteroWinWordIntegration.vcxproj.filters
├── chrome.manifest
├── components
└── zoteroWinWordIntegration.mjs
├── defaults
└── preferences
│ └── zoteroWinWordIntegration.js
├── install
├── Zotero.dotm
├── libzoteroWinWordIntegration.dll
├── libzoteroWinWordIntegration_ARM64.dll
└── libzoteroWinWordIntegration_x64.dll
└── resource
├── installer.jsm
└── version.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | build/zoteroWinWordIntegration/.vs
2 | build/zoteroWinWordIntegration/**/Release
3 | build/zoteroWinWordIntegration/**/Debug
4 | build/zoteroWinWordIntegration/**/x64
5 | build/zoteroWinWordIntegration/**/ARM64
6 | build/zoteroWinWordIntegration/**/zoteroWinWordIntegration.log
7 | *.vcxproj.user
8 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "build/tools/officeparser"]
2 | path = build/tools/officeparser
3 | url = https://github.com/unixfreak0037/officeparser.git
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: generic
2 | notifications:
3 | email: false
4 | script: build/template/unpack_templates.sh && build/template/check_template_src.sh
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Zotero Word for Windows Integration
2 |
3 | This is a Firefox add-on that consists of a library written in C++ that communicates with Microsoft Word out of process using OLE Automation, a js-ctypes wrapper for said library, and a template that is installed into Microsoft Word to communicate with Zotero.
4 |
5 | ## C++ Library Build Requirements
6 | - Visual Studio (currently 2017)
7 | - Windows XP C++ libraries (install in VS by right-clicking the project and selecting "Install Missing Features")
8 | - Microsoft Office (previously build with 2010, but newer versions should work)
9 |
10 | ## To Build the C++ Library
11 | - Open `build/zoteroWinWordIntegration/zoteroWinWordIntegration.sln`
12 | - Change `imports.h `to point to the appropriate files (may be in different places with newer Office)
13 | - Set to Release configuration in the dropdown in the toolbar
14 | - Set to Win32 target in dropdown to the right of Release dropdown
15 | - Build->Build Solution
16 | - Set to x64 target in dropdown
17 | - Build->Build Solution
18 |
19 | ## Template Build Requirements
20 | - Templates should be built with the oldest version of Word to be supported. Otherwise older versions of Word may fail to function properly. This is currently:
21 | - Word 2007 (for the ribbonized dotm template)
22 | - Word 2003 (for the old dot template)
23 |
24 | ## To Modify/Build the Templates
25 | - Open the template from inside Microsoft Word
26 | - Go to View->Macros->View Macros (Ribbonized Word) or Tools->Macros->View Macros (Word 2003) and click "Edit" for one of the Zotero macros
27 | - Edit/replace code as desired
28 | - Go to Debug->Compile Project to ensure there are no code errors
29 | - Run `build/template/unpack_templates.sh`
30 |
31 | ## Development Starter's Guide
32 |
33 | Start by opening the dotm/dot template in Word. Word templates have support for custom macros
34 | and adding UI elements to call the macros, which is how the extension is implemented on Word.
35 | RibbonUI can be edited by extracting the dotm file or using the [Custom UI editor](http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/06/7293.aspx).
36 | To edit the .dot template UI Word for Windows 2003 is needed.
37 | In VBA macro code you will find that [SendMessage](https://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx)
38 | protocol is used to issue commands to Zotero process from Word. These commands are received in [zotero-service.js](https://github.com/zotero/zotero/blob/eaf8d3696359dcea0edaa2fd9bc1e4cf5d985014/components/zotero-service.js#L516-L516)
39 | where they are passed to integration.js.
40 |
41 | Zotero talks to Word via [js-ctype bindings](https://github.com/zotero/zotero-word-for-windows-integration/blob/4f07be4bfaa3f37897a5af5371ea20353214f23e/components/zoteroWinWordIntegration.js#L52-L52)
42 | to a C++ OLE Automation based [library](https://github.com/zotero/zotero-word-for-windows-integration/blob/8d1807584d02f3b10715dd9895413c04349d45e8/build/zoteroWinWordIntegration/zoteroWinWordIntegration.h).
43 | To generate new interfaces for Word interop communications you should use the Add New Class wizard in
44 | Visual Studio and select 'MFC Class from Typelib'. The interop API docs can be found in the [MSDN](https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word._document?view=word-pia).
45 | The plugin should technically work with Word versions starting with 2003, but we have stopped supporting everything below Word 2010
46 | due to impossible to fix bugs cropping up as time goes on and Microsoft drops compatibility themselves.
47 | Some API calls are on a deprecation path, so we may be inevitably be forced to move
48 | away or split the library into multiple DLLs.
49 |
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/customUI.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/addEditZoteroBibliography-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/addEditZoteroBibliography-small.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/addEditZoteroBibliography.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/addEditZoteroBibliography.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/addEditZoteroCitation-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/addEditZoteroCitation-small.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/addEditZoteroCitation0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/addEditZoteroCitation0.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/addZoteroNote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/addZoteroNote.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/setZoteroDocPrefs-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/setZoteroDocPrefs-small.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/setZoteroDocPrefs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/setZoteroDocPrefs.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/customUI/images/zotero-z-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/template/Zotero.dotm/customUI/images/zotero-z-16.png
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/word/vbaProject.bin/ThisDocument.cls:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "ThisDocument"
2 | Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
3 | Attribute VB_GlobalNameSpace = False
4 | Attribute VB_Creatable = False
5 | Attribute VB_PredeclaredId = True
6 | Attribute VB_Exposed = True
7 | Attribute VB_TemplateDerived = False
8 | Attribute VB_Customizable = True
9 |
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/word/vbaProject.bin/Zotero.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "Zotero"
2 | ' ***** BEGIN LICENSE BLOCK *****
3 | '
4 | ' Copyright (c) 2015 Zotero
5 | ' Center for History and New Media
6 | ' George Mason University, Fairfax, Virginia, USA
7 | ' http://zotero.org
8 | '
9 | ' This program is free software: you can redistribute it and/or modify
10 | ' it under the terms of the GNU General Public License as published by
11 | ' the Free Software Foundation, either version 3 of the License, or
12 | ' (at your option) any later version.
13 | '
14 | ' This program is distributed in the hope that it will be useful,
15 | ' but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | ' GNU General Public License for more details.
18 | '
19 | ' You should have received a copy of the GNU General Public License
20 | ' along with this program. If not, see .
21 | '
22 | ' ***** END LICENSE BLOCK *****
23 |
24 | Option Explicit
25 |
26 | Private Const CP_UTF8 = 65001
27 | Private Const WM_COPYDATA = &H4A
28 | #If VBA7 Then
29 | Global ZotWnd As LongPtr
30 | #Else
31 | Global ZotWnd As Long
32 | #End If
33 | Global IsZotero7 As Boolean
34 |
35 | #If VBA7 Then
36 | Type COPYDATASTRUCT
37 | dwData As LongPtr
38 | cbData As Long
39 | lpData As LongPtr
40 | End Type
41 | Private Declare PtrSafe Function FindWindow Lib "user32" Alias _
42 | "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
43 | As String) As LongPtr
44 | Private Declare PtrSafe Function FindWindowEx Lib "user32" Alias _
45 | "FindWindowExA" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, _
46 | ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPtr
47 | Private Declare PtrSafe Function SendMessage Lib "user32" Alias _
48 | "SendMessageA" (ByVal hwnd As LongPtr, ByVal wMsg As Long, ByVal _
49 | wParam As Long, lParam As Any) As Integer
50 | Private Declare PtrSafe Function SetForegroundWindow Lib "user32" _
51 | (ByVal hwnd As LongPtr) As Boolean
52 | Private Declare PtrSafe Function EnumThreadWindows Lib "user32" _
53 | (ByVal dwThreadId As Long, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Boolean
54 | Private Declare PtrSafe Function GetWindowThreadProcessId Lib "user32" _
55 | (ByVal hwnd As LongPtr, lpdwProcessId As Long) As Long
56 | Private Declare PtrSafe Function GetClassName Lib "user32" Alias "GetClassNameA" _
57 | (ByVal hwnd As LongPtr, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
58 | Private Declare PtrSafe Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As Long, _
59 | ByVal dwflags As Long, ByVal lpWideCharStr As LongPtr, _
60 | ByVal cchWideChar As Long, lpMultiByteStr As Any, _
61 | ByVal cchMultiByte As Long, ByVal lpDefaultChar As Long, _
62 | ByVal lpUsedDefaultChar As Long) As Long
63 | #Else
64 | Type COPYDATASTRUCT
65 | dwData As Long
66 | cbData As Long
67 | lpData As Long
68 | End Type
69 | Private Declare Function FindWindow Lib "user32" Alias _
70 | "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
71 | As String) As Long
72 | Private Declare Function FindWindowEx Lib "user32" Alias _
73 | "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
74 | ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
75 | Private Declare Function SendMessage Lib "user32" Alias _
76 | "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
77 | wParam As Long, lParam As Any) As Integer
78 | Private Declare Function SetForegroundWindow Lib "user32" _
79 | (ByVal hwnd As Long) As Boolean
80 | Private Declare Function EnumThreadWindows Lib "user32" _
81 | (ByVal dwThreadId As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Boolean
82 | Private Declare Function GetWindowThreadProcessId Lib "user32" _
83 | (ByVal hwnd As Long, lpdwProcessId As Long) As Long
84 | Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
85 | (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
86 | Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
87 | (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
88 | Private Declare Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As Long, _
89 | ByVal dwflags As Long, ByVal lpWideCharStr As Long, _
90 | ByVal cchWideChar As Long, lpMultiByteStr As Any, _
91 | ByVal cchMultiByte As Long, ByVal lpDefaultChar As Long, _
92 | ByVal lpUsedDefaultChar As Long) As Long
93 | #End If
94 |
95 | Public Sub ZoteroInsertCitation()
96 | Call ZoteroCommand("addCitation", True)
97 | End Sub
98 |
99 | Public Sub ZoteroInsertBibliography()
100 | Call ZoteroCommand("addBibliography", False)
101 | End Sub
102 |
103 | Public Sub ZoteroEditCitation()
104 | Call ZoteroCommand("editCitation", True)
105 | End Sub
106 |
107 | Public Sub ZoteroEditBibliography()
108 | Call ZoteroCommand("editBibliography", True)
109 | End Sub
110 |
111 | Public Sub ZoteroAddEditCitation()
112 | Call ZoteroCommand("addEditCitation", True)
113 | End Sub
114 |
115 | Public Sub ZoteroAddNote()
116 | Call ZoteroCommand("addNote", True)
117 | End Sub
118 |
119 | Public Sub ZoteroAddEditBibliography()
120 | Call ZoteroCommand("addEditBibliography", True)
121 | End Sub
122 |
123 | Public Sub ZoteroSetDocPrefs()
124 | Call ZoteroCommand("setDocPrefs", True)
125 | End Sub
126 |
127 | Public Sub ZoteroRefresh()
128 | Call ZoteroCommand("refresh", False)
129 | End Sub
130 |
131 | Public Sub ZoteroRemoveCodes()
132 | Call ZoteroCommand("removeCodes", False)
133 | End Sub
134 |
135 | Private Sub FindZoteroWindow()
136 | ZotWnd = 0
137 | #If VBA7 Then
138 | Dim ThWnd As LongPtr
139 | #Else
140 | Dim ThWnd As Long
141 | #End If
142 | ' Zotero 6 / FX60+
143 | ThWnd = FindWindow("ZoteroMessageWindow", vbNullString)
144 | If ThWnd <> 0 Then
145 | ZotWnd = ThWnd
146 | Exit Sub
147 | End If
148 |
149 | IsZotero7 = True
150 |
151 | ' Zotero 7 / FX102+
152 | Dim lpdwThreadId As Long
153 | ThWnd = FindWindow("MozillaWindowClass", vbNullString)
154 | Do While ThWnd <> 0
155 | lpdwThreadId = GetWindowThreadProcessId(ThWnd, 0)
156 | Call EnumThreadWindows(lpdwThreadId, AddressOf EnumWindowsCallback, ByVal 0&)
157 | If ZotWnd <> 0 Then
158 | Exit Do
159 | End If
160 | ThWnd = FindWindowEx(0, ThWnd, "MozillaWindowClass", vbNullString)
161 | Loop
162 | End Sub
163 |
164 | Function EnumWindowsCallback(ByVal hwnd As Long, ByVal lParams As Long) As Long ' {
165 | Dim windowClass As String * 256
166 | Dim retVal As Long
167 | Dim zoteroPosition As Long
168 | Dim remoteWindowPosition As Long
169 |
170 | retVal = GetClassName(hwnd, windowClass, 255)
171 | windowClass = Left$(windowClass, retVal)
172 | zoteroPosition = InStr(windowClass, "Mozilla_zotero_")
173 | remoteWindowPosition = InStr(windowClass, "RemoteWindow")
174 | ' Looking for window name like `Mozilla_zotero_%profileName%_RemoteWindow`
175 | ' which is not configurable and used to be much simpler in Z6 - `ZoteroMessageWindow`
176 | If zoteroPosition <> 0 And remoteWindowPosition <> 0 Then
177 | ZotWnd = hwnd
178 | EnumWindowsCallback = False
179 | Else
180 | '
181 | ' Return true to indicate that we want to continue
182 | ' with the enumeration of the windows:
183 | '
184 | EnumWindowsCallback = True
185 | End If
186 | End Function ' }
187 |
188 |
189 | Sub ZoteroCommand(cmd As String, bringToFront As Boolean)
190 | Dim cds As COPYDATASTRUCT
191 | Dim a$, args$, name$, templateVersion$
192 | Dim i As Long
193 | Dim ignore As Long
194 | Dim sBuffer$
195 | Dim lLength As Long
196 | Dim buf() As Byte
197 |
198 | Call FindZoteroWindow
199 | If ZotWnd = 0 Then
200 | MsgBox ("Word could not communicate with Zotero. Please ensure Zotero is running and try again. If this problem persists, see https://www.zotero.org/support/word_processor_plugin_troubleshooting")
201 | Exit Sub
202 | End If
203 |
204 | ' Allow Firefox to bring a window to the front
205 | If bringToFront Then Call SetForegroundWindow(ZotWnd)
206 |
207 | ' Get path to active document
208 | If ActiveDocument.Path <> "" Then
209 | name$ = ActiveDocument.Path & Application.PathSeparator & ActiveDocument.name
210 | Else
211 | name$ = ActiveDocument.name
212 | End If
213 |
214 | templateVersion$ = 1
215 |
216 | ' Set up command line arguments
217 | name$ = Replace(name$, """", """""")
218 | args$ = "-silent -ZoteroIntegrationAgent WinWord -ZoteroIntegrationCommand " & cmd & " -ZoteroIntegrationDocument """ & name$ & """ -ZoteroIntegrationTemplateVersion " & templateVersion$
219 | a$ = "zotero.exe " & args$ & Chr$(0) & "C:\"
220 |
221 | If IsZotero7 Then
222 | ' With FX128+ WM_COPYDATA either has to be in UTF16 (native VBA string encoding)
223 | ' or the UTF8 WM_COPYDATA must start with Fire + Fox emojis. We cannot do that
224 | ' because the VBA editor doesn't support unicode at all.
225 | ' Either way this works with FX115 too which is now released
226 | ' so we do this for Zotero 7
227 | cds.dwData = 2
228 | cds.cbData = LenB(a$)
229 | cds.lpData = StrPtr(a$)
230 | Else
231 | ' Do some UTF-8 magic for Zotero 6
232 | lLength = WideCharToMultiByte(CP_UTF8, 0, StrPtr(a$), -1, ByVal 0, 0, 0, 0)
233 | ReDim buf(lLength) As Byte
234 | Call WideCharToMultiByte(CP_UTF8, 0, StrPtr(a$), -1, buf(1), lLength, 0, 0)
235 |
236 | cds.dwData = 1
237 | cds.cbData = lLength
238 | cds.lpData = VarPtr(buf(1))
239 | End If
240 |
241 | ' Send message to Firefox
242 | i = SendMessage(ZotWnd, WM_COPYDATA, 0, cds)
243 |
244 | ' Handle error
245 | If Err.LastDllError = 5 Then
246 | If Dir("C:\Program Files\Zotero\zotero.exe.exe") <> "" Then
247 | Call Shell("""C:\Program Files\Zotero\zotero.exe"" " & args$, vbNormalFocus)
248 | ElseIf Dir("C:\Program Files (x86)\Zotero\zotero.exe.exe") <> "" Then
249 | Call Shell("""C:\Program Files (x86)\Zotero\zotero.exe.exe"" " & args$, vbNormalFocus)
250 | End If
251 | End If
252 | End Sub
253 |
254 |
--------------------------------------------------------------------------------
/build/template/Zotero.dotm/word/vbaProject.bin/ZoteroRibbon.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "ZoteroRibbon"
2 | ' ***** BEGIN LICENSE BLOCK *****
3 | '
4 | ' Copyright (c) 2015 Zotero
5 | ' Center for History and New Media
6 | ' George Mason University, Fairfax, Virginia, USA
7 | ' http://zotero.org
8 | '
9 | ' This program is free software: you can redistribute it and/or modify
10 | ' it under the terms of the GNU General Public License as published by
11 | ' the Free Software Foundation, either version 3 of the License, or
12 | ' (at your option) any later version.
13 | '
14 | ' This program is distributed in the hope that it will be useful,
15 | ' but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | ' GNU General Public License for more details.
18 | '
19 | ' You should have received a copy of the GNU General Public License
20 | ' along with this program. If not, see .
21 | '
22 | ' ***** END LICENSE BLOCK *****
23 |
24 | Option Explicit
25 |
26 | Sub ZoteroRibbonAddEditCitation(button As IRibbonControl)
27 | Call ZoteroAddEditCitation
28 | End Sub
29 |
30 | Sub ZoteroRibbonAddNote(button As IRibbonControl)
31 | Call ZoteroAddNote
32 | End Sub
33 |
34 | Sub ZoteroRibbonAddEditBibliography(button As IRibbonControl)
35 | Call ZoteroAddEditBibliography
36 | End Sub
37 |
38 | Sub ZoteroRibbonSetDocPrefs(button As IRibbonControl)
39 | Call ZoteroSetDocPrefs
40 | End Sub
41 |
42 | Sub ZoteroRibbonRefresh(button As IRibbonControl)
43 | Call ZoteroRefresh
44 | End Sub
45 |
46 | Sub ZoteroRibbonRemoveCodes(button As IRibbonControl)
47 | Call ZoteroRemoveCodes
48 | End Sub
49 |
50 | Sub ZoteroTabLabel(tb As IRibbonControl, ByRef returnedVal)
51 | Dim ver As Double
52 | ver = Val(Application.Version)
53 | If ver >= 15 And ver < 16 Then
54 | returnedVal = "ZOTERO"
55 | Else
56 | returnedVal = "Zotero"
57 | End If
58 | End Sub
59 |
--------------------------------------------------------------------------------
/build/template/check_template_src.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd "$( dirname "${BASH_SOURCE[0]}" )"
3 | modifiedFiles=`git status -s -u | wc -l`
4 | if [ "$modifiedFiles" != "0" ]; then
5 | echo "Template source is not up to date. Use unpack_templates.sh to update source"
6 | exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/build/template/unpack_templates.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 | TEMPLATE_DIR="$CWD/Zotero.dotm"
5 | BIN_DIR="$TEMPLATE_DIR/word/vbaProject.bin"
6 |
7 | # Zotero.dotm
8 | echo 'Unpacking Zotero.dotm...'
9 |
10 | cd "$( dirname "${BASH_SOURCE[0]}" )"
11 | rm -rf $TEMPLATE_DIR*
12 |
13 | # Other than vbaProject.bin, all files are XML
14 | unzip -q ../../install/Zotero.dotm -d $TEMPLATE_DIR
15 |
16 | # Pretty-print XML files
17 | find Zotero.dotm/ -type f \( -iname '*.xml' -o -iname '*.rels' \) -exec xmllint --output '{}' --format '{}' \;
18 |
19 | # Extract vbaProject.bin
20 | rm $BIN_DIR
21 | mkdir $BIN_DIR
22 | python ../tools/officeparser/officeparser.py -l ERROR -o $BIN_DIR \
23 | --extract-macros ../../install/Zotero.dotm
24 |
25 | # Remove unnecessary files
26 | rm -rf $TEMPLATE_DIR/_rels $TEMPLATE_DIR/docProps $TEMPLATE_DIR/word/_rels \
27 | $TEMPLATE_DIR/word/theme $TEMPLATE_DIR/word/*.xml $TEMPLATE_DIR/customUI/_rels \
28 | "$TEMPLATE_DIR/[Content_Types].xml"
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CBookmark0.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CBookmark0 wrapper class
4 |
5 | class CBookmark0 : public COleDispatchDriver
6 | {
7 | public:
8 | CBookmark0(){} // Calls COleDispatchDriver default constructor
9 | CBookmark0(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CBookmark0(const CBookmark0& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Bookmark methods
20 | public:
21 | CString get_Name()
22 | {
23 | CString result;
24 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
25 | return result;
26 | }
27 | LPDISPATCH get_Range()
28 | {
29 | LPDISPATCH result;
30 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
31 | return result;
32 | }
33 | BOOL get_Empty()
34 | {
35 | BOOL result;
36 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Start()
40 | {
41 | long result;
42 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_Start(long newValue)
46 | {
47 | static BYTE parms[] = VTS_I4 ;
48 | InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | long get_End()
51 | {
52 | long result;
53 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
54 | return result;
55 | }
56 | void put_End(long newValue)
57 | {
58 | static BYTE parms[] = VTS_I4 ;
59 | InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
60 | }
61 | BOOL get_Column()
62 | {
63 | BOOL result;
64 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
65 | return result;
66 | }
67 | long get_StoryType()
68 | {
69 | long result;
70 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
71 | return result;
72 | }
73 | LPDISPATCH get_Application()
74 | {
75 | LPDISPATCH result;
76 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
77 | return result;
78 | }
79 | long get_Creator()
80 | {
81 | long result;
82 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
83 | return result;
84 | }
85 | LPDISPATCH get_Parent()
86 | {
87 | LPDISPATCH result;
88 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
89 | return result;
90 | }
91 | void Select()
92 | {
93 | InvokeHelper(0xffff, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
94 | }
95 | void Delete()
96 | {
97 | InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
98 | }
99 | LPDISPATCH Copy(LPCTSTR Name)
100 | {
101 | LPDISPATCH result;
102 | static BYTE parms[] = VTS_BSTR ;
103 | InvokeHelper(0xc, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Name);
104 | return result;
105 | }
106 |
107 | // Bookmark properties
108 | public:
109 |
110 | };
111 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CBookmarks.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CBookmarks wrapper class
4 |
5 | class CBookmarks : public COleDispatchDriver
6 | {
7 | public:
8 | CBookmarks(){} // Calls COleDispatchDriver default constructor
9 | CBookmarks(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CBookmarks(const CBookmarks& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Bookmarks methods
20 | public:
21 | LPUNKNOWN get__NewEnum()
22 | {
23 | LPUNKNOWN result;
24 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Count()
28 | {
29 | long result;
30 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | long get_DefaultSorting()
34 | {
35 | long result;
36 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
37 | return result;
38 | }
39 | void put_DefaultSorting(long newValue)
40 | {
41 | static BYTE parms[] = VTS_I4 ;
42 | InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
43 | }
44 | BOOL get_ShowHidden()
45 | {
46 | BOOL result;
47 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
48 | return result;
49 | }
50 | void put_ShowHidden(BOOL newValue)
51 | {
52 | static BYTE parms[] = VTS_BOOL ;
53 | InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
54 | }
55 | LPDISPATCH get_Application()
56 | {
57 | LPDISPATCH result;
58 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
59 | return result;
60 | }
61 | long get_Creator()
62 | {
63 | long result;
64 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
65 | return result;
66 | }
67 | LPDISPATCH get_Parent()
68 | {
69 | LPDISPATCH result;
70 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
71 | return result;
72 | }
73 | LPDISPATCH Item(long Index)
74 | {
75 | LPDISPATCH result;
76 | static BYTE parms[] = VTS_I4 ;
77 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
78 | return result;
79 | }
80 | LPDISPATCH Item(LPCTSTR Name)
81 | {
82 | LPDISPATCH result;
83 | static BYTE parms[] = VTS_BSTR ;
84 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Name);
85 | return result;
86 | }
87 | LPDISPATCH Add(LPCTSTR Name, LPDISPATCH Range)
88 | {
89 | LPDISPATCH result;
90 | static BYTE parms[] = VTS_BSTR VTS_DISPATCH ;
91 | InvokeHelper(0x5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Name, Range);
92 | return result;
93 | }
94 | BOOL Exists(LPCTSTR Name)
95 | {
96 | BOOL result;
97 | static BYTE parms[] = VTS_BSTR ;
98 | InvokeHelper(0x6, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, Name);
99 | return result;
100 | }
101 |
102 | // Bookmarks properties
103 | public:
104 |
105 | };
106 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CCustomProperties.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // NOTE: The generated header here is used with office.core.DocumentProperties
4 | // for which the TypeLib definition in MSO.DLL is not included for some reason.
5 | // office.interop.word.CustomProperties has been repurposed for the job.
6 | // See https://msdn.microsoft.com/en-us/library/microsoft.office.core.documentproperties.aspx
7 | // https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.customproperties(v=office.11).aspx
8 | // and https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word._document.customdocumentproperties(v=office.11).aspx
9 |
10 | // CCustomProperties wrapper class
11 |
12 | class CCustomProperties : public COleDispatchDriver
13 | {
14 | public:
15 | CCustomProperties(){} // Calls COleDispatchDriver default constructor
16 | CCustomProperties(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
17 | CCustomProperties(const CCustomProperties& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
18 |
19 | // Attributes
20 | public:
21 |
22 | // Operations
23 | public:
24 |
25 |
26 | // CustomProperties methods
27 | public:
28 | LPUNKNOWN get__NewEnum()
29 | {
30 | LPUNKNOWN result;
31 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
32 | return result;
33 | }
34 | long get_Count()
35 | {
36 | long result;
37 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
38 | return result;
39 | }
40 | LPDISPATCH Item(LPCTSTR Name)
41 | {
42 | LPDISPATCH result;
43 | static BYTE parms[] = VTS_BSTR ;
44 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, Name);
45 | return result;
46 | }
47 | LPDISPATCH Item(long Index)
48 | {
49 | LPDISPATCH result;
50 | static BYTE parms[] = VTS_I4 ;
51 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, Index);
52 | return result;
53 | }
54 | LPDISPATCH Add(LPCTSTR Name, bool LinkToContent, short Type, LPCTSTR Value)
55 | {
56 | LPDISPATCH result;
57 | static BYTE parms[] = VTS_BSTR VTS_BOOL VTS_I4 VTS_BSTR ;
58 | InvokeHelper(0x5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Name, LinkToContent, Type, Value);
59 | return result;
60 | }
61 |
62 | // CustomProperties properties
63 | public:
64 |
65 | };
66 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CCustomProperty.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CCustomProperty wrapper class
4 |
5 | class CCustomProperty : public COleDispatchDriver
6 | {
7 | public:
8 | CCustomProperty(){} // Calls COleDispatchDriver default constructor
9 | CCustomProperty(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CCustomProperty(const CCustomProperty& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // CustomProperty methods
20 | public:
21 | CString get_Name()
22 | {
23 | CString result;
24 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
25 | return result;
26 | }
27 | CString get_Value()
28 | {
29 | CString result;
30 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
31 | return result;
32 | }
33 | void put_Value(LPCTSTR newValue)
34 | {
35 | static BYTE parms[] = VTS_BSTR ;
36 | InvokeHelper(0x0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
37 | }
38 | void Delete()
39 | {
40 | InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
41 | }
42 |
43 | // CustomProperty properties
44 | public:
45 |
46 | };
47 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CEndnote.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CEndnote wrapper class
4 |
5 | class CEndnote : public COleDispatchDriver
6 | {
7 | public:
8 | CEndnote(){} // Calls COleDispatchDriver default constructor
9 | CEndnote(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CEndnote(const CEndnote& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Endnote methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_Range()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Reference()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | long get_Index()
52 | {
53 | long result;
54 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
55 | return result;
56 | }
57 | void Delete()
58 | {
59 | InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
60 | }
61 |
62 | // Endnote properties
63 | public:
64 |
65 | };
66 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CEndnoteOptions.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CEndnoteOptions wrapper class
4 |
5 | class CEndnoteOptions : public COleDispatchDriver
6 | {
7 | public:
8 | CEndnoteOptions(){} // Calls COleDispatchDriver default constructor
9 | CEndnoteOptions(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CEndnoteOptions(const CEndnoteOptions& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // EndnoteOptions methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Location()
40 | {
41 | long result;
42 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_Location(long newValue)
46 | {
47 | static BYTE parms[] = VTS_I4 ;
48 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | long get_NumberStyle()
51 | {
52 | long result;
53 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
54 | return result;
55 | }
56 | void put_NumberStyle(long newValue)
57 | {
58 | static BYTE parms[] = VTS_I4 ;
59 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
60 | }
61 | long get_StartingNumber()
62 | {
63 | long result;
64 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
65 | return result;
66 | }
67 | void put_StartingNumber(long newValue)
68 | {
69 | static BYTE parms[] = VTS_I4 ;
70 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
71 | }
72 | long get_NumberingRule()
73 | {
74 | long result;
75 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
76 | return result;
77 | }
78 | void put_NumberingRule(long newValue)
79 | {
80 | static BYTE parms[] = VTS_I4 ;
81 | InvokeHelper(0x67, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
82 | }
83 |
84 | // EndnoteOptions properties
85 | public:
86 |
87 | };
88 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CEndnotes.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CEndnotes wrapper class
4 |
5 | class CEndnotes : public COleDispatchDriver
6 | {
7 | public:
8 | CEndnotes(){} // Calls COleDispatchDriver default constructor
9 | CEndnotes(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CEndnotes(const CEndnotes& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Endnotes methods
20 | public:
21 | LPUNKNOWN get__NewEnum()
22 | {
23 | LPUNKNOWN result;
24 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Count()
28 | {
29 | long result;
30 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Application()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Creator()
40 | {
41 | long result;
42 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Parent()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | long get_Location()
52 | {
53 | long result;
54 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
55 | return result;
56 | }
57 | void put_Location(long newValue)
58 | {
59 | static BYTE parms[] = VTS_I4 ;
60 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
61 | }
62 | long get_NumberStyle()
63 | {
64 | long result;
65 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
66 | return result;
67 | }
68 | void put_NumberStyle(long newValue)
69 | {
70 | static BYTE parms[] = VTS_I4 ;
71 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
72 | }
73 | long get_StartingNumber()
74 | {
75 | long result;
76 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
77 | return result;
78 | }
79 | void put_StartingNumber(long newValue)
80 | {
81 | static BYTE parms[] = VTS_I4 ;
82 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
83 | }
84 | long get_NumberingRule()
85 | {
86 | long result;
87 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
88 | return result;
89 | }
90 | void put_NumberingRule(long newValue)
91 | {
92 | static BYTE parms[] = VTS_I4 ;
93 | InvokeHelper(0x67, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
94 | }
95 | LPDISPATCH get_Separator()
96 | {
97 | LPDISPATCH result;
98 | InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
99 | return result;
100 | }
101 | LPDISPATCH get_ContinuationSeparator()
102 | {
103 | LPDISPATCH result;
104 | InvokeHelper(0x69, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
105 | return result;
106 | }
107 | LPDISPATCH get_ContinuationNotice()
108 | {
109 | LPDISPATCH result;
110 | InvokeHelper(0x6a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
111 | return result;
112 | }
113 | LPDISPATCH Item(long Index)
114 | {
115 | LPDISPATCH result;
116 | static BYTE parms[] = VTS_I4 ;
117 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
118 | return result;
119 | }
120 | LPDISPATCH Add(LPDISPATCH Range, VARIANT * Reference, VARIANT * Text)
121 | {
122 | LPDISPATCH result;
123 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT ;
124 | InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Range, Reference, Text);
125 | return result;
126 | }
127 | void Convert()
128 | {
129 | InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
130 | }
131 | void SwapWithFootnotes()
132 | {
133 | InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
134 | }
135 | void ResetSeparator()
136 | {
137 | InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
138 | }
139 | void ResetContinuationSeparator()
140 | {
141 | InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
142 | }
143 | void ResetContinuationNotice()
144 | {
145 | InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
146 | }
147 |
148 | // Endnotes properties
149 | public:
150 |
151 | };
152 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CField.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CField wrapper class
4 |
5 | class CField : public COleDispatchDriver
6 | {
7 | public:
8 | CField(){} // Calls COleDispatchDriver default constructor
9 | CField(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CField(const CField& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Field methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_Code()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_Code(LPDISPATCH newValue)
46 | {
47 | static BYTE parms[] = VTS_DISPATCH ;
48 | InvokeHelper(0x0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | long get_Type()
51 | {
52 | long result;
53 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
54 | return result;
55 | }
56 | BOOL get_Locked()
57 | {
58 | BOOL result;
59 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
60 | return result;
61 | }
62 | void put_Locked(BOOL newValue)
63 | {
64 | static BYTE parms[] = VTS_BOOL ;
65 | InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
66 | }
67 | long get_Kind()
68 | {
69 | long result;
70 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
71 | return result;
72 | }
73 | LPDISPATCH get_Result()
74 | {
75 | LPDISPATCH result;
76 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
77 | return result;
78 | }
79 | void put_Result(LPDISPATCH newValue)
80 | {
81 | static BYTE parms[] = VTS_DISPATCH ;
82 | InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
83 | }
84 | CString get_Data()
85 | {
86 | CString result;
87 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
88 | return result;
89 | }
90 | void put_Data(LPCTSTR newValue)
91 | {
92 | static BYTE parms[] = VTS_BSTR ;
93 | InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
94 | }
95 | LPDISPATCH get_Next()
96 | {
97 | LPDISPATCH result;
98 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
99 | return result;
100 | }
101 | LPDISPATCH get_Previous()
102 | {
103 | LPDISPATCH result;
104 | InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
105 | return result;
106 | }
107 | long get_Index()
108 | {
109 | long result;
110 | InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
111 | return result;
112 | }
113 | BOOL get_ShowCodes()
114 | {
115 | BOOL result;
116 | InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
117 | return result;
118 | }
119 | void put_ShowCodes(BOOL newValue)
120 | {
121 | static BYTE parms[] = VTS_BOOL ;
122 | InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
123 | }
124 | LPDISPATCH get_LinkFormat()
125 | {
126 | LPDISPATCH result;
127 | InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
128 | return result;
129 | }
130 | LPDISPATCH get_OLEFormat()
131 | {
132 | LPDISPATCH result;
133 | InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
134 | return result;
135 | }
136 | LPDISPATCH get_InlineShape()
137 | {
138 | LPDISPATCH result;
139 | InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
140 | return result;
141 | }
142 | void Select()
143 | {
144 | InvokeHelper(0xffff, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
145 | }
146 | BOOL Update()
147 | {
148 | BOOL result;
149 | InvokeHelper(0x65, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
150 | return result;
151 | }
152 | void Unlink()
153 | {
154 | InvokeHelper(0x66, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
155 | }
156 | void UpdateSource()
157 | {
158 | InvokeHelper(0x67, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
159 | }
160 | void DoClick()
161 | {
162 | InvokeHelper(0x68, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
163 | }
164 | void Copy()
165 | {
166 | InvokeHelper(0x69, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
167 | }
168 | void Cut()
169 | {
170 | InvokeHelper(0x6a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
171 | }
172 | void Delete()
173 | {
174 | InvokeHelper(0x6b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
175 | }
176 |
177 | // Field properties
178 | public:
179 |
180 | };
181 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CFields.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CFields wrapper class
4 |
5 | class CFields : public COleDispatchDriver
6 | {
7 | public:
8 | CFields(){} // Calls COleDispatchDriver default constructor
9 | CFields(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CFields(const CFields& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Fields methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Count()
40 | {
41 | long result;
42 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | long get_Locked()
46 | {
47 | long result;
48 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
49 | return result;
50 | }
51 | void put_Locked(long newValue)
52 | {
53 | static BYTE parms[] = VTS_I4 ;
54 | InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
55 | }
56 | LPUNKNOWN get__NewEnum()
57 | {
58 | LPUNKNOWN result;
59 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
60 | return result;
61 | }
62 | LPDISPATCH Item(long Index)
63 | {
64 | LPDISPATCH result;
65 | static BYTE parms[] = VTS_I4 ;
66 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
67 | return result;
68 | }
69 | void ToggleShowCodes()
70 | {
71 | InvokeHelper(0x64, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
72 | }
73 | long Update()
74 | {
75 | long result;
76 | InvokeHelper(0x65, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
77 | return result;
78 | }
79 | void Unlink()
80 | {
81 | InvokeHelper(0x66, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
82 | }
83 | void UpdateSource()
84 | {
85 | InvokeHelper(0x68, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
86 | }
87 | LPDISPATCH Add(LPDISPATCH Range, VARIANT * Type, VARIANT * Text, VARIANT * PreserveFormatting)
88 | {
89 | LPDISPATCH result;
90 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
91 | InvokeHelper(0x69, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Range, Type, Text, PreserveFormatting);
92 | return result;
93 | }
94 |
95 | // Fields properties
96 | public:
97 |
98 | };
99 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CFont0.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CFont0 wrapper class
4 |
5 | class CFont0 : public COleDispatchDriver
6 | {
7 | public:
8 | CFont0(){} // Calls COleDispatchDriver default constructor
9 | CFont0(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CFont0(const CFont0& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // _Font methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_Duplicate()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | long get_Bold()
46 | {
47 | long result;
48 | InvokeHelper(0x82, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
49 | return result;
50 | }
51 | void put_Bold(long newValue)
52 | {
53 | static BYTE parms[] = VTS_I4 ;
54 | InvokeHelper(0x82, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
55 | }
56 | long get_Italic()
57 | {
58 | long result;
59 | InvokeHelper(0x83, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
60 | return result;
61 | }
62 | void put_Italic(long newValue)
63 | {
64 | static BYTE parms[] = VTS_I4 ;
65 | InvokeHelper(0x83, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
66 | }
67 | long get_Hidden()
68 | {
69 | long result;
70 | InvokeHelper(0x84, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
71 | return result;
72 | }
73 | void put_Hidden(long newValue)
74 | {
75 | static BYTE parms[] = VTS_I4 ;
76 | InvokeHelper(0x84, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
77 | }
78 | long get_SmallCaps()
79 | {
80 | long result;
81 | InvokeHelper(0x85, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
82 | return result;
83 | }
84 | void put_SmallCaps(long newValue)
85 | {
86 | static BYTE parms[] = VTS_I4 ;
87 | InvokeHelper(0x85, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
88 | }
89 | long get_AllCaps()
90 | {
91 | long result;
92 | InvokeHelper(0x86, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
93 | return result;
94 | }
95 | void put_AllCaps(long newValue)
96 | {
97 | static BYTE parms[] = VTS_I4 ;
98 | InvokeHelper(0x86, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
99 | }
100 | long get_StrikeThrough()
101 | {
102 | long result;
103 | InvokeHelper(0x87, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
104 | return result;
105 | }
106 | void put_StrikeThrough(long newValue)
107 | {
108 | static BYTE parms[] = VTS_I4 ;
109 | InvokeHelper(0x87, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
110 | }
111 | long get_DoubleStrikeThrough()
112 | {
113 | long result;
114 | InvokeHelper(0x88, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
115 | return result;
116 | }
117 | void put_DoubleStrikeThrough(long newValue)
118 | {
119 | static BYTE parms[] = VTS_I4 ;
120 | InvokeHelper(0x88, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
121 | }
122 | long get_ColorIndex()
123 | {
124 | long result;
125 | InvokeHelper(0x89, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
126 | return result;
127 | }
128 | void put_ColorIndex(long newValue)
129 | {
130 | static BYTE parms[] = VTS_I4 ;
131 | InvokeHelper(0x89, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
132 | }
133 | long get_Subscript()
134 | {
135 | long result;
136 | InvokeHelper(0x8a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
137 | return result;
138 | }
139 | void put_Subscript(long newValue)
140 | {
141 | static BYTE parms[] = VTS_I4 ;
142 | InvokeHelper(0x8a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
143 | }
144 | long get_Superscript()
145 | {
146 | long result;
147 | InvokeHelper(0x8b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
148 | return result;
149 | }
150 | void put_Superscript(long newValue)
151 | {
152 | static BYTE parms[] = VTS_I4 ;
153 | InvokeHelper(0x8b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
154 | }
155 | long get_Underline()
156 | {
157 | long result;
158 | InvokeHelper(0x8c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
159 | return result;
160 | }
161 | void put_Underline(long newValue)
162 | {
163 | static BYTE parms[] = VTS_I4 ;
164 | InvokeHelper(0x8c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
165 | }
166 | float get_Size()
167 | {
168 | float result;
169 | InvokeHelper(0x8d, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
170 | return result;
171 | }
172 | void put_Size(float newValue)
173 | {
174 | static BYTE parms[] = VTS_R4 ;
175 | InvokeHelper(0x8d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
176 | }
177 | CString get_Name()
178 | {
179 | CString result;
180 | InvokeHelper(0x8e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
181 | return result;
182 | }
183 | void put_Name(LPCTSTR newValue)
184 | {
185 | static BYTE parms[] = VTS_BSTR ;
186 | InvokeHelper(0x8e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
187 | }
188 | long get_Position()
189 | {
190 | long result;
191 | InvokeHelper(0x8f, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
192 | return result;
193 | }
194 | void put_Position(long newValue)
195 | {
196 | static BYTE parms[] = VTS_I4 ;
197 | InvokeHelper(0x8f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
198 | }
199 | float get_Spacing()
200 | {
201 | float result;
202 | InvokeHelper(0x90, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
203 | return result;
204 | }
205 | void put_Spacing(float newValue)
206 | {
207 | static BYTE parms[] = VTS_R4 ;
208 | InvokeHelper(0x90, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
209 | }
210 | long get_Scaling()
211 | {
212 | long result;
213 | InvokeHelper(0x91, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
214 | return result;
215 | }
216 | void put_Scaling(long newValue)
217 | {
218 | static BYTE parms[] = VTS_I4 ;
219 | InvokeHelper(0x91, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
220 | }
221 | long get_Shadow()
222 | {
223 | long result;
224 | InvokeHelper(0x92, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
225 | return result;
226 | }
227 | void put_Shadow(long newValue)
228 | {
229 | static BYTE parms[] = VTS_I4 ;
230 | InvokeHelper(0x92, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
231 | }
232 | long get_Outline()
233 | {
234 | long result;
235 | InvokeHelper(0x93, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
236 | return result;
237 | }
238 | void put_Outline(long newValue)
239 | {
240 | static BYTE parms[] = VTS_I4 ;
241 | InvokeHelper(0x93, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
242 | }
243 | long get_Emboss()
244 | {
245 | long result;
246 | InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
247 | return result;
248 | }
249 | void put_Emboss(long newValue)
250 | {
251 | static BYTE parms[] = VTS_I4 ;
252 | InvokeHelper(0x94, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
253 | }
254 | float get_Kerning()
255 | {
256 | float result;
257 | InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
258 | return result;
259 | }
260 | void put_Kerning(float newValue)
261 | {
262 | static BYTE parms[] = VTS_R4 ;
263 | InvokeHelper(0x95, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
264 | }
265 | long get_Engrave()
266 | {
267 | long result;
268 | InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
269 | return result;
270 | }
271 | void put_Engrave(long newValue)
272 | {
273 | static BYTE parms[] = VTS_I4 ;
274 | InvokeHelper(0x96, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
275 | }
276 | long get_Animation()
277 | {
278 | long result;
279 | InvokeHelper(0x97, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
280 | return result;
281 | }
282 | void put_Animation(long newValue)
283 | {
284 | static BYTE parms[] = VTS_I4 ;
285 | InvokeHelper(0x97, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
286 | }
287 | LPDISPATCH get_Borders()
288 | {
289 | LPDISPATCH result;
290 | InvokeHelper(0x44c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
291 | return result;
292 | }
293 | void put_Borders(LPDISPATCH newValue)
294 | {
295 | static BYTE parms[] = VTS_DISPATCH ;
296 | InvokeHelper(0x44c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
297 | }
298 | LPDISPATCH get_Shading()
299 | {
300 | LPDISPATCH result;
301 | InvokeHelper(0x99, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
302 | return result;
303 | }
304 | long get_EmphasisMark()
305 | {
306 | long result;
307 | InvokeHelper(0x9a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
308 | return result;
309 | }
310 | void put_EmphasisMark(long newValue)
311 | {
312 | static BYTE parms[] = VTS_I4 ;
313 | InvokeHelper(0x9a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
314 | }
315 | BOOL get_DisableCharacterSpaceGrid()
316 | {
317 | BOOL result;
318 | InvokeHelper(0x9b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
319 | return result;
320 | }
321 | void put_DisableCharacterSpaceGrid(BOOL newValue)
322 | {
323 | static BYTE parms[] = VTS_BOOL ;
324 | InvokeHelper(0x9b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
325 | }
326 | CString get_NameFarEast()
327 | {
328 | CString result;
329 | InvokeHelper(0x9c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
330 | return result;
331 | }
332 | void put_NameFarEast(LPCTSTR newValue)
333 | {
334 | static BYTE parms[] = VTS_BSTR ;
335 | InvokeHelper(0x9c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
336 | }
337 | CString get_NameAscii()
338 | {
339 | CString result;
340 | InvokeHelper(0x9d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
341 | return result;
342 | }
343 | void put_NameAscii(LPCTSTR newValue)
344 | {
345 | static BYTE parms[] = VTS_BSTR ;
346 | InvokeHelper(0x9d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
347 | }
348 | CString get_NameOther()
349 | {
350 | CString result;
351 | InvokeHelper(0x9e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
352 | return result;
353 | }
354 | void put_NameOther(LPCTSTR newValue)
355 | {
356 | static BYTE parms[] = VTS_BSTR ;
357 | InvokeHelper(0x9e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
358 | }
359 | void Grow()
360 | {
361 | InvokeHelper(0x64, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
362 | }
363 | void Shrink()
364 | {
365 | InvokeHelper(0x65, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
366 | }
367 | void Reset()
368 | {
369 | InvokeHelper(0x66, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
370 | }
371 | void SetAsTemplateDefault()
372 | {
373 | InvokeHelper(0x67, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
374 | }
375 | long get_Color()
376 | {
377 | long result;
378 | InvokeHelper(0x9f, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
379 | return result;
380 | }
381 | void put_Color(long newValue)
382 | {
383 | static BYTE parms[] = VTS_I4 ;
384 | InvokeHelper(0x9f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
385 | }
386 | long get_BoldBi()
387 | {
388 | long result;
389 | InvokeHelper(0xa0, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
390 | return result;
391 | }
392 | void put_BoldBi(long newValue)
393 | {
394 | static BYTE parms[] = VTS_I4 ;
395 | InvokeHelper(0xa0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
396 | }
397 | long get_ItalicBi()
398 | {
399 | long result;
400 | InvokeHelper(0xa1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
401 | return result;
402 | }
403 | void put_ItalicBi(long newValue)
404 | {
405 | static BYTE parms[] = VTS_I4 ;
406 | InvokeHelper(0xa1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
407 | }
408 | float get_SizeBi()
409 | {
410 | float result;
411 | InvokeHelper(0xa2, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
412 | return result;
413 | }
414 | void put_SizeBi(float newValue)
415 | {
416 | static BYTE parms[] = VTS_R4 ;
417 | InvokeHelper(0xa2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
418 | }
419 | CString get_NameBi()
420 | {
421 | CString result;
422 | InvokeHelper(0xa3, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
423 | return result;
424 | }
425 | void put_NameBi(LPCTSTR newValue)
426 | {
427 | static BYTE parms[] = VTS_BSTR ;
428 | InvokeHelper(0xa3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
429 | }
430 | long get_ColorIndexBi()
431 | {
432 | long result;
433 | InvokeHelper(0xa4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
434 | return result;
435 | }
436 | void put_ColorIndexBi(long newValue)
437 | {
438 | static BYTE parms[] = VTS_I4 ;
439 | InvokeHelper(0xa4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
440 | }
441 | long get_DiacriticColor()
442 | {
443 | long result;
444 | InvokeHelper(0xa5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
445 | return result;
446 | }
447 | void put_DiacriticColor(long newValue)
448 | {
449 | static BYTE parms[] = VTS_I4 ;
450 | InvokeHelper(0xa5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
451 | }
452 | long get_UnderlineColor()
453 | {
454 | long result;
455 | InvokeHelper(0xa6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
456 | return result;
457 | }
458 | void put_UnderlineColor(long newValue)
459 | {
460 | static BYTE parms[] = VTS_I4 ;
461 | InvokeHelper(0xa6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
462 | }
463 |
464 | // _Font properties
465 | public:
466 |
467 | };
468 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CFootnote.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CFootnote wrapper class
4 |
5 | class CFootnote : public COleDispatchDriver
6 | {
7 | public:
8 | CFootnote(){} // Calls COleDispatchDriver default constructor
9 | CFootnote(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CFootnote(const CFootnote& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Footnote methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_Range()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Reference()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | long get_Index()
52 | {
53 | long result;
54 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
55 | return result;
56 | }
57 | void Delete()
58 | {
59 | InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
60 | }
61 |
62 | // Footnote properties
63 | public:
64 |
65 | };
66 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CFootnoteOptions.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CFootnoteOptions wrapper class
4 |
5 | class CFootnoteOptions : public COleDispatchDriver
6 | {
7 | public:
8 | CFootnoteOptions(){} // Calls COleDispatchDriver default constructor
9 | CFootnoteOptions(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CFootnoteOptions(const CFootnoteOptions& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // FootnoteOptions methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Location()
40 | {
41 | long result;
42 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_Location(long newValue)
46 | {
47 | static BYTE parms[] = VTS_I4 ;
48 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | long get_NumberStyle()
51 | {
52 | long result;
53 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
54 | return result;
55 | }
56 | void put_NumberStyle(long newValue)
57 | {
58 | static BYTE parms[] = VTS_I4 ;
59 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
60 | }
61 | long get_StartingNumber()
62 | {
63 | long result;
64 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
65 | return result;
66 | }
67 | void put_StartingNumber(long newValue)
68 | {
69 | static BYTE parms[] = VTS_I4 ;
70 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
71 | }
72 | long get_NumberingRule()
73 | {
74 | long result;
75 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
76 | return result;
77 | }
78 | void put_NumberingRule(long newValue)
79 | {
80 | static BYTE parms[] = VTS_I4 ;
81 | InvokeHelper(0x67, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
82 | }
83 |
84 | // FootnoteOptions properties
85 | public:
86 |
87 | };
88 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CFootnotes.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CFootnotes wrapper class
4 |
5 | class CFootnotes : public COleDispatchDriver
6 | {
7 | public:
8 | CFootnotes(){} // Calls COleDispatchDriver default constructor
9 | CFootnotes(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CFootnotes(const CFootnotes& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Footnotes methods
20 | public:
21 | LPUNKNOWN get__NewEnum()
22 | {
23 | LPUNKNOWN result;
24 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Count()
28 | {
29 | long result;
30 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Application()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Creator()
40 | {
41 | long result;
42 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Parent()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | long get_Location()
52 | {
53 | long result;
54 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
55 | return result;
56 | }
57 | void put_Location(long newValue)
58 | {
59 | static BYTE parms[] = VTS_I4 ;
60 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
61 | }
62 | long get_NumberStyle()
63 | {
64 | long result;
65 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
66 | return result;
67 | }
68 | void put_NumberStyle(long newValue)
69 | {
70 | static BYTE parms[] = VTS_I4 ;
71 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
72 | }
73 | long get_StartingNumber()
74 | {
75 | long result;
76 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
77 | return result;
78 | }
79 | void put_StartingNumber(long newValue)
80 | {
81 | static BYTE parms[] = VTS_I4 ;
82 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
83 | }
84 | long get_NumberingRule()
85 | {
86 | long result;
87 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
88 | return result;
89 | }
90 | void put_NumberingRule(long newValue)
91 | {
92 | static BYTE parms[] = VTS_I4 ;
93 | InvokeHelper(0x67, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
94 | }
95 | LPDISPATCH get_Separator()
96 | {
97 | LPDISPATCH result;
98 | InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
99 | return result;
100 | }
101 | LPDISPATCH get_ContinuationSeparator()
102 | {
103 | LPDISPATCH result;
104 | InvokeHelper(0x69, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
105 | return result;
106 | }
107 | LPDISPATCH get_ContinuationNotice()
108 | {
109 | LPDISPATCH result;
110 | InvokeHelper(0x6a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
111 | return result;
112 | }
113 | LPDISPATCH Item(long Index)
114 | {
115 | LPDISPATCH result;
116 | static BYTE parms[] = VTS_I4 ;
117 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
118 | return result;
119 | }
120 | LPDISPATCH Add(LPDISPATCH Range, VARIANT * Reference, VARIANT * Text)
121 | {
122 | LPDISPATCH result;
123 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT ;
124 | InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Range, Reference, Text);
125 | return result;
126 | }
127 | void Convert()
128 | {
129 | InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
130 | }
131 | void SwapWithEndnotes()
132 | {
133 | InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
134 | }
135 | void ResetSeparator()
136 | {
137 | InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
138 | }
139 | void ResetContinuationSeparator()
140 | {
141 | InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
142 | }
143 | void ResetContinuationNotice()
144 | {
145 | InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
146 | }
147 |
148 | // Footnotes properties
149 | public:
150 |
151 | };
152 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CHyperlink.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CHyperlink wrapper class
4 |
5 | class CHyperlink : public COleDispatchDriver
6 | {
7 | public:
8 | CHyperlink(){} // Calls COleDispatchDriver default constructor
9 | CHyperlink(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CHyperlink(const CHyperlink& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Hyperlink methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | CString get_Name()
40 | {
41 | CString result;
42 | InvokeHelper(0x3eb, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
43 | return result;
44 | }
45 | CString get_AddressOld()
46 | {
47 | CString result;
48 | InvokeHelper(0x3ec, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
49 | return result;
50 | }
51 | long get_Type()
52 | {
53 | long result;
54 | InvokeHelper(0x3ed, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
55 | return result;
56 | }
57 | LPDISPATCH get_Range()
58 | {
59 | LPDISPATCH result;
60 | InvokeHelper(0x3ee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
61 | return result;
62 | }
63 | LPDISPATCH get_Shape()
64 | {
65 | LPDISPATCH result;
66 | InvokeHelper(0x3ef, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
67 | return result;
68 | }
69 | CString get_SubAddressOld()
70 | {
71 | CString result;
72 | InvokeHelper(0x3f0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
73 | return result;
74 | }
75 | BOOL get_ExtraInfoRequired()
76 | {
77 | BOOL result;
78 | InvokeHelper(0x3f1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
79 | return result;
80 | }
81 | void Delete()
82 | {
83 | InvokeHelper(0x67, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
84 | }
85 | void Follow(VARIANT * NewWindow, VARIANT * AddHistory, VARIANT * ExtraInfo, VARIANT * Method, VARIANT * HeaderInfo)
86 | {
87 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT;
88 | InvokeHelper(0x68, DISPATCH_METHOD, VT_EMPTY, NULL, parms, NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo);
89 | }
90 | void AddToFavorites()
91 | {
92 | InvokeHelper(0x69, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
93 | }
94 | void CreateNewDocument(LPCTSTR FileName, BOOL EditNow, BOOL Overwrite)
95 | {
96 | static BYTE parms[] = VTS_BSTR VTS_BOOL VTS_BOOL;
97 | InvokeHelper(0x6a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FileName, EditNow, Overwrite);
98 | }
99 | CString get_Address()
100 | {
101 | CString result;
102 | InvokeHelper(0x44c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
103 | return result;
104 | }
105 | void put_Address(LPCTSTR newValue)
106 | {
107 | static BYTE parms[] = VTS_BSTR;
108 | InvokeHelper(0x44c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
109 | }
110 | CString get_SubAddress()
111 | {
112 | CString result;
113 | InvokeHelper(0x44d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
114 | return result;
115 | }
116 | void put_SubAddress(LPCTSTR newValue)
117 | {
118 | static BYTE parms[] = VTS_BSTR;
119 | InvokeHelper(0x44d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
120 | }
121 | CString get_EmailSubject()
122 | {
123 | CString result;
124 | InvokeHelper(0x3f2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
125 | return result;
126 | }
127 | void put_EmailSubject(LPCTSTR newValue)
128 | {
129 | static BYTE parms[] = VTS_BSTR;
130 | InvokeHelper(0x3f2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
131 | }
132 | CString get_ScreenTip()
133 | {
134 | CString result;
135 | InvokeHelper(0x3f3, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
136 | return result;
137 | }
138 | void put_ScreenTip(LPCTSTR newValue)
139 | {
140 | static BYTE parms[] = VTS_BSTR;
141 | InvokeHelper(0x3f3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
142 | }
143 | CString get_TextToDisplay()
144 | {
145 | CString result;
146 | InvokeHelper(0x3f4, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
147 | return result;
148 | }
149 | void put_TextToDisplay(LPCTSTR newValue)
150 | {
151 | static BYTE parms[] = VTS_BSTR;
152 | InvokeHelper(0x3f4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
153 | }
154 | CString get_Target()
155 | {
156 | CString result;
157 | InvokeHelper(0x3f5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
158 | return result;
159 | }
160 | void put_Target(LPCTSTR newValue)
161 | {
162 | static BYTE parms[] = VTS_BSTR;
163 | InvokeHelper(0x3f5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
164 | }
165 |
166 | // Hyperlink properties
167 | public:
168 |
169 | };
170 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CHyperlinks.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CHyperlinks wrapper class
4 |
5 | class CHyperlinks : public COleDispatchDriver
6 | {
7 | public:
8 | CHyperlinks(){} // Calls COleDispatchDriver default constructor
9 | CHyperlinks(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CHyperlinks(const CHyperlinks& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Hyperlinks methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Count()
40 | {
41 | long result;
42 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPUNKNOWN get__NewEnum()
46 | {
47 | LPUNKNOWN result;
48 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
49 | return result;
50 | }
51 | LPDISPATCH Item(VARIANT * Index)
52 | {
53 | LPDISPATCH result;
54 | static BYTE parms[] = VTS_PVARIANT;
55 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
56 | return result;
57 | }
58 | LPDISPATCH _Add(LPDISPATCH Anchor, VARIANT * Address, VARIANT * SubAddress)
59 | {
60 | LPDISPATCH result;
61 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT;
62 | InvokeHelper(0x64, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Anchor, Address, SubAddress);
63 | return result;
64 | }
65 | LPDISPATCH Add(LPDISPATCH Anchor, VARIANT * Address, VARIANT * SubAddress, VARIANT * ScreenTip, VARIANT * TextToDisplay, VARIANT * Target)
66 | {
67 | LPDISPATCH result;
68 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT;
69 | InvokeHelper(0x65, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Anchor, Address, SubAddress, ScreenTip, TextToDisplay, Target);
70 | return result;
71 | }
72 |
73 | // Hyperlinks properties
74 | public:
75 |
76 | };
77 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CParagraphFormat.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CParagraphFormat wrapper class
4 |
5 | class CParagraphFormat : public COleDispatchDriver
6 | {
7 | public:
8 | CParagraphFormat(){} // Calls COleDispatchDriver default constructor
9 | CParagraphFormat(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CParagraphFormat(const CParagraphFormat& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // _ParagraphFormat methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_Duplicate()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | VARIANT get_Style()
46 | {
47 | VARIANT result;
48 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
49 | return result;
50 | }
51 | void put_Style(VARIANT * newValue)
52 | {
53 | static BYTE parms[] = VTS_PVARIANT ;
54 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
55 | }
56 | long get_Alignment()
57 | {
58 | long result;
59 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
60 | return result;
61 | }
62 | void put_Alignment(long newValue)
63 | {
64 | static BYTE parms[] = VTS_I4 ;
65 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
66 | }
67 | long get_KeepTogether()
68 | {
69 | long result;
70 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
71 | return result;
72 | }
73 | void put_KeepTogether(long newValue)
74 | {
75 | static BYTE parms[] = VTS_I4 ;
76 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
77 | }
78 | long get_KeepWithNext()
79 | {
80 | long result;
81 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
82 | return result;
83 | }
84 | void put_KeepWithNext(long newValue)
85 | {
86 | static BYTE parms[] = VTS_I4 ;
87 | InvokeHelper(0x67, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
88 | }
89 | long get_PageBreakBefore()
90 | {
91 | long result;
92 | InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
93 | return result;
94 | }
95 | void put_PageBreakBefore(long newValue)
96 | {
97 | static BYTE parms[] = VTS_I4 ;
98 | InvokeHelper(0x68, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
99 | }
100 | long get_NoLineNumber()
101 | {
102 | long result;
103 | InvokeHelper(0x69, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
104 | return result;
105 | }
106 | void put_NoLineNumber(long newValue)
107 | {
108 | static BYTE parms[] = VTS_I4 ;
109 | InvokeHelper(0x69, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
110 | }
111 | float get_RightIndent()
112 | {
113 | float result;
114 | InvokeHelper(0x6a, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
115 | return result;
116 | }
117 | void put_RightIndent(float newValue)
118 | {
119 | static BYTE parms[] = VTS_R4 ;
120 | InvokeHelper(0x6a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
121 | }
122 | float get_LeftIndent()
123 | {
124 | float result;
125 | InvokeHelper(0x6b, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
126 | return result;
127 | }
128 | void put_LeftIndent(float newValue)
129 | {
130 | static BYTE parms[] = VTS_R4 ;
131 | InvokeHelper(0x6b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
132 | }
133 | float get_FirstLineIndent()
134 | {
135 | float result;
136 | InvokeHelper(0x6c, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
137 | return result;
138 | }
139 | void put_FirstLineIndent(float newValue)
140 | {
141 | static BYTE parms[] = VTS_R4 ;
142 | InvokeHelper(0x6c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
143 | }
144 | float get_LineSpacing()
145 | {
146 | float result;
147 | InvokeHelper(0x6d, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
148 | return result;
149 | }
150 | void put_LineSpacing(float newValue)
151 | {
152 | static BYTE parms[] = VTS_R4 ;
153 | InvokeHelper(0x6d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
154 | }
155 | long get_LineSpacingRule()
156 | {
157 | long result;
158 | InvokeHelper(0x6e, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
159 | return result;
160 | }
161 | void put_LineSpacingRule(long newValue)
162 | {
163 | static BYTE parms[] = VTS_I4 ;
164 | InvokeHelper(0x6e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
165 | }
166 | float get_SpaceBefore()
167 | {
168 | float result;
169 | InvokeHelper(0x6f, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
170 | return result;
171 | }
172 | void put_SpaceBefore(float newValue)
173 | {
174 | static BYTE parms[] = VTS_R4 ;
175 | InvokeHelper(0x6f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
176 | }
177 | float get_SpaceAfter()
178 | {
179 | float result;
180 | InvokeHelper(0x70, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
181 | return result;
182 | }
183 | void put_SpaceAfter(float newValue)
184 | {
185 | static BYTE parms[] = VTS_R4 ;
186 | InvokeHelper(0x70, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
187 | }
188 | long get_Hyphenation()
189 | {
190 | long result;
191 | InvokeHelper(0x71, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
192 | return result;
193 | }
194 | void put_Hyphenation(long newValue)
195 | {
196 | static BYTE parms[] = VTS_I4 ;
197 | InvokeHelper(0x71, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
198 | }
199 | long get_WidowControl()
200 | {
201 | long result;
202 | InvokeHelper(0x72, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
203 | return result;
204 | }
205 | void put_WidowControl(long newValue)
206 | {
207 | static BYTE parms[] = VTS_I4 ;
208 | InvokeHelper(0x72, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
209 | }
210 | long get_FarEastLineBreakControl()
211 | {
212 | long result;
213 | InvokeHelper(0x75, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
214 | return result;
215 | }
216 | void put_FarEastLineBreakControl(long newValue)
217 | {
218 | static BYTE parms[] = VTS_I4 ;
219 | InvokeHelper(0x75, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
220 | }
221 | long get_WordWrap()
222 | {
223 | long result;
224 | InvokeHelper(0x76, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
225 | return result;
226 | }
227 | void put_WordWrap(long newValue)
228 | {
229 | static BYTE parms[] = VTS_I4 ;
230 | InvokeHelper(0x76, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
231 | }
232 | long get_HangingPunctuation()
233 | {
234 | long result;
235 | InvokeHelper(0x77, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
236 | return result;
237 | }
238 | void put_HangingPunctuation(long newValue)
239 | {
240 | static BYTE parms[] = VTS_I4 ;
241 | InvokeHelper(0x77, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
242 | }
243 | long get_HalfWidthPunctuationOnTopOfLine()
244 | {
245 | long result;
246 | InvokeHelper(0x78, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
247 | return result;
248 | }
249 | void put_HalfWidthPunctuationOnTopOfLine(long newValue)
250 | {
251 | static BYTE parms[] = VTS_I4 ;
252 | InvokeHelper(0x78, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
253 | }
254 | long get_AddSpaceBetweenFarEastAndAlpha()
255 | {
256 | long result;
257 | InvokeHelper(0x79, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
258 | return result;
259 | }
260 | void put_AddSpaceBetweenFarEastAndAlpha(long newValue)
261 | {
262 | static BYTE parms[] = VTS_I4 ;
263 | InvokeHelper(0x79, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
264 | }
265 | long get_AddSpaceBetweenFarEastAndDigit()
266 | {
267 | long result;
268 | InvokeHelper(0x7a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
269 | return result;
270 | }
271 | void put_AddSpaceBetweenFarEastAndDigit(long newValue)
272 | {
273 | static BYTE parms[] = VTS_I4 ;
274 | InvokeHelper(0x7a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
275 | }
276 | long get_BaseLineAlignment()
277 | {
278 | long result;
279 | InvokeHelper(0x7b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
280 | return result;
281 | }
282 | void put_BaseLineAlignment(long newValue)
283 | {
284 | static BYTE parms[] = VTS_I4 ;
285 | InvokeHelper(0x7b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
286 | }
287 | long get_AutoAdjustRightIndent()
288 | {
289 | long result;
290 | InvokeHelper(0x7c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
291 | return result;
292 | }
293 | void put_AutoAdjustRightIndent(long newValue)
294 | {
295 | static BYTE parms[] = VTS_I4 ;
296 | InvokeHelper(0x7c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
297 | }
298 | long get_DisableLineHeightGrid()
299 | {
300 | long result;
301 | InvokeHelper(0x7d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
302 | return result;
303 | }
304 | void put_DisableLineHeightGrid(long newValue)
305 | {
306 | static BYTE parms[] = VTS_I4 ;
307 | InvokeHelper(0x7d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
308 | }
309 | LPDISPATCH get_TabStops()
310 | {
311 | LPDISPATCH result;
312 | InvokeHelper(0x44f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
313 | return result;
314 | }
315 | void put_TabStops(LPDISPATCH newValue)
316 | {
317 | static BYTE parms[] = VTS_DISPATCH ;
318 | InvokeHelper(0x44f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
319 | }
320 | LPDISPATCH get_Borders()
321 | {
322 | LPDISPATCH result;
323 | InvokeHelper(0x44c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
324 | return result;
325 | }
326 | void put_Borders(LPDISPATCH newValue)
327 | {
328 | static BYTE parms[] = VTS_DISPATCH ;
329 | InvokeHelper(0x44c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
330 | }
331 | LPDISPATCH get_Shading()
332 | {
333 | LPDISPATCH result;
334 | InvokeHelper(0x44d, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
335 | return result;
336 | }
337 | long get_OutlineLevel()
338 | {
339 | long result;
340 | InvokeHelper(0xca, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
341 | return result;
342 | }
343 | void put_OutlineLevel(long newValue)
344 | {
345 | static BYTE parms[] = VTS_I4 ;
346 | InvokeHelper(0xca, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
347 | }
348 | void CloseUp()
349 | {
350 | InvokeHelper(0x12d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
351 | }
352 | void OpenUp()
353 | {
354 | InvokeHelper(0x12e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
355 | }
356 | void OpenOrCloseUp()
357 | {
358 | InvokeHelper(0x12f, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
359 | }
360 | void TabHangingIndent(short Count)
361 | {
362 | static BYTE parms[] = VTS_I2 ;
363 | InvokeHelper(0x130, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Count);
364 | }
365 | void TabIndent(short Count)
366 | {
367 | static BYTE parms[] = VTS_I2 ;
368 | InvokeHelper(0x132, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Count);
369 | }
370 | void Reset()
371 | {
372 | InvokeHelper(0x138, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
373 | }
374 | void Space1()
375 | {
376 | InvokeHelper(0x139, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
377 | }
378 | void Space15()
379 | {
380 | InvokeHelper(0x13a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
381 | }
382 | void Space2()
383 | {
384 | InvokeHelper(0x13b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
385 | }
386 | void IndentCharWidth(short Count)
387 | {
388 | static BYTE parms[] = VTS_I2 ;
389 | InvokeHelper(0x140, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Count);
390 | }
391 | void IndentFirstLineCharWidth(short Count)
392 | {
393 | static BYTE parms[] = VTS_I2 ;
394 | InvokeHelper(0x142, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Count);
395 | }
396 | float get_CharacterUnitRightIndent()
397 | {
398 | float result;
399 | InvokeHelper(0x7e, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
400 | return result;
401 | }
402 | void put_CharacterUnitRightIndent(float newValue)
403 | {
404 | static BYTE parms[] = VTS_R4 ;
405 | InvokeHelper(0x7e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
406 | }
407 | float get_CharacterUnitLeftIndent()
408 | {
409 | float result;
410 | InvokeHelper(0x7f, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
411 | return result;
412 | }
413 | void put_CharacterUnitLeftIndent(float newValue)
414 | {
415 | static BYTE parms[] = VTS_R4 ;
416 | InvokeHelper(0x7f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
417 | }
418 | float get_CharacterUnitFirstLineIndent()
419 | {
420 | float result;
421 | InvokeHelper(0x80, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
422 | return result;
423 | }
424 | void put_CharacterUnitFirstLineIndent(float newValue)
425 | {
426 | static BYTE parms[] = VTS_R4 ;
427 | InvokeHelper(0x80, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
428 | }
429 | float get_LineUnitBefore()
430 | {
431 | float result;
432 | InvokeHelper(0x81, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
433 | return result;
434 | }
435 | void put_LineUnitBefore(float newValue)
436 | {
437 | static BYTE parms[] = VTS_R4 ;
438 | InvokeHelper(0x81, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
439 | }
440 | float get_LineUnitAfter()
441 | {
442 | float result;
443 | InvokeHelper(0x82, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
444 | return result;
445 | }
446 | void put_LineUnitAfter(float newValue)
447 | {
448 | static BYTE parms[] = VTS_R4 ;
449 | InvokeHelper(0x82, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
450 | }
451 | long get_ReadingOrder()
452 | {
453 | long result;
454 | InvokeHelper(0x83, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
455 | return result;
456 | }
457 | void put_ReadingOrder(long newValue)
458 | {
459 | static BYTE parms[] = VTS_I4 ;
460 | InvokeHelper(0x83, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
461 | }
462 | long get_SpaceBeforeAuto()
463 | {
464 | long result;
465 | InvokeHelper(0x84, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
466 | return result;
467 | }
468 | void put_SpaceBeforeAuto(long newValue)
469 | {
470 | static BYTE parms[] = VTS_I4 ;
471 | InvokeHelper(0x84, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
472 | }
473 | long get_SpaceAfterAuto()
474 | {
475 | long result;
476 | InvokeHelper(0x85, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
477 | return result;
478 | }
479 | void put_SpaceAfterAuto(long newValue)
480 | {
481 | static BYTE parms[] = VTS_I4 ;
482 | InvokeHelper(0x85, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
483 | }
484 |
485 | // _ParagraphFormat properties
486 | public:
487 |
488 | };
489 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CRevisionsFilter.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // #import "C:\\Program Files (x86)\\Microsoft Office 2013\\Office15\\MSWORD.OLB" no_namespace
4 | // CRevisionsFilter wrapper class
5 |
6 | class CRevisionsFilter : public COleDispatchDriver
7 | {
8 | public:
9 | CRevisionsFilter() {} // Calls COleDispatchDriver default constructor
10 | CRevisionsFilter(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
11 | CRevisionsFilter(const CRevisionsFilter& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
12 |
13 | // Attributes
14 | public:
15 |
16 | // Operations
17 | public:
18 |
19 |
20 | // RevisionsFilter methods
21 | public:
22 | long get_View()
23 | {
24 | long result;
25 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, nullptr);
26 | return result;
27 | }
28 | void put_View(long newValue)
29 | {
30 | static BYTE parms[] = VTS_I4;
31 | InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, nullptr, parms, newValue);
32 | }
33 | long get_Markup()
34 | {
35 | long result;
36 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, nullptr);
37 | return result;
38 | }
39 | void put_Markup(long newValue)
40 | {
41 | static BYTE parms[] = VTS_I4;
42 | InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, nullptr, parms, newValue);
43 | }
44 | LPDISPATCH get_Reviewers()
45 | {
46 | LPDISPATCH result;
47 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, nullptr);
48 | return result;
49 | }
50 | void ToggleShowAllReviewers()
51 | {
52 | InvokeHelper(0x65, DISPATCH_METHOD, VT_EMPTY, nullptr, nullptr);
53 | }
54 |
55 | // RevisionsFilter properties
56 | public:
57 |
58 | };
59 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CStoryRanges.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CStoryRanges wrapper class
4 |
5 | class CStoryRanges : public COleDispatchDriver
6 | {
7 | public:
8 | CStoryRanges(){} // Calls COleDispatchDriver default constructor
9 | CStoryRanges(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CStoryRanges(const CStoryRanges& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // StoryRanges methods
20 | public:
21 | LPUNKNOWN get__NewEnum()
22 | {
23 | LPUNKNOWN result;
24 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Count()
28 | {
29 | long result;
30 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Application()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Creator()
40 | {
41 | long result;
42 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Parent()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | LPDISPATCH Item(long Index)
52 | {
53 | LPDISPATCH result;
54 | static BYTE parms[] = VTS_I4 ;
55 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
56 | return result;
57 | }
58 |
59 | // StoryRanges properties
60 | public:
61 |
62 | };
63 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CStyle.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CStyle wrapper class
4 |
5 | class CStyle : public COleDispatchDriver
6 | {
7 | public:
8 | CStyle(){} // Calls COleDispatchDriver default constructor
9 | CStyle(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CStyle(const CStyle& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Style methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | CString get_NameLocal()
40 | {
41 | CString result;
42 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_NameLocal(LPCTSTR newValue)
46 | {
47 | static BYTE parms[] = VTS_BSTR ;
48 | InvokeHelper(0x0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | VARIANT get_BaseStyle()
51 | {
52 | VARIANT result;
53 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
54 | return result;
55 | }
56 | void put_BaseStyle(VARIANT * newValue)
57 | {
58 | static BYTE parms[] = VTS_PVARIANT ;
59 | InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
60 | }
61 | CString get_Description()
62 | {
63 | CString result;
64 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
65 | return result;
66 | }
67 | long get_Type()
68 | {
69 | long result;
70 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
71 | return result;
72 | }
73 | BOOL get_BuiltIn()
74 | {
75 | BOOL result;
76 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
77 | return result;
78 | }
79 | VARIANT get_NextParagraphStyle()
80 | {
81 | VARIANT result;
82 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
83 | return result;
84 | }
85 | void put_NextParagraphStyle(VARIANT * newValue)
86 | {
87 | static BYTE parms[] = VTS_PVARIANT ;
88 | InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
89 | }
90 | BOOL get_InUse()
91 | {
92 | BOOL result;
93 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
94 | return result;
95 | }
96 | LPDISPATCH get_Shading()
97 | {
98 | LPDISPATCH result;
99 | InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
100 | return result;
101 | }
102 | LPDISPATCH get_Borders()
103 | {
104 | LPDISPATCH result;
105 | InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
106 | return result;
107 | }
108 | void put_Borders(LPDISPATCH newValue)
109 | {
110 | static BYTE parms[] = VTS_DISPATCH ;
111 | InvokeHelper(0x8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
112 | }
113 | LPDISPATCH get_ParagraphFormat()
114 | {
115 | LPDISPATCH result;
116 | InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
117 | return result;
118 | }
119 | void put_ParagraphFormat(LPDISPATCH newValue)
120 | {
121 | static BYTE parms[] = VTS_DISPATCH ;
122 | InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
123 | }
124 | LPDISPATCH get_Font()
125 | {
126 | LPDISPATCH result;
127 | InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
128 | return result;
129 | }
130 | void put_Font(LPDISPATCH newValue)
131 | {
132 | static BYTE parms[] = VTS_DISPATCH ;
133 | InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
134 | }
135 | LPDISPATCH get_Frame()
136 | {
137 | LPDISPATCH result;
138 | InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
139 | return result;
140 | }
141 | long get_LanguageID()
142 | {
143 | long result;
144 | InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
145 | return result;
146 | }
147 | void put_LanguageID(long newValue)
148 | {
149 | static BYTE parms[] = VTS_I4 ;
150 | InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
151 | }
152 | BOOL get_AutomaticallyUpdate()
153 | {
154 | BOOL result;
155 | InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
156 | return result;
157 | }
158 | void put_AutomaticallyUpdate(BOOL newValue)
159 | {
160 | static BYTE parms[] = VTS_BOOL ;
161 | InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
162 | }
163 | LPDISPATCH get_ListTemplate()
164 | {
165 | LPDISPATCH result;
166 | InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
167 | return result;
168 | }
169 | long get_ListLevelNumber()
170 | {
171 | long result;
172 | InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
173 | return result;
174 | }
175 | long get_LanguageIDFarEast()
176 | {
177 | long result;
178 | InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
179 | return result;
180 | }
181 | void put_LanguageIDFarEast(long newValue)
182 | {
183 | static BYTE parms[] = VTS_I4 ;
184 | InvokeHelper(0x10, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
185 | }
186 | BOOL get_Hidden()
187 | {
188 | BOOL result;
189 | InvokeHelper(0x11, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
190 | return result;
191 | }
192 | void put_Hidden(BOOL newValue)
193 | {
194 | static BYTE parms[] = VTS_BOOL ;
195 | InvokeHelper(0x11, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
196 | }
197 | void Delete()
198 | {
199 | InvokeHelper(0x64, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
200 | }
201 | void LinkToListTemplate(LPDISPATCH ListTemplate, VARIANT * ListLevelNumber)
202 | {
203 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT ;
204 | InvokeHelper(0x65, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ListTemplate, ListLevelNumber);
205 | }
206 | long get_NoProofing()
207 | {
208 | long result;
209 | InvokeHelper(0x12, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
210 | return result;
211 | }
212 | void put_NoProofing(long newValue)
213 | {
214 | static BYTE parms[] = VTS_I4 ;
215 | InvokeHelper(0x12, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
216 | }
217 | VARIANT get_LinkStyle()
218 | {
219 | VARIANT result;
220 | InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
221 | return result;
222 | }
223 | void put_LinkStyle(VARIANT * newValue)
224 | {
225 | static BYTE parms[] = VTS_PVARIANT ;
226 | InvokeHelper(0x68, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
227 | }
228 | BOOL get_Visibility()
229 | {
230 | BOOL result;
231 | InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
232 | return result;
233 | }
234 | void put_Visibility(BOOL newValue)
235 | {
236 | static BYTE parms[] = VTS_BOOL ;
237 | InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
238 | }
239 | BOOL get_NoSpaceBetweenParagraphsOfSameStyle()
240 | {
241 | BOOL result;
242 | InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
243 | return result;
244 | }
245 | void put_NoSpaceBetweenParagraphsOfSameStyle(BOOL newValue)
246 | {
247 | static BYTE parms[] = VTS_BOOL ;
248 | InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
249 | }
250 | LPDISPATCH get_Table()
251 | {
252 | LPDISPATCH result;
253 | InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
254 | return result;
255 | }
256 | BOOL get_Locked()
257 | {
258 | BOOL result;
259 | InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
260 | return result;
261 | }
262 | void put_Locked(BOOL newValue)
263 | {
264 | static BYTE parms[] = VTS_BOOL ;
265 | InvokeHelper(0x16, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
266 | }
267 |
268 | // Style properties
269 | public:
270 |
271 | };
272 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CStyles.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CStyles wrapper class
4 |
5 | class CStyles : public COleDispatchDriver
6 | {
7 | public:
8 | CStyles(){} // Calls COleDispatchDriver default constructor
9 | CStyles(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CStyles(const CStyles& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Styles methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPUNKNOWN get__NewEnum()
40 | {
41 | LPUNKNOWN result;
42 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
43 | return result;
44 | }
45 | long get_Count()
46 | {
47 | long result;
48 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
49 | return result;
50 | }
51 | LPDISPATCH Item(LPCTSTR Index)
52 | {
53 | LPDISPATCH result;
54 | static BYTE parms[] = VTS_BSTR ;
55 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
56 | return result;
57 | }
58 | LPDISPATCH Item(long Index)
59 | {
60 | LPDISPATCH result;
61 | static BYTE parms[] = VTS_I4 ;
62 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
63 | return result;
64 | }
65 | LPDISPATCH Add(LPCTSTR Name, VARIANT * Type)
66 | {
67 | LPDISPATCH result;
68 | static BYTE parms[] = VTS_BSTR VTS_PVARIANT ;
69 | InvokeHelper(0x64, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Name, Type);
70 | return result;
71 | }
72 |
73 | // Styles properties
74 | public:
75 |
76 | };
77 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CTabStop.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CTabStop wrapper class
4 |
5 | class CTabStop : public COleDispatchDriver
6 | {
7 | public:
8 | CTabStop(){} // Calls COleDispatchDriver default constructor
9 | CTabStop(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CTabStop(const CTabStop& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // TabStop methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Alignment()
40 | {
41 | long result;
42 | InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | void put_Alignment(long newValue)
46 | {
47 | static BYTE parms[] = VTS_I4 ;
48 | InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
49 | }
50 | long get_Leader()
51 | {
52 | long result;
53 | InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
54 | return result;
55 | }
56 | void put_Leader(long newValue)
57 | {
58 | static BYTE parms[] = VTS_I4 ;
59 | InvokeHelper(0x65, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
60 | }
61 | float get_Position()
62 | {
63 | float result;
64 | InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
65 | return result;
66 | }
67 | void put_Position(float newValue)
68 | {
69 | static BYTE parms[] = VTS_R4 ;
70 | InvokeHelper(0x66, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
71 | }
72 | BOOL get_CustomTab()
73 | {
74 | BOOL result;
75 | InvokeHelper(0x67, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
76 | return result;
77 | }
78 | LPDISPATCH get_Next()
79 | {
80 | LPDISPATCH result;
81 | InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
82 | return result;
83 | }
84 | LPDISPATCH get_Previous()
85 | {
86 | LPDISPATCH result;
87 | InvokeHelper(0x69, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
88 | return result;
89 | }
90 | void Clear()
91 | {
92 | InvokeHelper(0xc8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
93 | }
94 |
95 | // TabStop properties
96 | public:
97 |
98 | };
99 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CTabStops.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CTabStops wrapper class
4 |
5 | class CTabStops : public COleDispatchDriver
6 | {
7 | public:
8 | CTabStops(){} // Calls COleDispatchDriver default constructor
9 | CTabStops(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CTabStops(const CTabStops& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // TabStops methods
20 | public:
21 | LPUNKNOWN get__NewEnum()
22 | {
23 | LPUNKNOWN result;
24 | InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Count()
28 | {
29 | long result;
30 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Application()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | long get_Creator()
40 | {
41 | long result;
42 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Parent()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | LPDISPATCH Item(VARIANT * Index)
52 | {
53 | LPDISPATCH result;
54 | static BYTE parms[] = VTS_PVARIANT ;
55 | InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Index);
56 | return result;
57 | }
58 | LPDISPATCH Add(float Position, VARIANT * Alignment, VARIANT * Leader)
59 | {
60 | LPDISPATCH result;
61 | static BYTE parms[] = VTS_R4 VTS_PVARIANT VTS_PVARIANT ;
62 | InvokeHelper(0x64, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Position, Alignment, Leader);
63 | return result;
64 | }
65 | void ClearAll()
66 | {
67 | InvokeHelper(0x65, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
68 | }
69 | LPDISPATCH Before(float Position)
70 | {
71 | LPDISPATCH result;
72 | static BYTE parms[] = VTS_R4 ;
73 | InvokeHelper(0x66, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Position);
74 | return result;
75 | }
76 | LPDISPATCH After(float Position)
77 | {
78 | LPDISPATCH result;
79 | static BYTE parms[] = VTS_R4 ;
80 | InvokeHelper(0x67, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, Position);
81 | return result;
82 | }
83 |
84 | // TabStops properties
85 | public:
86 |
87 | };
88 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CUndoRecord.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // NOTE: Only available in Word 2010 and later
4 |
5 | // CUndoRecord wrapper class
6 |
7 | class CUndoRecord : public COleDispatchDriver
8 | {
9 | public:
10 | CUndoRecord() {} // Calls COleDispatchDriver default constructor
11 | CUndoRecord(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
12 | CUndoRecord(const CUndoRecord& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
13 |
14 | // Attributes
15 | public:
16 |
17 | // Operations
18 | public:
19 |
20 |
21 | // UndoRecord methods
22 | public:
23 | LPDISPATCH get_Application()
24 | {
25 | LPDISPATCH result;
26 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
27 | return result;
28 | }
29 | long get_Creator()
30 | {
31 | long result;
32 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
33 | return result;
34 | }
35 | LPDISPATCH get_Parent()
36 | {
37 | LPDISPATCH result;
38 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
39 | return result;
40 | }
41 | void StartCustomRecord(LPCTSTR Name)
42 | {
43 | static BYTE parms[] = VTS_BSTR;
44 | InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Name);
45 | }
46 | void EndCustomRecord()
47 | {
48 | InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
49 | }
50 | BOOL get_IsRecordingCustomRecord()
51 | {
52 | BOOL result;
53 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
54 | return result;
55 | }
56 | CString get_CustomRecordName()
57 | {
58 | CString result;
59 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
60 | return result;
61 | }
62 | long get_CustomRecordLevel()
63 | {
64 | long result;
65 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
66 | return result;
67 | }
68 |
69 | // UndoRecord properties
70 | public:
71 |
72 | };
73 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/CWindow0.h:
--------------------------------------------------------------------------------
1 | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
2 |
3 | // CWindow0 wrapper class
4 |
5 | class CWindow0 : public COleDispatchDriver
6 | {
7 | public:
8 | CWindow0(){} // Calls COleDispatchDriver default constructor
9 | CWindow0(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 | CWindow0(const CWindow0& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11 |
12 | // Attributes
13 | public:
14 |
15 | // Operations
16 | public:
17 |
18 |
19 | // Window methods
20 | public:
21 | LPDISPATCH get_Application()
22 | {
23 | LPDISPATCH result;
24 | InvokeHelper(0x3e8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
25 | return result;
26 | }
27 | long get_Creator()
28 | {
29 | long result;
30 | InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 | return result;
32 | }
33 | LPDISPATCH get_Parent()
34 | {
35 | LPDISPATCH result;
36 | InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
37 | return result;
38 | }
39 | LPDISPATCH get_ActivePane()
40 | {
41 | LPDISPATCH result;
42 | InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
43 | return result;
44 | }
45 | LPDISPATCH get_Document()
46 | {
47 | LPDISPATCH result;
48 | InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
49 | return result;
50 | }
51 | LPDISPATCH get_Panes()
52 | {
53 | LPDISPATCH result;
54 | InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
55 | return result;
56 | }
57 | LPDISPATCH get_Selection()
58 | {
59 | LPDISPATCH result;
60 | InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
61 | return result;
62 | }
63 | long get_Left()
64 | {
65 | long result;
66 | InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
67 | return result;
68 | }
69 | void put_Left(long newValue)
70 | {
71 | static BYTE parms[] = VTS_I4 ;
72 | InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
73 | }
74 | long get_Top()
75 | {
76 | long result;
77 | InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
78 | return result;
79 | }
80 | void put_Top(long newValue)
81 | {
82 | static BYTE parms[] = VTS_I4 ;
83 | InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
84 | }
85 | long get_Width()
86 | {
87 | long result;
88 | InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
89 | return result;
90 | }
91 | void put_Width(long newValue)
92 | {
93 | static BYTE parms[] = VTS_I4 ;
94 | InvokeHelper(0x7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
95 | }
96 | long get_Height()
97 | {
98 | long result;
99 | InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
100 | return result;
101 | }
102 | void put_Height(long newValue)
103 | {
104 | static BYTE parms[] = VTS_I4 ;
105 | InvokeHelper(0x8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
106 | }
107 | BOOL get_Split()
108 | {
109 | BOOL result;
110 | InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
111 | return result;
112 | }
113 | void put_Split(BOOL newValue)
114 | {
115 | static BYTE parms[] = VTS_BOOL ;
116 | InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
117 | }
118 | long get_SplitVertical()
119 | {
120 | long result;
121 | InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
122 | return result;
123 | }
124 | void put_SplitVertical(long newValue)
125 | {
126 | static BYTE parms[] = VTS_I4 ;
127 | InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
128 | }
129 | CString get_Caption()
130 | {
131 | CString result;
132 | InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
133 | return result;
134 | }
135 | void put_Caption(LPCTSTR newValue)
136 | {
137 | static BYTE parms[] = VTS_BSTR ;
138 | InvokeHelper(0x0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
139 | }
140 | long get_WindowState()
141 | {
142 | long result;
143 | InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
144 | return result;
145 | }
146 | void put_WindowState(long newValue)
147 | {
148 | static BYTE parms[] = VTS_I4 ;
149 | InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
150 | }
151 | BOOL get_DisplayRulers()
152 | {
153 | BOOL result;
154 | InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
155 | return result;
156 | }
157 | void put_DisplayRulers(BOOL newValue)
158 | {
159 | static BYTE parms[] = VTS_BOOL ;
160 | InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
161 | }
162 | BOOL get_DisplayVerticalRuler()
163 | {
164 | BOOL result;
165 | InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
166 | return result;
167 | }
168 | void put_DisplayVerticalRuler(BOOL newValue)
169 | {
170 | static BYTE parms[] = VTS_BOOL ;
171 | InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
172 | }
173 | LPDISPATCH get_View()
174 | {
175 | LPDISPATCH result;
176 | InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
177 | return result;
178 | }
179 | long get_Type()
180 | {
181 | long result;
182 | InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
183 | return result;
184 | }
185 | LPDISPATCH get_Next()
186 | {
187 | LPDISPATCH result;
188 | InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
189 | return result;
190 | }
191 | LPDISPATCH get_Previous()
192 | {
193 | LPDISPATCH result;
194 | InvokeHelper(0x11, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
195 | return result;
196 | }
197 | long get_WindowNumber()
198 | {
199 | long result;
200 | InvokeHelper(0x12, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
201 | return result;
202 | }
203 | BOOL get_DisplayVerticalScrollBar()
204 | {
205 | BOOL result;
206 | InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
207 | return result;
208 | }
209 | void put_DisplayVerticalScrollBar(BOOL newValue)
210 | {
211 | static BYTE parms[] = VTS_BOOL ;
212 | InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
213 | }
214 | BOOL get_DisplayHorizontalScrollBar()
215 | {
216 | BOOL result;
217 | InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
218 | return result;
219 | }
220 | void put_DisplayHorizontalScrollBar(BOOL newValue)
221 | {
222 | static BYTE parms[] = VTS_BOOL ;
223 | InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
224 | }
225 | float get_StyleAreaWidth()
226 | {
227 | float result;
228 | InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
229 | return result;
230 | }
231 | void put_StyleAreaWidth(float newValue)
232 | {
233 | static BYTE parms[] = VTS_R4 ;
234 | InvokeHelper(0x15, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
235 | }
236 | BOOL get_DisplayScreenTips()
237 | {
238 | BOOL result;
239 | InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
240 | return result;
241 | }
242 | void put_DisplayScreenTips(BOOL newValue)
243 | {
244 | static BYTE parms[] = VTS_BOOL ;
245 | InvokeHelper(0x16, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
246 | }
247 | long get_HorizontalPercentScrolled()
248 | {
249 | long result;
250 | InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
251 | return result;
252 | }
253 | void put_HorizontalPercentScrolled(long newValue)
254 | {
255 | static BYTE parms[] = VTS_I4 ;
256 | InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
257 | }
258 | long get_VerticalPercentScrolled()
259 | {
260 | long result;
261 | InvokeHelper(0x18, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
262 | return result;
263 | }
264 | void put_VerticalPercentScrolled(long newValue)
265 | {
266 | static BYTE parms[] = VTS_I4 ;
267 | InvokeHelper(0x18, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
268 | }
269 | BOOL get_DocumentMap()
270 | {
271 | BOOL result;
272 | InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
273 | return result;
274 | }
275 | void put_DocumentMap(BOOL newValue)
276 | {
277 | static BYTE parms[] = VTS_BOOL ;
278 | InvokeHelper(0x19, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
279 | }
280 | BOOL get_Active()
281 | {
282 | BOOL result;
283 | InvokeHelper(0x1a, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
284 | return result;
285 | }
286 | long get_DocumentMapPercentWidth()
287 | {
288 | long result;
289 | InvokeHelper(0x1b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
290 | return result;
291 | }
292 | void put_DocumentMapPercentWidth(long newValue)
293 | {
294 | static BYTE parms[] = VTS_I4 ;
295 | InvokeHelper(0x1b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
296 | }
297 | long get_Index()
298 | {
299 | long result;
300 | InvokeHelper(0x1c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
301 | return result;
302 | }
303 | long get_IMEMode()
304 | {
305 | long result;
306 | InvokeHelper(0x1e, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
307 | return result;
308 | }
309 | void put_IMEMode(long newValue)
310 | {
311 | static BYTE parms[] = VTS_I4 ;
312 | InvokeHelper(0x1e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
313 | }
314 | void Activate()
315 | {
316 | InvokeHelper(0x64, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
317 | }
318 | void Close(VARIANT * SaveChanges, VARIANT * RouteDocument)
319 | {
320 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT ;
321 | InvokeHelper(0x66, DISPATCH_METHOD, VT_EMPTY, NULL, parms, SaveChanges, RouteDocument);
322 | }
323 | void LargeScroll(VARIANT * Down, VARIANT * Up, VARIANT * ToRight, VARIANT * ToLeft)
324 | {
325 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
326 | InvokeHelper(0x67, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Down, Up, ToRight, ToLeft);
327 | }
328 | void SmallScroll(VARIANT * Down, VARIANT * Up, VARIANT * ToRight, VARIANT * ToLeft)
329 | {
330 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
331 | InvokeHelper(0x68, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Down, Up, ToRight, ToLeft);
332 | }
333 | LPDISPATCH NewWindow()
334 | {
335 | LPDISPATCH result;
336 | InvokeHelper(0x69, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
337 | return result;
338 | }
339 | void PrintOutOld(VARIANT * Background, VARIANT * Append, VARIANT * Range, VARIANT * OutputFileName, VARIANT * From, VARIANT * To, VARIANT * Item, VARIANT * Copies, VARIANT * Pages, VARIANT * PageType, VARIANT * PrintToFile, VARIANT * Collate, VARIANT * ActivePrinterMacGX, VARIANT * ManualDuplexPrint)
340 | {
341 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
342 | InvokeHelper(0x6b, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Background, Append, Range, OutputFileName, From, To, Item, Copies, Pages, PageType, PrintToFile, Collate, ActivePrinterMacGX, ManualDuplexPrint);
343 | }
344 | void PageScroll(VARIANT * Down, VARIANT * Up)
345 | {
346 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT ;
347 | InvokeHelper(0x6c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Down, Up);
348 | }
349 | void SetFocus()
350 | {
351 | InvokeHelper(0x6d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
352 | }
353 | LPDISPATCH RangeFromPoint(long x, long y)
354 | {
355 | LPDISPATCH result;
356 | static BYTE parms[] = VTS_I4 VTS_I4 ;
357 | InvokeHelper(0x6e, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, x, y);
358 | return result;
359 | }
360 | void ScrollIntoView(LPDISPATCH obj, VARIANT * Start)
361 | {
362 | static BYTE parms[] = VTS_DISPATCH VTS_PVARIANT ;
363 | InvokeHelper(0x6f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, obj, Start);
364 | }
365 | void GetPoint(long * ScreenPixelsLeft, long * ScreenPixelsTop, long * ScreenPixelsWidth, long * ScreenPixelsHeight, LPDISPATCH obj)
366 | {
367 | static BYTE parms[] = VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4 VTS_DISPATCH ;
368 | InvokeHelper(0x70, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ScreenPixelsLeft, ScreenPixelsTop, ScreenPixelsWidth, ScreenPixelsHeight, obj);
369 | }
370 | void PrintOut2000(VARIANT * Background, VARIANT * Append, VARIANT * Range, VARIANT * OutputFileName, VARIANT * From, VARIANT * To, VARIANT * Item, VARIANT * Copies, VARIANT * Pages, VARIANT * PageType, VARIANT * PrintToFile, VARIANT * Collate, VARIANT * ActivePrinterMacGX, VARIANT * ManualDuplexPrint, VARIANT * PrintZoomColumn, VARIANT * PrintZoomRow, VARIANT * PrintZoomPaperWidth, VARIANT * PrintZoomPaperHeight)
371 | {
372 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
373 | InvokeHelper(0x1bc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Background, Append, Range, OutputFileName, From, To, Item, Copies, Pages, PageType, PrintToFile, Collate, ActivePrinterMacGX, ManualDuplexPrint, PrintZoomColumn, PrintZoomRow, PrintZoomPaperWidth, PrintZoomPaperHeight);
374 | }
375 | long get_UsableWidth()
376 | {
377 | long result;
378 | InvokeHelper(0x1f, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
379 | return result;
380 | }
381 | long get_UsableHeight()
382 | {
383 | long result;
384 | InvokeHelper(0x20, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
385 | return result;
386 | }
387 | BOOL get_EnvelopeVisible()
388 | {
389 | BOOL result;
390 | InvokeHelper(0x21, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
391 | return result;
392 | }
393 | void put_EnvelopeVisible(BOOL newValue)
394 | {
395 | static BYTE parms[] = VTS_BOOL ;
396 | InvokeHelper(0x21, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
397 | }
398 | BOOL get_DisplayRightRuler()
399 | {
400 | BOOL result;
401 | InvokeHelper(0x23, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
402 | return result;
403 | }
404 | void put_DisplayRightRuler(BOOL newValue)
405 | {
406 | static BYTE parms[] = VTS_BOOL ;
407 | InvokeHelper(0x23, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
408 | }
409 | BOOL get_DisplayLeftScrollBar()
410 | {
411 | BOOL result;
412 | InvokeHelper(0x22, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
413 | return result;
414 | }
415 | void put_DisplayLeftScrollBar(BOOL newValue)
416 | {
417 | static BYTE parms[] = VTS_BOOL ;
418 | InvokeHelper(0x22, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
419 | }
420 | BOOL get_Visible()
421 | {
422 | BOOL result;
423 | InvokeHelper(0x24, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
424 | return result;
425 | }
426 | void put_Visible(BOOL newValue)
427 | {
428 | static BYTE parms[] = VTS_BOOL ;
429 | InvokeHelper(0x24, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
430 | }
431 | void PrintOut(VARIANT * Background, VARIANT * Append, VARIANT * Range, VARIANT * OutputFileName, VARIANT * From, VARIANT * To, VARIANT * Item, VARIANT * Copies, VARIANT * Pages, VARIANT * PageType, VARIANT * PrintToFile, VARIANT * Collate, VARIANT * ActivePrinterMacGX, VARIANT * ManualDuplexPrint, VARIANT * PrintZoomColumn, VARIANT * PrintZoomRow, VARIANT * PrintZoomPaperWidth, VARIANT * PrintZoomPaperHeight)
432 | {
433 | static BYTE parms[] = VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT ;
434 | InvokeHelper(0x1bd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Background, Append, Range, OutputFileName, From, To, Item, Copies, Pages, PageType, PrintToFile, Collate, ActivePrinterMacGX, ManualDuplexPrint, PrintZoomColumn, PrintZoomRow, PrintZoomPaperWidth, PrintZoomPaperHeight);
435 | }
436 | void ToggleShowAllReviewers()
437 | {
438 | InvokeHelper(0x1be, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
439 | }
440 | BOOL get_Thumbnails()
441 | {
442 | BOOL result;
443 | InvokeHelper(0x25, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
444 | return result;
445 | }
446 | void put_Thumbnails(BOOL newValue)
447 | {
448 | static BYTE parms[] = VTS_BOOL ;
449 | InvokeHelper(0x25, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
450 | }
451 | long get_ShowSourceDocuments()
452 | {
453 | long result;
454 | InvokeHelper(0x26, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
455 | return result;
456 | }
457 | void put_ShowSourceDocuments(long newValue)
458 | {
459 | static BYTE parms[] = VTS_I4 ;
460 | InvokeHelper(0x26, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
461 | }
462 | void ToggleRibbon()
463 | {
464 | InvokeHelper(0x1bf, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
465 | }
466 |
467 | // Window properties
468 | public:
469 |
470 | };
471 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/field.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | ***** BEGIN LICENSE BLOCK *****
3 |
4 | Copyright (c) 2009-2012 Zotero
5 | Center for History and New Media
6 | George Mason University, Fairfax, Virginia, USA
7 | http://zotero.org
8 |
9 | Zotero is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Zotero is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with Zotero. If not, see .
21 |
22 | Permission is granted to link statically the libraries included with
23 | a stock copy of Microsoft Windows. This library may not be linked,
24 | directly or indirectly, with any other proprietary code.
25 |
26 | ***** END LICENSE BLOCK *****
27 | */
28 |
29 | #include "zoteroWinWordIntegration.h"
30 |
31 | static COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
32 | static COleVariant covTrue((short)TRUE), covFalse((short)FALSE);
33 | static wchar_t* FIELD_PREFIXES[] = {L" ADDIN ZOTERO_", L" CSL_", NULL};
34 | static wchar_t* BOOKMARK_PREFIXES[] = {L"ZOTERO_", L"CSL_", NULL};
35 |
36 | statusCode isWholeNote(field_t* field, bool* returnValue);
37 | statusCode setTextAndNoteLocations(field_t* field);
38 |
39 | // Allocates a field structure based on a CField, optionally checking to make
40 | // sure that the field code actually matches a Zotero field.
41 | statusCode initField(document_t *doc, CField comField, short noteType,
42 | bool ignoreCode, field_t **returnValue) {
43 | HANDLE_EXCEPTIONS_BEGIN
44 | CRange comCodeRange = comField.get_Code();
45 |
46 | field_t *field = NULL;
47 | if(ignoreCode) {
48 | field = new field_t;
49 | field->code = NULL;
50 | } else {
51 | // Read code
52 | ENSURE_OK(prepareReadFieldCode(doc));
53 | CString rawCode = comCodeRange.get_Text();
54 |
55 | if(rawCode) {
56 | // Check that this field is a valid Zotero field
57 | for(unsigned short i=0; FIELD_PREFIXES[i] != NULL; i++) {
58 | int location = rawCode.Find(FIELD_PREFIXES[i]);
59 | if(location != -1) {
60 | field = new field_t;
61 |
62 | // If field code is all caps, make sure text object isn't in
63 | // all caps mode
64 | CString upperCaseCode = rawCode;
65 | upperCaseCode.MakeUpper();
66 | if(rawCode == upperCaseCode) {
67 | try {
68 | CFont0 comFont = comCodeRange.get_Font();
69 | if(comFont.get_AllCaps()) {
70 | comFont.put_AllCaps(false);
71 | rawCode = comCodeRange.get_Text();
72 | }
73 | } catch(CException* e) {
74 | e->Delete();
75 | }
76 | }
77 |
78 | // Get code
79 | int rawCodeLength = rawCode.GetLength();
80 | int codeStart = location + ((int) wcslen(FIELD_PREFIXES[i]));
81 | int codeLength = rawCodeLength - codeStart;
82 |
83 | // Sometimes there is a space at the end of the code, which
84 | // we ignore here
85 | if(rawCode.GetAt(rawCodeLength-1) == L' ') {
86 | codeLength--;
87 | }
88 |
89 | CString code = rawCode.Mid(codeStart, codeLength);
90 | field->code = _wcsdup(code);
91 |
92 | break;
93 | }
94 | }
95 | }
96 | }
97 |
98 | if(field) {
99 | field->text = NULL;
100 | field->bookmarkName = NULL;
101 | field->comBookmark = NULL;
102 | field->adjacent = false;
103 |
104 | field->doc = doc;
105 | field->comField = comField;
106 | field->comCodeRange = comCodeRange;
107 | field->comContentRange = comField.get_Result();
108 | field->noteType = noteType;
109 | setTextAndNoteLocations(field);
110 |
111 | // Add field to field list for document
112 | addValueToList(field, &(doc->allocatedFieldsStart),
113 | &(doc->allocatedFieldsEnd));
114 |
115 | *returnValue = field;
116 | return STATUS_OK;
117 | }
118 |
119 | *returnValue = NULL;
120 | return STATUS_OK;
121 | HANDLE_EXCEPTIONS_END
122 | }
123 |
124 | // Allocates a field structure based on a WordBookmark
125 | statusCode initBookmark(document_t *doc, CBookmark0 comBookmark, short noteType,
126 | bool ignoreCode, field_t **returnValue) {
127 | HANDLE_EXCEPTIONS_BEGIN
128 | field_t *field = NULL;
129 |
130 | // Read code
131 | CString bookmarkName = comBookmark.get_Name();
132 |
133 | if(ignoreCode) {
134 | field = new field_t;
135 | field->code = NULL;
136 | } else {
137 | // Check that this field is a valid Zotero field
138 | for(unsigned short i=0; BOOKMARK_PREFIXES[i] != NULL; i++) {
139 | int location = bookmarkName.Find(BOOKMARK_PREFIXES[i]);
140 | if(location != -1) {
141 | // Get code from preferences
142 | CString propertyValue;
143 | ENSURE_OK(getProperty(doc, bookmarkName, &propertyValue));
144 |
145 | // Check that preferences code is valid
146 | for(unsigned short i=0; BOOKMARK_PREFIXES[i] != NULL; i++) {
147 | int location = propertyValue.Find(BOOKMARK_PREFIXES[i]);
148 | if(location != -1) {
149 | field = new field_t;
150 |
151 | // Get code
152 | int rawCodeLength = propertyValue.GetLength();
153 | int codeStart = location + ((int) wcslen(BOOKMARK_PREFIXES[i]));
154 | int codeLength = rawCodeLength - codeStart;
155 |
156 | CString code = propertyValue.Mid(codeStart, codeLength);
157 | field->code = _wcsdup(code);
158 | break;
159 | }
160 | }
161 |
162 | if(field) break;
163 | }
164 | }
165 |
166 | }
167 |
168 | if(field) {
169 | field->text = NULL;
170 | field->comField = NULL;
171 | field->adjacent = false;
172 |
173 | field->bookmarkName = _wcsdup(bookmarkName);
174 | field->doc = doc;
175 | field->comBookmark = comBookmark;
176 |
177 | // Get the field contents
178 | field->comContentRange = comBookmark.get_Range();
179 | field->comCodeRange = field->comContentRange;
180 | field->noteType = noteType;
181 | setTextAndNoteLocations(field);
182 |
183 | // Add field to field list for document
184 | addValueToList(field, &(doc->allocatedFieldsStart),
185 | &(doc->allocatedFieldsEnd));
186 |
187 | *returnValue = field;
188 | return STATUS_OK;
189 | }
190 |
191 | *returnValue = NULL;
192 | return STATUS_OK;
193 | HANDLE_EXCEPTIONS_END
194 | }
195 |
196 | // Frees a field struct. This does not free the corresponding field list node.
197 | void __stdcall freeField(field_t* field) {
198 | if(field->text) delete field->text;
199 | if(field->code) delete field->code;
200 | if(field->bookmarkName) free(field->bookmarkName);
201 | delete field;
202 | }
203 |
204 | // Deletes this field from the document
205 | statusCode __stdcall deleteField(field_t* field) {
206 | HANDLE_EXCEPTIONS_BEGIN
207 | bool wholeNote;
208 | ENSURE_OK(isWholeNote(field, &wholeNote));
209 | CSelection selection = field->doc->comWindow.get_Selection();
210 | CRange selectionRange = selection.get_Range();
211 | if(wholeNote) {
212 | // If the note contains only this field, delete the note
213 | if(field->noteType == NOTE_FOOTNOTE) {
214 | CRange noteRange = field->comFootnote.get_Range();
215 | // If we remove a note and the selection cursor is in it, the document ends up without a valid selection
216 | // so we put the selection right after the note in the reference.
217 | if (selection.get_Start() >= noteRange.get_Start() && selection.get_End() <= noteRange.get_End()) {
218 | CRange refRange = field->comFootnote.get_Reference();
219 | CRange dupRange = refRange.get_Duplicate();
220 | dupRange.Collapse(0);
221 | dupRange.Select();
222 | field->doc->insertTextIntoNote = field->noteType;
223 | }
224 | field->comFootnote.Delete();
225 | } else if(field->noteType == NOTE_ENDNOTE) {
226 | CRange noteRange = field->comEndnote.get_Range();
227 | if (selection.get_Start() >= noteRange.get_Start() && selection.get_End() <= noteRange.get_End()) {
228 | CRange refRange = field->comEndnote.get_Reference();
229 | CRange dupRange = refRange.get_Duplicate();
230 | dupRange.Collapse(0);
231 | dupRange.Select();
232 | field->doc->insertTextIntoNote = field->noteType;
233 | }
234 | field->comEndnote.Delete();
235 | }
236 | } else if(field->comBookmark) {
237 | field->comContentRange.put_Text(L"");
238 | } else {
239 | field->comField.Delete();
240 | }
241 |
242 | return STATUS_OK;
243 | HANDLE_EXCEPTIONS_END
244 | }
245 |
246 | // Selects this field
247 | statusCode __stdcall selectField(field_t* field) {
248 | HANDLE_EXCEPTIONS_BEGIN
249 | setScreenUpdatingStatus(field->doc, true);
250 | return STATUS_OK;
251 | HANDLE_EXCEPTIONS_END
252 | }
253 |
254 | // Removes a field code
255 | statusCode __stdcall removeCode(field_t* field) {
256 | HANDLE_EXCEPTIONS_BEGIN
257 | if(field->comBookmark) {
258 | field->comBookmark.Delete();
259 | setProperty(field->doc, field->bookmarkName, L"");
260 | } else {
261 | field->comField.Unlink();
262 | }
263 | return STATUS_OK;
264 | HANDLE_EXCEPTIONS_END
265 | }
266 |
267 | // Gets text inside this field. DO NOT FREE THE RETURN VALUE!
268 | statusCode __stdcall getText(field_t* field, wchar_t** returnValue) {
269 | HANDLE_EXCEPTIONS_BEGIN
270 | CString fieldText = field->comContentRange.get_Text();
271 | *returnValue = field->text = _wcsdup(fieldText);
272 | return STATUS_OK;
273 | HANDLE_EXCEPTIONS_END
274 | }
275 |
276 | // Sets text of this field
277 | statusCode __stdcall setText(field_t* field, const wchar_t string[], bool isRich) {
278 | HANDLE_EXCEPTIONS_BEGIN
279 | setScreenUpdatingStatus(field->doc, false);
280 |
281 | // Get current font size
282 | CFont0 comFont = field->comContentRange.get_Font();
283 | float fontSize = comFont.get_Size();
284 |
285 | // Get the font name from style instead of directly from the
286 | // content range, because when there are mixed fonts (like when
287 | // inserting text with mixed latin and chinese characters)
288 | // the returned font style is an empty string "" and if you
289 | // try to put that back on Word defaults to Times New Roman
290 | CString fontName;
291 | CComVariant varStyle = field->comContentRange.get_Style();
292 | if (varStyle.vt == VT_DISPATCH && varStyle.pdispVal != NULL) {
293 | CStyle comStyle(varStyle.pdispVal);
294 | CFont0 styleFont = comStyle.get_Font();
295 | fontName = styleFont.get_Name();
296 | }
297 |
298 | // Check if we need to restore cursor position after insert (bookmarks only)
299 | bool restoreSelectionToEnd = false;
300 | if(field->comBookmark) {
301 | CSelection comSelection = (field->doc)->comWindow.get_Selection();
302 | CRange comSelectionRange = comSelection.get_Range();
303 | CRange comTestRange = field->comContentRange.get_Duplicate();
304 | comTestRange.Collapse(0 /*wdCollapseEnd*/);
305 | if(comSelectionRange.IsEqual(comTestRange)) {
306 | restoreSelectionToEnd = true;
307 | }
308 | }
309 |
310 | if(isRich) {
311 | // Get a temp file
312 |
313 | char* utf8String;
314 | int nBytes;
315 | if(field->comBookmark && wcslen(string) > 6) {
316 | // InsertFile method will clobber the bookmark, so add it to the RTF
317 | CString insertString;
318 | insertString.Format(L"{\\rtf {\\bkmkstart %s}{%s{\\bkmkend %s}}", field->bookmarkName, string+6, field->bookmarkName);
319 | nBytes = WideCharToMultiByte(CP_UTF8, 0, insertString, -1, NULL, 0, NULL, NULL);
320 | utf8String = new char[nBytes];
321 | WideCharToMultiByte(CP_UTF8, 0, insertString, -1, utf8String, nBytes, NULL, NULL);
322 | } else {
323 | // Convert to UTF-8
324 | nBytes = WideCharToMultiByte(CP_UTF8, 0, string, -1, NULL, 0, NULL, NULL);
325 | utf8String = new char[nBytes];
326 | WideCharToMultiByte(CP_UTF8, 0, string, -1, utf8String, nBytes, NULL, NULL);
327 | }
328 |
329 | // Open and write file
330 | DWORD nWritten;
331 | HANDLE tempFileHandle = getTemporaryFile();
332 | WriteFile(tempFileHandle, utf8String, nBytes-1, &nWritten, NULL);
333 | SetEndOfFile(tempFileHandle);
334 | delete[] utf8String;
335 |
336 | // Read from file into range
337 | if(!(field->comBookmark) && (field->doc)->wordVersion >= 15) {
338 | // In Word 2013, text does not get inserted into ranges
339 | field->comContentRange.put_Text(L" ");
340 | CRange toDelete = field->comContentRange.get_Duplicate();
341 | toDelete.Collapse(0);
342 | CRange comDupRange = field->comContentRange.get_Duplicate();
343 | comDupRange.MoveEnd(1, -1);
344 | comDupRange.InsertFile(getTemporaryFilePath(), &covOptional, &covFalse, &covFalse, &covFalse);
345 | toDelete.MoveStart(1, -1);
346 | toDelete.put_Text(L"");
347 | } else {
348 | field->comContentRange.put_Text(L"");
349 | field->comContentRange.InsertFile(getTemporaryFilePath(), &covOptional, &covFalse, &covFalse, &covFalse);
350 |
351 | if(field->comBookmark) {
352 | field->comContentRange = field->comBookmark.get_Range();
353 | field->comCodeRange = field->comContentRange;
354 | } else {
355 | field->comContentRange = field->comField.get_Result();
356 | }
357 | }
358 |
359 | // We need to reset the font here, otherwise in mixed-font situations (e.g. when citing
360 | // items that contain english and chinese characters) the font somehow goes to Times New Roman
361 | CFont0 comFont = field->comContentRange.get_Font();
362 | comFont.put_Name(fontName);
363 | comFont.put_Size(fontSize);
364 |
365 | // Need to delete the return that gets added at the end, but only if there are no
366 | // returns within the text to be inserted
367 | if(!wcsstr(string, L"\\\r") && !wcsstr(string, L"\\par") && !wcsstr(string, L"\\\n")) {
368 | CRange toDelete = field->comContentRange.get_Duplicate();
369 | toDelete.Collapse(0);
370 | toDelete.MoveStart(1, -1);
371 | if(toDelete.get_Text() != L"\x0d") {
372 | toDelete.Collapse(0);
373 | toDelete.MoveEnd(1, 1);
374 | }
375 | toDelete.put_Text(L"");
376 | }
377 |
378 | if(wcsncmp(field->code, L"BIBL", 4) == 0) {
379 | setStyle(field->doc, &field->comContentRange, BIBLIOGRAPHY_STYLE_ENUM, BIBLIOGRAPHY_STYLE_NAME);
380 | }
381 | } else {
382 | CFont0 comFont = field->comContentRange.get_Font();
383 | comFont.Reset();
384 | field->comContentRange.put_Text(string);
385 | if(field->comBookmark) {
386 | // Setting the text of the bookmark erases it, so we need to recreate it
387 | CBookmarks comBookmarks = field->doc->comDoc.get_Bookmarks();
388 | field->comBookmark = comBookmarks.Add(field->bookmarkName, field->comContentRange);
389 | field->comContentRange = field->comBookmark.get_Range();
390 | }
391 | // Put dont back on
392 | comFont.put_Name(fontName);
393 | comFont.put_Size(fontSize);
394 | }
395 |
396 | // Restore the selection to the end of a bookmark
397 | if(restoreSelectionToEnd) {
398 | CRange comRange = field->comContentRange.get_Duplicate();
399 | comRange.Collapse(0 /*wdCollapseEnd*/);
400 | comRange.Select();
401 | }
402 |
403 | return STATUS_OK;
404 | HANDLE_EXCEPTIONS_END
405 | }
406 |
407 | // Sets the field code
408 | statusCode __stdcall setCode(field_t *field, const wchar_t code[]) {
409 | HANDLE_EXCEPTIONS_BEGIN
410 | if(field->comBookmark) {
411 | CString rawCode;
412 | rawCode.Format(L"%s%s", BOOKMARK_PREFIXES[0], code);
413 | ENSURE_OK(setProperty(field->doc, field->bookmarkName, rawCode));
414 | } else {
415 | CString rawCode;
416 | rawCode.Format(L"%s%s ", FIELD_PREFIXES[0], code);
417 | field->comCodeRange.put_Text(rawCode);
418 | }
419 |
420 | // Store code in struct
421 | if(field->code) free(field->code);
422 | field->code = _wcsdup(code);
423 |
424 | return STATUS_OK;
425 | HANDLE_EXCEPTIONS_END
426 | }
427 |
428 | // Returns the index of the note in which this field resides
429 | statusCode __stdcall getNoteIndex(field_t* field, unsigned long *returnValue) {
430 | HANDLE_EXCEPTIONS_BEGIN
431 | if(field->noteType == NOTE_FOOTNOTE) {
432 | *returnValue = field->comFootnote.get_Index();
433 | } else if(field->noteType == NOTE_ENDNOTE){
434 | *returnValue = field->comEndnote.get_Index();
435 | } else {
436 | *returnValue = 0;
437 | }
438 | return STATUS_OK;
439 | HANDLE_EXCEPTIONS_END
440 | }
441 |
442 | // Returns whether the field is adjacent to the next field
443 | statusCode __stdcall isAdjacentToNextField(field_t* field, bool *returnValue) {
444 | HANDLE_EXCEPTIONS_BEGIN
445 | *returnValue = field->adjacent;
446 | return STATUS_OK;
447 | HANDLE_EXCEPTIONS_END
448 | }
449 |
450 | // Compares two fields to determine which comes before which
451 | statusCode compareFields(field_t* a, field_t* b, short *returnValue) {
452 | HANDLE_EXCEPTIONS_BEGIN
453 | if(a->textLocation < b->textLocation) {
454 | *returnValue = -1;
455 | return STATUS_OK;
456 | } else if(b->textLocation < a->textLocation) {
457 | *returnValue = 1;
458 | return STATUS_OK;
459 | }
460 |
461 | // Compare positions inside a footnote
462 | if(a->noteType && b->noteType) {
463 | if(a->noteLocation < b->noteLocation) {
464 | *returnValue = -1;
465 | return STATUS_OK;
466 | } else if(b->noteLocation < a->noteLocation) {
467 | *returnValue = 1;
468 | return STATUS_OK;
469 | }
470 | }
471 |
472 | *returnValue = 0;
473 | return STATUS_OK;
474 | HANDLE_EXCEPTIONS_END
475 | }
476 |
477 | // Converts this field to a different note type. The implementation should not expect to use the
478 | // field structure for anything else after this happens.
479 | statusCode convertToNoteType(field_t* field, short toNoteType) {
480 | HANDLE_EXCEPTIONS_BEGIN
481 | if(field->noteType == NOTE_FOOTNOTE && toNoteType == NOTE_ENDNOTE) {
482 | // Footnote to endnote
483 | CRange comRange = field->comFootnote.get_Range();
484 | CFootnotes comFootnotes = comRange.get_Footnotes();
485 | comFootnotes.Convert();
486 | } else if(field->noteType == NOTE_ENDNOTE && toNoteType == NOTE_FOOTNOTE) {
487 | // Endnote to footnote
488 | CRange comRange = field->comEndnote.get_Range();
489 | CEndnotes comEndnotes = comRange.get_Endnotes();
490 | comEndnotes.Convert();
491 | } else {
492 | CRange comRange;
493 | if(field->noteType && !toNoteType) {
494 | // Footnote or endnote to in-text
495 | bool wholeNote;
496 | ENSURE_OK(isWholeNote(field, &wholeNote));
497 | if(wholeNote) { // Replace reference with citation if this is the only one in the note
498 | CRange comRefRange, comNoteRange;
499 | if(field->noteType == NOTE_FOOTNOTE) {
500 | comRefRange = field->comFootnote.get_Reference();
501 | comNoteRange = field->comFootnote.get_Range();
502 | } else {
503 | comRefRange = field->comEndnote.get_Reference();
504 | comNoteRange = field->comEndnote.get_Range();
505 | }
506 | comRange = comRefRange.get_Duplicate();
507 | comRange.Collapse(0);
508 | comRange.put_FormattedText(comNoteRange);
509 | comRefRange.put_Text(L"");
510 | }
511 | } else if(!field->noteType && toNoteType) {
512 | // In-text to footnote or endnote
513 | // Get document
514 | comRange = field->comContentRange.get_Duplicate();
515 | comRange.Collapse(0);
516 | comRange.Move(1, 1);
517 |
518 | // Create a new note and get its range
519 | if(toNoteType == NOTE_FOOTNOTE) {
520 | CFootnotes notes = (field->doc)->comDoc.get_Footnotes();
521 | CFootnote note = notes.Add(comRange, covOptional, covOptional);
522 | comRange = note.get_Range();
523 | } else if(toNoteType == NOTE_ENDNOTE) {
524 | CEndnotes notes = (field->doc)->comDoc.get_Endnotes();
525 | CEndnote note = notes.Add(comRange, covOptional, covOptional);
526 | comRange = note.get_Range();
527 | }
528 |
529 | // Put formatted text in the range
530 | CRange fieldRange;
531 | ENSURE_OK(getFieldRange(field, &fieldRange));
532 | comRange.put_FormattedText(fieldRange);
533 | deleteField(field);
534 | }
535 |
536 | // If a bookmark, re-create the mark
537 | if(field->bookmarkName) {
538 | CBookmarks comBookmarks = field->doc->comDoc.get_Bookmarks();
539 | field->comBookmark = comBookmarks.Add(field->bookmarkName, comRange);
540 | }
541 | }
542 | return STATUS_OK;
543 | HANDLE_EXCEPTIONS_END
544 | }
545 |
546 | statusCode isWholeNote(field_t* field, bool* returnValue) {
547 | HANDLE_EXCEPTIONS_BEGIN
548 | if(field->noteType) {
549 | CRange noteRange;
550 |
551 | if(field->noteType == NOTE_FOOTNOTE) {
552 | noteRange = field->comFootnote.get_Range();
553 | } else if(field->noteType == NOTE_ENDNOTE) {
554 | noteRange = field->comEndnote.get_Range();
555 | }
556 |
557 | CRange testRange;
558 | ENSURE_OK(getFieldRange(field, &testRange));
559 | *returnValue = noteRange.IsEqual(testRange) != 0;
560 | } else {
561 | *returnValue = false;
562 | }
563 | return STATUS_OK;
564 | HANDLE_EXCEPTIONS_END
565 | }
566 |
567 | // Get a range encompassing both the code range and the content range
568 | statusCode getFieldRange(field_t* field, CRange* testRange) {
569 | HANDLE_EXCEPTIONS_BEGIN
570 | if(field->comBookmark) {
571 | *testRange = field->comContentRange.get_Duplicate();
572 | } else {
573 | *testRange = field->comCodeRange.get_Duplicate();
574 | testRange->MoveStart(1, -1);
575 | testRange->put_End(field->comContentRange.get_End()+1);
576 | }
577 | return STATUS_OK;
578 | HANDLE_EXCEPTIONS_END
579 | }
580 |
581 | // Sets noteType, textLocation, noteLocation, comFootnote, and comEndnote
582 | statusCode setTextAndNoteLocations(field_t* field) {
583 | HANDLE_EXCEPTIONS_BEGIN
584 | if(field->noteType == -1) {
585 | long storyType = field->comCodeRange.get_StoryType();
586 | if(storyType == 2) {
587 | field->noteType = NOTE_FOOTNOTE;
588 | } else if(storyType == 3) {
589 | field->noteType = NOTE_ENDNOTE;
590 | } else {
591 | field->noteType = 0;
592 | }
593 | }
594 |
595 | if(field->noteType == NOTE_FOOTNOTE) {
596 | CFootnotes comFootnotes = field->comContentRange.get_Footnotes();
597 | field->comFootnote = comFootnotes.Item(1);
598 | field->comEndnote = NULL;
599 | CRange comNoteReference = field->comFootnote.get_Reference();
600 | field->textLocation = comNoteReference.get_Start();
601 | field->noteLocation = field->comCodeRange.get_Start();
602 | } else if(field->noteType == NOTE_ENDNOTE){
603 | CFootnotes comEndnotes = field->comContentRange.get_Endnotes();
604 | field->comEndnote = comEndnotes.Item(1);
605 | field->comFootnote = NULL;
606 | CRange comNoteReference = field->comEndnote.get_Reference();
607 | field->textLocation = comNoteReference.get_Start();
608 | field->noteLocation = field->comCodeRange.get_Start();
609 | } else {
610 | field->comFootnote = NULL;
611 | field->comEndnote = NULL;
612 | field->textLocation = field->comCodeRange.get_Start();
613 | field->noteLocation = field->textLocation;
614 | }
615 |
616 | return STATUS_OK;
617 | HANDLE_EXCEPTIONS_END
618 | }
619 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/stdafx.h:
--------------------------------------------------------------------------------
1 | // DO NOT REMOVE. Visual Studio does not allow to add MFC interfaces
2 | // if a file with this name does not exist
3 |
4 | // stdafx.h : include file for standard system include files,
5 | // or project specific include files that are used frequently, but
6 | // are changed infrequently
7 |
8 | #pragma once
9 |
10 | #ifndef VC_EXTRALEAN
11 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
12 | #endif
13 |
14 | #include "targetver.h"
15 |
16 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
17 |
18 | #include // MFC core and standard components
19 | #include // MFC extensions
20 |
21 | #ifndef _AFX_NO_OLE_SUPPORT
22 | #include // MFC OLE classes
23 | #include // MFC OLE dialog classes
24 | #include // MFC Automation classes
25 | #endif // _AFX_NO_OLE_SUPPORT
26 |
27 | #ifndef _AFX_NO_DB_SUPPORT
28 | #include // MFC ODBC database classes
29 | #endif // _AFX_NO_DB_SUPPORT
30 |
31 | #ifndef _AFX_NO_DAO_SUPPORT
32 | #include // MFC DAO database classes
33 | #endif // _AFX_NO_DAO_SUPPORT
34 |
35 | #ifndef _AFX_NO_OLE_SUPPORT
36 | #include // MFC support for Internet Explorer 4 Common Controls
37 | #endif
38 | #ifndef _AFX_NO_AFXCMN_SUPPORT
39 | #include // MFC support for Windows Common Controls
40 | #endif // _AFX_NO_AFXCMN_SUPPORT
41 |
42 |
43 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
10 | // Specifies that the minimum required platform is Windows XP.
11 | // Change this to the appropriate value to target other versions of Windows.
12 | #define _WIN32_WINNT 0x0501
13 | #define WINVER 0x0501
14 |
15 | #include
16 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/utilities.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | ***** BEGIN LICENSE BLOCK *****
3 |
4 | Copyright (c) 2009-2012 Zotero
5 | Center for History and New Media
6 | George Mason University, Fairfax, Virginia, USA
7 |
8 | Zotero is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU Affero General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Zotero is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU Affero General Public License for more details.
17 |
18 | You should have received a copy of the GNU Affero General Public License
19 | along with Zotero. If not, see .
20 |
21 | ***** END LICENSE BLOCK *****
22 | */
23 |
24 | #include "zoteroWinWordIntegration.h"
25 |
26 | CString* lastErrorString;
27 |
28 | // Checks if an error has occurred
29 | bool errorHasOccurred(void) {
30 | return lastErrorString != NULL;
31 | }
32 |
33 | // Manually throws an exception up to JS
34 | void throwError(const wchar_t error[], const char function[], const char file[],
35 | unsigned int line) {
36 | if(!lastErrorString) lastErrorString = new CString();
37 |
38 | if(line == 0) {
39 | lastErrorString->Format(L"%s [%S:%S]", error, function, file);
40 | } else {
41 | lastErrorString->Format(L"%s [%S:%S:%d]", error, function, file, line);
42 | }
43 | }
44 |
45 | // Converts a CException to a JS exception
46 | void throwError(const CException* error, const char function[], const char file[]) {
47 | wchar_t errorString[512];
48 | error->GetErrorMessage(errorString, 512);
49 | throwError(errorString, function, file, 0);
50 | }
51 |
52 | // Converts a std:exception to a JS exception
53 | void throwError(const std::exception *error, const char function[], const char file[]) {
54 | std::string str = error->what();
55 | std::wstring widestr = std::wstring(str.begin(), str.end());
56 | const wchar_t* widecstr = widestr.c_str();
57 | throwError(widecstr, function, file, 0);
58 | }
59 |
60 |
61 | // Clears the last error encountered
62 | void __stdcall clearError(void) {
63 | delete lastErrorString;
64 | lastErrorString = NULL;
65 | }
66 |
67 | // Gets the last error encountered
68 | const wchar_t* __stdcall getError(void) {
69 | return *lastErrorString;
70 | }
71 |
72 | HANDLE tempFile = NULL;
73 | wchar_t tempFilePath[MAX_PATH+1];
74 |
75 | // Gets a FILE for the temporary file, truncating it to zero length
76 | HANDLE getTemporaryFile(void) {
77 | if(tempFile == NULL) {
78 | wchar_t tempPath[MAX_PATH+1];
79 | GetTempPath(MAX_PATH, tempPath);
80 | GetTempFileName(tempPath, L"ZOTERO", 0, tempFilePath);
81 | tempFile = CreateFile(tempFilePath, GENERIC_WRITE, FILE_SHARE_READ, NULL,
82 | CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, NULL);
83 | } else {
84 | SetFilePointer(tempFile, 0, NULL, FILE_BEGIN);
85 | }
86 | return tempFile;
87 | }
88 |
89 | // Deletes the temp file
90 | void deleteTemporaryFile(void) {
91 | if(tempFile == NULL) return;
92 | CloseHandle(tempFile);
93 | tempFile = NULL;
94 | DeleteFile(tempFilePath);
95 | }
96 |
97 | // Gets an NSString representing the temp file
98 | wchar_t* getTemporaryFilePath(void) {
99 | return tempFilePath;
100 | }
101 |
102 | // Frees a pointer
103 | void __stdcall freeData(void* ptr) {
104 | free(ptr);
105 | }
106 |
107 | // Generates a random string
108 | CString generateRandomString(unsigned int length) {
109 | // seed random number generator
110 | static bool rndGeneratorSeeded = false;
111 | if(rndGeneratorSeeded == false) {
112 | srand((unsigned)time(0));
113 | rndGeneratorSeeded = true;
114 | }
115 |
116 | // generator random string of desired length
117 | CString randString = L"";
118 | static const CString characters = L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
119 | for(unsigned int i=0; iwordVersion >= 12) {
129 | // In Word 2007+, we should use WdBuiltinStyle enum
130 | // instead of the string name to reference the bibliography style.
131 | try {
132 | range->put_Style(styleEnum);
133 | }
134 | catch (...) {
135 | range->put_Style(styleName);
136 | }
137 | }
138 | else {
139 | range->put_Style(styleName);
140 | }
141 | }
142 | catch (...) {
143 | // This is probably not necessary, but it's better than throwing, and I can't test all
144 | // Word versions at this time
145 | }
146 | }
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/zoteroWinWordIntegration.h:
--------------------------------------------------------------------------------
1 | /*
2 | ***** BEGIN LICENSE BLOCK *****
3 |
4 | Copyright (c) 2009-2012 Zotero
5 | Center for History and New Media
6 | George Mason University, Fairfax, Virginia, USA
7 | http://zotero.org
8 |
9 | Zotero is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Zotero is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with Zotero. If not, see .
21 |
22 | ***** END LICENSE BLOCK *****
23 | */
24 | // stdafx.h : include file for standard system include files,
25 | // or project specific include files that are used frequently, but
26 | // are changed infrequently
27 |
28 | #define _ALLOW_RTCc_IN_STL
29 | #pragma once
30 | #pragma comment(lib, "mpr.lib")
31 |
32 | #include "stdafx.h"
33 | #include
34 | #include "CApplication.h"
35 | #include "CBookmark0.h"
36 | #include "CBookmarks.h"
37 | #include "CCustomProperties.h"
38 | #include "CCustomProperty.h"
39 | #include "CDocument0.h"
40 | #include "CEndnote.h"
41 | #include "CEndnotes.h"
42 | #include "CFootnote.h"
43 | #include "CFootnotes.h"
44 | #include "CHyperlink.h"
45 | #include "CHyperlinks.h"
46 | #include "CField.h"
47 | #include "CFields.h"
48 | #include "CFont0.h"
49 | #include "CParagraphFormat.h"
50 | #include "CRange.h"
51 | #include "CRevisionsFilter.h"
52 | #include "CSelection.h"
53 | #include "CStoryRanges.h"
54 | #include "CStyle.h"
55 | #include "CStyles.h"
56 | #include "CTabStop.h"
57 | #include "CTabStops.h"
58 | #include "CUndoRecord.h"
59 | #include "CView0.h"
60 | #include "CWindow0.h"
61 |
62 | enum STATUS {
63 | STATUS_OK = 0,
64 | STATUS_EXCEPTION = 1,
65 | STATUS_EXCEPTION_ALREADY_DISPLAYED = 2
66 | };
67 |
68 | enum DIALOG_ICON {
69 | DIALOG_ICON_STOP = 0,
70 | DIALOG_ICON_NOTICE = 1,
71 | DIALOG_ICON_CAUTION = 2
72 | };
73 |
74 | enum DIALOG_BUTTONS {
75 | DIALOG_BUTTONS_OK = 0,
76 | DIALOG_BUTTONS_OK_CANCEL = 1,
77 | DIALOG_BUTTONS_YES_NO = 2,
78 | DIALOG_BUTTONS_YES_NO_CANCEL = 3
79 | };
80 |
81 | enum NOTE_TYPE {
82 | NOTE_FOOTNOTE = 1,
83 | NOTE_ENDNOTE = 2
84 | };
85 |
86 | #define MAX_PROPERTY_LENGTH 255
87 | #define FIELD_PLACEHOLDER L"{Citation}"
88 | #define BOOKMARK_REFERENCE_PROPERTY L"ZOTERO_BREF"
89 | #define UNDO_RECORD_NAME L"Zotero Command"
90 | #define RTF_TEMP_BOOKMARK L"ZOTERO_TEMP_BOOKMARK"
91 | #define PREFS_PROPERTY L"ZOTERO_PREF"
92 | #define BOOKMARK_PREFIX L"ZOTERO_"
93 | #define BIBLIOGRAPHY_STYLE_NAME L"Bibliography"
94 | #define BIBLIOGRAPHY_STYLE_ENUM -266 /**WdBuiltinStyle.wdStyleBibliography**/
95 | #define FOOTNOTE_STYLE_NAME L"Footnote Text"
96 | #define FOOTNOTE_STYLE_ENUM -30 /**WdBuiltinStyle.wdStyleFootnoteText**/
97 | #define ENDNOTE_STYLE_NAME L"Endnote Text"
98 | #define ENDNOTE_STYLE_ENUM -44 /**WdBuiltinStyle.wdStyleEndnoteText**/
99 |
100 | // Returns expr if expr is non-zero.
101 | #define ENSURE_OK(expr) \
102 | { \
103 | statusCode statusToEnsure = expr; \
104 | if(statusToEnsure) return statusToEnsure; \
105 | }
106 |
107 | // Sets an error code doc and then returns STATUS_EXCEPTION.
108 | #define DIE(err) \
109 | {\
110 | throwError(err, __FUNCTION__, __FILE__, __LINE__);\
111 | return STATUS_EXCEPTION;\
112 | }
113 |
114 | #define IGNORING_SB_ERRORS_BEGIN setErrorMonitor(false);
115 | #define IGNORING_SB_ERRORS_END setErrorMonitor(true);
116 |
117 | #define HANDLE_EXCEPTIONS_BEGIN \
118 | try {
119 |
120 | #define HANDLE_EXCEPTIONS_END \
121 | } catch(CException *exception) { \
122 | throwError(exception, __FUNCTION__, __FILE__); \
123 | exception->Delete(); \
124 | return STATUS_EXCEPTION; \
125 | } catch(std::exception *exception) { \
126 | throwError(exception, __FUNCTION__, __FILE__); \
127 | return STATUS_EXCEPTION; \
128 | } catch(...) { \
129 | throwError(L"An unhandled exception occurred.", __FUNCTION__, __FILE__, 0);\
130 | return STATUS_EXCEPTION; \
131 | }
132 |
133 | typedef struct ListNode {
134 | void* value;
135 | struct ListNode* next;
136 | } listNode_t;
137 |
138 | typedef struct Document {
139 | CApplication comApp;
140 | CDocument0 comDoc;
141 | CCustomProperties comProperties;
142 | CWindow0 comWindow;
143 |
144 | long wordVersion;
145 | bool statusShowRevisions;
146 | bool restoreShowRevisions;
147 | long restoreRevisionsMarkup;
148 | bool statusScreenUpdating;
149 | bool restoreTrackChanges;
150 | short insertTextIntoNote;
151 |
152 | listNode_t* allocatedFieldsStart;
153 | listNode_t* allocatedFieldsEnd;
154 | listNode_t* allocatedFieldListsStart;
155 | listNode_t* allocatedFieldListsEnd;
156 | } document_t;
157 |
158 | typedef struct Field {
159 | // The field code
160 | wchar_t* code;
161 |
162 | // The field text
163 | wchar_t* text;
164 |
165 | // The note type (0, NOTE_FOOTNOTE, or NOTE_ENDNOTE)
166 | short noteType;
167 |
168 | // The bookmark name
169 | wchar_t* bookmarkName;
170 |
171 | // The location of this field relative to the start of the main body text.
172 | // For a footnote, this would be the position of the superscripted note
173 | // reference.
174 | long textLocation;
175 |
176 | // The location of this field relative to the start of the footnote/endnote
177 | // story.
178 | long noteLocation;
179 |
180 | // Whether this field is adjacent to the next field
181 | bool adjacent;
182 |
183 | // Only one of these will be set
184 | CField comField;
185 | CBookmark0 comBookmark;
186 |
187 | // The corresponding document
188 | document_t* doc;
189 |
190 | // The range corresponding to the field code, for a field
191 | CRange comCodeRange;
192 |
193 | // The range corresponding to the content of a field
194 | CRange comContentRange;
195 |
196 | // The footnote in which this field resides.
197 | CFootnote comFootnote;
198 |
199 | // The endnote in which this field resides.
200 | CEndnote comEndnote;
201 | } field_t;
202 |
203 | typedef unsigned short statusCode;
204 |
205 | // utilities.cpp
206 | extern "C" {
207 | __declspec(dllexport) const wchar_t* __stdcall getError(void);
208 | __declspec(dllexport) void __stdcall clearError(void);
209 | __declspec(dllexport) void __stdcall freeData(void* data);
210 | }
211 |
212 | bool errorHasOccurred(void);
213 | void throwError(const wchar_t error[], const char function[], const char file[],
214 | unsigned int line);
215 | void throwError(const CException* error, const char function[], const char file[]);
216 | void throwError(const std::exception* error, const char function[], const char file[]);
217 |
218 | HANDLE getTemporaryFile(void);
219 | void deleteTemporaryFile(void);
220 | wchar_t* getTemporaryFilePath(void);
221 |
222 | CString generateRandomString(unsigned int length);
223 |
224 | void setStyle(document_t *doc, CRange *range, long styleEnum, CString styleName);
225 |
226 | // document.cpp
227 | extern "C" {
228 | __declspec(dllexport) statusCode __stdcall getDocument(const wchar_t documentName[], document_t** returnValue);
229 | __declspec(dllexport) void __stdcall freeDocument(document_t *doc);
230 | __declspec(dllexport) statusCode __stdcall displayAlert(document_t *doc, const wchar_t dialogText[],
231 | unsigned short icon, unsigned short buttons,
232 | unsigned short* returnValue);
233 | __declspec(dllexport) statusCode __stdcall canInsertField(document_t *doc, const wchar_t fieldType[],
234 | bool* returnValue);
235 | __declspec(dllexport) statusCode __stdcall cursorInField(document_t *doc, const wchar_t fieldType[],
236 | field_t** returnValue);
237 | __declspec(dllexport) statusCode __stdcall getDocumentData(document_t *doc, wchar_t **returnValue);
238 | __declspec(dllexport) statusCode __stdcall setDocumentData(document_t *doc, const wchar_t documentData[]);
239 | __declspec(dllexport) statusCode __stdcall insertField(document_t *doc, const wchar_t fieldType[],
240 | unsigned short noteType, field_t **returnValue);
241 | __declspec(dllexport) statusCode __stdcall getFields(document_t *doc, const wchar_t fieldType[],
242 | listNode_t** returnNode);
243 | __declspec(dllexport) statusCode __stdcall convert(document_t *doc, field_t* fields[], unsigned long nFields,
244 | const wchar_t toFieldType[], unsigned short noteType[]);
245 | __declspec(dllexport) statusCode __stdcall setBibliographyStyle(document_t *doc, long firstLineIndent,
246 | long bodyIndent, unsigned long lineSpacing,
247 | unsigned long entrySpacing, long tabStops[],
248 | unsigned long tabStopCount);
249 | __declspec(dllexport) statusCode __stdcall exportDocument(document_t *doc, const wchar_t fieldType[], const wchar_t importInstructions[]);
250 | __declspec(dllexport) statusCode __stdcall importDocument(document_t *doc, const wchar_t fieldType[], bool* returnValue);
251 | __declspec(dllexport) statusCode __stdcall insertText(document_t *doc, const wchar_t htmlString[]);
252 | __declspec(dllexport) statusCode __stdcall convertPlaceholdersToFields(document_t *doc, const wchar_t* placeholders[], const unsigned long nPlaceholders,
253 | const unsigned short noteType, const wchar_t fieldType[], listNode_t** returnNode);
254 | __declspec(dllexport) statusCode __stdcall cleanup(document_t *doc);
255 | __declspec(dllexport) statusCode __stdcall complete(document_t *doc);
256 | }
257 |
258 | statusCode getFieldRange(field_t* field, CRange* testRange);
259 | statusCode getProperty(document_t *doc, CString propertyName,
260 | CString* returnValue);
261 | statusCode setProperty(document_t *doc, CString propertyName,
262 | CString propertyValue);
263 | statusCode prepareReadFieldCode(document_t *doc);
264 | statusCode setScreenUpdatingStatus(document_t* doc, bool status);
265 | statusCode insertFieldRaw(document_t *doc, const wchar_t fieldType[],
266 | CRange comWhere, field_t** returnValue);
267 | void addValueToList(void* value, listNode_t** listStart, listNode_t** listEnd);
268 |
269 | // field.cpp
270 | extern "C" {
271 | __declspec(dllexport) void __stdcall freeField(field_t* field);
272 | __declspec(dllexport) statusCode __stdcall deleteField(field_t* field);
273 | __declspec(dllexport) statusCode __stdcall removeCode(field_t* field);
274 | __declspec(dllexport) statusCode __stdcall selectField(field_t* field);
275 | __declspec(dllexport) statusCode __stdcall setText(field_t* field, const wchar_t string[], bool isRich);
276 | __declspec(dllexport) statusCode __stdcall getText(field_t* field, wchar_t** returnValue);
277 | __declspec(dllexport) statusCode __stdcall setCode(field_t *field, const wchar_t code[]);
278 | __declspec(dllexport) statusCode __stdcall getNoteIndex(field_t* field, unsigned long *returnValue);
279 | __declspec(dllexport) statusCode __stdcall isAdjacentToNextField(field_t* field, bool *returnValue);
280 | }
281 |
282 | statusCode initField(document_t *doc, CField comField, short noteType,
283 | bool ignoreCode, field_t **returnValue);
284 | statusCode initBookmark(document_t *doc, CBookmark0 comBookmark, short noteType,
285 | bool ignoreCode, field_t **returnValue);
286 | statusCode compareFields(field_t* a, field_t* b, short *returnValue);
287 | statusCode convertToNoteType(field_t* field, short noteType);
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/zoteroWinWordIntegration.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.489
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zoteroWinWordIntegration", "zoteroWinWordIntegration.vcxproj", "{4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM64 = Debug|ARM64
11 | Debug|Win32 = Debug|Win32
12 | Debug|x64 = Debug|x64
13 | Release|ARM64 = Release|ARM64
14 | Release|Win32 = Release|Win32
15 | Release|x64 = Release|x64
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|ARM64.ActiveCfg = Debug|ARM64
19 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|ARM64.Build.0 = Debug|ARM64
20 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|Win32.ActiveCfg = Debug|Win32
21 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|Win32.Build.0 = Debug|Win32
22 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|x64.ActiveCfg = Debug|x64
23 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Debug|x64.Build.0 = Debug|x64
24 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|ARM64.ActiveCfg = Release|ARM64
25 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|ARM64.Build.0 = Release|ARM64
26 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|Win32.ActiveCfg = Release|Win32
27 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|Win32.Build.0 = Release|Win32
28 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|x64.ActiveCfg = Release|x64
29 | {4B6DED58-2B58-417C-84CA-BDEFCBB0F16A}.Release|x64.Build.0 = Release|x64
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | GlobalSection(ExtensibilityGlobals) = postSolution
35 | SolutionGuid = {0F7B5B64-E575-4DE5-BA39-959ECE38B3AB}
36 | EndGlobalSection
37 | EndGlobal
38 |
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/zoteroWinWordIntegration.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/build/zoteroWinWordIntegration/zoteroWinWordIntegration.suo
--------------------------------------------------------------------------------
/build/zoteroWinWordIntegration/zoteroWinWordIntegration.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 | Source Files
26 |
27 |
28 |
29 |
30 | Header Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Header Files
37 |
38 |
39 | Header Files
40 |
41 |
42 | Header Files
43 |
44 |
45 | Header Files
46 |
47 |
48 | Header Files
49 |
50 |
51 | Header Files
52 |
53 |
54 | Header Files
55 |
56 |
57 | Header Files
58 |
59 |
60 | Header Files
61 |
62 |
63 | Header Files
64 |
65 |
66 | Header Files
67 |
68 |
69 | Header Files
70 |
71 |
72 | Header Files
73 |
74 |
75 | Header Files
76 |
77 |
78 | Header Files
79 |
80 |
81 | Header Files
82 |
83 |
84 | Header Files
85 |
86 |
87 | Header Files
88 |
89 |
90 | Header Files
91 |
92 |
93 | Header Files
94 |
95 |
96 | Header Files
97 |
98 |
99 | Header Files
100 |
101 |
102 | Header Files
103 |
104 |
105 | Header Files
106 |
107 |
108 | Header Files
109 |
110 |
111 | Header Files
112 |
113 |
114 | Header Files
115 |
116 |
117 | Header Files
118 |
119 |
120 | Header Files
121 |
122 |
123 | Header Files
124 |
125 |
126 |
--------------------------------------------------------------------------------
/chrome.manifest:
--------------------------------------------------------------------------------
1 | content zotero-winword-integration components/
2 | resource zotero-winword-integration resource/
3 |
--------------------------------------------------------------------------------
/components/zoteroWinWordIntegration.mjs:
--------------------------------------------------------------------------------
1 | /*
2 | ***** BEGIN LICENSE BLOCK *****
3 |
4 | Copyright (c) 2012 Zotero
5 | Center for History and New Media
6 | George Mason University, Fairfax, Virginia, USA
7 | http://zotero.org
8 |
9 | Zotero is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Zotero is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with Zotero. If not, see .
21 |
22 | ***** END LICENSE BLOCK *****
23 | */
24 |
25 | Components.utils.import("resource://gre/modules/ctypes.jsm");
26 | Components.utils.import("resource://gre/modules/FileUtils.jsm");
27 |
28 | var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
29 | var field_t, document_t, fieldListNode_t, progressFunction_t, lib, libPath, f, fieldPtr;
30 |
31 | /**
32 | * Loads libzoteroWinWordIntegration.dll and initializes js-ctypes functions
33 | */
34 | function init() {
35 | if(lib) return;
36 | libPath = FileUtils.getDir('ARes', []).parent.parent;
37 | libPath.append('integration');
38 | libPath.append('word-for-windows');
39 | libPath.append("libzoteroWinWordIntegration.dll");
40 |
41 | lib = ctypes.open(libPath.path);
42 |
43 | document_t = new ctypes.StructType("document_t");
44 |
45 | field_t = new ctypes.StructType("field_t", [
46 | { code: ctypes.jschar.ptr },
47 | { text: ctypes.jschar.ptr },
48 | { noteType: ctypes.unsigned_short },
49 | { bookmarkName: ctypes.jschar.ptr },
50 | { textLocation: ctypes.long },
51 | { noteLocation: ctypes.long },
52 | // There's more here, but we will never access it, and we do not create field_t objects
53 | // from JavaScript
54 | ]);
55 |
56 | fieldListNode_t = new ctypes.StructType("fieldListNode_t");
57 | fieldListNode_t.define([
58 | { field: field_t.ptr },
59 | { next: fieldListNode_t.ptr }
60 | ]);
61 |
62 | progressFunction_t = new ctypes.FunctionType(ctypes.stdcall_abi, ctypes.void_t,
63 | [ctypes.int]).ptr;
64 |
65 | var statusCode = ctypes.unsigned_short;
66 | f = {
67 | // void clearError(void);
68 | clearError: lib.declare("clearError", ctypes.stdcall_abi, ctypes.void_t),
69 |
70 | // jschar* getError(void);
71 | getError: lib.declare("getError", ctypes.stdcall_abi, ctypes.jschar.ptr),
72 |
73 | // statusCode getDocument(const jschar* documentName, Document** returnValue);
74 | getDocument: lib.declare("getDocument", ctypes.stdcall_abi, statusCode,
75 | ctypes.jschar.ptr, document_t.ptr.ptr),
76 |
77 | // void freeDocument(Document *doc);
78 | freeDocument: lib.declare("freeDocument", ctypes.stdcall_abi, statusCode, document_t.ptr),
79 |
80 | // statusCode displayAlert(jschar const dialogText[], unsigned short icon,
81 | // unsigned short buttons, unsigned short* returnValue);
82 | displayAlert: lib.declare("displayAlert", ctypes.stdcall_abi, ctypes.unsigned_short,
83 | document_t.ptr, ctypes.jschar.ptr, ctypes.unsigned_short, ctypes.unsigned_short,
84 | ctypes.unsigned_short.ptr),
85 |
86 | // statusCode canInsertField(Document *doc, const jschar fieldType[], bool* returnValue);
87 | canInsertField: lib.declare("canInsertField", ctypes.stdcall_abi, statusCode,
88 | document_t.ptr, ctypes.jschar.ptr, ctypes.bool.ptr),
89 |
90 | // statusCode cursorInField(Document *doc, const jschar fieldType[], Field** returnValue);
91 | cursorInField: lib.declare("cursorInField", ctypes.stdcall_abi, statusCode, document_t.ptr,
92 | ctypes.jschar.ptr, field_t.ptr.ptr),
93 |
94 | // statusCode getDocumentData(Document *doc, jschar **returnValue);
95 | getDocumentData: lib.declare("getDocumentData", ctypes.stdcall_abi, statusCode,
96 | document_t.ptr, ctypes.jschar.ptr.ptr),
97 |
98 | // statusCode setDocumentData(Document *doc, const jschar documentData[]);
99 | setDocumentData: lib.declare("setDocumentData", ctypes.stdcall_abi, statusCode,
100 | document_t.ptr, ctypes.jschar.ptr),
101 |
102 | // statusCode insertField(Document *doc, const jschar fieldType[],
103 | // unsigned short noteType, Field **returnValue)
104 | insertField: lib.declare("insertField", ctypes.stdcall_abi, statusCode, document_t.ptr,
105 | ctypes.jschar.ptr, ctypes.unsigned_short, field_t.ptr.ptr),
106 |
107 | // statusCode getFields(document_t *doc, const jschar fieldType[],
108 | // fieldListNode_t** returnNode);
109 | getFields: lib.declare("getFields", ctypes.stdcall_abi, statusCode, document_t.ptr,
110 | ctypes.jschar.ptr, fieldListNode_t.ptr.ptr),
111 |
112 | // statusCode setBibliographyStyle(Document *doc, long firstLineIndent,
113 | // long bodyIndent, unsigned long lineSpacing,
114 | // unsigned long entrySpacing, long tabStops[],
115 | // unsigned long tabStopCount);
116 | setBibliographyStyle: lib.declare("setBibliographyStyle", ctypes.stdcall_abi,
117 | statusCode, document_t.ptr, ctypes.long, ctypes.long, ctypes.unsigned_long,
118 | ctypes.unsigned_long, ctypes.long.array(), ctypes.unsigned_long),
119 |
120 | // statusCode exportDocument(Document *doc, const jschar fieldType[], const jschar importInstructions[]);
121 | exportDocument: lib.declare("exportDocument", ctypes.stdcall_abi, statusCode, document_t.ptr,
122 | ctypes.jschar.ptr, ctypes.jschar.ptr),
123 |
124 | // statusCode importDocument(Document *doc, const jschar fieldType[], bool *returnValue);
125 | importDocument: lib.declare("importDocument", ctypes.stdcall_abi, statusCode, document_t.ptr,
126 | ctypes.jschar.ptr, ctypes.bool.ptr),
127 |
128 | // statusCode insertText(document_t *doc, const wchar_t htmlString[]);
129 | insertText: lib.declare("insertText", ctypes.stdcall_abi, statusCode, document_t.ptr,
130 | ctypes.jschar.ptr),
131 |
132 | // statusCode convertPlaceholdersToFields(document_t *doc, wchar_t* placeholders[],
133 | // unsigned long nPlaceholders, unsigned short noteType, wchar_t fieldType[], listNode_t** returnNode);
134 | convertPlaceholdersToFields: lib.declare("convertPlaceholdersToFields", ctypes.stdcall_abi, statusCode, document_t.ptr,
135 | ctypes.jschar.ptr.ptr, ctypes.unsigned_long, ctypes.unsigned_short,
136 | ctypes.jschar.ptr, fieldListNode_t.ptr.ptr),
137 |
138 | // statusCode convert(document_t *doc, field_t* fields[], unsigned long nFields,
139 | // const wchar_t toFieldType[], unsigned short noteType[]);
140 | convert: lib.declare("convert", ctypes.stdcall_abi, statusCode, document_t.ptr,
141 | field_t.ptr.ptr, ctypes.unsigned_long, ctypes.jschar.ptr, ctypes.unsigned_short.ptr),
142 |
143 | // statusCode cleanup(Document *doc);
144 | cleanup: lib.declare("cleanup", ctypes.stdcall_abi, statusCode, document_t.ptr),
145 |
146 | // statusCode complete(Document *doc);
147 | complete: lib.declare("complete", ctypes.stdcall_abi, statusCode, document_t.ptr),
148 |
149 | // statusCode deleteField(Field* field);
150 | deleteField: lib.declare("deleteField", ctypes.stdcall_abi, statusCode, field_t.ptr),
151 |
152 | // statusCode removeCode(Field* field);
153 | removeCode: lib.declare("removeCode", ctypes.stdcall_abi, statusCode, field_t.ptr),
154 |
155 | // statusCode selectField(Field* field);
156 | selectField: lib.declare("selectField", ctypes.stdcall_abi, statusCode, field_t.ptr),
157 |
158 | // statusCode setText(Field* field, const jschar string[], bool isRich);
159 | setText: lib.declare("setText", ctypes.stdcall_abi, statusCode, field_t.ptr,
160 | ctypes.jschar.ptr, ctypes.bool),
161 |
162 | // statusCode getText(Field* field, jschar** returnValue);
163 | getText: lib.declare("getText", ctypes.stdcall_abi, statusCode, field_t.ptr,
164 | ctypes.jschar.ptr.ptr),
165 |
166 | // statusCode setCode(Field *field, const jschar code[]);
167 | setCode: lib.declare("setCode", ctypes.stdcall_abi, statusCode, field_t.ptr,
168 | ctypes.jschar.ptr),
169 |
170 | // statusCode getNoteIndex(Field* field, unsigned long *returnValue);
171 | getNoteIndex: lib.declare("getNoteIndex", ctypes.stdcall_abi, statusCode,
172 | field_t.ptr, ctypes.unsigned_long.ptr),
173 |
174 | // statusCode isAdjacentToNextField(Field* field, unsigned long *returnValue);
175 | isAdjacentToNextField: lib.declare("isAdjacentToNextField", ctypes.stdcall_abi, statusCode,
176 | field_t.ptr, ctypes.bool.ptr),
177 |
178 | // statusCode freeData(void* ptr);
179 | freeData: lib.declare("freeData", ctypes.stdcall_abi, statusCode, ctypes.void_t.ptr)
180 | };
181 |
182 | fieldPtr = new ctypes.PointerType(field_t);
183 | }
184 |
185 | /**
186 | * Gets the last error that took place in C code.
187 | */
188 | function getLastError() {
189 | var errPtr = f.getError();
190 | if(errPtr.isNull()) {
191 | var err = "An unexpected error occurred.";
192 | } else {
193 | var err = errPtr.readString().replace("\u2019", "'", "g");
194 | }
195 | f.clearError();
196 | return err;
197 | }
198 |
199 | /**
200 | * Checks the return status of a function to verify that no error occurred.
201 | * @param {Integer} status The return status code of a C function
202 | */
203 | function checkStatus(status) {
204 | if(!status) return;
205 |
206 | if(status === 1) {
207 | throw(getLastError());
208 | } else {
209 | throw "ExceptionAlreadyDisplayed";
210 | }
211 | }
212 |
213 | /**
214 | * Ensures that the document associated with this object has not been garbage collected
215 | */
216 | function checkIfFreed(documentStatus) {
217 | if(!documentStatus.active) throw "complete() method already called on document";
218 | }
219 |
220 | const DECODE_MAPPINGS = {
221 | ' ': '%20',
222 | '^': '%5e',
223 | }
224 |
225 | var Application = function() {};
226 | Application.prototype = {
227 | classDescription: "Zotero Word for Windows Integration Application",
228 | getDocument: async function(documentName) {
229 | init();
230 | var docPtr = new document_t.ptr();
231 | // As of 2024-05-02 Word passes the filepath of the opened file as it appears in the running-objects table
232 | // which is usually encoded for some characters (not encodeURI-style though)
233 | // except for the filename, which it passes in the "decoded" form. In this form weird things happen
234 | // like various symbols #^ are replaced with ^N^1 etc. In the running-object table the filename
235 | // of the opened document is encoded by replacing "^" with "%5e" and " " with "%20".
236 | //
237 | // E.g. the filename "Asdasdas!@#$%^&() _+ąčę.docx" is passed to us as "Asdasdas!@^N$^1^L^0()-_=^M^J; ąčę.docx"
238 | // and appears as "Asdasdas!@%5eN$%5e1%5eL%5e0()-_=%5eM%5eJ;%20ąčę.docx" in the running-objects table.
239 | //
240 | // For most users this doesn't matter because when we fail to find the open document via its running-objects
241 | // table entry we can get the current running instance of Word and get the active document instead, but this
242 | // doesn't work universally. Hopefully this will fix it for most users.
243 | if (documentName.indexOf('https://') == 0) {
244 | documentName = documentName.replace(/\\/g, '/');
245 | let parts = documentName.split('/'); // No "/" allowed in filenames, so we are safe to do this
246 | let finalPart = parts[parts.length-1];
247 | for (let [key, value] of Object.entries(DECODE_MAPPINGS)) {
248 | finalPart = finalPart.replaceAll(key, value);
249 | }
250 | parts[parts.length-1] = finalPart;
251 | documentName = parts.join('/');
252 | }
253 | checkStatus(f.getDocument(documentName, docPtr.address()));
254 | return new Document(docPtr);
255 | },
256 | getActiveDocument: async function(path) {
257 | return this.getDocument(null);
258 | },
259 | primaryFieldType: "Field",
260 | secondaryFieldType: "Bookmark",
261 | supportedNotes: ["footnote", "endnote"],
262 | supportsImportExport: true,
263 | supportsTextInsertion: true,
264 | outputFormat: "rtf",
265 | processorName: "Word"
266 | };
267 |
268 | /**
269 | * See integrationTests.js
270 | */
271 | var Document = function(cDoc) {
272 | this._document_t = cDoc;
273 | this._documentStatus = {"active":true};
274 | };
275 | Document.prototype = {
276 | displayAlert: function(dialogText, icon, buttons) {
277 | Zotero.debug("ZoteroWinWordIntegration: displayAlert", 4);
278 | var buttonPressed = new ctypes.unsigned_short();
279 | checkStatus(f.displayAlert(this._document_t, dialogText, icon, buttons,
280 | buttonPressed.address()));
281 | return buttonPressed.value;
282 | },
283 |
284 | activate: function() {},
285 |
286 | canInsertField: function(fieldType) {
287 | Zotero.debug("ZoteroWinWordIntegration: canInsertField", 4);
288 | checkIfFreed(this._documentStatus);
289 | var returnValue = new ctypes.bool();
290 | checkStatus(f.canInsertField(this._document_t, fieldType, returnValue.address()));
291 | return returnValue.value;
292 | },
293 |
294 | cursorInField: function(fieldType) {
295 | Zotero.debug("ZoteroWinWordIntegration: cursorInField", 4);
296 | checkIfFreed(this._documentStatus);
297 | var returnValue = new field_t.ptr();
298 | checkStatus(f.cursorInField(this._document_t, fieldType, returnValue.address()));
299 | return (returnValue.isNull() ? null : new Field(returnValue, this._documentStatus));
300 | },
301 |
302 | getDocumentData: function() {
303 | Zotero.debug("ZoteroWinWordIntegration: getDocumentData", 4);
304 | checkIfFreed(this._documentStatus);
305 | var returnValue = new ctypes.jschar.ptr();
306 | checkStatus(f.getDocumentData(this._document_t, returnValue.address()));
307 | var data = returnValue.readString();
308 | f.freeData(returnValue);
309 | return data;
310 | },
311 |
312 | setDocumentData: function(documentData) {
313 | Zotero.debug(`ZoteroWinWordIntegration: setDocumentData ${documentData}`, 4);
314 | checkIfFreed(this._documentStatus);
315 | checkStatus(f.setDocumentData(this._document_t, documentData));
316 | },
317 |
318 | insertField: function(fieldType, noteType) {
319 | Zotero.debug("ZoteroWinWordIntegration: insertField", 4);
320 | checkIfFreed(this._documentStatus);
321 | var returnValue = new field_t.ptr();
322 | checkStatus(f.insertField(this._document_t, fieldType, noteType, returnValue.address()));
323 | return new Field(returnValue, this._documentStatus);
324 | },
325 |
326 | getFields: async function(fieldType) {
327 | Zotero.debug("ZoteroWinWordIntegration: getFields", 4);
328 | checkIfFreed(this._documentStatus);
329 | var fieldListNode = new fieldListNode_t.ptr();
330 | checkStatus(f.getFields(this._document_t, fieldType, fieldListNode.address()));
331 | var fnum = new FieldEnumerator(fieldListNode, this._documentStatus);
332 | var fields = [];
333 | while (fnum.hasMoreElements()) {
334 | fields.push(fnum.getNext());
335 | await Zotero.Promise.delay();
336 | }
337 | return fields;
338 | },
339 |
340 | setBibliographyStyle: function(firstLineIndent, bodyIndent, lineSpacing, entrySpacing,
341 | tabStops) {
342 | Zotero.debug("ZoteroWinWordIntegration: setBibliographyStyle", 4);
343 | checkIfFreed(this._documentStatus);
344 | checkStatus(f.setBibliographyStyle(this._document_t, firstLineIndent, bodyIndent, lineSpacing,
345 | entrySpacing, ctypes.long.array(tabStops.length)(tabStops), tabStops.length));
346 | },
347 |
348 | importDocument: function(fieldType) {
349 | Zotero.debug(`ZoteroWinWordIntegration: importDocument`, 4);
350 | checkIfFreed(this._documentStatus);
351 | var returnValue = new ctypes.bool();
352 | checkStatus(f.importDocument(this._document_t, fieldType, returnValue.address()));
353 | return returnValue.value;
354 | },
355 |
356 | exportDocument: function(fieldType, importInstructions) {
357 | Zotero.debug(`ZoteroWinWordIntegration: exportDocument`, 4);
358 | checkIfFreed(this._documentStatus);
359 | checkStatus(f.exportDocument(this._document_t, fieldType, importInstructions));
360 | },
361 |
362 | insertText: function(text) {
363 | Zotero.debug(`ZoteroWinWordIntegration: insertText`, 4);
364 | checkIfFreed(this._documentStatus);
365 | checkStatus(f.insertText(this._document_t, text));
366 | },
367 |
368 | convertPlaceholdersToFields: async function(placeholderIDs, noteType, fieldType) {
369 | Zotero.debug("ZoteroWinWordIntegration: convertPlaceholdersToFields", 4);
370 | checkIfFreed(this._documentStatus);
371 | var cPlaceholderIDs = placeholderIDs.map(placeholderID => ctypes.jschar.array()(placeholderID));
372 | var fieldListNode = new fieldListNode_t.ptr();
373 | checkStatus(
374 | f.convertPlaceholdersToFields(
375 | this._document_t,
376 | ctypes.jschar.ptr.array()(cPlaceholderIDs),
377 | placeholderIDs.length,
378 | noteType,
379 | fieldType,
380 | fieldListNode.address()
381 | )
382 | );
383 | var fnum = new FieldEnumerator(fieldListNode, this._documentStatus);
384 | var fields = [];
385 | while (fnum.hasMoreElements()) {
386 | fields.push(fnum.getNext());
387 | await Zotero.Promise.delay();
388 | }
389 | return fields;
390 | },
391 |
392 | convert: function(fields, toFieldType, toNoteTypes, nFields) {
393 | Zotero.debug("ZoteroWinWordIntegration: convert", 4);
394 | checkIfFreed(this._documentStatus);
395 | fields = fields.map(field => field._field_t);
396 | checkStatus(f.convert(this._document_t, field_t.ptr.array()(fields),
397 | fields.length, ctypes.jschar.array()(toFieldType),
398 | ctypes.unsigned_short.array()(toNoteTypes)));
399 | },
400 |
401 | cleanup: function() {
402 | Zotero.debug("ZoteroWinWordIntegration: cleanup", 4);
403 | if(this._documentStatus.active) {
404 | checkStatus(f.cleanup(this._document_t));
405 | } else {
406 | Zotero.debug("complete() already called on document; ignoring");
407 | }
408 | },
409 |
410 | complete: function() {
411 | Zotero.debug("ZoteroWinWordIntegration: complete", 4);
412 | if(this._documentStatus.active) {
413 | checkStatus(f.complete(this._document_t));
414 | f.freeDocument(this._document_t);
415 | this._documentStatus.active = false;
416 | } else {
417 | Zotero.debug("complete() already called on document; ignoring");
418 | }
419 | }
420 | };
421 |
422 | /**
423 | * An enumerator implementation to handle passing off fields
424 | */
425 | var FieldEnumerator = function(startNode, documentStatus) {
426 | this._currentNode = startNode;
427 | this._previousField = null;
428 | this._documentStatus = documentStatus;
429 | };
430 | FieldEnumerator.prototype = {
431 | hasMoreElements: function() {
432 | checkIfFreed(this._documentStatus);
433 | return !this._currentNode.isNull();
434 | },
435 |
436 | getNext: function() {
437 | checkIfFreed(this._documentStatus);
438 | var contents = this._currentNode.contents;
439 | var fieldPtr = contents.addressOfField("field").contents;
440 | this._currentNode = contents.addressOfField("next").contents;
441 | return new Field(fieldPtr, this._documentStatus);
442 | },
443 | };
444 |
445 | /**
446 | * See integrationTests.js
447 | */
448 | var Field = function(field_t, documentStatus) {
449 | this._field_t = field_t;
450 | this._isBookmark = !field_t.contents.addressOfField("bookmarkName").contents.isNull();
451 | this._documentStatus = documentStatus;
452 | };
453 | Field.prototype = {
454 | delete: function() {
455 | Zotero.debug("ZoteroWinWordIntegration: delete", 4);
456 | checkIfFreed(this._documentStatus);
457 | checkStatus(f.deleteField(this._field_t));
458 | },
459 |
460 | removeCode: function() {
461 | Zotero.debug("ZoteroWinWordIntegration: removeCode", 4);
462 | checkIfFreed(this._documentStatus);
463 | checkStatus(f.removeCode(this._field_t));
464 | },
465 |
466 | select: function() {
467 | Zotero.debug("ZoteroWinWordIntegration: select", 4);
468 | checkIfFreed(this._documentStatus);
469 | checkStatus(f.selectField(this._field_t));
470 | },
471 |
472 | setText: function(text, isRich) {
473 | Zotero.debug("ZoteroWinWordIntegration: setText", 4);
474 | checkIfFreed(this._documentStatus);
475 | checkStatus(f.setText(this._field_t, text, isRich));
476 | },
477 |
478 | getText: function() {
479 | Zotero.debug("ZoteroWinWordIntegration: getText", 4);
480 | checkIfFreed(this._documentStatus);
481 | var returnValue = new ctypes.jschar.ptr();
482 | checkStatus(f.getText(this._field_t, returnValue.address()));
483 | return returnValue.readString();
484 | },
485 |
486 | setCode: function(code) {
487 | Zotero.debug("ZoteroWinWordIntegration: setCode "+code, 4);
488 | checkIfFreed(this._documentStatus);
489 | checkStatus(f.setCode(this._field_t, code));
490 | },
491 |
492 | getCode: function() {
493 | Zotero.debug("ZoteroWinWordIntegration: getCode", 4);
494 | checkIfFreed(this._documentStatus);
495 | var code = this._field_t.contents.addressOfField("code").contents.readString();
496 | Zotero.debug(code);
497 | return code;
498 | },
499 |
500 | equals: function(field) {
501 | Zotero.debug("ZoteroWinWordIntegration: equals", 4);
502 | checkIfFreed(this._documentStatus);
503 | // Obviously, a field cannot be equal to a bookmark
504 | if(this._isBookmark !== field._isBookmark) return false;
505 |
506 | if(this._isBookmark) {
507 | return this._field_t.contents.addressOfField("bookmarkName").contents.readString() ===
508 | field._field_t.contents.addressOfField("bookmarkName").contents.readString();
509 | } else {
510 | var a = this._field_t.contents,
511 | b = field._field_t.contents;
512 | // This is stupid.
513 | return a.addressOfField("noteType").contents.toString()
514 | === b.addressOfField("noteType").contents.toString()
515 | && a.addressOfField("noteLocation").contents.toString()
516 | === b.addressOfField("noteLocation").contents.toString();
517 | }
518 | },
519 |
520 | getNoteIndex: function() {
521 | Zotero.debug("ZoteroWinWordIntegration: getNoteIndex", 4);
522 | checkIfFreed(this._documentStatus);
523 | var returnValue = new ctypes.unsigned_long();
524 | checkStatus(f.getNoteIndex(this._field_t, returnValue.address()));
525 | return parseInt(returnValue.value);
526 | },
527 |
528 | isAdjacentToNextField: function() {
529 | Zotero.debug("ZoteroWinWordIntegration: isAdjacentToNextField", 4);
530 | checkIfFreed(this._documentStatus);
531 | var returnValue = new ctypes.bool();
532 | checkStatus(f.isAdjacentToNextField(this._field_t, returnValue.address()));
533 | return returnValue.value;
534 | }
535 | }
536 |
537 | for (let cls of [Document, Field]) {
538 | for (let method in cls.prototype) {
539 | if (typeof cls.prototype[method] == 'function') {
540 | let syncMethod = cls.prototype[method];
541 | cls.prototype[method] = async function() {
542 | return syncMethod.apply(this, arguments);
543 | }
544 | }
545 | }
546 | }
547 |
548 | function initIntegration() {
549 | // start plug-in installer
550 | var Installer = Components.utils.import("resource://zotero-winword-integration/installer.jsm").Installer;
551 | new Installer();
552 | }
553 |
554 | export { Application, initIntegration as init };
555 |
--------------------------------------------------------------------------------
/defaults/preferences/zoteroWinWordIntegration.js:
--------------------------------------------------------------------------------
1 | pref("extensions.zoteroWinWordIntegration.version", "");
2 | pref("extensions.zoteroWinWordIntegration.installed", false);
3 | pref("extensions.zoteroWinWordIntegration.skipInstallation", false);
--------------------------------------------------------------------------------
/install/Zotero.dotm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/install/Zotero.dotm
--------------------------------------------------------------------------------
/install/libzoteroWinWordIntegration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/install/libzoteroWinWordIntegration.dll
--------------------------------------------------------------------------------
/install/libzoteroWinWordIntegration_ARM64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/install/libzoteroWinWordIntegration_ARM64.dll
--------------------------------------------------------------------------------
/install/libzoteroWinWordIntegration_x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zotero/zotero-word-for-windows-integration/5ff7ab47457a70e393af73282274835285c72c64/install/libzoteroWinWordIntegration_x64.dll
--------------------------------------------------------------------------------
/resource/installer.jsm:
--------------------------------------------------------------------------------
1 | /*
2 | ***** BEGIN LICENSE BLOCK *****
3 |
4 | Copyright (c) 2009 Zotero
5 | Center for History and New Media
6 | George Mason University, Fairfax, Virginia, USA
7 | http://zotero.org
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with this program. If not, see .
21 |
22 | ***** END LICENSE BLOCK *****
23 | */
24 |
25 | var EXPORTED_SYMBOLS = ["Installer"];
26 | Components.utils.import("resource://gre/modules/FileUtils.jsm");
27 |
28 | var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
29 | var ZoteroPluginInstaller = Components.utils.import("resource://zotero/word-processor-plugin-installer.js").ZoteroPluginInstaller;
30 | var Installer = function(failSilently, force) {
31 | return new ZoteroPluginInstaller(Plugin,
32 | failSilently !== undefined ? failSilently : Zotero.isStandalone,
33 | force);
34 | }
35 |
36 | var Plugin = new function() {
37 | this.EXTENSION_STRING = "Zotero Word for Windows Integration";
38 | this.EXTENSION_ID = "zoteroWinWordIntegration@zotero.org";
39 | this.EXTENSION_PREF_BRANCH = "extensions.zoteroWinWordIntegration.";
40 | this.EXTENSION_DIR = "zotero-winword-integration";
41 | this.APP = 'Microsoft Word';
42 | this.VERSION_FILE = 'resource://zotero-winword-integration/version.txt';
43 |
44 | this.LAST_INSTALLED_FILE_UPDATE = "7.0.5pre";
45 |
46 | var zoteroPluginInstaller;
47 |
48 | this.install = async function(zpi) {
49 | // get Zotero.dot file
50 | let dotm = FileUtils.getDir('AChrom', []).parent.parent;
51 | dotm.append('integration');
52 | dotm.append('word-for-windows');
53 | dotm.append("Zotero.dotm");
54 |
55 | // find Word Startup folders (see http://support.microsoft.com/kb/210860)
56 | var appData = Components.classes["@mozilla.org/file/directory_service;1"]
57 | .getService(Components.interfaces.nsIProperties)
58 | .get("AppData", Components.interfaces.nsIFile);
59 |
60 | // first check the registry for a custom startup folder
61 | var startupFolders = [];
62 | var addDefaultStartupFolder = false;
63 | var wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
64 | .createInstance(Components.interfaces.nsIWindowsRegKey);
65 | var installedVersions = [];
66 | Zotero.debug("WinWordIntegration[install]: Looking for Word in HKCU");
67 | for(var i=9; i<=20; i++) {
68 | var path = null;
69 | try {
70 | wrk.open(Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
71 | "Software\\Microsoft\\Office\\"+i+".0\\Word\\Options",
72 | Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
73 | installedVersions.push(i);
74 | try {
75 | path = wrk.readStringValue("STARTUP-PATH");
76 | } finally {
77 | wrk.close();
78 | }
79 | } catch(e) {}
80 |
81 | // create nsIFile from path in registry
82 | if(path) {
83 | try {
84 | startupFolders.push(Zotero.File.pathToFile(path));
85 | } catch(e) {
86 | addDefaultStartupFolder = true;
87 | }
88 | } else {
89 | try {
90 | wrk.open(Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
91 | "Software\\Microsoft\\Office\\"+i+".0\\Common\\General",
92 | Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
93 | try {
94 | var startup = wrk.readStringValue("Startup");
95 | var startupFolder = appData.clone().QueryInterface(Components.interfaces.nsIFile);
96 | startupFolder.appendRelativePath("Microsoft\\Word\\"+startup);
97 | startupFolders.push(startupFolder);
98 | } finally {
99 | wrk.close();
100 | }
101 | } catch(e) {
102 | addDefaultStartupFolder = true;
103 | }
104 | }
105 | }
106 |
107 | if(installedVersions.length == 0) {
108 | Zotero.debug("WinWordIntegration[install]: Word installations not found in HKCU. Searching in HKLM");
109 | for(var i=9; i<=20; i++) {
110 | try {
111 | wrk.open(Components.interfaces.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE,
112 | "Software\\Microsoft\\Office\\"+i+".0\\Word",
113 | Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
114 | installedVersions.push(i);
115 | wrk.close();
116 | addDefaultStartupFolder = true;
117 | } catch(e) {}
118 | }
119 | }
120 |
121 | var defaultStartupFolder = appData.clone().QueryInterface(Components.interfaces.nsIFile);
122 | defaultStartupFolder.appendRelativePath("Microsoft\\Word\\Startup");
123 |
124 | if(startupFolders.length == 0 || addDefaultStartupFolder) {
125 | // if not in the registry, append Microsoft/Word/Startup to %AppData% (default location)
126 | startupFolders.push(defaultStartupFolder);
127 | }
128 |
129 | // The OEM Word 365 sandboxed location, which we might not have the permissions to write to
130 | // but it is worth a shot
131 | var startupFolder = Components.classes["@mozilla.org/file/directory_service;1"]
132 | .getService(Components.interfaces.nsIProperties)
133 | .get("LocalAppData", Components.interfaces.nsIFile)
134 | .QueryInterface(Components.interfaces.nsIFile);
135 | startupFolder.appendRelativePath("Packages\\Microsoft.Office.Desktop_8wekyb3d8bbwe\\LocalCache\\Roaming\\Microsoft\\Word\\Startup");
136 | startupFolders.push(startupFolder);
137 |
138 | var someBadFolders = false;
139 | var allBadFolders = true;
140 | var installedAt = new Set();
141 | for (let startupFolder of startupFolders) {
142 | if (startupFolder.path.includes('Program Files')) {
143 | someBadFolders = true;
144 | continue;
145 | }
146 | else {
147 | allBadFolders = false;
148 | }
149 |
150 | if (!startupFolder.clone().exists()) {
151 | // Sometimes even with Word installed and having been launched before the Startup folder does not exist
152 | // so we create it here if we have detected installed Word versions
153 | if (installedVersions.length && startupFolder.path.toLowerCase() == defaultStartupFolder.path.toLowerCase()) {
154 | try {
155 | Zotero.File.createDirectoryIfMissing(startupFolder.path);
156 | } catch (e) {
157 | Zotero.debug('Failed to create the default Word startup folder -- skipping\n\n' + e, 1);
158 | continue;
159 | }
160 | }
161 | else {
162 | Zotero.debug(`Potential Word startup location ${startupFolder.path} does not exist. Skipping`);
163 | continue;
164 | }
165 | }
166 |
167 | // Multiple versions of Word all with the same setting, so we only install there once
168 | if (installedAt.has(startupFolder.path)) continue;
169 | installedAt.add(startupFolder.path);
170 |
171 | var oldDot = startupFolder.clone().QueryInterface(Components.interfaces.nsIFile);
172 | var oldDotm = oldDot.clone();
173 | oldDot.append("Zotero.dot");
174 | oldDotm.append("Zotero.dotm");
175 |
176 | for(var template of [oldDot, oldDotm]) {
177 | if(template.exists()) {
178 | try {
179 | template.remove(false);
180 | } catch(e) {
181 | Zotero.debug(e);
182 | // Non-fatal if we cannot remove the .dot file since we're only
183 | // removing it to take out our own trash
184 | if (template === oldDotm) {
185 | throw new Error("Could not remove "+template.path);
186 | }
187 | }
188 | }
189 | }
190 |
191 | // copy Zotero.dotm file to Word Startup folder
192 | try {
193 | dotm.copyTo(startupFolder, "Zotero.dotm");
194 | } catch (e) {
195 | Zotero.debug(e, 1);
196 | throw new Error(`Could not copy Zotero.dotm to ${startupFolder.path}`)
197 | }
198 | }
199 |
200 | if (allBadFolders || someBadFolders) {
201 | zpi.failSilently = true;
202 | let title;
203 | let text;
204 | if (allBadFolders) {
205 | title = Zotero.getString('general.error');
206 | text = Zotero.getString(
207 | 'integration.error.misconfiguredWordStartupFolder.all',
208 | [Zotero.clientName]
209 | );
210 | zpi.error(text);
211 | }
212 | else {
213 | title = Zotero.getString('general.warning');
214 | text = Zotero.getString(
215 | 'integration.error.misconfiguredWordStartupFolder.some',
216 | [Zotero.clientName]
217 | );
218 | zpi.error(text, false);
219 | }
220 | text += "\n\n" + Zotero.getString('integration.error.misconfiguredWordStartupFolder.fix');
221 | // Only display prompt if force installing (via button press)
222 | if (zpi.force) {
223 | // Prompts displayed synchronously here fails for some mystical reason
224 | // (probably because this runs in a some event handler event loop)
225 | // See zpi.success()/zpi.error() which also shows its dialogs in the next loop
226 | await Zotero.Promise.delay();
227 | let ps = Services.prompt;
228 | let buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING
229 | + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL;
230 | let index = ps.confirmEx(
231 | null,
232 | title,
233 | text,
234 | buttonFlags,
235 | Zotero.getString('general.moreInformation'),
236 | "", "", "", {}
237 | );
238 | if (index == 0) {
239 | Zotero.launchURL('https://www.zotero.org/support/kb/misconfigured_word_startup_folder');
240 | }
241 | }
242 |
243 | return;
244 | }
245 |
246 | zpi.success();
247 | }
248 | }
249 |
--------------------------------------------------------------------------------
/resource/version.txt:
--------------------------------------------------------------------------------
1 | 7.0.5.SOURCE
2 |
--------------------------------------------------------------------------------