Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerfilter / source / dmapper / PropertyIds.cxx
blobb8b4efc06222683a571681527dc9dad70d25a4cb
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 #include <rtl/ustring.hxx>
20 #include "PropertyIds.hxx"
21 #include <frozen/bits/defines.h>
22 #include <frozen/bits/elsa_std.h>
23 #include <frozen/unordered_map.h>
25 namespace writerfilter::dmapper{
27 namespace
29 constexpr auto constPropertyMap = frozen::make_unordered_map<PropertyIds, std::u16string_view>(
31 { PROP_CHAR_WEIGHT, u"CharWeight"},
32 { PROP_CHAR_POSTURE, u"CharPosture"},
33 { PROP_CHAR_STRIKEOUT, u"CharStrikeout"},
34 { PROP_CHAR_CONTOURED, u"CharContoured"},
35 { PROP_CHAR_SHADOWED, u"CharShadowed"},
36 { PROP_CHAR_CASE_MAP, u"CharCaseMap"},
37 { PROP_CHAR_COLOR, u"CharColor"},
38 { PROP_CHAR_COMPLEX_COLOR, u"CharComplexColor"},
39 { PROP_CHAR_RELIEF, u"CharRelief"},
40 { PROP_CHAR_UNDERLINE, u"CharUnderline"},
41 { PROP_CHAR_UNDERLINE_COLOR, u"CharUnderlineColor"},
42 { PROP_CHAR_UNDERLINE_COMPLEX_COLOR, u"CharUnderlineComplexColor"},
43 { PROP_CHAR_UNDERLINE_HAS_COLOR, u"CharUnderlineHasColor"},
44 { PROP_CHAR_WORD_MODE, u"CharWordMode"},
45 { PROP_CHAR_ESCAPEMENT, u"CharEscapement"},
46 { PROP_CHAR_ESCAPEMENT_HEIGHT, u"CharEscapementHeight"},
47 { PROP_CHAR_HEIGHT, u"CharHeight"},
48 { PROP_CHAR_HEIGHT_COMPLEX, u"CharHeightComplex"},
49 { PROP_CHAR_LOCALE, u"CharLocale"},
50 { PROP_CHAR_LOCALE_ASIAN, u"CharLocaleAsian"},
51 { PROP_CHAR_LOCALE_COMPLEX, u"CharLocaleComplex"},
52 { PROP_CHAR_WEIGHT_COMPLEX, u"CharWeightComplex"},
53 { PROP_CHAR_POSTURE_COMPLEX, u"CharPostureComplex"},
54 { PROP_CHAR_CHAR_KERNING, u"CharKerning"},
55 { PROP_CHAR_AUTO_KERNING, u"CharAutoKerning"},
56 { PROP_CHAR_SCALE_WIDTH, u"CharScaleWidth"},
57 { PROP_CHAR_STYLE_NAME, u"CharStyleName"},
58 { PROP_CHAR_FONT_NAME, u"CharFontName"},
59 { PROP_CHAR_FONT_CHAR_SET, u"CharFontCharSet"},
60 { PROP_CHAR_FONT_NAME_ASIAN, u"CharFontNameAsian"},
61 { PROP_CHAR_HEIGHT_ASIAN, u"CharHeightAsian"},
62 { PROP_CHAR_FONT_NAME_COMPLEX, u"CharFontNameComplex"},
63 { PROP_CHAR_HIDDEN, u"CharHidden"},
64 { PROP_CHAR_WEIGHT_ASIAN, u"CharWeightAsian"},
65 { PROP_CHAR_POSTURE_ASIAN, u"CharPostureAsian"},
66 { PROP_CHAR_BACK_COLOR, u"CharBackColor"},
67 { PROP_CHAR_BACKGROUND_COMPLEX_COLOR, u"CharBackgroundComplexColor"},
68 { PROP_CHAR_EMPHASIS, u"CharEmphasis"},
69 { PROP_CHAR_COMBINE_IS_ON, u"CharCombineIsOn"},
70 { PROP_CHAR_COMBINE_PREFIX, u"CharCombinePrefix"},
71 { PROP_CHAR_COMBINE_SUFFIX, u"CharCombineSuffix"},
72 { PROP_CHAR_ROTATION, u"CharRotation"},
73 { PROP_CHAR_ROTATION_IS_FIT_TO_LINE, u"CharRotationIsFitToLine"},
74 { PROP_CHAR_FLASH, u"CharFlash"},
75 { PROP_CHAR_LEFT_BORDER, u"CharLeftBorder"},
76 { PROP_CHAR_RIGHT_BORDER, u"CharRightBorder"},
77 { PROP_CHAR_TOP_BORDER, u"CharTopBorder"},
78 { PROP_CHAR_BOTTOM_BORDER, u"CharBottomBorder"},
79 { PROP_CHAR_LEFT_BORDER_DISTANCE, u"CharLeftBorderDistance"},
80 { PROP_CHAR_RIGHT_BORDER_DISTANCE, u"CharRightBorderDistance"},
81 { PROP_CHAR_TOP_BORDER_DISTANCE, u"CharTopBorderDistance"},
82 { PROP_CHAR_BOTTOM_BORDER_DISTANCE, u"CharBottomBorderDistance"},
83 { PROP_CHAR_BORDER_LEFT_COMPLEX_COLOR, u"CharLeftBorderComplexColor"},
84 { PROP_CHAR_BORDER_RIGHT_COMPLEX_COLOR, u"CharRightBorderComplexColor"},
85 { PROP_CHAR_BORDER_TOP_COMPLEX_COLOR, u"CharTopBorderComplexColor"},
86 { PROP_CHAR_BORDER_BOTTOM_COMPLEX_COLOR, u"CharBottomBorderComplexColor"},
87 { PROP_CHAR_SHADOW_FORMAT, u"CharShadowFormat"},
88 { PROP_CHAR_HIGHLIGHT, u"CharHighlight"},
89 { PROP_PARA_STYLE_NAME, u"ParaStyleName"},
90 { PROP_PARA_ADJUST, u"ParaAdjust"},
91 { PROP_PARA_VERT_ALIGNMENT, u"ParaVertAlignment"},
92 { PROP_PARA_LAST_LINE_ADJUST, u"ParaLastLineAdjust"},
93 { PROP_PARA_RIGHT_MARGIN, u"ParaRightMargin"},
94 { PROP_PARA_LEFT_MARGIN, u"ParaLeftMargin"},
95 { PROP_PARA_FIRST_LINE_INDENT, u"ParaFirstLineIndent"},
96 { PROP_PARA_KEEP_TOGETHER, u"ParaKeepTogether"},
97 { PROP_PARA_TOP_MARGIN, u"ParaTopMargin"},
98 { PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING, u"ParaTopMarginBeforeAutoSpacing"},
99 { PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING, u"ParaBottomMarginAfterAutoSpacing"},
100 { PROP_PARA_CONTEXT_MARGIN, u"ParaContextMargin"},
101 { PROP_PARA_BOTTOM_MARGIN, u"ParaBottomMargin"},
102 { PROP_PARA_IS_HYPHENATION, u"ParaIsHyphenation"},
103 { PROP_PARA_HYPHENATION_NO_CAPS, u"ParaHyphenationNoCaps"},
104 { PROP_PARA_HYPHENATION_ZONE, u"ParaHyphenationZone"},
105 { PROP_PARA_LINE_NUMBER_COUNT, u"ParaLineNumberCount"},
106 { PROP_PARA_IS_HANGING_PUNCTUATION, u"ParaIsHangingPunctuation"},
107 { PROP_PARA_LINE_SPACING, u"ParaLineSpacing"},
108 { PROP_PARA_TAB_STOPS, u"ParaTabStops"},
109 { PROP_PARA_WIDOWS, u"ParaWidows"},
110 { PROP_PARA_ORPHANS, u"ParaOrphans"},
111 { PROP_PARA_LINE_NUMBER_START_VALUE, u"ParaLineNumberStartValue"},
112 { PROP_NUMBERING_LEVEL, u"NumberingLevel"},
113 { PROP_NUMBERING_RULES, u"NumberingRules"},
114 { PROP_NUMBERING_TYPE, u"NumberingType"},
115 { PROP_START_WITH, u"StartWith"},
116 { PROP_ADJUST, u"Adjust"},
117 { PROP_PARENT_NUMBERING, u"ParentNumbering"},
118 { PROP_RIGHT_MARGIN, u"RightMargin"},
119 { PROP_LEFT_MARGIN, u"LeftMargin"},
120 { PROP_TOP_MARGIN, u"TopMargin"},
121 { PROP_BOTTOM_MARGIN, u"BottomMargin"},
122 { PROP_FIRST_LINE_OFFSET, u"FirstLineOffset"},
123 { PROP_LEFT_BORDER, u"LeftBorder"},
124 { PROP_RIGHT_BORDER, u"RightBorder"},
125 { PROP_TOP_BORDER, u"TopBorder"},
126 { PROP_BOTTOM_BORDER, u"BottomBorder"},
127 { PROP_BORDER_LEFT_COMPLEX_COLOR, u"LeftBorderComplexColor"},
128 { PROP_BORDER_RIGHT_COMPLEX_COLOR, u"RightBorderComplexColor"},
129 { PROP_BORDER_TOP_COMPLEX_COLOR, u"TopBorderComplexColor"},
130 { PROP_BORDER_BOTTOM_COMPLEX_COLOR, u"BottomBorderComplexColor"},
131 { PROP_TABLE_BORDER, u"TableBorder"},
132 { PROP_TABLE_ROW_DELETE, u"TableRowDelete"},
133 { PROP_TABLE_ROW_INSERT, u"TableRowInsert"},
134 { PROP_TABLE_CELL_DELETE, u"TableCellDelete"},
135 { PROP_TABLE_CELL_INSERT, u"TableCellInsert"},
136 { PROP_LEFT_BORDER_DISTANCE, u"LeftBorderDistance"},
137 { PROP_RIGHT_BORDER_DISTANCE, u"RightBorderDistance"},
138 { PROP_TOP_BORDER_DISTANCE, u"TopBorderDistance"},
139 { PROP_BOTTOM_BORDER_DISTANCE, u"BottomBorderDistance"},
140 { PROP_CURRENT_PRESENTATION, u"CurrentPresentation"},
141 { PROP_IS_FIXED, u"IsFixed"},
142 { PROP_SUB_TYPE, u"SubType"},
143 { PROP_FILE_FORMAT, u"FileFormat"},
144 { PROP_HYPER_LINK_U_R_L, u"HyperLinkURL"},
145 { PROP_HYPERLINK, u"Hyperlink"},
146 { PROP_NUMBER_FORMAT, u"NumberFormat"},
147 { PROP_NAME, u"Name"},
148 { PROP_IS_INPUT, u"IsInput"},
149 { PROP_HINT, u"Hint"},
150 { PROP_FULL_NAME, u"FullName"},
151 { PROP_DESCRIPTION, u"Description"},
152 { PROP_MACRO_NAME, u"MacroName"},
153 { PROP_TITLE, u"Title"},
154 { PROP_CONTENT, u"Content"},
155 { PROP_INPUT_STREAM, u"InputStream"},
156 { PROP_GRAPHIC, u"Graphic"},
157 { PROP_ANCHOR_TYPE, u"AnchorType"},
158 { PROP_SIZE, u"Size"},
159 { PROP_HORI_ORIENT, u"HoriOrient"},
160 { PROP_HORI_ORIENT_POSITION, u"HoriOrientPosition"},
161 { PROP_HORI_ORIENT_RELATION, u"HoriOrientRelation"},
162 { PROP_VERT_ORIENT, u"VertOrient"},
163 { PROP_VERT_ORIENT_POSITION, u"VertOrientPosition"},
164 { PROP_VERT_ORIENT_RELATION, u"VertOrientRelation"},
165 { PROP_SIZE100th_M_M, u"Size100thMM"},
166 { PROP_SIZE_PIXEL, u"SizePixel"},
167 { PROP_SURROUND, u"Surround"},
168 { PROP_SURROUND_CONTOUR, u"SurroundContour"},
169 { PROP_ADJUST_CONTRAST, u"AdjustContrast"},
170 { PROP_ADJUST_LUMINANCE, u"AdjustLuminance"},
171 { PROP_GRAPHIC_COLOR_MODE, u"GraphicColorMode"},
172 { PROP_CONTOUR_OUTSIDE, u"ContourOutside"},
173 { PROP_CONTOUR_POLY_POLYGON, u"ContourPolyPolygon"},
174 { PROP_PAGE_TOGGLE, u"PageToggle"},
175 { PROP_BACK_COLOR, u"BackColor"},
176 { PROP_BACK_COMPLEX_COLOR, u"BackComplexColor"},
177 { PROP_BACK_COLOR_TRANSPARENCY, u"BackColorTransparency"},
178 { PROP_ALLOW_OVERLAP, u"AllowOverlap"},
179 { PROP_ALTERNATIVE_TEXT, u"AlternativeText"},
180 { PROP_HEADER_TEXT_LEFT, u"HeaderTextLeft"},
181 { PROP_HEADER_TEXT_FIRST, u"HeaderTextFirst"},
182 { PROP_HEADER_TEXT, u"HeaderText"},
183 { PROP_HEADER_IS_SHARED, u"HeaderIsShared"},
184 { PROP_HEADER_IS_ON, u"HeaderIsOn"},
185 { PROP_FIRST_IS_SHARED, u"FirstIsShared"},
186 { PROP_FOOTER_TEXT_LEFT, u"FooterTextLeft"},
187 { PROP_FOOTER_TEXT_FIRST, u"FooterTextFirst"},
188 { PROP_FOOTER_TEXT, u"FooterText"},
189 { PROP_FOOTER_IS_SHARED, u"FooterIsShared"},
190 { PROP_FOOTER_IS_ON, u"FooterIsOn"},
191 { PROP_FOOTNOTE_COUNTING, u"FootnoteCounting"},
192 { PROP_FOOTNOTE_LINE_ADJUST, u"FootnoteLineAdjust"},
193 { PROP_WIDTH, u"Width"},
194 { PROP_HEIGHT, u"Height"},
195 { PROP_TEXT_COLUMNS, u"TextColumns"},
196 { PROP_AUTOMATIC_DISTANCE, u"AutomaticDistance"},
197 { PROP_IS_LANDSCAPE, u"IsLandscape"},
198 { PROP_FIRST_PAGE, u"First Page"},
199 { PROP_PAGE_DESC_NAME, u"PageDescName"},
200 { PROP_PAGE_NUMBER_OFFSET, u"PageNumberOffset"},
201 { PROP_BREAK_TYPE, u"BreakType"},
202 { PROP_FOOTER_IS_DYNAMIC_HEIGHT, u"FooterIsDynamicHeight"},
203 { PROP_FOOTER_DYNAMIC_SPACING, u"FooterDynamicSpacing"},
204 { PROP_FOOTER_HEIGHT, u"FooterHeight"},
205 { PROP_FOOTER_BODY_DISTANCE, u"FooterBodyDistance"},
206 { PROP_HEADER_IS_DYNAMIC_HEIGHT, u"HeaderIsDynamicHeight"},
207 { PROP_HEADER_DYNAMIC_SPACING, u"HeaderDynamicSpacing"},
208 { PROP_HEADER_HEIGHT, u"HeaderHeight"},
209 { PROP_HEADER_BODY_DISTANCE, u"HeaderBodyDistance"},
210 { PROP_WRITING_MODE, u"WritingMode"},
211 { PROP_GRID_MODE, u"GridMode"},
212 { PROP_GRID_DISPLAY, u"GridDisplay"},
213 { PROP_GRID_PRINT, u"GridPrint"},
214 { PROP_GRID_LINES, u"GridLines"},
215 { PROP_GRID_BASE_HEIGHT, u"GridBaseHeight"},
216 { PROP_GRID_BASE_WIDTH, u"GridBaseWidth"},
217 { PROP_GRID_RUBY_HEIGHT, u"GridRubyHeight"},
218 { PROP_GRID_STANDARD_MODE, u"StandardPageMode"},
219 { PROP_IS_ON, u"IsOn"},
220 { PROP_RESTART_AT_EACH_PAGE, u"RestartAtEachPage"},
221 { PROP_COUNT_EMPTY_LINES, u"CountEmptyLines"},
222 { PROP_COUNT_LINES_IN_FRAMES, u"CountLinesInFrames"},
223 { PROP_INTERVAL, u"Interval"},
224 { PROP_DISTANCE, u"Distance"},
225 { PROP_NUMBER_POSITION, u"NumberPosition"},
226 { PROP_LEVEL, u"Level"},
227 { PROP_LEVEL_FOLLOW, u"LabelFollowedBy"},
228 { PROP_LEVEL_PARAGRAPH_STYLES, u"LevelParagraphStyles"},
229 { PROP_LEVEL_FORMAT, u"LevelFormat"},
230 { PROP_LEVEL_IS_LEGAL, u"IsLegal"},
231 { PROP_LIST_FORMAT, u"ListFormat"},
232 { PROP_TOKEN_TYPE, u"TokenType"},
233 { PROP_TOKEN_HYPERLINK_START, u"TokenHyperlinkStart"},
234 { PROP_TOKEN_HYPERLINK_END, u"TokenHyperlinkEnd"},
235 { PROP_TOKEN_CHAPTER_INFO, u"TokenChapterInfo"},
236 { PROP_CHAPTER_FORMAT, u"ChapterFormat"},
237 { PROP_TOKEN_TEXT, u"TokenText"},
238 { PROP_TEXT, u"Text"},
239 { PROP_CREATE_FROM_OUTLINE, u"CreateFromOutline"},
240 { PROP_CREATE_FROM_MARKS, u"CreateFromMarks"},
241 { PROP_STANDARD, u"Standard"},
242 { PROP_SPLIT, u"Split"},
243 { PROP_IS_SPLIT_ALLOWED, u"IsSplitAllowed"},
244 { META_PROP_VERTICAL_BORDER, u"VerticalBorder"},
245 { META_PROP_HORIZONTAL_BORDER, u"HorizontalBorder"},
246 { PROP_HEADER_ROW_COUNT, u"HeaderRowCount"},
247 { PROP_SIZE_TYPE, u"SizeType"},
248 { PROP_TABLE_COLUMN_SEPARATORS, u"TableColumnSeparators"},
249 { META_PROP_TABLE_STYLE_NAME, u"TableStyleName"},
250 { PROP_TABLE_REDLINE_PARAMS, u"TableRedlineParams"},
251 { PROP_REDLINE_AUTHOR, u"RedlineAuthor"},
252 { PROP_REDLINE_DATE_TIME, u"RedlineDateTime"},
253 { PROP_REDLINE_TYPE, u"RedlineType"},
254 { PROP_REDLINE_REVERT_PROPERTIES, u"RedlineRevertProperties"},
255 { PROP_IS_PROTECTED, u"IsProtected"},
256 { PROP_SIZE_PROTECTED, u"SizeProtected"},
257 { PROP_POSITION_PROTECTED, u"PositionProtected"},
258 { PROP_OPAQUE, u"Opaque"},
259 { PROP_VERTICAL_MERGE, u"VerticalMerge"},
260 { PROP_BULLET_CHAR, u"BulletChar"},
261 { PROP_BULLET_FONT_NAME, u"BulletFontName"},
262 { PROP_TABS_RELATIVE_TO_INDENT, u"TabsRelativeToIndent"},
263 { PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES, u"CreateFromLevelParagraphStyles"},
264 { PROP_DROP_CAP_FORMAT, u"DropCapFormat"},
265 { PROP_REFERENCE_FIELD_FLAGS, u"ReferenceFieldFlags"},
266 { PROP_REFERENCE_FIELD_PART, u"ReferenceFieldPart"},
267 { PROP_SOURCE_NAME, u"SourceName"},
268 { PROP_REFERENCE_FIELD_SOURCE, u"ReferenceFieldSource"},
269 { PROP_WIDTH_TYPE, u"WidthType"},
270 { PROP_TBL_LOOK, u"TblLook"},
271 { PROP_TEXT_RANGE, u"TextRange"},
272 { PROP_TEXT_VERTICAL_ADJUST, u"TextVerticalAdjust"},
273 { PROP_SERVICE_CHAR_STYLE, u"com.sun.star.style.CharacterStyle"},
274 { PROP_SERVICE_PARA_STYLE, u"com.sun.star.style.ParagraphStyle"},
275 { PROP_CHARACTER_STYLES, u"CharacterStyles"},
276 { PROP_PARAGRAPH_STYLES, u"ParagraphStyles"},
277 { PROP_TABLE_BORDER_DISTANCES, u"TableBorderDistances"},
278 { META_PROP_CELL_MAR_TOP, u"MetaPropCellMarTop"},
279 { META_PROP_CELL_MAR_BOTTOM, u"MetaPropCellMarBottom"},
280 { META_PROP_CELL_MAR_LEFT, u"MetaPropCellMarLeft"},
281 { META_PROP_CELL_MAR_RIGHT, u"MetaPropCellMarRight"},
282 { PROP_START_AT, u"StartAt"},
283 { PROP_CHAR_PROP_HEIGHT, u"CharPropHeight"},
284 { PROP_CHAR_PROP_HEIGHT_ASIAN, u"CharPropHeightAsian"},
285 { PROP_CHAR_PROP_HEIGHT_COMPLEX, u"CharPropHeightComplex"},
286 { PROP_FORMAT, u"Format"},
287 { PROP_INSERT, u"Insert"},
288 { PROP_DELETE, u"Delete"},
289 { PROP_PARAGRAPH_FORMAT, u"ParagraphFormat"},
290 { PROP_STREAM_NAME, u"StreamName"},
291 { PROP_BITMAP, u"Bitmap"},
292 { PROP_IS_DATE, u"IsDate"},
293 { PROP_TAB_STOP_DISTANCE, u"TabStopDistance"},
294 { PROP_INDENT_AT, u"IndentAt"},
295 { PROP_FIRST_LINE_INDENT, u"FirstLineIndent"},
296 { PROP_NUMBERING_STYLE_NAME, u"NumberingStyleName"},
297 { PROP_OUTLINE_LEVEL, u"OutlineLevel"},
298 { PROP_LISTTAB_STOP_POSITION, u"ListtabStopPosition"},
299 { PROP_POSITION_AND_SPACE_MODE, u"PositionAndSpaceMode"},
300 { PROP_PARA_SPLIT, u"ParaSplit"},
301 { PROP_HELP, u"Help"},
302 { PROP_HEADING_STYLE_NAME, u"HeadingStyleName"},
303 { PROP_FRM_DIRECTION, u"FRMDirection"},
304 { PROP_EMBEDDED_OBJECT, u"EmbeddedObject"},
305 { PROP_IS_VISIBLE, u"IsVisible"},
306 { PROP_PAGE_STYLE_LAYOUT, u"PageStyleLayout"},
307 { PROP_Z_ORDER, u"ZOrder"},
308 { PROP_EMBED_FONTS, u"EmbedFonts"},
309 { PROP_EMBED_SYSTEM_FONTS, u"EmbedSystemFonts"},
310 { PROP_SHADOW_FORMAT, u"ShadowFormat"},
311 { PROP_RELATIVE_WIDTH, u"RelativeWidth"},
312 { PROP_IS_WIDTH_RELATIVE, u"IsWidthRelative"},
313 { PROP_GRAPHIC_BITMAP, u"GraphicBitmap"},
314 { PROP_GRAPHIC_SIZE, u"GraphicSize"},
315 { PROP_CHAR_SHADING_VALUE, u"CharShadingValue"},
316 { PROP_CHAR_SHADING_MARKER, u"CharShadingMarker"},
317 { PROP_LABEL_CATEGORY, u"LabelCategory"},
318 { PROP_MIRROR_INDENTS, u"MirrorIndents"},
319 { PROP_SURROUND_TEXT_WRAP_SMALL, u"SurroundTextWrapSmall"},
320 { PROP_PARA_SHADOW_FORMAT, u"ParaShadowFormat"},
321 { PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, u"FootnoteLineRelativeWidth"},
322 { PROP_TBL_HEADER, u"TblHeader"},
323 { PROP_CHAR_THEME_NAME_ASCII, u"CharThemeNameAscii"},
324 { PROP_CHAR_THEME_NAME_CS, u"CharThemeNameCs"},
325 { PROP_CHAR_THEME_NAME_H_ANSI, u"CharThemeNameHAnsi"},
326 { PROP_CHAR_THEME_NAME_EAST_ASIA, u"CharThemeNameEastAsia"},
327 { PROP_CHAR_THEME_FONT_NAME_ASCII, u"CharThemeFontNameAscii"},
328 { PROP_CHAR_THEME_FONT_NAME_CS, u"CharThemeFontNameCs"},
329 { PROP_CHAR_THEME_FONT_NAME_EAST_ASIA, u"CharThemeFontNameEastAsia"},
330 { PROP_CHAR_THEME_COLOR, u"CharThemeColor"},
331 { PROP_CHAR_THEME_ORIGINAL_COLOR, u"CharThemeOriginalColor"},
332 { PROP_CHAR_THEME_COLOR_SHADE, u"CharThemeColorShade"},
333 { PROP_CHAR_THEME_FILL, u"CharThemeFill"},
334 { PROP_HORIZONTAL_MERGE, u"HorizontalMerge"},
335 { PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS, u"HideTabLeaderAndPageNumber"},
336 { PROP_TAB_IN_TOC, u"TabInTOC"},
337 { PROP_TOC_BOOKMARK, u"TOCBookmark"},
338 { PROP_TOC_NEW_LINE, u"TOCNewLine"},
339 { PROP_TOC_PARAGRAPH_OUTLINE_LEVEL, u"TOCParagraphOutlineLevel"},
340 { PROP_CHAR_THEME_COLOR_TINT, u"CharThemeColorTint"},
341 { PROP_CHAR_GLOW_TEXT_EFFECT, u"CharGlowTextEffect"},
342 { PROP_CHAR_SHADOW_TEXT_EFFECT, u"CharShadowTextEffect"},
343 { PROP_CHAR_REFLECTION_TEXT_EFFECT, u"CharReflectionTextEffect"},
344 { PROP_CHAR_TEXTOUTLINE_TEXT_EFFECT, u"CharTextOutlineTextEffect"},
345 { PROP_CHAR_TEXTFILL_TEXT_EFFECT, u"CharTextFillTextEffect"},
346 { PROP_CHAR_SCENE3D_TEXT_EFFECT, u"CharScene3DTextEffect"},
347 { PROP_CHAR_PROPS3D_TEXT_EFFECT, u"CharProps3DTextEffect"},
348 { PROP_CHAR_LIGATURES_TEXT_EFFECT, u"CharLigaturesTextEffect"},
349 { PROP_CHAR_NUMFORM_TEXT_EFFECT, u"CharNumFormTextEffect"},
350 { PROP_CHAR_NUMSPACING_TEXT_EFFECT, u"CharNumSpacingTextEffect"},
351 { PROP_CHAR_STYLISTICSETS_TEXT_EFFECT, u"CharStylisticSetsTextEffect"},
352 { PROP_CHAR_CNTXTALTS_TEXT_EFFECT, u"CharCntxtAltsTextEffect"},
353 { PROP_SDTPR, u"SdtPr"},
354 { PROP_CELL_INTEROP_GRAB_BAG, u"CellInteropGrabBag"},
355 { PROP_TABLE_INTEROP_GRAB_BAG, u"TableInteropGrabBag"},
356 { PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, u"ApplyParagraphMarkFormatToNumbering"},
357 { PROP_SDT_END_BEFORE, u"SdtEndBefore"},
358 { PROP_PARA_SDT_END_BEFORE, u"ParaSdtEndBefore"},
359 { META_PROP_TABLE_LOOK, u"TableStyleLook"},
360 { PROP_PARA_CNF_STYLE, u"ParaCnfStyle"},
361 { PROP_CELL_CNF_STYLE, u"CellCnfStyle"},
362 { PROP_ROW_CNF_STYLE, u"RowCnfStyle"},
363 { PROP_CELL_HIDE_MARK, u"CellHideMark"},
364 { PROP_FOLLOW_TEXT_FLOW, u"IsFollowingTextFlow"},
365 { PROP_FILL_STYLE, u"FillStyle"},
366 { PROP_FILL_COLOR, u"FillColor"},
367 { PROP_FILL_COMPLEX_COLOR, u"FillComplexColor"},
368 { PROP_SNAP_TO_GRID, u"SnapToGrid"},
369 { PROP_GRID_SNAP_TO_CHARS, u"GridSnapToChars"},
370 { PROP_RUBY_STYLE, u"RubyCharStyleName"},
371 { PROP_RUBY_TEXT, u"RubyText"},
372 { PROP_RUBY_ADJUST, u"RubyAdjust"},
373 { PROP_RUBY_POSITION, u"RubyPosition"},
374 { PROP_DATABASE_NAME, u"DataBaseName"},
375 { PROP_COMMAND_TYPE, u"DataCommandType"},
376 { PROP_DATATABLE_NAME, u"DataTableName"},
377 { PROP_DATACOLUMN_NAME, u"DataColumnName"},
378 { PROP_CHAR_TRANSPARENCE, u"CharTransparence"},
379 { PROP_CELL_FORMULA, u"CellFormula"},
380 { PROP_CELL_FORMULA_CONVERTED, u"CellFormulaConverted"},
381 { PROP_GUTTER_MARGIN, u"GutterMargin"},
382 { PROP_RTL_GUTTER, u"RtlGutter"},
383 { PROP_CURSOR_NOT_IGNORE_TABLES_IN_HF, u"CursorNotIgnoreTables"},
384 { PROP_PARA_CONNECT_BORDERS, u"ParaIsConnectBorder"},
385 { PROP_DECORATIVE, u"Decorative"},
386 { PROP_PAPER_TRAY, u"PrinterPaperTray"},
388 } // end anonymous ns
390 OUString getPropertyName( PropertyIds eId )
392 auto iterator = constPropertyMap.find(eId);
393 if (iterator != constPropertyMap.end())
394 return OUString(iterator->second);
396 return OUString();
399 bool isCharacterProperty( const PropertyIds eId )
401 return eId > PROP_CHARACTER_STYLES && eId < PROP_CHARACTER_END;
404 bool isParagraphProperty( const PropertyIds eId )
406 return (eId >= PROP_PARA_ADJUST && eId <= PROP_PARA_WIDOWS)
407 || eId == PROP_FILL_COLOR
408 || eId == PROP_FILL_COMPLEX_COLOR;
411 } //namespace writerfilter
413 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */