Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerfilter / source / dmapper / PropertyIds.hxx
blobb39fcd24fa494068560973a091f619b19cedaa50
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #pragma once
21 #include <rtl/ustring.hxx>
23 namespace writerfilter::dmapper{
24 // Ensure that Character Properties are placed between PROP_CHARACTER_STYLES and PROP_CHARACTER_END
25 enum PropertyIds
27 INVALID = 0
28 ,PROP_ID_START = 1
29 ,META_PROP_CELL_MAR_BOTTOM = PROP_ID_START
30 ,META_PROP_CELL_MAR_LEFT
31 ,META_PROP_CELL_MAR_RIGHT
32 ,META_PROP_CELL_MAR_TOP
33 ,META_PROP_HORIZONTAL_BORDER
34 ,META_PROP_TABLE_STYLE_NAME
35 ,META_PROP_VERTICAL_BORDER
36 ,PROP_ADJUST
37 ,PROP_ADJUST_CONTRAST
38 ,PROP_ADJUST_LUMINANCE
39 ,PROP_ALLOW_OVERLAP
40 ,PROP_ALTERNATIVE_TEXT
41 ,PROP_ANCHOR_TYPE
42 ,PROP_AUTOMATIC_DISTANCE
43 ,PROP_BACK_COLOR
44 ,PROP_BACK_COMPLEX_COLOR
45 ,PROP_BACK_COLOR_TRANSPARENCY
46 ,PROP_BITMAP
47 ,PROP_BORDER_LEFT_COMPLEX_COLOR
48 ,PROP_BORDER_RIGHT_COMPLEX_COLOR
49 ,PROP_BORDER_TOP_COMPLEX_COLOR
50 ,PROP_BORDER_BOTTOM_COMPLEX_COLOR
51 ,PROP_BOTTOM_BORDER
52 ,PROP_BOTTOM_BORDER_DISTANCE
53 ,PROP_BOTTOM_MARGIN
54 ,PROP_BREAK_TYPE
55 ,PROP_BULLET_CHAR
56 ,PROP_BULLET_FONT_NAME
57 ,PROP_CHAPTER_FORMAT
58 ,PROP_CHARACTER_STYLES
59 ,PROP_CHAR_AUTO_KERNING
60 ,PROP_CHAR_BACK_COLOR
61 ,PROP_CHAR_BACKGROUND_COMPLEX_COLOR
62 ,PROP_CHAR_CASE_MAP
63 ,PROP_CHAR_CHAR_KERNING
64 ,PROP_CHAR_COLOR
65 ,PROP_CHAR_COMPLEX_COLOR
66 ,PROP_CHAR_COMBINE_IS_ON
67 ,PROP_CHAR_COMBINE_PREFIX
68 ,PROP_CHAR_COMBINE_SUFFIX
69 ,PROP_CHAR_CONTOURED
70 ,PROP_CHAR_LEFT_BORDER
71 ,PROP_CHAR_RIGHT_BORDER
72 ,PROP_CHAR_TOP_BORDER
73 ,PROP_CHAR_BOTTOM_BORDER
74 ,PROP_CHAR_LEFT_BORDER_DISTANCE
75 ,PROP_CHAR_RIGHT_BORDER_DISTANCE
76 ,PROP_CHAR_TOP_BORDER_DISTANCE
77 ,PROP_CHAR_BOTTOM_BORDER_DISTANCE
78 ,PROP_CHAR_BORDER_LEFT_COMPLEX_COLOR
79 ,PROP_CHAR_BORDER_RIGHT_COMPLEX_COLOR
80 ,PROP_CHAR_BORDER_TOP_COMPLEX_COLOR
81 ,PROP_CHAR_BORDER_BOTTOM_COMPLEX_COLOR
82 ,PROP_CHAR_EMPHASIS
83 ,PROP_CHAR_ESCAPEMENT
84 ,PROP_CHAR_ESCAPEMENT_HEIGHT
85 ,PROP_CHAR_FLASH
86 ,PROP_CHAR_FONT_CHAR_SET
87 ,PROP_CHAR_FONT_NAME
88 ,PROP_CHAR_FONT_NAME_ASIAN
89 ,PROP_CHAR_FONT_NAME_COMPLEX
90 ,PROP_CHAR_HEIGHT
91 ,PROP_CHAR_HEIGHT_ASIAN
92 ,PROP_CHAR_HEIGHT_COMPLEX
93 ,PROP_CHAR_HIDDEN
94 ,PROP_CHAR_HIGHLIGHT
95 ,PROP_CHAR_LOCALE
96 ,PROP_CHAR_LOCALE_ASIAN
97 ,PROP_CHAR_LOCALE_COMPLEX
98 ,PROP_CHAR_POSTURE
99 ,PROP_CHAR_POSTURE_ASIAN
100 ,PROP_CHAR_POSTURE_COMPLEX
101 ,PROP_CHAR_PROP_HEIGHT
102 ,PROP_CHAR_PROP_HEIGHT_ASIAN
103 ,PROP_CHAR_PROP_HEIGHT_COMPLEX
104 ,PROP_CHAR_RELIEF
105 ,PROP_CHAR_ROTATION
106 ,PROP_CHAR_ROTATION_IS_FIT_TO_LINE
107 ,PROP_CHAR_SCALE_WIDTH
108 ,PROP_CHAR_SHADOW_FORMAT
109 ,PROP_CHAR_SHADING_MARKER
110 ,PROP_CHAR_SHADING_VALUE
111 ,PROP_CHAR_SHADOWED
112 ,PROP_CHAR_STRIKEOUT
113 ,PROP_CHAR_STYLE_NAME
114 ,PROP_CHAR_TEXTOUTLINE_TEXT_EFFECT
115 ,PROP_CHAR_TEXTFILL_TEXT_EFFECT
116 ,PROP_CHAR_THEME_NAME_ASCII
117 ,PROP_CHAR_THEME_NAME_CS
118 ,PROP_CHAR_THEME_NAME_H_ANSI
119 ,PROP_CHAR_THEME_NAME_EAST_ASIA
120 ,PROP_CHAR_THEME_FONT_NAME_ASCII
121 ,PROP_CHAR_THEME_FONT_NAME_CS
122 ,PROP_CHAR_THEME_FONT_NAME_EAST_ASIA
123 ,PROP_CHAR_THEME_COLOR
124 ,PROP_CHAR_THEME_ORIGINAL_COLOR
125 ,PROP_CHAR_THEME_COLOR_SHADE
126 ,PROP_CHAR_THEME_FILL
127 ,PROP_CHAR_THEME_COLOR_TINT
128 ,PROP_CHAR_UNDERLINE
129 ,PROP_CHAR_UNDERLINE_COLOR
130 ,PROP_CHAR_UNDERLINE_COMPLEX_COLOR
131 ,PROP_CHAR_UNDERLINE_HAS_COLOR
132 ,PROP_CHAR_WEIGHT
133 ,PROP_CHAR_WEIGHT_ASIAN
134 ,PROP_CHAR_WEIGHT_COMPLEX
135 ,PROP_CHAR_WORD_MODE
136 ,PROP_CHAR_GLOW_TEXT_EFFECT
137 ,PROP_CHAR_SHADOW_TEXT_EFFECT
138 ,PROP_CHAR_REFLECTION_TEXT_EFFECT
139 ,PROP_CHAR_SCENE3D_TEXT_EFFECT
140 ,PROP_CHAR_PROPS3D_TEXT_EFFECT
141 ,PROP_CHAR_LIGATURES_TEXT_EFFECT
142 ,PROP_CHAR_NUMFORM_TEXT_EFFECT
143 ,PROP_CHAR_NUMSPACING_TEXT_EFFECT
144 ,PROP_CHAR_STYLISTICSETS_TEXT_EFFECT
145 ,PROP_CHAR_CNTXTALTS_TEXT_EFFECT
146 ,PROP_CHARACTER_END
147 ,PROP_CONTENT = PROP_CHARACTER_END
148 ,PROP_CONTOUR_OUTSIDE
149 ,PROP_CONTOUR_POLY_POLYGON
150 ,PROP_COUNT_EMPTY_LINES
151 ,PROP_COUNT_LINES_IN_FRAMES
152 ,PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES
153 ,PROP_CREATE_FROM_MARKS
154 ,PROP_CREATE_FROM_OUTLINE
155 ,PROP_CURRENT_PRESENTATION
156 ,PROP_DECORATIVE
157 ,PROP_DELETE
158 ,PROP_DESCRIPTION
159 ,PROP_DISTANCE
160 ,PROP_DROP_CAP_FORMAT
161 ,PROP_FILE_FORMAT
162 ,PROP_FIRST_LINE_INDENT
163 ,PROP_FIRST_LINE_OFFSET
164 ,PROP_FIRST_PAGE
165 ,PROP_FIRST_IS_SHARED
166 ,PROP_FOOTER_BODY_DISTANCE
167 ,PROP_FOOTER_DYNAMIC_SPACING
168 ,PROP_FOOTER_HEIGHT
169 ,PROP_FOOTER_IS_DYNAMIC_HEIGHT
170 ,PROP_FOOTER_IS_ON
171 ,PROP_FOOTER_IS_SHARED
172 ,PROP_FOOTER_TEXT
173 ,PROP_FOOTER_TEXT_LEFT
174 ,PROP_FOOTER_TEXT_FIRST
175 ,PROP_FOOTNOTE_COUNTING
176 ,PROP_FOOTNOTE_LINE_ADJUST
177 ,PROP_FORMAT
178 ,PROP_FULL_NAME
179 ,PROP_GRAPHIC
180 ,PROP_GRAPHIC_COLOR_MODE
181 ,PROP_GRID_BASE_HEIGHT
182 ,PROP_GRID_BASE_WIDTH
183 ,PROP_GRID_DISPLAY
184 ,PROP_GRID_LINES
185 ,PROP_GRID_MODE
186 ,PROP_GRID_PRINT
187 ,PROP_GRID_RUBY_HEIGHT
188 ,PROP_HEADER_BODY_DISTANCE
189 ,PROP_HEADER_DYNAMIC_SPACING
190 ,PROP_HEADER_HEIGHT
191 ,PROP_HEADER_IS_DYNAMIC_HEIGHT
192 ,PROP_HEADER_IS_ON
193 ,PROP_HEADER_IS_SHARED
194 ,PROP_HEADER_ROW_COUNT
195 ,PROP_HEADER_TEXT
196 ,PROP_HEADER_TEXT_LEFT
197 ,PROP_HEADER_TEXT_FIRST
198 ,PROP_HEADING_STYLE_NAME
199 ,PROP_HEIGHT
200 ,PROP_HELP
201 ,PROP_HINT
202 ,PROP_HORI_ORIENT
203 ,PROP_HORI_ORIENT_POSITION
204 ,PROP_HORI_ORIENT_RELATION
205 ,PROP_HYPER_LINK_U_R_L
206 ,PROP_HYPERLINK
207 ,PROP_INDENT_AT
208 ,PROP_INPUT_STREAM
209 ,PROP_INSERT
210 ,PROP_INTERVAL
211 ,PROP_IS_DATE
212 ,PROP_IS_FIXED
213 ,PROP_IS_INPUT
214 ,PROP_IS_LANDSCAPE
215 ,PROP_IS_ON
216 ,PROP_IS_SPLIT_ALLOWED
217 ,PROP_IS_VISIBLE
218 ,PROP_LABEL_CATEGORY
219 ,PROP_LEFT_BORDER
220 ,PROP_LEFT_BORDER_DISTANCE
221 ,PROP_LEFT_MARGIN
222 ,PROP_LEVEL
223 ,PROP_LEVEL_FOLLOW
224 ,PROP_LEVEL_FORMAT
225 ,PROP_LEVEL_PARAGRAPH_STYLES
226 ,PROP_LEVEL_IS_LEGAL
227 ,PROP_LISTTAB_STOP_POSITION
228 ,PROP_LIST_FORMAT
229 ,PROP_MACRO_NAME
230 ,PROP_NAME
231 ,PROP_NUMBERING_LEVEL
232 ,PROP_NUMBERING_RULES
233 ,PROP_NUMBERING_STYLE_NAME
234 ,PROP_NUMBERING_TYPE
235 ,PROP_NUMBER_FORMAT
236 ,PROP_NUMBER_POSITION
237 ,PROP_OPAQUE
238 ,PROP_OUTLINE_LEVEL
239 ,PROP_PAGE_DESC_NAME
240 ,PROP_PAGE_NUMBER_OFFSET
241 ,PROP_PAGE_TOGGLE
242 ,PROP_PARAGRAPH_FORMAT
243 ,PROP_PARAGRAPH_STYLES
244 ,PROP_PARA_ADJUST
245 ,PROP_PARA_BOTTOM_MARGIN
246 ,PROP_PARA_FIRST_LINE_INDENT
247 ,PROP_PARA_IS_HANGING_PUNCTUATION
248 ,PROP_PARA_IS_HYPHENATION
249 ,PROP_PARA_HYPHENATION_NO_CAPS
250 ,PROP_PARA_HYPHENATION_ZONE
251 ,PROP_PARA_KEEP_TOGETHER
252 ,PROP_PARA_LAST_LINE_ADJUST
253 ,PROP_PARA_LEFT_MARGIN
254 ,PROP_PARA_LINE_NUMBER_COUNT
255 ,PROP_PARA_LINE_NUMBER_START_VALUE
256 ,PROP_PARA_LINE_SPACING
257 ,PROP_PARA_ORPHANS
258 ,PROP_PARA_RIGHT_MARGIN
259 ,PROP_PARA_SPLIT
260 ,PROP_PARA_STYLE_NAME
261 ,PROP_PARA_TAB_STOPS
262 ,PROP_PARA_TOP_MARGIN
263 ,PROP_PARA_VERT_ALIGNMENT
264 ,PROP_PARA_WIDOWS
265 ,PROP_PAPER_TRAY
266 ,PROP_PARENT_NUMBERING
267 ,PROP_POSITION_AND_SPACE_MODE
268 ,PROP_POSITION_PROTECTED
269 ,PROP_IS_PROTECTED
270 ,PROP_REDLINE_AUTHOR
271 ,PROP_REDLINE_DATE_TIME
272 ,PROP_REDLINE_TYPE
273 ,PROP_REDLINE_REVERT_PROPERTIES
274 ,PROP_REFERENCE_FIELD_FLAGS
275 ,PROP_REFERENCE_FIELD_PART
276 ,PROP_REFERENCE_FIELD_SOURCE
277 ,PROP_RESTART_AT_EACH_PAGE
278 ,PROP_RIGHT_BORDER
279 ,PROP_RIGHT_BORDER_DISTANCE
280 ,PROP_RIGHT_MARGIN
281 ,PROP_SERVICE_CHAR_STYLE
282 ,PROP_SERVICE_PARA_STYLE
283 ,PROP_SIZE
284 ,PROP_SIZE100th_M_M
285 ,PROP_SIZE_PIXEL
286 ,PROP_SIZE_PROTECTED
287 ,PROP_SIZE_TYPE
288 ,PROP_SOURCE_NAME
289 ,PROP_SPLIT
290 ,PROP_STANDARD
291 ,PROP_START_AT
292 ,PROP_START_WITH
293 ,PROP_STREAM_NAME
294 ,PROP_SUB_TYPE
295 ,PROP_SURROUND
296 ,PROP_SURROUND_CONTOUR
297 ,PROP_TABLE_BORDER
298 ,PROP_TABLE_BORDER_DISTANCES
299 ,PROP_TABLE_COLUMN_SEPARATORS
300 ,PROP_TABLE_REDLINE_PARAMS
301 ,PROP_TABLE_ROW_DELETE
302 ,PROP_TABLE_ROW_INSERT
303 ,PROP_TABLE_CELL_DELETE
304 ,PROP_TABLE_CELL_INSERT
305 ,PROP_TABS_RELATIVE_TO_INDENT
306 ,PROP_TAB_STOP_DISTANCE
307 ,PROP_TEXT
308 ,PROP_TEXT_COLUMNS
309 ,PROP_TEXT_RANGE
310 ,PROP_TEXT_VERTICAL_ADJUST
311 ,PROP_TITLE
312 ,PROP_TOKEN_CHAPTER_INFO
313 ,PROP_TOKEN_HYPERLINK_END
314 ,PROP_TOKEN_HYPERLINK_START
315 ,PROP_TOKEN_TEXT
316 ,PROP_TOKEN_TYPE
317 ,PROP_TOP_BORDER
318 ,PROP_TOP_BORDER_DISTANCE
319 ,PROP_TOP_MARGIN
320 ,PROP_VERTICAL_MERGE
321 ,PROP_GRID_STANDARD_MODE
322 ,PROP_VERT_ORIENT
323 ,PROP_VERT_ORIENT_POSITION
324 ,PROP_VERT_ORIENT_RELATION
325 ,PROP_WIDTH
326 ,PROP_WIDTH_TYPE
327 ,PROP_TBL_LOOK
328 ,PROP_WRITING_MODE
329 ,PROP_FRM_DIRECTION
330 ,PROP_EMBEDDED_OBJECT
331 ,PROP_PARA_CONTEXT_MARGIN
332 ,PROP_PAGE_STYLE_LAYOUT
333 ,PROP_Z_ORDER
334 ,PROP_EMBED_FONTS
335 ,PROP_EMBED_SYSTEM_FONTS
336 ,PROP_SHADOW_FORMAT
337 ,PROP_RELATIVE_WIDTH
338 ,PROP_IS_WIDTH_RELATIVE
339 ,PROP_GRAPHIC_BITMAP
340 ,PROP_GRAPHIC_SIZE
341 ,PROP_MIRROR_INDENTS
342 ,PROP_SURROUND_TEXT_WRAP_SMALL
343 ,PROP_PARA_SHADOW_FORMAT
344 ,PROP_FOOTNOTE_LINE_RELATIVE_WIDTH
345 ,PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING
346 ,PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING
347 ,PROP_TBL_HEADER
348 ,PROP_HORIZONTAL_MERGE
349 ,PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS
350 ,PROP_TAB_IN_TOC
351 ,PROP_TOC_BOOKMARK
352 ,PROP_TOC_NEW_LINE
353 ,PROP_TOC_PARAGRAPH_OUTLINE_LEVEL
354 ,PROP_SDTPR
355 ,PROP_CELL_INTEROP_GRAB_BAG
356 ,PROP_TABLE_INTEROP_GRAB_BAG
357 ,PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
358 ,PROP_SDT_END_BEFORE
359 ,PROP_PARA_SDT_END_BEFORE
360 ,META_PROP_TABLE_LOOK
361 ,PROP_PARA_CNF_STYLE
362 ,PROP_CELL_CNF_STYLE
363 ,PROP_ROW_CNF_STYLE
364 ,PROP_CELL_HIDE_MARK
365 ,PROP_FOLLOW_TEXT_FLOW
366 ,PROP_FILL_STYLE
367 ,PROP_FILL_COLOR
368 ,PROP_FILL_COMPLEX_COLOR
369 ,PROP_SNAP_TO_GRID
370 ,PROP_GRID_SNAP_TO_CHARS
371 ,PROP_RUBY_STYLE
372 ,PROP_RUBY_TEXT
373 ,PROP_RUBY_ADJUST
374 ,PROP_RUBY_POSITION
375 ,PROP_DATABASE_NAME
376 ,PROP_COMMAND_TYPE
377 ,PROP_DATATABLE_NAME
378 ,PROP_DATACOLUMN_NAME
379 ,PROP_CHAR_TRANSPARENCE
380 ,PROP_CELL_FORMULA
381 ,PROP_CELL_FORMULA_CONVERTED
382 ,PROP_GUTTER_MARGIN
383 ,PROP_RTL_GUTTER
384 ,PROP_CURSOR_NOT_IGNORE_TABLES_IN_HF
385 ,PROP_PARA_CONNECT_BORDERS
388 //Returns the UNO string equivalent to eId.
389 OUString getPropertyName(PropertyIds eId);
391 bool isCharacterProperty(const PropertyIds eId);
393 bool isParagraphProperty(const PropertyIds eId);
395 } // namespace writerfilter::dmapper
397 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */