1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLOFF_XMLTYPES_HXX
21 #define INCLUDED_XMLOFF_XMLTYPES_HXX
24 // Flags to specify how to im/export the property
27 // 8421.8421.8421.8421.8421.8421.8421.8421
28 // n n m mmmd m baaa tttt.tttt.tttt
29 // spsp eep paef e ppp tttt.tttt.tttt
30 // iiee iei ieie i ppp tttt.tttt.tttt
32 // n n mm mmdm pp ppba aatt.tttt.tttt
33 // spsp eepp aefe p pptt.tttt.tttt
34 // iiee ieii eiei p pptt.tttt.tttt
36 #define MID_FLAG_MASK 0x00003fff
38 // Import only: In general, properties may not throw exception, but
39 // this one may. If it throws an IllegalArgumentException, it will be
40 // silently ignored. This should be used for properties whose values
41 // cannot be checked. (E.g., the printer paper tray: The tray names
42 // are different for all printers, and we don't know ahead whether a
43 // printer supports the trays in the current document.)
44 #define MID_FLAG_PROPERTY_MAY_THROW 0x00100000
46 // Export only: When exporting defaults, export this property even if it is
48 #define MID_FLAG_DEFAULT_ITEM_EXPORT 0x00200000
50 // Import and Export: The property in question must exist. No call to
51 // hasPropertyByName is required.
52 #define MID_FLAG_MUST_EXIST 0x00400000
54 // Export only: If an xml attribute with the same name has been exported
55 // already, supply its value to the exportXML call and delete the existing
56 // attribute afterwards.
57 #define MID_FLAG_MERGE_ATTRIBUTE 0x00800000
59 // Import only: If a property with the same name has been set already, supply
60 // the current value to the importXML call.
61 #define MID_FLAG_MERGE_PROPERTY 0x01000000
63 // Import only: there are more entries for the same xml attribute existing
64 #define MID_FLAG_MULTI_PROPERTY 0x02000000
66 // the map entry denotes the name of an element item
67 #define MID_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
68 #define MID_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
70 #define MID_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
72 // the property is ignored
73 #define MID_FLAG_NO_PROPERTY_EXPORT 0x10000000
75 // the attribute is ignored (not yet implemented)
76 #define MID_FLAG_NO_PROPERTY_IMPORT 0x40000000
78 #define MID_FLAG_NO_PROPERTY 0x50000000 // both import and export
80 // Import only: the xml attribute's value is evaluated by a call to
81 // handleSpecialItem instead of calling the property handler's importXML method
82 #define MID_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
84 // Export only: the property's value is exported by a call to handleSpecialItem
85 // instead of calling the property handler's exportXML method
86 #define MID_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
87 #define MID_FLAG_SPECIAL_ITEM 0xa0000000 // both import and export
90 #define XML_TYPE_PROP_SHIFT 14
91 #define XML_TYPE_PROP_MASK (0xf << XML_TYPE_PROP_SHIFT)
93 #define XML_TYPE_PROP_START (0x1 << XML_TYPE_PROP_SHIFT)
94 #define XML_TYPE_PROP_GRAPHIC (0x1 << XML_TYPE_PROP_SHIFT)
95 #define XML_TYPE_PROP_DRAWING_PAGE (0x2 << XML_TYPE_PROP_SHIFT)
96 #define XML_TYPE_PROP_PAGE_LAYOUT (0x3 << XML_TYPE_PROP_SHIFT)
97 #define XML_TYPE_PROP_HEADER_FOOTER (0x4 << XML_TYPE_PROP_SHIFT)
98 #define XML_TYPE_PROP_TEXT (0x5 << XML_TYPE_PROP_SHIFT)
99 #define XML_TYPE_PROP_PARAGRAPH (0x6 << XML_TYPE_PROP_SHIFT)
100 #define XML_TYPE_PROP_RUBY (0x7 << XML_TYPE_PROP_SHIFT)
101 #define XML_TYPE_PROP_SECTION (0x8 << XML_TYPE_PROP_SHIFT)
102 #define XML_TYPE_PROP_TABLE (0x9 << XML_TYPE_PROP_SHIFT)
103 #define XML_TYPE_PROP_TABLE_COLUMN (0xa << XML_TYPE_PROP_SHIFT)
104 #define XML_TYPE_PROP_TABLE_ROW (0xb << XML_TYPE_PROP_SHIFT)
105 #define XML_TYPE_PROP_TABLE_CELL (0xc << XML_TYPE_PROP_SHIFT)
106 #define XML_TYPE_PROP_LIST_LEVEL (0xd << XML_TYPE_PROP_SHIFT)
107 #define XML_TYPE_PROP_CHART (0xe << XML_TYPE_PROP_SHIFT)
108 #define XML_TYPE_PROP_END (0xf << XML_TYPE_PROP_SHIFT)
110 #define XML_TYPE_APP_SHIFT 10
112 #define XML_SC_TYPES_START (0x1 << XML_TYPE_APP_SHIFT)
113 #define XML_SD_TYPES_START (0x2 << XML_TYPE_APP_SHIFT)
114 #define XML_TEXT_TYPES_START (0x3 << XML_TYPE_APP_SHIFT)
115 #define XML_SCH_TYPES_START (0x4 << XML_TYPE_APP_SHIFT)
116 #define XML_PM_TYPES_START (0x5 << XML_TYPE_APP_SHIFT) // page master
117 #define XML_DB_TYPES_START (0x6 << XML_TYPE_APP_SHIFT)
119 // XML-data-type-ID's
121 // simple types, no special compare necessary
122 #define XML_TYPE_BUILDIN_CMP 0x00002000
124 // basic types (all also XML_TYPE_BUILDIN_CMP)
125 #define XML_TYPE_BOOL 0x00002001 // true/false
126 #define XML_TYPE_MEASURE 0x00002002 // 1cm
127 #define XML_TYPE_MEASURE8 0x00002003 // 1cm
128 #define XML_TYPE_MEASURE16 0x00002004 // 1cm
129 #define XML_TYPE_PERCENT 0x00002005 // 50%
130 #define XML_TYPE_PERCENT8 0x00002006 // 50%
131 #define XML_TYPE_PERCENT16 0x00002007 // 50%
132 #define XML_TYPE_STRING 0x00002008 // "blablabla"
133 #define XML_TYPE_COLOR 0x00002009 // Colors
134 #define XML_TYPE_NUMBER 0x0000200a // 123
135 #define XML_TYPE_NUMBER8 0x0000200b // 123
136 #define XML_TYPE_NUMBER16 0x0000200c // 123
137 #define XML_TYPE_NUMBER_NONE 0x0000200d // 123 and "no-limit" for 0
138 #define XML_TYPE_DOUBLE 0x0000200e // for doubles
139 #define XML_TYPE_NBOOL 0x0000200f // !true/false
140 #define XML_TYPE_COLORTRANSPARENT 0x00002010 // Colors or "transparent"
141 #define XML_TYPE_ISTRANSPARENT 0x00002011 // "transparent"
142 #define XML_TYPE_BUILDIN_CMP_ONLY 0x00002012 // Only buildin comparison is required, so no handler exists
143 #define XML_TYPE_NUMBER8_NONE 0x00002013 // 123 and "no-limit" for 0
144 #define XML_TYPE_NUMBER16_NONE 0x00002014 // 123 and "no-limit" for 0
145 #define XML_TYPE_COLOR_MODE 0x00002015
146 #define XML_TYPE_DURATION16_MS 0x00002016 // PT00H00M01S to ms in sal_Int16
147 #define XML_TYPE_MEASURE_PX 0x00002017 // 1px
148 #define XML_TYPE_COLORAUTO 0x00002018 // color if not -1
149 #define XML_TYPE_ISAUTOCOLOR 0x00002019 // true if -1
150 #define XML_TYPE_STYLENAME 0x00002020 // "blablabla"
151 #define XML_TYPE_NEG_PERCENT 0x00002021 // (100-x)%
152 #define XML_TYPE_NEG_PERCENT8 0x00002022 // (100-x)%
153 #define XML_TYPE_NEG_PERCENT16 0x00002023 // (100-x)
154 #define XML_TYPE_DOUBLE_PERCENT 0x00002024 // 50% (source is a double from 0.0 to 1.0)
155 #define XML_TYPE_HEX 0x00002025 // 00544F1B
157 // special basic types
158 #define XML_TYPE_RECTANGLE_LEFT 0x00000100 // the Left member of a awt::Rectangle as a measure
159 #define XML_TYPE_RECTANGLE_TOP 0x00000101 // the Top member of a awt::Rectangle as a measure
160 #define XML_TYPE_RECTANGLE_WIDTH 0x00000102 // the Width member of a awt::Rectangle as a measure
161 #define XML_TYPE_RECTANGLE_HEIGHT 0x00000103 // the Height member of a awt::Rectangle as a measure
163 #define XML_TYPE_TEXT_CROSSEDOUT_STYLE (XML_TEXT_TYPES_START + 0)
164 #define XML_TYPE_TEXT_CASEMAP (XML_TEXT_TYPES_START + 1)
165 #define XML_TYPE_TEXT_FONTFAMILYNAME (XML_TEXT_TYPES_START + 2)
166 #define XML_TYPE_TEXT_FONTFAMILY (XML_TEXT_TYPES_START + 3)
167 #define XML_TYPE_TEXT_FONTENCODING (XML_TEXT_TYPES_START + 4)
168 #define XML_TYPE_TEXT_FONTPITCH (XML_TEXT_TYPES_START + 5)
169 #define XML_TYPE_TEXT_KERNING (XML_TEXT_TYPES_START + 6)
170 #define XML_TYPE_TEXT_POSTURE (XML_TEXT_TYPES_START + 7)
171 #define XML_TYPE_TEXT_SHADOWED (XML_TEXT_TYPES_START + 8)
172 #define XML_TYPE_TEXT_UNDERLINE_STYLE (XML_TEXT_TYPES_START + 9)
173 #define XML_TYPE_TEXT_WEIGHT (XML_TEXT_TYPES_START + 10)
174 #define XML_TYPE_TEXT_SPLIT (XML_TEXT_TYPES_START + 11)
175 #define XML_TYPE_TEXT_BREAKBEFORE (XML_TEXT_TYPES_START + 12)
176 #define XML_TYPE_TEXT_BREAKAFTER (XML_TEXT_TYPES_START + 13)
177 #define XML_TYPE_TEXT_SHADOW (XML_TEXT_TYPES_START + 14)
178 #define XML_TYPE_TEXT_ADJUST (XML_TEXT_TYPES_START + 15)
179 #define XML_TYPE_TEXT_ADJUSTLAST (XML_TEXT_TYPES_START + 16)
180 #define XML_TYPE_TEXT_CASEMAP_VAR (XML_TEXT_TYPES_START + 17)
181 #define XML_TYPE_TEXT_ESCAPEMENT (XML_TEXT_TYPES_START + 18)
182 #define XML_TYPE_TEXT_ESCAPEMENT_HEIGHT (XML_TEXT_TYPES_START + 19)
183 #define XML_TYPE_CHAR_HEIGHT (XML_TEXT_TYPES_START + 20)
184 #define XML_TYPE_CHAR_HEIGHT_PROP (XML_TEXT_TYPES_START + 21)
185 #define XML_TYPE_CHAR_LANGUAGE (XML_TEXT_TYPES_START + 22)
186 #define XML_TYPE_CHAR_COUNTRY (XML_TEXT_TYPES_START + 23)
187 #define XML_TYPE_LINE_SPACE_FIXED (XML_TEXT_TYPES_START + 24)
188 #define XML_TYPE_LINE_SPACE_MINIMUM (XML_TEXT_TYPES_START + 25)
189 #define XML_TYPE_LINE_SPACE_DISTANCE (XML_TEXT_TYPES_START + 26)
190 #define XML_TYPE_BORDER (XML_TEXT_TYPES_START + 27)
191 #define XML_TYPE_BORDER_WIDTH (XML_TEXT_TYPES_START + 28)
192 #define XML_TYPE_TEXT_DROPCAP (XML_TEXT_TYPES_START + 29)
193 #define XML_TYPE_TEXT_TABSTOP (XML_TEXT_TYPES_START + 30)
194 #define XML_TYPE_TEXT_BOOLCROSSEDOUT (XML_TEXT_TYPES_START + 31)
195 #define XML_TYPE_TEXT_WRAP (XML_TEXT_TYPES_START + 32)
196 #define XML_TYPE_TEXT_PARAGRAPH_ONLY (XML_TEXT_TYPES_START + 33)
197 #define XML_TYPE_TEXT_WRAP_OUTSIDE (XML_TEXT_TYPES_START + 34)
198 #define XML_TYPE_TEXT_OPAQUE (XML_TEXT_TYPES_START + 35)
199 #define XML_TYPE_TEXT_PROTECT_CONTENT (XML_TEXT_TYPES_START + 36)
200 #define XML_TYPE_TEXT_PROTECT_SIZE (XML_TEXT_TYPES_START + 37)
201 #define XML_TYPE_TEXT_PROTECT_POSITION (XML_TEXT_TYPES_START + 38)
202 #define XML_TYPE_TEXT_ANCHOR_TYPE (XML_TEXT_TYPES_START + 39)
203 #define XML_TYPE_TEXT_COLUMNS (XML_TEXT_TYPES_START + 40)
204 #define XML_TYPE_TEXT_HORIZONTAL_POS (XML_TEXT_TYPES_START + 41)
205 #define XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED (XML_TEXT_TYPES_START + 42)
206 #define XML_TYPE_TEXT_HORIZONTAL_REL (XML_TEXT_TYPES_START + 43)
207 #define XML_TYPE_TEXT_HORIZONTAL_REL_FRAME (XML_TEXT_TYPES_START + 44)
208 #define XML_TYPE_TEXT_HORIZONTAL_MIRROR (XML_TEXT_TYPES_START + 45)
209 #define XML_TYPE_TEXT_VERTICAL_POS (XML_TEXT_TYPES_START + 46)
210 #define XML_TYPE_TEXT_VERTICAL_REL (XML_TEXT_TYPES_START + 47)
211 #define XML_TYPE_TEXT_VERTICAL_REL_PAGE (XML_TEXT_TYPES_START + 48)
212 #define XML_TYPE_TEXT_VERTICAL_REL_FRAME (XML_TEXT_TYPES_START + 49)
213 #define XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR (XML_TEXT_TYPES_START + 50)
214 #define XML_TYPE_TEXT_MIRROR_VERTICAL (XML_TEXT_TYPES_START + 51)
215 #define XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT (XML_TEXT_TYPES_START + 52)
216 #define XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT (XML_TEXT_TYPES_START + 53)
217 #define XML_TYPE_TEXT_CLIP11 (XML_TEXT_TYPES_START + 54)
218 #define XML_TYPE_ATTRIBUTE_CONTAINER (XML_TEXT_TYPES_START + 55 )
219 #define XML_TYPE_CHAR_HEIGHT_DIFF (XML_TEXT_TYPES_START + 56)
220 #define XML_TYPE_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 57)
221 #define XML_TYPE_TEXT_COMBINE (XML_TEXT_TYPES_START + 58)
222 #define XML_TYPE_TEXT_COMBINECHAR (XML_TEXT_TYPES_START + 59)
223 #define XML_TYPE_TEXT_UNDERLINE_COLOR (XML_TEXT_TYPES_START + 60)
224 #define XML_TYPE_TEXT_UNDERLINE_HASCOLOR (XML_TEXT_TYPES_START + 61)
225 #define XML_TYPE_TEXT_AUTOSPACE (XML_TEXT_TYPES_START + 62)
226 #define XML_TYPE_TEXT_PUNCTUATION_WRAP (XML_TEXT_TYPES_START + 63)
227 #define XML_TYPE_TEXT_LINE_BREAK (XML_TEXT_TYPES_START + 64)
229 #define XML_TYPE_TEXT_ALIGN (XML_TEXT_TYPES_START + 65)
230 #define XML_TYPE_FONT_WIDTH (XML_TEXT_TYPES_START + 66)
231 #define XML_TYPE_ROTATION_ANGLE (XML_TEXT_TYPES_START + 67)
232 #define XML_TYPE_CONTROL_BORDER (XML_TEXT_TYPES_START + 68)
233 #define XML_TYPE_TEXT_REL_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 69)
234 #define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 70)
235 #define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN (XML_TEXT_TYPES_START + 71)
236 #define XML_TYPE_TEXT_COMBINE_CHARACTERS (XML_TEXT_TYPES_START + 72)
237 #define XML_TYPE_TEXT_ANIMATION (XML_TEXT_TYPES_START + 73)
238 #define XML_TYPE_TEXT_ANIMATION_DIRECTION (XML_TEXT_TYPES_START + 74)
239 #define XML_TYPE_TEXT_HORIZONTAL_ADJUST (XML_TEXT_TYPES_START + 75)
240 #define XML_TYPE_TEXT_RUBY_ADJUST (XML_TEXT_TYPES_START + 76)
241 #define XML_TYPE_TEXT_FONT_RELIEF (XML_TEXT_TYPES_START + 77)
242 #define XML_TYPE_TEXT_ROTATION_ANGLE (XML_TEXT_TYPES_START + 78)
243 #define XML_TYPE_TEXT_ROTATION_SCALE (XML_TEXT_TYPES_START + 79)
244 #define XML_TYPE_TEXT_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 80)
245 #define XML_TYPE_TEXT_DRAW_ASPECT (XML_TEXT_TYPES_START + 81)
246 #define XML_TYPE_CONTROL_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 82)
247 #define XML_TYPE_TEXT_RUBY_POSITION (XML_TEXT_TYPES_START + 83)
248 #define XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR (XML_TEXT_TYPES_START + 84)
249 #define XML_TYPE_TEXT_WRITING_MODE (XML_TEXT_TYPES_START + 85)
250 #define XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT (XML_TEXT_TYPES_START + 86)
251 #define XML_TYPE_LAYOUT_GRID_MODE (XML_TEXT_TYPES_START + 87)
252 #define XML_TYPE_TEXT_HIDDEN_AS_DISPLAY (XML_TEXT_TYPES_START + 88)
253 #define XML_TYPE_CONTROL_BORDER_COLOR (XML_TEXT_TYPES_START + 89)
254 #define XML_TYPE_BORDER_MODEL (XML_TEXT_TYPES_START + 90)
255 #define XML_TYPE_TEXT_LINE_MODE (XML_TEXT_TYPES_START + 91)
256 #define XML_TYPE_TEXT_UNDERLINE_TYPE (XML_TEXT_TYPES_START + 92)
257 #define XML_TYPE_TEXT_UNDERLINE_WIDTH (XML_TEXT_TYPES_START + 93)
258 #define XML_TYPE_TEXT_CROSSEDOUT_TYPE (XML_TEXT_TYPES_START + 94)
259 #define XML_TYPE_TEXT_CROSSEDOUT_WIDTH (XML_TEXT_TYPES_START + 95)
260 #define XML_TYPE_TEXT_CROSSEDOUT_TEXT (XML_TEXT_TYPES_START + 96)
261 #define XML_TYPE_TEXT_KEEP (XML_TEXT_TYPES_START + 97)
262 #define XML_TYPE_TEXT_NKEEP (XML_TEXT_TYPES_START + 98)
263 #define XML_TYPE_WRAP_INFLUENCE_ON_POSITION (XML_TEXT_TYPES_START + 99)
264 #define XML_TYPE_WRAP_OPTION (XML_TEXT_TYPES_START + 100)
265 #define XML_TYPE_TEXT_NUMBER8_ONE_BASED (XML_TEXT_TYPES_START + 101)
266 #define XML_TYPE_NUMBER_NO_ZERO (XML_TEXT_TYPES_START + 102)
267 #define XML_TYPE_NUMBER8_NO_ZERO (XML_TEXT_TYPES_START + 103)
268 #define XML_TYPE_NUMBER16_NO_ZERO (XML_TEXT_TYPES_START + 104)
269 #define XML_TYPE_NUMBER16_AUTO (XML_TEXT_TYPES_START + 105)
270 #define XML_TYPE_TEXT_SOFT_PAGE_BREAK (XML_TEXT_TYPES_START + 106)
271 #define XML_TYPE_TEXT_USE_SOFT_PAGE_BREAKS (XML_TEXT_TYPES_START + 107)
272 #define XML_TYPE_TEXT_CLIP (XML_TEXT_TYPES_START + 108)
273 #define XML_TYPE_TEXT_OVERLINE_TYPE (XML_TEXT_TYPES_START + 109)
274 #define XML_TYPE_TEXT_OVERLINE_STYLE (XML_TEXT_TYPES_START + 110)
275 #define XML_TYPE_TEXT_OVERLINE_WIDTH (XML_TEXT_TYPES_START + 111)
276 #define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 112)
277 #define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 113)
278 #define XML_TYPE_BOOL_FALSE (XML_TEXT_TYPES_START + 114)
280 #define XML_TYPE_CHAR_SCRIPT (XML_TEXT_TYPES_START + 116)
281 #define XML_TYPE_CHAR_RFC_LANGUAGE_TAG (XML_TEXT_TYPES_START + 117)
282 #define XML_TYPE_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 118)
284 #define XML_SW_TYPE_FILLSTYLE (XML_TEXT_TYPES_START + 119)
285 #define XML_SW_TYPE_FILLBITMAPSIZE (XML_TEXT_TYPES_START + 120)
286 #define XML_SW_TYPE_LOGICAL_SIZE (XML_TEXT_TYPES_START + 121)
287 #define XML_SW_TYPE_BITMAP_REFPOINT (XML_TEXT_TYPES_START + 122)
288 #define XML_SW_TYPE_BITMAP_MODE (XML_TEXT_TYPES_START + 123)
289 #define XML_SW_TYPE_BITMAPREPOFFSETX (XML_TEXT_TYPES_START + 124)
290 #define XML_SW_TYPE_BITMAPREPOFFSETY (XML_TEXT_TYPES_START + 125)
292 #endif // INCLUDED_XMLOFF_XMLTYPES_HXX
294 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */