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_FORMS_SOURCE_INC_PROPERTY_HXX
21 #define INCLUDED_FORMS_SOURCE_INC_PROPERTY_HXX
23 #include <sal/config.h>
25 #include <unordered_map>
27 #include <com/sun/star/beans/PropertyAttribute.hpp>
28 #include <comphelper/propagg.hxx>
29 #include <tools/debug.hxx>
31 #include "frm_strings.hxx"
33 using namespace comphelper
;
35 //= property helper classes
40 // PropertyId's, who have a mapping to a PropertyName
41 #define PROPERTY_ID_START 0
43 #define PROPERTY_ID_NAME (PROPERTY_ID_START + 1)
44 #define PROPERTY_ID_TABINDEX (PROPERTY_ID_START + 2)
45 #define PROPERTY_ID_CONTROLSOURCE (PROPERTY_ID_START + 3)
46 #define PROPERTY_ID_MASTERFIELDS (PROPERTY_ID_START + 4)
47 #define PROPERTY_ID_DATASOURCE (PROPERTY_ID_START + 6)
48 #define PROPERTY_ID_CLASSID (PROPERTY_ID_START + 9)
49 #define PROPERTY_ID_CURSORTYPE (PROPERTY_ID_START + 10)
50 #define PROPERTY_ID_READONLY (PROPERTY_ID_START + 11)
51 #define PROPERTY_ID_NAVIGATION (PROPERTY_ID_START + 13)
52 #define PROPERTY_ID_CYCLE (PROPERTY_ID_START + 14)
53 #define PROPERTY_ID_ALLOWADDITIONS (PROPERTY_ID_START + 15)
54 #define PROPERTY_ID_ALLOWEDITS (PROPERTY_ID_START + 16)
55 #define PROPERTY_ID_ALLOWDELETIONS (PROPERTY_ID_START + 17)
56 #define PROPERTY_ID_NATIVE_LOOK (PROPERTY_ID_START + 18)
57 #define PROPERTY_ID_INPUT_REQUIRED (PROPERTY_ID_START + 19)
58 #define PROPERTY_ID_WRITING_MODE (PROPERTY_ID_START + 20)
59 #define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21)
60 #define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22)
61 #define PROPERTY_ID_GRAPHIC (PROPERTY_ID_START + 23)
62 #define PROPERTY_ID_GROUP_NAME (PROPERTY_ID_START + 24)
69 #define PROPERTY_ID_VALUE (PROPERTY_ID_START + 31) // INT32
71 #define PROPERTY_ID_FORMATKEY (PROPERTY_ID_START + 33) // UINT32
75 #define PROPERTY_ID_SIZE (PROPERTY_ID_START + 37) // UINT32
76 #define PROPERTY_ID_REFERENCE_DEVICE (PROPERTY_ID_START + 38) // XDevice
80 #define PROPERTY_ID_WIDTH (PROPERTY_ID_START + 42) // UINT16
81 #define PROPERTY_ID_DEFAULTCONTROL (PROPERTY_ID_START + 43) // string
82 #define PROPERTY_ID_BOUNDCOLUMN (PROPERTY_ID_START + 44) // UINT16 may be null
83 #define PROPERTY_ID_LISTSOURCETYPE (PROPERTY_ID_START + 45) // UINT16
84 #define PROPERTY_ID_LISTSOURCE (PROPERTY_ID_START + 46) // string
86 #define PROPERTY_ID_TEXT (PROPERTY_ID_START + 48) // string
87 #define PROPERTY_ID_STRINGITEMLIST (PROPERTY_ID_START + 49) // wsstringsequence
88 #define PROPERTY_ID_LABEL (PROPERTY_ID_START + 50) // string
89 #define PROPERTY_ID_HIDEINACTIVESELECTION (PROPERTY_ID_START + 51) // sal_Bool
90 #define PROPERTY_ID_STATE (PROPERTY_ID_START + 52) // UINT16
91 #define PROPERTY_ID_DELAY (PROPERTY_ID_START + 53) // sal_Int32
92 #define PROPERTY_ID_FONT (PROPERTY_ID_START + 54) // font
93 #define PROPERTY_ID_HASNAVIGATION (PROPERTY_ID_START + 55)
94 #define PROPERTY_ID_BORDERCOLOR (PROPERTY_ID_START + 56) // sal_Int32
95 #define PROPERTY_ID_ROWHEIGHT (PROPERTY_ID_START + 57) // UINT16
96 #define PROPERTY_ID_BACKGROUNDCOLOR (PROPERTY_ID_START + 58) // sal_Int32
97 #define PROPERTY_ID_FILLCOLOR (PROPERTY_ID_START + 59) // UINT32
98 #define PROPERTY_ID_TEXTCOLOR (PROPERTY_ID_START + 60) // UINT32
99 #define PROPERTY_ID_LINECOLOR (PROPERTY_ID_START + 61) // UINT32
100 #define PROPERTY_ID_BORDER (PROPERTY_ID_START + 62) // UINT16
101 #define PROPERTY_ID_ALIGN (PROPERTY_ID_START + 63) // UINT16
102 #define PROPERTY_ID_DROPDOWN (PROPERTY_ID_START + 64) // BOOL
103 #define PROPERTY_ID_UNCHECKED_REFVALUE (PROPERTY_ID_START + 65) // OUString
104 #define PROPERTY_ID_HSCROLL (PROPERTY_ID_START + 66) // BOOL
105 #define PROPERTY_ID_VSCROLL (PROPERTY_ID_START + 67) // BOOL
106 #define PROPERTY_ID_TABSTOP (PROPERTY_ID_START + 68) // BOOL
107 #define PROPERTY_ID_REFVALUE (PROPERTY_ID_START + 69) // OUString
108 #define PROPERTY_ID_BUTTONTYPE (PROPERTY_ID_START + 70) // UINT16
109 #define PROPERTY_ID_DEFAULT_TEXT (PROPERTY_ID_START + 71) // OUString
110 #define PROPERTY_ID_SUBMIT_ACTION (PROPERTY_ID_START + 72) // string
111 #define PROPERTY_ID_SUBMIT_METHOD (PROPERTY_ID_START + 73) // FmSubmitMethod
112 #define PROPERTY_ID_SUBMIT_ENCODING (PROPERTY_ID_START + 74) // FmSubmitEncoding
113 #define PROPERTY_ID_DEFAULT_VALUE (PROPERTY_ID_START + 75) // OUString
114 #define PROPERTY_ID_SUBMIT_TARGET (PROPERTY_ID_START + 76) // OUString
115 #define PROPERTY_ID_DEFAULT_STATE (PROPERTY_ID_START + 77) // UINT16
116 #define PROPERTY_ID_VALUE_SEQ (PROPERTY_ID_START + 78) // StringSeq
117 #define PROPERTY_ID_IMAGE_URL (PROPERTY_ID_START + 79) // OUString
118 #define PROPERTY_ID_SELECT_VALUE (PROPERTY_ID_START + 80) // StringSeq
119 #define PROPERTY_ID_SELECT_VALUE_SEQ (PROPERTY_ID_START + 81) // StringSeq
129 #define PROPERTY_ID_SELECT_SEQ (PROPERTY_ID_START + 91) // INT16Seq
130 #define PROPERTY_ID_DEFAULT_SELECT_SEQ (PROPERTY_ID_START + 92) // INT16Seq
131 #define PROPERTY_ID_MULTISELECTION (PROPERTY_ID_START + 93) // BOOL
132 #define PROPERTY_ID_MULTILINE (PROPERTY_ID_START + 94) // BOOL
133 #define PROPERTY_ID_DATE (PROPERTY_ID_START + 95) // UINT32
134 #define PROPERTY_ID_DATEMIN (PROPERTY_ID_START + 96) // UINT32
135 #define PROPERTY_ID_DATEMAX (PROPERTY_ID_START + 97) // UINT32
136 #define PROPERTY_ID_DATEFORMAT (PROPERTY_ID_START + 98) // UINT16
137 #define PROPERTY_ID_TIME (PROPERTY_ID_START + 99) // UINT32
138 #define PROPERTY_ID_TIMEMIN (PROPERTY_ID_START +100) // UINT32
139 #define PROPERTY_ID_TIMEMAX (PROPERTY_ID_START +101) // UINT32
140 #define PROPERTY_ID_TIMEFORMAT (PROPERTY_ID_START +102) // UINT16
141 #define PROPERTY_ID_VALUEMIN (PROPERTY_ID_START +103) // INT32
142 #define PROPERTY_ID_VALUEMAX (PROPERTY_ID_START +104) // INT32
143 #define PROPERTY_ID_VALUESTEP (PROPERTY_ID_START +105) // INT32
144 #define PROPERTY_ID_CURRENCYSYMBOL (PROPERTY_ID_START +106) // OUString
145 #define PROPERTY_ID_EDITMASK (PROPERTY_ID_START +107) // OUString
146 #define PROPERTY_ID_LITERALMASK (PROPERTY_ID_START +108) // OUString
147 #define PROPERTY_ID_ENABLED (PROPERTY_ID_START +109) // BOOL
148 #define PROPERTY_ID_AUTOCOMPLETE (PROPERTY_ID_START +110) // BOOL
149 #define PROPERTY_ID_LINECOUNT (PROPERTY_ID_START +111) // UINT16
150 #define PROPERTY_ID_MAXTEXTLEN (PROPERTY_ID_START +112) // UINT16
151 #define PROPERTY_ID_SPIN (PROPERTY_ID_START +113) // BOOL
152 #define PROPERTY_ID_STRICTFORMAT (PROPERTY_ID_START +114) // BOOL
153 #define PROPERTY_ID_SHOWTHOUSANDSEP (PROPERTY_ID_START +115) // BOOL
154 #define PROPERTY_ID_HARDLINEBREAKS (PROPERTY_ID_START +116) // BOOL
155 #define PROPERTY_ID_PRINTABLE (PROPERTY_ID_START +117) // BOOL
156 #define PROPERTY_ID_TARGET_URL (PROPERTY_ID_START +118) // OUString
157 #define PROPERTY_ID_TARGET_FRAME (PROPERTY_ID_START +119) // OUString
158 #define PROPERTY_ID_TAG (PROPERTY_ID_START +120) // OUString
159 #define PROPERTY_ID_ECHO_CHAR (PROPERTY_ID_START +121) // UINT16
160 #define PROPERTY_ID_SHOW_POSITION (PROPERTY_ID_START +122) // sal_Bool
161 #define PROPERTY_ID_SHOW_NAVIGATION (PROPERTY_ID_START +123) // sal_Bool
162 #define PROPERTY_ID_SHOW_RECORDACTIONS (PROPERTY_ID_START +124) // sal_Bool
163 #define PROPERTY_ID_SHOW_FILTERSORT (PROPERTY_ID_START +125) // sal_Bool
164 #define PROPERTY_ID_EMPTY_IS_NULL (PROPERTY_ID_START +126) // Bool
165 #define PROPERTY_ID_DECIMAL_ACCURACY (PROPERTY_ID_START +127) // UINT16
166 #define PROPERTY_ID_DATE_SHOW_CENTURY (PROPERTY_ID_START +128) // Bool
167 #define PROPERTY_ID_TRISTATE (PROPERTY_ID_START +129) // Bool
168 #define PROPERTY_ID_DEFAULT_BUTTON (PROPERTY_ID_START +130) // Bool
169 #define PROPERTY_ID_HIDDEN_VALUE (PROPERTY_ID_START +131) // OUString
170 #define PROPERTY_ID_DECIMALS (PROPERTY_ID_START +132) // UINT16
171 #define PROPERTY_ID_AUTOINCREMENT (PROPERTY_ID_START +133) // UINT16
173 #define PROPERTY_ID_FILTER (PROPERTY_ID_START +135) // OUString
174 #define PROPERTY_ID_HAVINGCLAUSE (PROPERTY_ID_START +136) // OUString
175 #define PROPERTY_ID_QUERY (PROPERTY_ID_START +137) // OUString
176 #define PROPERTY_ID_DEFAULT_LONG_VALUE (PROPERTY_ID_START +138) // Double
177 #define PROPERTY_ID_DEFAULT_DATE (PROPERTY_ID_START +139) // UINT32
178 #define PROPERTY_ID_DEFAULT_TIME (PROPERTY_ID_START +140)
179 #define PROPERTY_ID_HELPTEXT (PROPERTY_ID_START +141)
180 #define PROPERTY_ID_FONT_NAME (PROPERTY_ID_START +142)
181 #define PROPERTY_ID_FONT_STYLENAME (PROPERTY_ID_START +143)
182 #define PROPERTY_ID_FONT_FAMILY (PROPERTY_ID_START +144)
183 #define PROPERTY_ID_FONT_CHARSET (PROPERTY_ID_START +145)
184 #define PROPERTY_ID_FONT_HEIGHT (PROPERTY_ID_START +146)
185 #define PROPERTY_ID_FONT_WEIGHT (PROPERTY_ID_START +147)
186 #define PROPERTY_ID_FONT_SLANT (PROPERTY_ID_START +148)
187 #define PROPERTY_ID_FONT_UNDERLINE (PROPERTY_ID_START +149)
188 #define PROPERTY_ID_FONT_STRIKEOUT (PROPERTY_ID_START +150)
189 #define PROPERTY_ID_ISPASSTHROUGH (PROPERTY_ID_START +151)
190 #define PROPERTY_ID_HELPURL (PROPERTY_ID_START +152) // OUString
191 #define PROPERTY_ID_RECORDMARKER (PROPERTY_ID_START +153)
192 #define PROPERTY_ID_BOUNDFIELD (PROPERTY_ID_START +154)
193 #define PROPERTY_ID_FORMATSSUPPLIER (PROPERTY_ID_START +155) // XNumberFormatsSupplier
194 #define PROPERTY_ID_TREATASNUMERIC (PROPERTY_ID_START +156) // BOOL
195 #define PROPERTY_ID_EFFECTIVE_VALUE (PROPERTY_ID_START +157) // ANY (string or double)
196 #define PROPERTY_ID_EFFECTIVE_DEFAULT (PROPERTY_ID_START +158) // ditto
197 #define PROPERTY_ID_EFFECTIVE_MIN (PROPERTY_ID_START +159) // ditto
198 #define PROPERTY_ID_EFFECTIVE_MAX (PROPERTY_ID_START +160) // ditto
199 #define PROPERTY_ID_HIDDEN (PROPERTY_ID_START +161) // BOOL
200 #define PROPERTY_ID_FILTERPROPOSAL (PROPERTY_ID_START +162) // BOOL
201 #define PROPERTY_ID_FIELDSOURCE (PROPERTY_ID_START +163) // String
202 #define PROPERTY_ID_TABLENAME (PROPERTY_ID_START +164) // String
203 #define PROPERTY_ID_ENABLEVISIBLE (PROPERTY_ID_START +165) // BOOL
208 #define PROPERTY_ID_CONTROLLABEL (PROPERTY_ID_START +171) // XPropertySet
209 #define PROPERTY_ID_CURRSYM_POSITION (PROPERTY_ID_START +172) // String
211 #define PROPERTY_ID_CURSORCOLOR (PROPERTY_ID_START +174) // INT32
212 #define PROPERTY_ID_ALWAYSSHOWCURSOR (PROPERTY_ID_START +175) // BOOL
213 #define PROPERTY_ID_DISPLAYSYNCHRON (PROPERTY_ID_START +176) // BOOL
214 #define PROPERTY_ID_ISMODIFIED (PROPERTY_ID_START +177) // BOOL
215 #define PROPERTY_ID_ISNEW (PROPERTY_ID_START +178) // BOOL
216 #define PROPERTY_ID_PRIVILEGES (PROPERTY_ID_START +179) // INT32
217 #define PROPERTY_ID_DETAILFIELDS (PROPERTY_ID_START +180) // Sequence< OUString >
218 #define PROPERTY_ID_COMMAND (PROPERTY_ID_START +181) // String
219 #define PROPERTY_ID_COMMANDTYPE (PROPERTY_ID_START +182) // INT32 (css::sdb::CommandType)
220 #define PROPERTY_ID_RESULTSET_CONCURRENCY (PROPERTY_ID_START +183)// INT32 (css::sdbc::ResultSetConcurrency)
221 #define PROPERTY_ID_INSERTONLY (PROPERTY_ID_START +184) // BOOL
222 #define PROPERTY_ID_RESULTSET_TYPE (PROPERTY_ID_START +185) // INT32 (css::sdbc::ResultSetType)
223 #define PROPERTY_ID_ESCAPE_PROCESSING (PROPERTY_ID_START +186) // BOOL
224 #define PROPERTY_ID_APPLYFILTER (PROPERTY_ID_START +187) // BOOL
226 #define PROPERTY_ID_ISNULLABLE (PROPERTY_ID_START +188) // BOOL
227 #define PROPERTY_ID_ACTIVECOMMAND (PROPERTY_ID_START +189) // String
228 #define PROPERTY_ID_ISCURRENCY (PROPERTY_ID_START +190) // BOOL
229 #define PROPERTY_ID_URL (PROPERTY_ID_START +192) // String
230 #define PROPERTY_ID_TITLE (PROPERTY_ID_START +193) // String
231 #define PROPERTY_ID_ACTIVE_CONNECTION (PROPERTY_ID_START +194) // css::sdbc::XConnection
232 #define PROPERTY_ID_SCALE (PROPERTY_ID_START +195) // INT32
233 #define PROPERTY_ID_SORT (PROPERTY_ID_START +196) // String
237 #define PROPERTY_ID_FETCHSIZE (PROPERTY_ID_START +199)
239 #define PROPERTY_ID_SEARCHABLE (PROPERTY_ID_START +201)
240 #define PROPERTY_ID_ISREADONLY (PROPERTY_ID_START +202)
242 #define PROPERTY_ID_FIELDTYPE (PROPERTY_ID_START +204)
243 #define PROPERTY_ID_COLUMNSERVICENAME (PROPERTY_ID_START +205)
244 #define PROPERTY_ID_CONTROLSOURCEPROPERTY (PROPERTY_ID_START +206)
245 #define PROPERTY_ID_REALNAME (PROPERTY_ID_START +207)
246 #define PROPERTY_ID_FONT_WORDLINEMODE (PROPERTY_ID_START +208)
247 #define PROPERTY_ID_TEXTLINECOLOR (PROPERTY_ID_START +209)
248 #define PROPERTY_ID_FONTEMPHASISMARK (PROPERTY_ID_START +210)
249 #define PROPERTY_ID_FONTRELIEF (PROPERTY_ID_START +211)
251 #define PROPERTY_ID_DISPATCHURLINTERNAL ( PROPERTY_ID_START + 212 ) // sal_Bool
252 #define PROPERTY_ID_PERSISTENCE_MAXTEXTLENGTH ( PROPERTY_ID_START + 213 ) // sal_Int16
253 #define PROPERTY_ID_DEFAULT_SCROLL_VALUE ( PROPERTY_ID_START + 214 ) // sal_Int32
254 #define PROPERTY_ID_DEFAULT_SPIN_VALUE ( PROPERTY_ID_START + 215 ) // sal_Int32
255 #define PROPERTY_ID_SCROLL_VALUE ( PROPERTY_ID_START + 216 ) // sal_Int32
256 #define PROPERTY_ID_SPIN_VALUE ( PROPERTY_ID_START + 217 ) // sal_Int32
257 #define PROPERTY_ID_ICONSIZE ( PROPERTY_ID_START + 218 ) // sal_Int16
259 #define PROPERTY_ID_FONT_CHARWIDTH ( PROPERTY_ID_START + 219 ) // float
260 #define PROPERTY_ID_FONT_KERNING ( PROPERTY_ID_START + 220 ) // sal_Bool
261 #define PROPERTY_ID_FONT_ORIENTATION ( PROPERTY_ID_START + 221 ) // float
262 #define PROPERTY_ID_FONT_PITCH ( PROPERTY_ID_START + 222 ) // sal_Int16
263 #define PROPERTY_ID_FONT_TYPE ( PROPERTY_ID_START + 223 ) // sal_Int16
264 #define PROPERTY_ID_FONT_WIDTH ( PROPERTY_ID_START + 224 ) // sal_Int16
265 #define PROPERTY_ID_RICH_TEXT ( PROPERTY_ID_START + 225 ) // sal_Bool
267 #define PROPERTY_ID_DYNAMIC_CONTROL_BORDER ( PROPERTY_ID_START + 226 ) // sal_Bool
268 #define PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS ( PROPERTY_ID_START + 227 ) // sal_Int32
269 #define PROPERTY_ID_CONTROL_BORDER_COLOR_MOUSE ( PROPERTY_ID_START + 228 ) // sal_Int32
270 #define PROPERTY_ID_CONTROL_BORDER_COLOR_INVALID ( PROPERTY_ID_START + 229 ) // sal_Int32
272 #define PROPERTY_ID_XSD_PATTERN ( PROPERTY_ID_START + 230 )
273 #define PROPERTY_ID_XSD_WHITESPACE ( PROPERTY_ID_START + 231 )
274 #define PROPERTY_ID_XSD_LENGTH ( PROPERTY_ID_START + 232 )
275 #define PROPERTY_ID_XSD_MIN_LENGTH ( PROPERTY_ID_START + 233 )
276 #define PROPERTY_ID_XSD_MAX_LENGTH ( PROPERTY_ID_START + 234 )
277 #define PROPERTY_ID_XSD_TOTAL_DIGITS ( PROPERTY_ID_START + 235 )
278 #define PROPERTY_ID_XSD_FRACTION_DIGITS ( PROPERTY_ID_START + 236 )
279 #define PROPERTY_ID_XSD_MAX_INCLUSIVE_INT ( PROPERTY_ID_START + 237 )
280 #define PROPERTY_ID_XSD_MAX_EXCLUSIVE_INT ( PROPERTY_ID_START + 238 )
281 #define PROPERTY_ID_XSD_MIN_INCLUSIVE_INT ( PROPERTY_ID_START + 239 )
282 #define PROPERTY_ID_XSD_MIN_EXCLUSIVE_INT ( PROPERTY_ID_START + 240 )
283 #define PROPERTY_ID_XSD_MAX_INCLUSIVE_DOUBLE ( PROPERTY_ID_START + 241 )
284 #define PROPERTY_ID_XSD_MAX_EXCLUSIVE_DOUBLE ( PROPERTY_ID_START + 242 )
285 #define PROPERTY_ID_XSD_MIN_INCLUSIVE_DOUBLE ( PROPERTY_ID_START + 243 )
286 #define PROPERTY_ID_XSD_MIN_EXCLUSIVE_DOUBLE ( PROPERTY_ID_START + 244 )
287 #define PROPERTY_ID_XSD_MAX_INCLUSIVE_DATE ( PROPERTY_ID_START + 245 )
288 #define PROPERTY_ID_XSD_MAX_EXCLUSIVE_DATE ( PROPERTY_ID_START + 246 )
289 #define PROPERTY_ID_XSD_MIN_INCLUSIVE_DATE ( PROPERTY_ID_START + 247 )
290 #define PROPERTY_ID_XSD_MIN_EXCLUSIVE_DATE ( PROPERTY_ID_START + 248 )
291 #define PROPERTY_ID_XSD_MAX_INCLUSIVE_TIME ( PROPERTY_ID_START + 249 )
292 #define PROPERTY_ID_XSD_MAX_EXCLUSIVE_TIME ( PROPERTY_ID_START + 250 )
293 #define PROPERTY_ID_XSD_MIN_INCLUSIVE_TIME ( PROPERTY_ID_START + 251 )
294 #define PROPERTY_ID_XSD_MIN_EXCLUSIVE_TIME ( PROPERTY_ID_START + 252 )
295 #define PROPERTY_ID_XSD_MAX_INCLUSIVE_DATE_TIME ( PROPERTY_ID_START + 253 )
296 #define PROPERTY_ID_XSD_MAX_EXCLUSIVE_DATE_TIME ( PROPERTY_ID_START + 254 )
297 #define PROPERTY_ID_XSD_MIN_INCLUSIVE_DATE_TIME ( PROPERTY_ID_START + 255 )
298 #define PROPERTY_ID_XSD_MIN_EXCLUSIVE_DATE_TIME ( PROPERTY_ID_START + 256 )
299 #define PROPERTY_ID_XSD_IS_BASIC ( PROPERTY_ID_START + 257 )
300 #define PROPERTY_ID_XSD_TYPE_CLASS ( PROPERTY_ID_START + 258 )
302 #define PROPERTY_ID_LINEEND_FORMAT ( PROPERTY_ID_START + 259 ) // css.awt.LineEndFormat
303 #define PROPERTY_ID_GENERATEVBAEVENTS ( PROPERTY_ID_START + 260 )
304 #define PROPERTY_ID_CONTROL_TYPE_IN_MSO ( PROPERTY_ID_START + 261 )
305 #define PROPERTY_ID_OBJ_ID_IN_MSO ( PROPERTY_ID_START + 262 )
307 #define PROPERTY_ID_TYPEDITEMLIST ( PROPERTY_ID_START + 263 ) // Sequence<Any>
309 // start ID for aggregated properties
310 #define PROPERTY_ID_AGGREGATE_ID (PROPERTY_ID_START + 10000)
312 //= assignment property handle <-> property name
313 //= used by the PropertySetAggregationHelper
316 class PropertyInfoService
318 typedef std::unordered_map
<OUString
, sal_Int32
> PropertyMap
;
319 static PropertyMap s_AllKnownProperties
;
322 PropertyInfoService() = delete;
324 static sal_Int32
getPropertyId(const OUString
& _rName
);
327 static void initialize();
331 // a class implementing the comphelper::IPropertyInfoService
332 class ConcreteInfoService
: public ::comphelper::IPropertyInfoService
335 virtual ~ConcreteInfoService() {}
337 virtual sal_Int32
getPreferredPropertyId(const OUString
& _rName
) override
;
341 #define DECL_PROP_IMPL(varname, type) \
342 *pProperties++ = css::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<type>::get(),
345 #define DECL_BOOL_PROP_IMPL(varname) \
346 *pProperties++ = css::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<bool>::get(),
349 #define DECL_IFACE_PROP_IMPL(varname, type) \
350 *pProperties++ = css::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<type>::get(),
353 #define BEGIN_DESCRIBE_PROPERTIES( count, baseclass ) \
354 baseclass::describeFixedProperties( _rProps ); \
355 sal_Int32 nOldCount = _rProps.getLength(); \
356 _rProps.realloc( nOldCount + ( count ) ); \
357 css::beans::Property* pProperties = _rProps.getArray() + nOldCount; \
360 #define BEGIN_DESCRIBE_BASE_PROPERTIES( count ) \
361 _rProps.realloc( count ); \
362 css::beans::Property* pProperties = _rProps.getArray(); \
365 #define DECL_PROP0(varname, type) \
366 DECL_PROP_IMPL(varname, type) 0)
369 #define DECL_PROP1(varname, type, attrib1) \
370 DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1)
373 #define DECL_PROP2(varname, type, attrib1, attrib2) \
374 DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2)
377 #define DECL_PROP3(varname, type, attrib1, attrib2, attrib3) \
378 DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3)
381 #define DECL_PROP4(varname, type, attrib1, attrib2, attrib3, attrib4) \
382 DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 | css::beans::PropertyAttribute::attrib4)
384 // === some property types require special handling
385 // === such as interfaces
387 #define DECL_IFACE_PROP2(varname, type, attrib1, attrib2) \
388 DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2)
391 #define DECL_IFACE_PROP3(varname, type, attrib1, attrib2, attrib3) \
392 DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3)
395 #define DECL_IFACE_PROP4(varname, type, attrib1, attrib2, attrib3, attrib4) \
396 DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 | PropertyAttribute::attrib4)
398 // === or Boolean properties
400 #define DECL_BOOL_PROP1(varname, attrib1) \
401 DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1)
404 #define DECL_BOOL_PROP2(varname, attrib1, attrib2) \
405 DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2)
408 #define DECL_BOOL_PROP3( varname, attrib1, attrib2, attrib3 ) \
409 DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 )
412 #define END_DESCRIBE_PROPERTIES() \
413 DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); \
416 #define REGISTER_PROP_2( prop, member, attrib1, attrib2 ) \
417 registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
418 &member, cppu::UnoType<decltype(member)>::get() );
420 #define REGISTER_PROP_3( prop, member, attrib1, attrib2, attrib3 ) \
421 registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2 | PropertyAttribute::attrib3, \
422 &member, cppu::UnoType<decltype(member)>::get() );
425 #define REGISTER_VOID_PROP_2( prop, memberAny, type, attrib1, attrib2 ) \
426 registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
427 &memberAny, cppu::UnoType<type>::get() );
431 //... namespace frm .......................................................
433 #endif // INCLUDED_FORMS_SOURCE_INC_PROPERTY_HXX
435 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */