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