1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  *   Licensed to the Apache Software Foundation (ASF) under one or more
12  *   contributor license agreements. See the NOTICE file distributed
13  *   with this work for additional information regarding copyright
14  *   ownership. The ASF licenses this file to you under the Apache
15  *   License, Version 2.0 (the "License"); you may not use this file
16  *   except in compliance with the License. You may obtain a copy of
17  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #pragma once
20 
21 namespace writerfilter::dmapper {
22 
23 enum FieldId
24 {
25     /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/
26     FIELD_ADDRESSBLOCK
27     /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/
28     ,FIELD_ADVANCE
29     /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT ->
30      the hint is not always quoted, inputfield with default answer, prompt before merge (\o)
31      */
32     ,FIELD_ASK
33     /* AUTONUM \* Numberingswitch ->
34      mapped to sequence field "AutoNr"
35      */
36     ,FIELD_AUTONUM
37     /* AUTONUMLGL \* Numberingswitch ->
38      mapped to sequence field "AutoNr"
39      */
40     ,FIELD_AUTONUMLGL
41     /* AUTONUMOUT \* Numberingswitch ->
42         mapped to sequence field "AutoNr"
43      */
44     ,FIELD_AUTONUMOUT
45     /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT ->
46         mapped to sequence field "AutoNr"
47      */
48     ,FIELD_AUTHOR
49     /* COMMENTS "comment" \* MERGEFORMAT ->
50         Docinfo-Comments
51      */
52     ,FIELD_COMMENTS
53     /* CREATEDATE \h \* MERGEFORMAT ->
54      docinfo-created-date
55      */
56     ,FIELD_CREATEDATE
57     /* DATE \@ "number format" \s \* MERGEFORMAT ->
58         ww8filterimprovement: multiple languages now supported
59      */
60     ,FIELD_DATE
61     /* DOCPROPERTY propertyname \* MERGEFORMAT ->
62         ww8filterimprovement: some fields imported as functionally equivalent fields if possible,
63         the others imported as UserField
64      */
65     ,FIELD_DOCPROPERTY
66     /* DOCVARIABLE Name \* MERGEFORMAT ->
67      ww8filterimprovement: now imported as user fields
68      */
69     ,FIELD_DOCVARIABLE
70     /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT ->
71         DocInfo-Modified-Date
72         ww8filterimprovement: multiple languages now supported
73      */
74     ,FIELD_EDITTIME
75     ,FIELD_EQ
76     /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT ->
77         Function-InputField
78      */
79     ,FIELD_FILLIN
80     /* FILENAME \p \* * MERGEFORMAT ->
81         file name (\p with path)
82      */
83     ,FIELD_FILENAME
84     /* FILESIZE \* NumberingType \* MERGEFORMAT ->
85      not imported in old ww8 filter, see lcl_ParseNumberingType
86      todo find alternative field
87      */
88     ,FIELD_FILESIZE
89     /* =formula \# "number format"
90      todo find alternative field
91      */
92     ,FIELD_FORMULA
93     /* FORMCHECKBOX */
94     ,FIELD_FORMCHECKBOX
95     /* FORMDROPDOWN */
96     ,FIELD_FORMDROPDOWN
97     /* FORMTEXT */
98     ,FIELD_FORMTEXT
99     /* GOTOBUTTON text \* MERGEFORMAT ->
100         not imported in old ww8 filter
101         todo find alternative field
102      */
103     ,FIELD_GOTOBUTTON
104     /* HYPERLINK "link" \* MERGEFORMAT ->
105         not imported in old ww8 filter
106         ww8filterimprovement: now imported as hyperlink
107      */
108     ,FIELD_HYPERLINK
109     /* IF condition "then text" "else text" ->
110         not imported in old ww8 filter
111         ww8filterimprovement: now imported
112         todo: condition, if text, else text still missing
113      */
114     ,FIELD_IF
115     /* INFO NameOfInfo \* MERGEFORMAT -> old
116         todo: filter imports wrong?
117      */
118     ,FIELD_INFO
119     /* INCLUDEPICTURE path \* MERGEFORMAT->
120      old filter imports an embedded picture
121      */
122     ,FIELD_INCLUDEPICTURE
123     /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT ->
124      DocInfo Keywords
125      */
126     ,FIELD_KEYWORDS
127     /* LASTSAVEDBY \* MERGEFORMAT ->
128      DocInfo-Modified-Author
129      */
130     ,FIELD_LASTSAVEDBY
131     /* MACROBUTTON MacroName quick help text ->
132      Macro field
133      */
134     ,FIELD_MACROBUTTON
135     /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT ->
136         ww8filterimprovement: column-only API now supported
137      */
138     ,FIELD_MERGEFIELD
139     /* MERGEREC \* MERGEFORMAT ->
140      RecordNumber field, maybe without db name
141      todo: currently unchecked
142      */
143     ,FIELD_MERGEREC
144     /* MERGESEQ \* MERGEFORMAT ->
145      not imported in old ww8 filter
146      ww8filterimprovement: now imported
147      todo: currently unchecked
148      */
149     ,FIELD_MERGESEQ
150     /* NEXT text ->
151      Next record
152      todo: currently unchecked
153      */
154     ,FIELD_NEXT
155     /* NEXTIF condition
156      todo: condition not imported
157      */
158     ,FIELD_NEXTIF
159     /* PAGE \* Numberingswitch \* MERGEFORMAT ->
160      see lcl_ParseNumberingType
161      */
162     ,FIELD_PAGE
163     ,FIELD_PAGEREF
164     /* REF targetbkm \f \* MERGEFORMAT ->
165         imports a ShowVariable (bookmarkname)?
166         \h hyperlink to paragraph
167         \p relative to para above/below
168         \f reference number
169         \d separator number separator
170         \n paragraph number
171         \r paragraph number in relative context
172         \t suppress non delimiters
173         \w paragraph number in full context
174         \* Upper/Lower...
175      */
176     ,FIELD_REF
177     /* REVNUM \* Numberingswitch \* MERGEFORMAT ->
178      DocInfo-revision number
179      */
180     ,FIELD_REVNUM
181     /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT ->
182      DocInfo-modified-date
183      */
184     ,FIELD_SAVEDATE
185     /* SECTION \* NumberFormat \* MERGEFORMAT ->
186         not imported in old ww8 filter see lcl_ParseNumberingType
187         todo: find alternative
188      */
189     ,FIELD_SECTION
190     /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT ->
191      not imported in old ww8 filter see lcl_ParseNumberingType
192         todo: find alternative
193      */
194     ,FIELD_SECTIONPAGES
195     /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT ->
196      number range name:sequencename value:sequencename+1
197      todo: only partially implemented, switches unsupported
198      */
199     ,FIELD_SEQ
200     /* SET bookmarkname newtext \* MERGEFORMAT ->
201      SetVariable bookmarkname = newtext
202      todo: not implemented yet
203      */
204     ,FIELD_SET
205     /* SKIPIF condition \* MERGEFORMAT ->
206      ??
207      todo: not implemented yet
208      */
209     ,FIELD_SKIPIF
210     /* STYLEREF stylename \* MERGEFORMAT ->
211      not imported in old ww8 filter
212      todo: add an equivalent field type
213      */
214     ,FIELD_STYLEREF
215     /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT ->
216      DocInfo - subject
217      */
218     ,FIELD_SUBJECT
219     /* SYMBOL symbolnumber \* MERGEFORMAT ->
220      inserts a special char (symbolnumber)
221      todo: find alternative
222      */
223     ,FIELD_SYMBOL
224     /* TEMPLATE \* Defaultswitch \* MERGEFORMAT
225      TemplateName field
226      */
227     ,FIELD_TEMPLATE
228     /* TIME \@ "number format" \* MERGEFORMAT
229      ww8filterimprovement: multiple languages now supported
230      */
231     ,FIELD_TIME
232     /* TITLE \* Defaultswitch \* MERGEFORMAT ->
233      DocInfo-title
234      */
235     ,FIELD_TITLE
236     /* USERINITIALS newinitials \* MERGEFORMAT ->
237      ExtendedUser field (SHORTCUT)
238      */
239     ,FIELD_USERINITIALS
240     /* USERADDRESS \* MERGEFORMAT ->
241      not imported in old ww8 filter
242         todo: find alternative
243      */
244     ,FIELD_USERADDRESS
245     /* USERNAME newusername \* MERGEFORMAT ->
246      not imported in old ww8 filter
247      todo: import as extended user field(s)
248      */
249     ,FIELD_USERNAME
250     /*
251     TOC options:
252     \a Builds a table of figures but does not include the captions's label and number
253     \b Uses a bookmark to specify area of document from which to build table of contents
254     \c Builds a table of figures of the given label
255     \d Defines the separator between sequence and page numbers
256     \f Builds a table of contents using TC entries instead of outline levels
257     \h Hyperlinks the entries and page numbers within the table of contents
258     \l Defines the TC entries field level used to build a table of contents
259     \n Builds a table of contents or a range of entries, such as 1-9, in a table of contents without page numbers
260     \o  Builds a table of contents by using outline levels instead of TC entries
261     \p Defines the separator between the table entry and its page number
262     \s  Builds a table of contents by using a sequence type
263     \t  Builds a table of contents by using style names other than the standard outline styles
264     \u  Builds a table of contents by using the applied paragraph outline level
265     \w Preserve tab characters within table entries
266     \x Preserve newline characters within table entries
267     \z Hides page numbers within the table of contents when shown in Web Layout View
268      */
269     ,FIELD_TOC
270     /*
271      TOC entry: text
272         \f TC entry in doc with multiple tables
273         \l Outline Level
274         \n Suppress page numbers
275      example: TOC "EntryText \f \l 2 \n
276      */
277     ,FIELD_TC
278     /* document statistic - number of characters
279      */
280     ,FIELD_NUMCHARS
281     /* document statistic - number of words
282      */
283     ,FIELD_NUMWORDS
284     /* document statistic - number of pages
285      */
286     ,FIELD_NUMPAGES
287     /* Document alphabetical index
288      */
289     ,FIELD_INDEX
290     /* Document alphabetical index marks
291      */
292     ,FIELD_XE
293     /**
294      * Bibliography
295      */
296     ,FIELD_BIBLIOGRAPHY
297     /* Citation
298      */
299     ,FIELD_CITATION
300 };
301 
302 }
303 
304 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
305