LibreOffice Module xmloff (master) 1
xmltypes.hxx
Go to the documentation of this file.
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
20#ifndef INCLUDED_XMLOFF_XMLTYPES_HXX
21#define INCLUDED_XMLOFF_XMLTYPES_HXX
22
23
24// Flags to specify how to im/export the property
25
26// OLD:
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
31// NOW:
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
35
36#define MID_FLAG_MASK 0x00003fff
37
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
45
46// Export only: When exporting defaults, export this property even if it is
47// not set
48#define MID_FLAG_DEFAULT_ITEM_EXPORT 0x00200000
49
50// Import and Export: The property in question must exist. No call to
51// hasPropertyByName is required.
52#define MID_FLAG_MUST_EXIST 0x00400000
53
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
58
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
62
63// Import only: there are more entries for the same xml attribute existing
64#define MID_FLAG_MULTI_PROPERTY 0x02000000
65
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
69
70#define MID_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
71
72// the property is ignored
73#define MID_FLAG_NO_PROPERTY_EXPORT 0x10000000
74
75// the attribute is ignored (not yet implemented)
76#define MID_FLAG_NO_PROPERTY_IMPORT 0x40000000
77
78#define MID_FLAG_NO_PROPERTY 0x50000000 // both import and export
79
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
83
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
88
89
90#define XML_TYPE_PROP_SHIFT 14
91#define XML_TYPE_PROP_MASK (0xf << XML_TYPE_PROP_SHIFT)
92
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)
109
110#define XML_TYPE_APP_SHIFT 10
111
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)
118
119// XML-data-type-ID's
120
121// simple types, no special compare necessary
122#define XML_TYPE_BUILDIN_CMP 0x00002000
123
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
156#define XML_TYPE_PERCENT100 0x00002026 // 100th percent
157
158// special basic types
159#define XML_TYPE_RECTANGLE_LEFT 0x00000100 // the Left member of an awt::Rectangle as a measure
160#define XML_TYPE_RECTANGLE_TOP 0x00000101 // the Top member of an awt::Rectangle as a measure
161#define XML_TYPE_RECTANGLE_WIDTH 0x00000102 // the Width member of an awt::Rectangle as a measure
162#define XML_TYPE_RECTANGLE_HEIGHT 0x00000103 // the Height member of an awt::Rectangle as a measure
163
164#define XML_TYPE_TEXT_CROSSEDOUT_STYLE (XML_TEXT_TYPES_START + 0)
165#define XML_TYPE_TEXT_CASEMAP (XML_TEXT_TYPES_START + 1)
166#define XML_TYPE_TEXT_FONTFAMILYNAME (XML_TEXT_TYPES_START + 2)
167#define XML_TYPE_TEXT_FONTFAMILY (XML_TEXT_TYPES_START + 3)
168#define XML_TYPE_TEXT_FONTENCODING (XML_TEXT_TYPES_START + 4)
169#define XML_TYPE_TEXT_FONTPITCH (XML_TEXT_TYPES_START + 5)
170#define XML_TYPE_TEXT_KERNING (XML_TEXT_TYPES_START + 6)
171#define XML_TYPE_TEXT_POSTURE (XML_TEXT_TYPES_START + 7)
172#define XML_TYPE_TEXT_SHADOWED (XML_TEXT_TYPES_START + 8)
173#define XML_TYPE_TEXT_UNDERLINE_STYLE (XML_TEXT_TYPES_START + 9)
174#define XML_TYPE_TEXT_WEIGHT (XML_TEXT_TYPES_START + 10)
175#define XML_TYPE_TEXT_SPLIT (XML_TEXT_TYPES_START + 11)
176#define XML_TYPE_TEXT_BREAKBEFORE (XML_TEXT_TYPES_START + 12)
177#define XML_TYPE_TEXT_BREAKAFTER (XML_TEXT_TYPES_START + 13)
178#define XML_TYPE_TEXT_SHADOW (XML_TEXT_TYPES_START + 14)
179#define XML_TYPE_TEXT_ADJUST (XML_TEXT_TYPES_START + 15)
180#define XML_TYPE_TEXT_ADJUSTLAST (XML_TEXT_TYPES_START + 16)
181#define XML_TYPE_TEXT_CASEMAP_VAR (XML_TEXT_TYPES_START + 17)
182#define XML_TYPE_TEXT_ESCAPEMENT (XML_TEXT_TYPES_START + 18)
183#define XML_TYPE_TEXT_ESCAPEMENT_HEIGHT (XML_TEXT_TYPES_START + 19)
184#define XML_TYPE_CHAR_HEIGHT (XML_TEXT_TYPES_START + 20)
185#define XML_TYPE_CHAR_HEIGHT_PROP (XML_TEXT_TYPES_START + 21)
186#define XML_TYPE_CHAR_LANGUAGE (XML_TEXT_TYPES_START + 22)
187#define XML_TYPE_CHAR_COUNTRY (XML_TEXT_TYPES_START + 23)
188#define XML_TYPE_LINE_SPACE_FIXED (XML_TEXT_TYPES_START + 24)
189#define XML_TYPE_LINE_SPACE_MINIMUM (XML_TEXT_TYPES_START + 25)
190#define XML_TYPE_LINE_SPACE_DISTANCE (XML_TEXT_TYPES_START + 26)
191#define XML_TYPE_BORDER (XML_TEXT_TYPES_START + 27)
192#define XML_TYPE_BORDER_WIDTH (XML_TEXT_TYPES_START + 28)
193#define XML_TYPE_TEXT_DROPCAP (XML_TEXT_TYPES_START + 29)
194#define XML_TYPE_TEXT_TABSTOP (XML_TEXT_TYPES_START + 30)
195#define XML_TYPE_TEXT_BOOLCROSSEDOUT (XML_TEXT_TYPES_START + 31)
196#define XML_TYPE_TEXT_WRAP (XML_TEXT_TYPES_START + 32)
197#define XML_TYPE_TEXT_PARAGRAPH_ONLY (XML_TEXT_TYPES_START + 33)
198#define XML_TYPE_TEXT_WRAP_OUTSIDE (XML_TEXT_TYPES_START + 34)
199#define XML_TYPE_TEXT_OPAQUE (XML_TEXT_TYPES_START + 35)
200#define XML_TYPE_TEXT_PROTECT_CONTENT (XML_TEXT_TYPES_START + 36)
201#define XML_TYPE_TEXT_PROTECT_SIZE (XML_TEXT_TYPES_START + 37)
202#define XML_TYPE_TEXT_PROTECT_POSITION (XML_TEXT_TYPES_START + 38)
203#define XML_TYPE_TEXT_ANCHOR_TYPE (XML_TEXT_TYPES_START + 39)
204#define XML_TYPE_TEXT_COLUMNS (XML_TEXT_TYPES_START + 40)
205#define XML_TYPE_TEXT_HORIZONTAL_POS (XML_TEXT_TYPES_START + 41)
206#define XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED (XML_TEXT_TYPES_START + 42)
207#define XML_TYPE_TEXT_HORIZONTAL_REL (XML_TEXT_TYPES_START + 43)
208#define XML_TYPE_TEXT_HORIZONTAL_REL_FRAME (XML_TEXT_TYPES_START + 44)
209#define XML_TYPE_TEXT_HORIZONTAL_MIRROR (XML_TEXT_TYPES_START + 45)
210#define XML_TYPE_TEXT_VERTICAL_POS (XML_TEXT_TYPES_START + 46)
211#define XML_TYPE_TEXT_VERTICAL_REL (XML_TEXT_TYPES_START + 47)
212#define XML_TYPE_TEXT_VERTICAL_REL_PAGE (XML_TEXT_TYPES_START + 48)
213#define XML_TYPE_TEXT_VERTICAL_REL_FRAME (XML_TEXT_TYPES_START + 49)
214#define XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR (XML_TEXT_TYPES_START + 50)
215#define XML_TYPE_TEXT_MIRROR_VERTICAL (XML_TEXT_TYPES_START + 51)
216#define XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT (XML_TEXT_TYPES_START + 52)
217#define XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT (XML_TEXT_TYPES_START + 53)
218#define XML_TYPE_TEXT_CLIP11 (XML_TEXT_TYPES_START + 54)
219#define XML_TYPE_ATTRIBUTE_CONTAINER (XML_TEXT_TYPES_START + 55 )
220#define XML_TYPE_CHAR_HEIGHT_DIFF (XML_TEXT_TYPES_START + 56)
221#define XML_TYPE_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 57)
222#define XML_TYPE_TEXT_COMBINE (XML_TEXT_TYPES_START + 58)
223#define XML_TYPE_TEXT_COMBINECHAR (XML_TEXT_TYPES_START + 59)
224#define XML_TYPE_TEXT_UNDERLINE_COLOR (XML_TEXT_TYPES_START + 60)
225#define XML_TYPE_TEXT_UNDERLINE_HASCOLOR (XML_TEXT_TYPES_START + 61)
226#define XML_TYPE_TEXT_AUTOSPACE (XML_TEXT_TYPES_START + 62)
227#define XML_TYPE_TEXT_PUNCTUATION_WRAP (XML_TEXT_TYPES_START + 63)
228#define XML_TYPE_TEXT_LINE_BREAK (XML_TEXT_TYPES_START + 64)
229
230#define XML_TYPE_TEXT_ALIGN (XML_TEXT_TYPES_START + 65)
231#define XML_TYPE_FONT_WIDTH (XML_TEXT_TYPES_START + 66)
232#define XML_TYPE_ROTATION_ANGLE (XML_TEXT_TYPES_START + 67)
233#define XML_TYPE_CONTROL_BORDER (XML_TEXT_TYPES_START + 68)
234#define XML_TYPE_TEXT_REL_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 69)
235#define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 70)
236#define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN (XML_TEXT_TYPES_START + 71)
237#define XML_TYPE_TEXT_COMBINE_CHARACTERS (XML_TEXT_TYPES_START + 72)
238#define XML_TYPE_TEXT_ANIMATION (XML_TEXT_TYPES_START + 73)
239#define XML_TYPE_TEXT_ANIMATION_DIRECTION (XML_TEXT_TYPES_START + 74)
240#define XML_TYPE_TEXT_HORIZONTAL_ADJUST (XML_TEXT_TYPES_START + 75)
241#define XML_TYPE_TEXT_RUBY_ADJUST (XML_TEXT_TYPES_START + 76)
242#define XML_TYPE_TEXT_FONT_RELIEF (XML_TEXT_TYPES_START + 77)
243#define XML_TYPE_TEXT_ROTATION_ANGLE (XML_TEXT_TYPES_START + 78)
244#define XML_TYPE_TEXT_ROTATION_SCALE (XML_TEXT_TYPES_START + 79)
245#define XML_TYPE_TEXT_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 80)
246#define XML_TYPE_TEXT_DRAW_ASPECT (XML_TEXT_TYPES_START + 81)
247#define XML_TYPE_CONTROL_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 82)
248#define XML_TYPE_TEXT_RUBY_POSITION (XML_TEXT_TYPES_START + 83)
249#define XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR (XML_TEXT_TYPES_START + 84)
250#define XML_TYPE_TEXT_WRITING_MODE (XML_TEXT_TYPES_START + 85)
251#define XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT (XML_TEXT_TYPES_START + 86)
252#define XML_TYPE_LAYOUT_GRID_MODE (XML_TEXT_TYPES_START + 87)
253#define XML_TYPE_TEXT_HIDDEN_AS_DISPLAY (XML_TEXT_TYPES_START + 88)
254#define XML_TYPE_CONTROL_BORDER_COLOR (XML_TEXT_TYPES_START + 89)
255#define XML_TYPE_BORDER_MODEL (XML_TEXT_TYPES_START + 90)
256#define XML_TYPE_TEXT_LINE_MODE (XML_TEXT_TYPES_START + 91)
257#define XML_TYPE_TEXT_UNDERLINE_TYPE (XML_TEXT_TYPES_START + 92)
258#define XML_TYPE_TEXT_UNDERLINE_WIDTH (XML_TEXT_TYPES_START + 93)
259#define XML_TYPE_TEXT_CROSSEDOUT_TYPE (XML_TEXT_TYPES_START + 94)
260#define XML_TYPE_TEXT_CROSSEDOUT_WIDTH (XML_TEXT_TYPES_START + 95)
261#define XML_TYPE_TEXT_CROSSEDOUT_TEXT (XML_TEXT_TYPES_START + 96)
262#define XML_TYPE_TEXT_KEEP (XML_TEXT_TYPES_START + 97)
263#define XML_TYPE_TEXT_NKEEP (XML_TEXT_TYPES_START + 98)
264#define XML_TYPE_WRAP_INFLUENCE_ON_POSITION (XML_TEXT_TYPES_START + 99)
265#define XML_TYPE_WRAP_OPTION (XML_TEXT_TYPES_START + 100)
266#define XML_TYPE_TEXT_NUMBER8_ONE_BASED (XML_TEXT_TYPES_START + 101)
267#define XML_TYPE_NUMBER_NO_ZERO (XML_TEXT_TYPES_START + 102)
268#define XML_TYPE_NUMBER8_NO_ZERO (XML_TEXT_TYPES_START + 103)
269#define XML_TYPE_NUMBER16_NO_ZERO (XML_TEXT_TYPES_START + 104)
270#define XML_TYPE_NUMBER16_AUTO (XML_TEXT_TYPES_START + 105)
271#define XML_TYPE_TEXT_SOFT_PAGE_BREAK (XML_TEXT_TYPES_START + 106)
272#define XML_TYPE_TEXT_USE_SOFT_PAGE_BREAKS (XML_TEXT_TYPES_START + 107)
273#define XML_TYPE_TEXT_CLIP (XML_TEXT_TYPES_START + 108)
274#define XML_TYPE_TEXT_OVERLINE_TYPE (XML_TEXT_TYPES_START + 109)
275#define XML_TYPE_TEXT_OVERLINE_STYLE (XML_TEXT_TYPES_START + 110)
276#define XML_TYPE_TEXT_OVERLINE_WIDTH (XML_TEXT_TYPES_START + 111)
277#define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 112)
278#define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 113)
279#define XML_TYPE_BOOL_FALSE (XML_TEXT_TYPES_START + 114)
280
281#define XML_TYPE_CHAR_SCRIPT (XML_TEXT_TYPES_START + 116)
282#define XML_TYPE_CHAR_RFC_LANGUAGE_TAG (XML_TEXT_TYPES_START + 117)
283#define XML_TYPE_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 118)
284
285#define XML_SW_TYPE_FILLSTYLE (XML_TEXT_TYPES_START + 119)
286#define XML_SW_TYPE_FILLBITMAPSIZE (XML_TEXT_TYPES_START + 120)
287#define XML_SW_TYPE_LOGICAL_SIZE (XML_TEXT_TYPES_START + 121)
288#define XML_SW_TYPE_BITMAP_REFPOINT (XML_TEXT_TYPES_START + 122)
289#define XML_SW_TYPE_BITMAP_MODE (XML_TEXT_TYPES_START + 123)
290#define XML_SW_TYPE_BITMAPREPOFFSETX (XML_TEXT_TYPES_START + 124)
291#define XML_SW_TYPE_BITMAPREPOFFSETY (XML_TEXT_TYPES_START + 125)
292
293#define XML_TYPE_TEXT_RUBY_IS_ABOVE (XML_TEXT_TYPES_START + 126)
294#define XML_TYPE_GRAPHIC (XML_TEXT_TYPES_START + 127)
295#define XML_SW_TYPE_PRESPAGE_BACKSIZE (XML_TEXT_TYPES_START + 128)
296#define XML_SW_TYPE_RTLGUTTER (XML_TEXT_TYPES_START + 129)
297#define XML_TYPE_THEME_COLOR (XML_TEXT_TYPES_START + 130)
298
299#endif // INCLUDED_XMLOFF_XMLTYPES_HXX
300
301/* vim:set shiftwidth=4 softtabstop=4 expandtab: */