Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / forms / source / misc / property.cxx
blob10f0caf312183086492f558be2960320e64c6e38
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 .
20 #include "frm_strings.hxx"
21 #include "property.hxx"
23 #include "property.hrc"
25 namespace frm
28 //= PropertyInfoService
30 PropertyInfoService::PropertyMap PropertyInfoService::s_AllKnownProperties;
32 sal_Int32 PropertyInfoService::getPropertyId(const OUString& _rName)
34 initialize();
36 sal_Int32 nHandle = -1;
37 const auto foundProperty = s_AllKnownProperties.find(_rName);
38 if (foundProperty != s_AllKnownProperties.end())
39 nHandle = foundProperty->second;
40 return nHandle;
44 sal_Int32 ConcreteInfoService::getPreferredPropertyId(const OUString& _rName)
46 return PropertyInfoService::getPropertyId(_rName);
50 #define EXPAND_PROP_INIT(varname) \
51 { PROPERTY_##varname, PROPERTY_ID_##varname }
53 void PropertyInfoService::initialize()
55 if (!s_AllKnownProperties.empty())
56 return;
58 s_AllKnownProperties.insert({
59 EXPAND_PROP_INIT(NAME),
60 EXPAND_PROP_INIT(TAG),
61 EXPAND_PROP_INIT(TABINDEX),
62 EXPAND_PROP_INIT(CLASSID),
63 EXPAND_PROP_INIT(ALIGN),
64 EXPAND_PROP_INIT(FETCHSIZE),
65 EXPAND_PROP_INIT(VALUE),
66 EXPAND_PROP_INIT(VALUEMIN),
67 EXPAND_PROP_INIT(VALUEMAX),
68 EXPAND_PROP_INIT(VALUESTEP),
69 EXPAND_PROP_INIT(TEXT),
70 EXPAND_PROP_INIT(LABEL),
71 EXPAND_PROP_INIT(NAVIGATION),
72 EXPAND_PROP_INIT(CYCLE),
73 EXPAND_PROP_INIT(CONTROLSOURCE),
74 EXPAND_PROP_INIT(ENABLED),
75 EXPAND_PROP_INIT(ENABLEVISIBLE),
76 EXPAND_PROP_INIT(SPIN),
77 EXPAND_PROP_INIT(READONLY),
78 EXPAND_PROP_INIT(FILTER),
79 EXPAND_PROP_INIT(WIDTH),
80 EXPAND_PROP_INIT(SEARCHABLE),
81 EXPAND_PROP_INIT(MULTILINE),
82 EXPAND_PROP_INIT(TARGET_URL),
83 EXPAND_PROP_INIT(DEFAULTCONTROL),
84 EXPAND_PROP_INIT(MAXTEXTLEN),
85 EXPAND_PROP_INIT(SIZE),
86 EXPAND_PROP_INIT(DATE),
87 EXPAND_PROP_INIT(TIME),
88 EXPAND_PROP_INIT(STATE),
89 EXPAND_PROP_INIT(TRISTATE),
90 EXPAND_PROP_INIT(HIDDEN_VALUE),
91 EXPAND_PROP_INIT(TARGET_FRAME),
92 EXPAND_PROP_INIT(BUTTONTYPE),
93 EXPAND_PROP_INIT(STRINGITEMLIST),
94 EXPAND_PROP_INIT(DEFAULT_TEXT),
95 EXPAND_PROP_INIT(DEFAULT_STATE),
96 EXPAND_PROP_INIT(DEFAULT_DATE),
97 EXPAND_PROP_INIT(DEFAULT_TIME),
98 EXPAND_PROP_INIT(DEFAULT_VALUE),
99 EXPAND_PROP_INIT(FORMATKEY),
100 EXPAND_PROP_INIT(FORMATSSUPPLIER),
101 EXPAND_PROP_INIT(SUBMIT_ACTION),
102 EXPAND_PROP_INIT(SUBMIT_TARGET),
103 EXPAND_PROP_INIT(SUBMIT_METHOD),
104 EXPAND_PROP_INIT(SUBMIT_ENCODING),
105 EXPAND_PROP_INIT(IMAGE_URL),
106 EXPAND_PROP_INIT(GRAPHIC),
107 EXPAND_PROP_INIT(EMPTY_IS_NULL),
108 EXPAND_PROP_INIT(LISTSOURCETYPE),
109 EXPAND_PROP_INIT(LISTSOURCE),
110 EXPAND_PROP_INIT(SELECT_SEQ),
111 EXPAND_PROP_INIT(VALUE_SEQ),
112 EXPAND_PROP_INIT(SELECT_VALUE),
113 EXPAND_PROP_INIT(SELECT_VALUE_SEQ),
114 EXPAND_PROP_INIT(DEFAULT_SELECT_SEQ),
115 EXPAND_PROP_INIT(MULTISELECTION),
116 EXPAND_PROP_INIT(DECIMAL_ACCURACY),
117 EXPAND_PROP_INIT(EDITMASK),
118 EXPAND_PROP_INIT(ISREADONLY),
119 EXPAND_PROP_INIT(FIELDTYPE),
120 EXPAND_PROP_INIT(DECIMALS),
121 EXPAND_PROP_INIT(REFVALUE),
122 EXPAND_PROP_INIT(STRICTFORMAT),
123 EXPAND_PROP_INIT(DATASOURCE),
124 EXPAND_PROP_INIT(ALLOWADDITIONS),
125 EXPAND_PROP_INIT(ALLOWEDITS),
126 EXPAND_PROP_INIT(ALLOWDELETIONS),
127 EXPAND_PROP_INIT(MASTERFIELDS),
128 EXPAND_PROP_INIT(ISPASSTHROUGH),
129 EXPAND_PROP_INIT(QUERY),
130 EXPAND_PROP_INIT(LITERALMASK),
131 EXPAND_PROP_INIT(SHOWTHOUSANDSEP),
132 EXPAND_PROP_INIT(CURRENCYSYMBOL),
133 EXPAND_PROP_INIT(DATEFORMAT),
134 EXPAND_PROP_INIT(DATEMIN),
135 EXPAND_PROP_INIT(DATEMAX),
136 EXPAND_PROP_INIT(DATE_SHOW_CENTURY),
137 EXPAND_PROP_INIT(TIMEFORMAT),
138 EXPAND_PROP_INIT(TIMEMIN),
139 EXPAND_PROP_INIT(TIMEMAX),
140 EXPAND_PROP_INIT(LINECOUNT),
141 EXPAND_PROP_INIT(BOUNDCOLUMN),
142 EXPAND_PROP_INIT(HASNAVIGATION),
143 EXPAND_PROP_INIT(FONT),
144 EXPAND_PROP_INIT(BACKGROUNDCOLOR),
145 EXPAND_PROP_INIT(FILLCOLOR),
146 EXPAND_PROP_INIT(TEXTCOLOR),
147 EXPAND_PROP_INIT(LINECOLOR),
148 EXPAND_PROP_INIT(BORDER),
149 EXPAND_PROP_INIT(DROPDOWN),
150 EXPAND_PROP_INIT(HSCROLL),
151 EXPAND_PROP_INIT(VSCROLL),
152 EXPAND_PROP_INIT(TABSTOP),
153 EXPAND_PROP_INIT(AUTOCOMPLETE),
154 EXPAND_PROP_INIT(HARDLINEBREAKS),
155 EXPAND_PROP_INIT(PRINTABLE),
156 EXPAND_PROP_INIT(ECHO_CHAR),
157 EXPAND_PROP_INIT(ROWHEIGHT),
158 EXPAND_PROP_INIT(HELPTEXT),
159 EXPAND_PROP_INIT(FONT_NAME),
160 EXPAND_PROP_INIT(FONT_STYLENAME),
161 EXPAND_PROP_INIT(FONT_FAMILY),
162 EXPAND_PROP_INIT(FONT_CHARSET),
163 EXPAND_PROP_INIT(FONT_HEIGHT),
164 EXPAND_PROP_INIT(FONT_WEIGHT),
165 EXPAND_PROP_INIT(FONT_SLANT),
166 EXPAND_PROP_INIT(FONT_UNDERLINE),
167 EXPAND_PROP_INIT(FONT_WORDLINEMODE),
168 EXPAND_PROP_INIT(FONT_STRIKEOUT),
169 EXPAND_PROP_INIT(TEXTLINECOLOR),
170 EXPAND_PROP_INIT(FONTEMPHASISMARK),
171 EXPAND_PROP_INIT(FONTRELIEF),
172 EXPAND_PROP_INIT(HELPURL),
173 EXPAND_PROP_INIT(RECORDMARKER),
174 EXPAND_PROP_INIT(BOUNDFIELD),
175 EXPAND_PROP_INIT(INPUT_REQUIRED),
176 EXPAND_PROP_INIT(TREATASNUMERIC),
177 EXPAND_PROP_INIT(EFFECTIVE_VALUE),
178 EXPAND_PROP_INIT(EFFECTIVE_DEFAULT),
179 EXPAND_PROP_INIT(EFFECTIVE_MIN),
180 EXPAND_PROP_INIT(EFFECTIVE_MAX),
181 EXPAND_PROP_INIT(HIDDEN),
182 EXPAND_PROP_INIT(FILTERPROPOSAL),
183 EXPAND_PROP_INIT(FIELDSOURCE),
184 EXPAND_PROP_INIT(TABLENAME),
185 EXPAND_PROP_INIT(CONTROLLABEL),
186 EXPAND_PROP_INIT(CURRSYM_POSITION),
187 EXPAND_PROP_INIT(CURSORCOLOR),
188 EXPAND_PROP_INIT(ALWAYSSHOWCURSOR),
189 EXPAND_PROP_INIT(DISPLAYSYNCHRON),
190 EXPAND_PROP_INIT(ISMODIFIED),
191 EXPAND_PROP_INIT(ISNEW),
192 EXPAND_PROP_INIT(PRIVILEGES),
193 EXPAND_PROP_INIT(DETAILFIELDS),
194 EXPAND_PROP_INIT(COMMAND),
195 EXPAND_PROP_INIT(COMMANDTYPE),
196 EXPAND_PROP_INIT(RESULTSET_CONCURRENCY),
197 EXPAND_PROP_INIT(INSERTONLY),
198 EXPAND_PROP_INIT(RESULTSET_TYPE),
199 EXPAND_PROP_INIT(ESCAPE_PROCESSING),
200 EXPAND_PROP_INIT(APPLYFILTER),
201 EXPAND_PROP_INIT(ISNULLABLE),
202 EXPAND_PROP_INIT(ACTIVECOMMAND),
203 EXPAND_PROP_INIT(ISCURRENCY),
204 EXPAND_PROP_INIT(URL),
205 EXPAND_PROP_INIT(TITLE),
206 EXPAND_PROP_INIT(ACTIVE_CONNECTION),
207 EXPAND_PROP_INIT(SCALE),
208 EXPAND_PROP_INIT(SORT),
209 EXPAND_PROP_INIT(PERSISTENCE_MAXTEXTLENGTH),
210 EXPAND_PROP_INIT(SCROLL_VALUE),
211 EXPAND_PROP_INIT(SPIN_VALUE),
212 EXPAND_PROP_INIT(DEFAULT_SCROLL_VALUE),
213 EXPAND_PROP_INIT(DEFAULT_SPIN_VALUE),
214 EXPAND_PROP_INIT( WRITING_MODE ),
215 EXPAND_PROP_INIT( CONTEXT_WRITING_MODE ),
216 EXPAND_PROP_INIT( GENERATEVBAEVENTS )
222 //... namespace frm .......................................................
224 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */