xref: /aoo41x/main/toolkit/source/helper/property.cxx (revision 24c56ab9)
1b0724fc6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3b0724fc6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4b0724fc6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5b0724fc6SAndrew Rist  * distributed with this work for additional information
6b0724fc6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7b0724fc6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8b0724fc6SAndrew Rist  * "License"); you may not use this file except in compliance
9b0724fc6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10b0724fc6SAndrew Rist  *
11b0724fc6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12b0724fc6SAndrew Rist  *
13b0724fc6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14b0724fc6SAndrew Rist  * software distributed under the License is distributed on an
15b0724fc6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16b0724fc6SAndrew Rist  * KIND, either express or implied.  See the License for the
17b0724fc6SAndrew Rist  * specific language governing permissions and limitations
18b0724fc6SAndrew Rist  * under the License.
19b0724fc6SAndrew Rist  *
20b0724fc6SAndrew Rist  *************************************************************/
21b0724fc6SAndrew Rist 
22b0724fc6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_toolkit.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <toolkit/helper/property.hxx>
29cdf0e10cSrcweir #include <toolkit/helper/macros.hxx>
30cdf0e10cSrcweir #include <osl/mutex.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <stdlib.h>	// qsort/bsearch
33cdf0e10cSrcweir #include <tools/debug.hxx>
34cdf0e10cSrcweir #include <com/sun/star/awt/FontWeight.hpp>
35cdf0e10cSrcweir #include <com/sun/star/awt/FontSlant.hpp>
36cdf0e10cSrcweir #include <com/sun/star/awt/CharSet.hpp>
37cdf0e10cSrcweir #include <com/sun/star/awt/FontDescriptor.hpp>
38cdf0e10cSrcweir #include <com/sun/star/awt/FontWidth.hpp>
39cdf0e10cSrcweir #include <com/sun/star/awt/FontType.hpp>
40cdf0e10cSrcweir #include <com/sun/star/awt/FontUnderline.hpp>
41cdf0e10cSrcweir #include <com/sun/star/awt/FontStrikeout.hpp>
42cdf0e10cSrcweir #include <com/sun/star/awt/FontPitch.hpp>
43cdf0e10cSrcweir #include <com/sun/star/awt/XDevice.hpp>
44cdf0e10cSrcweir #include <com/sun/star/awt/tree/XTreeDataModel.hpp>
45cdf0e10cSrcweir #include <com/sun/star/awt/grid/XGridDataModel.hpp>
46cdf0e10cSrcweir #include <com/sun/star/awt/grid/XGridColumnModel.hpp>
47cdf0e10cSrcweir #include <com/sun/star/view/SelectionType.hpp>
48cdf0e10cSrcweir #include <com/sun/star/style/VerticalAlignment.hpp>
49cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
50cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
51cdf0e10cSrcweir #include <com/sun/star/graphic/XGraphic.hpp>
52cdf0e10cSrcweir #include <com/sun/star/resource/XStringResourceResolver.hpp>
53cdf0e10cSrcweir #include <comphelper/types.hxx>
54cdf0e10cSrcweir #include <functional>
55cdf0e10cSrcweir #include <algorithm>
56cdf0e10cSrcweir #include <toolkit/helper/property.hxx>
57cdf0e10cSrcweir 
58cdf0e10cSrcweir using ::com::sun::star::uno::Any;
59cdf0e10cSrcweir using ::com::sun::star::uno::Sequence;
60cdf0e10cSrcweir using ::com::sun::star::uno::Reference;
61cdf0e10cSrcweir using ::com::sun::star::awt::XDevice;
62cdf0e10cSrcweir using ::com::sun::star::awt::FontDescriptor;
63cdf0e10cSrcweir using ::com::sun::star::style::VerticalAlignment;
64cdf0e10cSrcweir using ::com::sun::star::graphic::XGraphic;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir struct ImplPropertyInfo
67cdf0e10cSrcweir {
68cdf0e10cSrcweir 	::rtl::OUString					aName;
69cdf0e10cSrcweir 	sal_uInt16						nPropId;
70cdf0e10cSrcweir 	::com::sun::star::uno::Type		aType;
71cdf0e10cSrcweir 	sal_Int16 						nAttribs;
72cdf0e10cSrcweir 	sal_Bool						bDependsOnOthers;	// eg. VALUE depends on MIN/MAX and must be set after MIN/MAX.
73cdf0e10cSrcweir 
ImplPropertyInfoImplPropertyInfo74cdf0e10cSrcweir 	ImplPropertyInfo()
75cdf0e10cSrcweir 	 {
76cdf0e10cSrcweir 	 	nPropId = 0;
77cdf0e10cSrcweir 		nAttribs = 0;
78cdf0e10cSrcweir    		bDependsOnOthers = sal_False;
79cdf0e10cSrcweir 	 }
80cdf0e10cSrcweir 
ImplPropertyInfoImplPropertyInfo81*24c56ab9SHerbert Dürr 	ImplPropertyInfo( const rtl::OUString& rName, sal_uInt16 nId, const ::com::sun::star::uno::Type& rType,
82cdf0e10cSrcweir 						sal_Int16 nAttrs, sal_Bool bDepends = sal_False )
83*24c56ab9SHerbert Dürr 	 : aName( rName )
84cdf0e10cSrcweir 	 {
85cdf0e10cSrcweir 	 	nPropId = nId;
86cdf0e10cSrcweir 		aType = rType;
87cdf0e10cSrcweir 		nAttribs = nAttrs;
88cdf0e10cSrcweir    		bDependsOnOthers = bDepends;
89cdf0e10cSrcweir 	 }
90cdf0e10cSrcweir 
91cdf0e10cSrcweir };
92cdf0e10cSrcweir 
93cdf0e10cSrcweir #define DECL_PROP_1( asciiname, id, type, attrib1 ) \
94cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 )
95cdf0e10cSrcweir #define DECL_PROP_2( asciiname, id, type, attrib1, attrib2 ) \
96cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 )
97cdf0e10cSrcweir #define DECL_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \
98cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 )
99cdf0e10cSrcweir #define DECL_PROP_4( asciiname, id, type, attrib1, attrib2, attrib3, attrib4 ) \
100cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 | ::com::sun::star::beans::PropertyAttribute::attrib4 )
101cdf0e10cSrcweir 
102cdf0e10cSrcweir #define DECL_DEP_PROP_1( asciiname, id, type, attrib1 ) \
103cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1, sal_True )
104cdf0e10cSrcweir #define DECL_DEP_PROP_2( asciiname, id, type, attrib1, attrib2 ) \
105cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2, sal_True )
106cdf0e10cSrcweir #define DECL_DEP_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \
107cdf0e10cSrcweir     ImplPropertyInfo( ::rtl::OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3, sal_True )
108cdf0e10cSrcweir 
ImplGetPropertyInfos(sal_uInt16 & rElementCount)109cdf0e10cSrcweir ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
110cdf0e10cSrcweir {
111cdf0e10cSrcweir 	static ImplPropertyInfo* pPropertyInfos = NULL;
112cdf0e10cSrcweir 	static sal_uInt16 nElements = 0;
113cdf0e10cSrcweir 	if( !pPropertyInfos )
114cdf0e10cSrcweir 	{
115cdf0e10cSrcweir 		::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
116cdf0e10cSrcweir 		if( !pPropertyInfos )
117cdf0e10cSrcweir 		{
118cdf0e10cSrcweir 			static ImplPropertyInfo __FAR_DATA aImplPropertyInfos [] =
119cdf0e10cSrcweir 			{
120cdf0e10cSrcweir 			DECL_PROP_2     ( "AccessibleName",         ACCESSIBLENAME,     ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
121cdf0e10cSrcweir             DECL_PROP_3     ( "Align",                  ALIGN,              sal_Int16,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
122cdf0e10cSrcweir             DECL_PROP_2     ( "Autocomplete",           AUTOCOMPLETE,       bool,               BOUND, MAYBEDEFAULT ),
123cdf0e10cSrcweir             DECL_PROP_2     ( "AutoHScroll",            AUTOHSCROLL,        bool,               BOUND, MAYBEDEFAULT ),
124cdf0e10cSrcweir             DECL_PROP_1     ( "AutoMnemonics",          AUTOMNEMONICS,      bool,               BOUND ),
125cdf0e10cSrcweir             DECL_PROP_2     ( "AutoToggle",             AUTOTOGGLE,         bool,               BOUND, MAYBEDEFAULT ),
126cdf0e10cSrcweir             DECL_PROP_2     ( "AutoVScroll",            AUTOVSCROLL,        bool,               BOUND, MAYBEDEFAULT ),
127cdf0e10cSrcweir             DECL_PROP_3     ( "BackgroundColor",        BACKGROUNDCOLOR,    sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
128cdf0e10cSrcweir             DECL_DEP_PROP_2 ( "BlockIncrement",         BLOCKINCREMENT,     sal_Int32,          BOUND, MAYBEDEFAULT ),
129cdf0e10cSrcweir             DECL_PROP_3     ( "Border",                 BORDER,             sal_Int16,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
130cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "BorderColor",            BORDERCOLOR,        sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
131cdf0e10cSrcweir             DECL_PROP_2     ( "Closeable",              CLOSEABLE,          bool,               BOUND, MAYBEDEFAULT ),
132cdf0e10cSrcweir             DECL_PROP_2     ( "CurrencySymbol",         CURRENCYSYMBOL,     ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
133cdf0e10cSrcweir             DECL_PROP_2     ( "CustomUnitText",         CUSTOMUNITTEXT,     ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
134cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "Date",                   DATE,               sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
135cdf0e10cSrcweir             DECL_PROP_2     ( "DateFormat",             EXTDATEFORMAT,      sal_Int16,          BOUND, MAYBEDEFAULT ),
136cdf0e10cSrcweir             DECL_PROP_2     ( "DateMax",                DATEMAX,            sal_Int32,          BOUND, MAYBEDEFAULT ),
137cdf0e10cSrcweir             DECL_PROP_2     ( "DateMin",                DATEMIN,            sal_Int32,          BOUND, MAYBEDEFAULT ),
138cdf0e10cSrcweir             DECL_PROP_3     ( "DateShowCentury",        DATESHOWCENTURY,    bool,               BOUND, MAYBEDEFAULT, MAYBEVOID ),
139cdf0e10cSrcweir             DECL_PROP_2     ( "DecimalAccuracy",        DECIMALACCURACY,    sal_Int16,          BOUND, MAYBEDEFAULT ),
140cdf0e10cSrcweir             DECL_PROP_2     ( "DefaultButton",          DEFAULTBUTTON,      bool,               BOUND, MAYBEDEFAULT ),
141cdf0e10cSrcweir             DECL_PROP_2     ( "DefaultControl",         DEFAULTCONTROL,     ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
142cdf0e10cSrcweir             DECL_PROP_2     ( "DesktopAsParent",        DESKTOP_AS_PARENT,  bool,               BOUND, MAYBEDEFAULT ),
143cdf0e10cSrcweir             DECL_PROP_2     ( "DisplayBackgroundColor", DISPLAYBACKGROUNDCOLOR, sal_Int32, BOUND, MAYBEVOID ),
144cdf0e10cSrcweir             DECL_PROP_2     ( "Dropdown",               DROPDOWN,           bool,               BOUND, MAYBEDEFAULT ),
145cdf0e10cSrcweir             DECL_PROP_2     ( "EchoChar",               ECHOCHAR,           sal_Int16,          BOUND, MAYBEDEFAULT ),
146cdf0e10cSrcweir             DECL_PROP_2     ( "EditMask",               EDITMASK,           ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
147cdf0e10cSrcweir             DECL_PROP_3     ( "EffectiveDefault",       EFFECTIVE_DEFAULT, Any,                BOUND, MAYBEDEFAULT, MAYBEVOID ),
148cdf0e10cSrcweir             DECL_PROP_3     ( "EffectiveMax",           EFFECTIVE_MAX,      double,             BOUND, MAYBEDEFAULT, MAYBEVOID ),
149cdf0e10cSrcweir             DECL_PROP_3     ( "EffectiveMin",           EFFECTIVE_MIN,      double,             BOUND, MAYBEDEFAULT, MAYBEVOID ),
150cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "EffectiveValue",         EFFECTIVE_VALUE,    Any,                BOUND, MAYBEDEFAULT, MAYBEVOID ),
151cdf0e10cSrcweir             DECL_PROP_2     ( "Enabled",                ENABLED,            bool,               BOUND, MAYBEDEFAULT ),
152cdf0e10cSrcweir             DECL_PROP_2     ( "EnforceFormat",          ENFORCE_FORMAT,     bool,               BOUND, MAYBEDEFAULT ),
153cdf0e10cSrcweir             DECL_PROP_3     ( "FillColor",              FILLCOLOR,          sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
154cdf0e10cSrcweir             DECL_PROP_2     ( "FocusOnClick",           FOCUSONCLICK,       bool,               BOUND, MAYBEDEFAULT ),
155cdf0e10cSrcweir             DECL_PROP_2     ( "FontRelief",             FONTRELIEF,         sal_Int16,          BOUND, MAYBEDEFAULT ),
156cdf0e10cSrcweir             DECL_PROP_2     ( "FontEmphasisMark",       FONTEMPHASISMARK,   sal_Int16,          BOUND, MAYBEDEFAULT ),
157cdf0e10cSrcweir             DECL_PROP_2     ( "FontDescriptor",         FONTDESCRIPTOR,     FontDescriptor,     BOUND, MAYBEDEFAULT ),
158cdf0e10cSrcweir 
159cdf0e10cSrcweir             // Teile des ::com::sun::star::awt::FontDescriptor
160cdf0e10cSrcweir             DECL_PROP_2     ( "FontName",               FONTDESCRIPTORPART_NAME,         ::rtl::OUString,BOUND, MAYBEDEFAULT ),
161cdf0e10cSrcweir             DECL_PROP_2     ( "FontStyleName",          FONTDESCRIPTORPART_STYLENAME,    ::rtl::OUString,BOUND, MAYBEDEFAULT ),
162cdf0e10cSrcweir             DECL_PROP_2     ( "FontFamily",             FONTDESCRIPTORPART_FAMILY,       sal_Int16,      BOUND, MAYBEDEFAULT ),
163cdf0e10cSrcweir             DECL_PROP_2     ( "FontCharset",            FONTDESCRIPTORPART_CHARSET,      sal_Int16,      BOUND, MAYBEDEFAULT ),
164cdf0e10cSrcweir             DECL_PROP_2     ( "FontHeight",             FONTDESCRIPTORPART_HEIGHT,       float,          BOUND, MAYBEDEFAULT ),
165cdf0e10cSrcweir             DECL_PROP_2     ( "FontWidth",              FONTDESCRIPTORPART_WIDTH,        sal_Int16,      BOUND, MAYBEDEFAULT ),
166cdf0e10cSrcweir             DECL_PROP_2     ( "FontPitch",              FONTDESCRIPTORPART_PITCH,        sal_Int16,      BOUND, MAYBEDEFAULT ),
167cdf0e10cSrcweir             DECL_PROP_2     ( "FontWeight",             FONTDESCRIPTORPART_WEIGHT,       float,          BOUND, MAYBEDEFAULT ),
168cdf0e10cSrcweir             DECL_PROP_2     ( "FontCharWidth",          FONTDESCRIPTORPART_CHARWIDTH,    float,          BOUND, MAYBEDEFAULT ),
169cdf0e10cSrcweir             DECL_PROP_2     ( "FontOrientation",        FONTDESCRIPTORPART_ORIENTATION,  float,          BOUND, MAYBEDEFAULT ),
170cdf0e10cSrcweir             DECL_PROP_2     ( "FontSlant",              FONTDESCRIPTORPART_SLANT,        sal_Int16,      BOUND, MAYBEDEFAULT ),
171cdf0e10cSrcweir             DECL_PROP_2     ( "FontUnderline",          FONTDESCRIPTORPART_UNDERLINE,    sal_Int16,      BOUND, MAYBEDEFAULT ),
172cdf0e10cSrcweir             DECL_PROP_2     ( "FontStrikeout",          FONTDESCRIPTORPART_STRIKEOUT,    sal_Int16,      BOUND, MAYBEDEFAULT ),
173cdf0e10cSrcweir             DECL_PROP_2     ( "FontKerning",            FONTDESCRIPTORPART_KERNING,      bool,           BOUND, MAYBEDEFAULT ),
174cdf0e10cSrcweir             DECL_PROP_2     ( "FontWordLineMode",       FONTDESCRIPTORPART_WORDLINEMODE, bool,           BOUND, MAYBEDEFAULT ),
175cdf0e10cSrcweir             DECL_PROP_2     ( "FontType",               FONTDESCRIPTORPART_TYPE,         sal_Int16,      BOUND, MAYBEDEFAULT ),
176cdf0e10cSrcweir 
177cdf0e10cSrcweir             DECL_PROP_3     ( "FormatKey",              FORMATKEY,          sal_Int32,      BOUND, MAYBEVOID, TRANSIENT ),
178cdf0e10cSrcweir             DECL_PROP_3     ( "FormatsSupplier",        FORMATSSUPPLIER,    Reference< ::com::sun::star::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ),
179cdf0e10cSrcweir 
180cdf0e10cSrcweir             DECL_PROP_2     ( "Graphic",                GRAPHIC,            Reference< XGraphic >, BOUND, TRANSIENT ),
181cdf0e10cSrcweir             DECL_PROP_2     ( "HelpText",               HELPTEXT,           ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
182cdf0e10cSrcweir             DECL_PROP_2     ( "HelpURL",                HELPURL,            ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
183cdf0e10cSrcweir             DECL_PROP_2     ( "HideInactiveSelection",  HIDEINACTIVESELECTION, bool,            BOUND, MAYBEDEFAULT ),
184cdf0e10cSrcweir             DECL_PROP_2     ( "HighContrastMode",       HIGHCONTRASTMODE,   bool,               BOUND, MAYBEDEFAULT ),
185cdf0e10cSrcweir             DECL_PROP_2     ( "HScroll",                HSCROLL,            bool,               BOUND, MAYBEDEFAULT ),
186cdf0e10cSrcweir             DECL_PROP_2     ( "HardLineBreaks",         HARDLINEBREAKS,     bool,               BOUND, MAYBEDEFAULT ),
187cdf0e10cSrcweir             DECL_PROP_2     ( "ImageAlign",             IMAGEALIGN,         sal_Int16,          BOUND, MAYBEDEFAULT),
188cdf0e10cSrcweir             DECL_PROP_2     ( "ImagePosition",          IMAGEPOSITION,      sal_Int16,          BOUND, MAYBEDEFAULT),
189cdf0e10cSrcweir             DECL_PROP_2     ( "ImageURL",               IMAGEURL,           ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
190cdf0e10cSrcweir             DECL_PROP_3     ( "ItemSeparatorPos",       ITEM_SEPARATOR_POS, sal_Int16,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
191cdf0e10cSrcweir             DECL_PROP_2     ( "Label",                  LABEL,              ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
192cdf0e10cSrcweir             DECL_PROP_3     ( "LineColor",              LINECOLOR,          sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
193cdf0e10cSrcweir             DECL_PROP_2     ( "LineCount",              LINECOUNT,          sal_Int16,          BOUND, MAYBEDEFAULT ),
194cdf0e10cSrcweir             DECL_PROP_2     ( "LineEndFormat",          LINE_END_FORMAT,    sal_Int16,          BOUND, MAYBEDEFAULT ),
195cdf0e10cSrcweir             DECL_DEP_PROP_2 ( "LineIncrement",          LINEINCREMENT,      sal_Int32,          BOUND, MAYBEDEFAULT ),
196cdf0e10cSrcweir             DECL_PROP_2     ( "LiteralMask",            LITERALMASK,        ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
197cdf0e10cSrcweir             DECL_PROP_2     ( "LiveScroll",             LIVE_SCROLL,        bool,               BOUND, MAYBEDEFAULT ),
198cdf0e10cSrcweir             DECL_PROP_2     ( "MaxTextLen",             MAXTEXTLEN,         sal_Int16,          BOUND, MAYBEDEFAULT ),
199cdf0e10cSrcweir             DECL_PROP_2     ( "Moveable",               MOVEABLE,           bool,               BOUND, MAYBEDEFAULT ),
200cdf0e10cSrcweir             DECL_PROP_1     ( "MouseTransparent",       MOUSETRANSPARENT,   bool,               BOUND ),
201cdf0e10cSrcweir             DECL_PROP_2     ( "MultiLine",              MULTILINE,          bool,               BOUND, MAYBEDEFAULT ),
202cdf0e10cSrcweir             DECL_PROP_2     ( "MultiSelection",         MULTISELECTION,     bool,               BOUND, MAYBEDEFAULT ),
203cdf0e10cSrcweir             DECL_PROP_2     ( "MultiSelectionSimpleMode",   MULTISELECTION_SIMPLEMODE,    bool, BOUND, MAYBEDEFAULT ),
204cdf0e10cSrcweir             DECL_PROP_2     ( "NativeWidgetLook",       NATIVE_WIDGET_LOOK, bool,               BOUND, MAYBEDEFAULT ),
205cdf0e10cSrcweir             DECL_PROP_2	    ( "NoLabel",                NOLABEL,            bool,               BOUND, MAYBEDEFAULT ),
206cdf0e10cSrcweir             DECL_PROP_2     ( "Orientation",            ORIENTATION,        sal_Int32,          BOUND, MAYBEDEFAULT ),
207cdf0e10cSrcweir             DECL_PROP_2     ( "PaintTransparent",       PAINTTRANSPARENT,   bool,               BOUND, MAYBEDEFAULT ),
208cdf0e10cSrcweir             DECL_PROP_2     ( "PluginParent",           PLUGINPARENT,       sal_Int64,          BOUND, MAYBEDEFAULT ),
209cdf0e10cSrcweir             DECL_PROP_2     ( "PrependCurrencySymbol",  CURSYM_POSITION,    bool,               BOUND, MAYBEDEFAULT ),
210cdf0e10cSrcweir             DECL_PROP_2     ( "Printable",              PRINTABLE,          bool,               BOUND, MAYBEDEFAULT ),
211cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "ProgressValue",          PROGRESSVALUE,      sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
212cdf0e10cSrcweir             DECL_PROP_2     ( "ProgressValueMax",       PROGRESSVALUE_MAX,  sal_Int32,          BOUND, MAYBEDEFAULT ),
213cdf0e10cSrcweir             DECL_PROP_2     ( "ProgressValueMin",       PROGRESSVALUE_MIN,  sal_Int32,          BOUND, MAYBEDEFAULT ),
214cdf0e10cSrcweir             DECL_PROP_2     ( "PushButtonType",         PUSHBUTTONTYPE,     sal_Int16,          BOUND, MAYBEDEFAULT),
215cdf0e10cSrcweir             DECL_PROP_2     ( "ReadOnly",               READONLY,           bool,               BOUND, MAYBEDEFAULT ),
216cdf0e10cSrcweir             DECL_PROP_2     ( "Repeat",                 REPEAT,             bool,               BOUND, MAYBEDEFAULT ),
217cdf0e10cSrcweir             DECL_PROP_2     ( "AutoRepeat",             AUTO_REPEAT,        sal_Bool,           BOUND, MAYBEDEFAULT ),
218cdf0e10cSrcweir             DECL_PROP_2     ( "RepeatDelay",            REPEAT_DELAY,       sal_Int32,          BOUND, MAYBEDEFAULT ),
219cdf0e10cSrcweir             DECL_PROP_2     ( "ScaleImage",             SCALEIMAGE,         bool,               BOUND, MAYBEDEFAULT ),
220cdf0e10cSrcweir             DECL_PROP_2     ( "ScaleMode",              IMAGE_SCALE_MODE,   sal_Int16,          BOUND, MAYBEDEFAULT ),
221cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "ScrollValue",            SCROLLVALUE,        sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
222cdf0e10cSrcweir             DECL_PROP_2     ( "ScrollValueMax",         SCROLLVALUE_MAX,    sal_Int32,          BOUND, MAYBEDEFAULT ),
223cdf0e10cSrcweir             DECL_PROP_2     ( "ScrollValueMin",         SCROLLVALUE_MIN,    sal_Int32,          BOUND, MAYBEDEFAULT ),
224cdf0e10cSrcweir             DECL_DEP_PROP_2 ( "SelectedItems",          SELECTEDITEMS,      Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ),
225cdf0e10cSrcweir             DECL_PROP_2     ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP,     bool,           BOUND, MAYBEDEFAULT ),
226cdf0e10cSrcweir             DECL_PROP_2     ( "Sizeable",               SIZEABLE,               bool,           BOUND, MAYBEDEFAULT ),
227cdf0e10cSrcweir             DECL_PROP_2     ( "Spin",                   SPIN,                   bool,           BOUND, MAYBEDEFAULT ),
228cdf0e10cSrcweir             DECL_PROP_2     ( "SpinIncrement",          SPININCREMENT,          sal_Int32,      BOUND, MAYBEDEFAULT ),
229cdf0e10cSrcweir             DECL_DEP_PROP_2 ( "SpinValue",              SPINVALUE,              sal_Int32,      BOUND, MAYBEDEFAULT ),
230cdf0e10cSrcweir             DECL_PROP_2     ( "SpinValueMax",           SPINVALUE_MAX,          sal_Int32,      BOUND, MAYBEDEFAULT ),
231cdf0e10cSrcweir             DECL_PROP_2     ( "SpinValueMin",           SPINVALUE_MIN,          sal_Int32,      BOUND, MAYBEDEFAULT ),
232cdf0e10cSrcweir             DECL_DEP_PROP_2 ( "State",                  STATE,                  sal_Int16,      BOUND, MAYBEDEFAULT ),
233cdf0e10cSrcweir             DECL_PROP_2     ( "StrictFormat",           STRICTFORMAT,           bool,           BOUND, MAYBEDEFAULT ),
234cdf0e10cSrcweir             DECL_PROP_2     ( "StringItemList",         STRINGITEMLIST,         Sequence< ::rtl::OUString >, BOUND, MAYBEDEFAULT ),
235cdf0e10cSrcweir             DECL_PROP_2     ( "VisualEffect",           VISUALEFFECT,           sal_Int16,      BOUND, MAYBEDEFAULT ),
236cdf0e10cSrcweir             DECL_PROP_3     ( "SymbolColor",            SYMBOL_COLOR,           sal_Int32,      BOUND, MAYBEDEFAULT, MAYBEVOID ),
237cdf0e10cSrcweir             DECL_PROP_3     ( "Tabstop",                TABSTOP,                bool,           BOUND, MAYBEDEFAULT, MAYBEVOID ),
238cdf0e10cSrcweir             DECL_PROP_2     ( "Text",                   TEXT,                   ::rtl::OUString, BOUND, MAYBEDEFAULT ),
239cdf0e10cSrcweir             DECL_PROP_3     ( "TextColor",              TEXTCOLOR,              sal_Int32,      BOUND, MAYBEDEFAULT, MAYBEVOID ),
240cdf0e10cSrcweir             DECL_PROP_3     ( "TextLineColor",          TEXTLINECOLOR,          sal_Int32,      BOUND, MAYBEDEFAULT, MAYBEVOID ),
241cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "Time",                   TIME,                   sal_Int32,      BOUND, MAYBEDEFAULT, MAYBEVOID ),
242cdf0e10cSrcweir             DECL_PROP_2     ( "TimeFormat",             EXTTIMEFORMAT,          sal_Int16,      BOUND, MAYBEDEFAULT ),
243cdf0e10cSrcweir             DECL_PROP_2     ( "TimeMax",                TIMEMAX,                sal_Int32,      BOUND, MAYBEDEFAULT ),
244cdf0e10cSrcweir             DECL_PROP_2     ( "TimeMin",                TIMEMIN,                sal_Int32,      BOUND, MAYBEDEFAULT ),
245cdf0e10cSrcweir             DECL_PROP_2     ( "Title",                  TITLE,                  ::rtl::OUString, BOUND, MAYBEDEFAULT ),
246cdf0e10cSrcweir             DECL_PROP_2     ( "Toggle",                 TOGGLE,                 bool,           BOUND, MAYBEDEFAULT ),
247cdf0e10cSrcweir             DECL_PROP_3     ( "TreatAsNumber",          TREATASNUMBER,          bool,           BOUND, MAYBEDEFAULT,TRANSIENT ),
248cdf0e10cSrcweir             DECL_PROP_2     ( "TriState",               TRISTATE,               bool,           BOUND, MAYBEDEFAULT ),
249cdf0e10cSrcweir             DECL_PROP_2     ( "Unit",                   UNIT,                   sal_Int16,      BOUND, MAYBEDEFAULT ),
250cdf0e10cSrcweir             DECL_PROP_2     ( "VScroll",                VSCROLL,                bool,           BOUND, MAYBEDEFAULT ),
251cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "Value",                  VALUE_DOUBLE,           double,         BOUND, MAYBEDEFAULT, MAYBEVOID ),
252cdf0e10cSrcweir             DECL_PROP_2     ( "ValueMax",               VALUEMAX_DOUBLE,        double,         BOUND, MAYBEDEFAULT ),
253cdf0e10cSrcweir             DECL_PROP_2     ( "ValueMin",               VALUEMIN_DOUBLE,        double,         BOUND, MAYBEDEFAULT ),
254cdf0e10cSrcweir             DECL_PROP_2     ( "ValueStep",              VALUESTEP_DOUBLE,       double,         BOUND, MAYBEDEFAULT ),
255cdf0e10cSrcweir             DECL_PROP_3     ( "VerticalAlign",          VERTICALALIGN,          VerticalAlignment, BOUND, MAYBEDEFAULT, MAYBEVOID ),
256cdf0e10cSrcweir             DECL_DEP_PROP_3 ( "VisibleSize",            VISIBLESIZE,            sal_Int32,      BOUND, MAYBEDEFAULT, MAYBEVOID ),
257cdf0e10cSrcweir             DECL_PROP_2     ( "Activated",              ACTIVATED,              sal_Bool,       BOUND, MAYBEDEFAULT ),
258cdf0e10cSrcweir             DECL_PROP_2     ( "Complete",               COMPLETE,               sal_Bool,       BOUND, MAYBEDEFAULT ),
259cdf0e10cSrcweir             DECL_PROP_2     ( "CurrentItemID",          CURRENTITEMID,          sal_Int16,      BOUND, MAYBEDEFAULT ),
260cdf0e10cSrcweir 
261cdf0e10cSrcweir             DECL_PROP_2     ( "MouseWheelBehavior",     MOUSE_WHEEL_BEHAVIOUR,  sal_Int16,      BOUND, MAYBEDEFAULT ),
262cdf0e10cSrcweir             DECL_PROP_2     ( "StepTime",               STEP_TIME,              sal_Int32,      BOUND, MAYBEDEFAULT ),
263cdf0e10cSrcweir             DECL_PROP_2     ( "Decoration",             DECORATION,             sal_Bool,       BOUND, MAYBEDEFAULT ),
264cdf0e10cSrcweir 
265cdf0e10cSrcweir 			DECL_PROP_2		( "SelectionType",			TREE_SELECTIONTYPE,		::com::sun::star::view::SelectionType,		BOUND, MAYBEDEFAULT ),
266cdf0e10cSrcweir 			DECL_PROP_2		( "Editable",				TREE_EDITABLE,			sal_Bool,		BOUND, MAYBEDEFAULT ),
267cdf0e10cSrcweir 			DECL_PROP_3		( "DataModel",				TREE_DATAMODEL,			Reference< ::com::sun::star::awt::tree::XTreeDataModel >,		BOUND, MAYBEDEFAULT, MAYBEVOID ),
268cdf0e10cSrcweir 			DECL_PROP_2		( "RootDisplayed",			TREE_ROOTDISPLAYED,		sal_Bool,			BOUND, MAYBEDEFAULT ),
269cdf0e10cSrcweir 			DECL_PROP_2		( "ShowsHandles",			TREE_SHOWSHANDLES,		sal_Bool,			BOUND, MAYBEDEFAULT ),
270cdf0e10cSrcweir 			DECL_PROP_2		( "ShowsRootHandles",		TREE_SHOWSROOTHANDLES,	sal_Bool,			BOUND, MAYBEDEFAULT ),
271cdf0e10cSrcweir 			DECL_PROP_3		( "RowHeight",				ROW_HEIGHT,			    sal_Int32,			BOUND, MAYBEDEFAULT, MAYBEVOID ),
272cdf0e10cSrcweir 			DECL_PROP_2		( "InvokesStopNodeEditing",	TREE_INVOKESSTOPNODEEDITING, sal_Bool,		BOUND, MAYBEDEFAULT ),
273cdf0e10cSrcweir             DECL_PROP_2     ( "DialogSourceURL",        DIALOGSOURCEURL,        ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
274cdf0e10cSrcweir             DECL_PROP_2     ( "URL",                    URL,                    ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
275cdf0e10cSrcweir             DECL_PROP_2     ( "WritingMode",            WRITING_MODE,           sal_Int16,          BOUND, MAYBEDEFAULT ),
276cdf0e10cSrcweir             DECL_PROP_3     ( "ContextWritingMode",     CONTEXT_WRITING_MODE,   sal_Int16,          BOUND, MAYBEDEFAULT, TRANSIENT ),
277cdf0e10cSrcweir             DECL_PROP_2     ( "ShowRowHeader",			GRID_SHOWROWHEADER,     sal_Bool,           BOUND, MAYBEDEFAULT ),
278cdf0e10cSrcweir             DECL_PROP_2     ( "RowHeaderWidth",         ROW_HEADER_WIDTH,       sal_Int32,          BOUND, MAYBEDEFAULT ),
279cdf0e10cSrcweir             DECL_PROP_2     ( "ShowColumnHeader",		GRID_SHOWCOLUMNHEADER,  sal_Bool,           BOUND, MAYBEDEFAULT ),
280cdf0e10cSrcweir             DECL_PROP_3     ( "ColumnHeaderHeight",     COLUMN_HEADER_HEIGHT,   sal_Int32,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
281cdf0e10cSrcweir             DECL_PROP_1     ( "GridDataModel",		    GRID_DATAMODEL,         Reference< ::com::sun::star::awt::grid::XGridDataModel >,          BOUND ),
282cdf0e10cSrcweir             DECL_PROP_1     ( "ColumnModel",		    GRID_COLUMNMODEL,       Reference< ::com::sun::star::awt::grid::XGridColumnModel >,          BOUND ),
283cdf0e10cSrcweir             DECL_PROP_3     ( "SelectionModel",		    GRID_SELECTIONMODE,     ::com::sun::star::view::SelectionType,          BOUND, MAYBEDEFAULT, MAYBEVOID ),
284cdf0e10cSrcweir             DECL_PROP_2     ( "EnableVisible",          ENABLEVISIBLE,          sal_Bool,           BOUND, MAYBEDEFAULT ),
285cdf0e10cSrcweir             DECL_PROP_3     ( "ReferenceDevice",        REFERENCE_DEVICE,       Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ),
286cdf0e10cSrcweir 			DECL_PROP_3     ( "HeaderBackgroundColor",  GRID_HEADER_BACKGROUND,     sal_Int32,              BOUND, MAYBEDEFAULT, MAYBEVOID ),
287cdf0e10cSrcweir 			DECL_PROP_3     ( "HeaderTextColor",        GRID_HEADER_TEXT_COLOR,     sal_Int32,              BOUND, MAYBEDEFAULT, MAYBEVOID ),
288cdf0e10cSrcweir 			DECL_PROP_3     ( "GridLineColor",          GRID_LINE_COLOR,            sal_Int32,              BOUND, MAYBEDEFAULT, MAYBEVOID ),
289cdf0e10cSrcweir 			DECL_PROP_3     ( "RowBackgroundColors",    GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >,  BOUND, MAYBEDEFAULT, MAYBEVOID ),
290cdf0e10cSrcweir             DECL_PROP_2     ( "UseGridLines",           USE_GRID_LINES,             sal_Bool,               BOUND, MAYBEDEFAULT ),
291cdf0e10cSrcweir             DECL_PROP_3     ( "ActiveSelectionBackgroundColor",     ACTIVE_SEL_BACKGROUND_COLOR,    sal_Int32,  BOUND, MAYBEDEFAULT, MAYBEVOID ),
292cdf0e10cSrcweir 			DECL_PROP_3     ( "InactiveSelectionBackgroundColor",   INACTIVE_SEL_BACKGROUND_COLOR,  sal_Int32,  BOUND, MAYBEDEFAULT, MAYBEVOID ),
293cdf0e10cSrcweir 			DECL_PROP_3     ( "ActiveSelectionTextColor",           ACTIVE_SEL_TEXT_COLOR,          sal_Int32,  BOUND, MAYBEDEFAULT, MAYBEVOID ),
294cdf0e10cSrcweir 			DECL_PROP_3     ( "InactiveSelectionTextColor",         INACTIVE_SEL_TEXT_COLOR,        sal_Int32,  BOUND, MAYBEDEFAULT, MAYBEVOID ),
295cdf0e10cSrcweir 	};
296cdf0e10cSrcweir 			pPropertyInfos = aImplPropertyInfos;
297cdf0e10cSrcweir 			nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );
298cdf0e10cSrcweir 		}
299cdf0e10cSrcweir 	}
300cdf0e10cSrcweir 	rElementCount = nElements;
301cdf0e10cSrcweir 	return pPropertyInfos;
302cdf0e10cSrcweir }
303cdf0e10cSrcweir 
304cdf0e10cSrcweir 
305cdf0e10cSrcweir struct ImplPropertyInfoCompareFunctor : ::std::binary_function<ImplPropertyInfo,::rtl::OUString,bool>
306cdf0e10cSrcweir {
operator ()ImplPropertyInfoCompareFunctor307cdf0e10cSrcweir 	inline bool operator()(const ImplPropertyInfo& lhs,const ImplPropertyInfo& rhs)	const
308cdf0e10cSrcweir 	{
309cdf0e10cSrcweir 		return lhs.aName.compareTo(rhs.aName) < 0;
310cdf0e10cSrcweir 	}
operator ()ImplPropertyInfoCompareFunctor311cdf0e10cSrcweir 	inline bool operator()(const ImplPropertyInfo& lhs,const ::rtl::OUString& rhs)	const
312cdf0e10cSrcweir 	{
313cdf0e10cSrcweir 		return lhs.aName.compareTo(rhs) < 0;
314cdf0e10cSrcweir 	}
operator ()ImplPropertyInfoCompareFunctor315cdf0e10cSrcweir 	inline bool operator()(const ::rtl::OUString& lhs,const ImplPropertyInfo& rhs)	const
316cdf0e10cSrcweir 	{
317cdf0e10cSrcweir 		return lhs.compareTo(rhs.aName) < 0;
318cdf0e10cSrcweir 	}
319cdf0e10cSrcweir };
320cdf0e10cSrcweir 
ImplAssertValidPropertyArray()321cdf0e10cSrcweir void ImplAssertValidPropertyArray()
322cdf0e10cSrcweir {
323cdf0e10cSrcweir 	static sal_Bool bSorted = sal_False;
324cdf0e10cSrcweir 	if( !bSorted )
325cdf0e10cSrcweir 	{
326cdf0e10cSrcweir 		sal_uInt16 nElements;
327cdf0e10cSrcweir 		ImplPropertyInfo* pInfos = ImplGetPropertyInfos( nElements );
328cdf0e10cSrcweir 		::std::sort(pInfos, pInfos+nElements,ImplPropertyInfoCompareFunctor());
329cdf0e10cSrcweir 		bSorted = sal_True;
330cdf0e10cSrcweir 	}
331cdf0e10cSrcweir }
332cdf0e10cSrcweir 
GetPropertyId(const::rtl::OUString & rPropertyName)333cdf0e10cSrcweir sal_uInt16 GetPropertyId( const ::rtl::OUString& rPropertyName )
334cdf0e10cSrcweir {
335cdf0e10cSrcweir 	ImplAssertValidPropertyArray();
336cdf0e10cSrcweir 
337cdf0e10cSrcweir 	sal_uInt16 nElements;
338cdf0e10cSrcweir 	ImplPropertyInfo* pInfos = ImplGetPropertyInfos( nElements );
339cdf0e10cSrcweir 	ImplPropertyInfo* pInf = ::std::lower_bound(pInfos,pInfos+nElements,rPropertyName,ImplPropertyInfoCompareFunctor());
340cdf0e10cSrcweir /*
341cdf0e10cSrcweir 		(ImplPropertyInfo*)
342cdf0e10cSrcweir 								bsearch( &aSearch, pInfos, nElements, sizeof( ImplPropertyInfo ), ImplPropertyInfoCompare );
343cdf0e10cSrcweir */
344cdf0e10cSrcweir 
345cdf0e10cSrcweir 	return ( pInf && pInf != (pInfos+nElements) && pInf->aName == rPropertyName) ? pInf->nPropId: 0;
346cdf0e10cSrcweir }
347cdf0e10cSrcweir 
ImplGetImplPropertyInfo(sal_uInt16 nPropertyId)348cdf0e10cSrcweir const ImplPropertyInfo* ImplGetImplPropertyInfo( sal_uInt16 nPropertyId )
349cdf0e10cSrcweir {
350cdf0e10cSrcweir 	ImplAssertValidPropertyArray();
351cdf0e10cSrcweir 
352cdf0e10cSrcweir 	sal_uInt16 nElements;
353cdf0e10cSrcweir 	ImplPropertyInfo* pInfos = ImplGetPropertyInfos( nElements );
354cdf0e10cSrcweir 	sal_uInt16 n;
355cdf0e10cSrcweir 	for ( n = 0; n < nElements && pInfos[n].nPropId != nPropertyId; ++n)
356cdf0e10cSrcweir 		;
357cdf0e10cSrcweir 
358cdf0e10cSrcweir 	return (n < nElements) ? &pInfos[n] : NULL;
359cdf0e10cSrcweir }
360cdf0e10cSrcweir 
GetPropertyOrderNr(sal_uInt16 nPropertyId)361cdf0e10cSrcweir sal_uInt16 GetPropertyOrderNr( sal_uInt16 nPropertyId )
362cdf0e10cSrcweir {
363cdf0e10cSrcweir 	ImplAssertValidPropertyArray();
364cdf0e10cSrcweir 
365cdf0e10cSrcweir 	sal_uInt16 nElements;
366cdf0e10cSrcweir 	ImplPropertyInfo* pInfos = ImplGetPropertyInfos( nElements );
367cdf0e10cSrcweir 	for ( sal_uInt16 n = nElements; n; )
368cdf0e10cSrcweir 	{
369cdf0e10cSrcweir 		if ( pInfos[--n].nPropId == nPropertyId )
370cdf0e10cSrcweir 			return n;
371cdf0e10cSrcweir 	}
372cdf0e10cSrcweir 	return 0xFFFF;
373cdf0e10cSrcweir }
374cdf0e10cSrcweir 
GetPropertyName(sal_uInt16 nPropertyId)375cdf0e10cSrcweir const ::rtl::OUString& GetPropertyName( sal_uInt16 nPropertyId )
376cdf0e10cSrcweir {
377cdf0e10cSrcweir 	const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
378cdf0e10cSrcweir 	DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
379cdf0e10cSrcweir 	return pImplPropertyInfo->aName;
380cdf0e10cSrcweir }
381cdf0e10cSrcweir 
GetPropertyType(sal_uInt16 nPropertyId)382cdf0e10cSrcweir const ::com::sun::star::uno::Type* GetPropertyType( sal_uInt16 nPropertyId )
383cdf0e10cSrcweir {
384cdf0e10cSrcweir 	const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
385cdf0e10cSrcweir 	DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
386cdf0e10cSrcweir 	return pImplPropertyInfo ? &pImplPropertyInfo->aType : NULL;
387cdf0e10cSrcweir }
388cdf0e10cSrcweir 
GetPropertyAttribs(sal_uInt16 nPropertyId)389cdf0e10cSrcweir sal_Int16 GetPropertyAttribs( sal_uInt16 nPropertyId )
390cdf0e10cSrcweir {
391cdf0e10cSrcweir 	const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
392cdf0e10cSrcweir 	DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
393cdf0e10cSrcweir 	return pImplPropertyInfo ? pImplPropertyInfo->nAttribs : 0;
394cdf0e10cSrcweir }
395cdf0e10cSrcweir 
DoesDependOnOthers(sal_uInt16 nPropertyId)396cdf0e10cSrcweir sal_Bool DoesDependOnOthers( sal_uInt16 nPropertyId )
397cdf0e10cSrcweir {
398cdf0e10cSrcweir 	const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
399cdf0e10cSrcweir 	DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
400cdf0e10cSrcweir 	return pImplPropertyInfo ? pImplPropertyInfo->bDependsOnOthers : sal_False;
401cdf0e10cSrcweir }
402cdf0e10cSrcweir 
CompareProperties(const::com::sun::star::uno::Any & r1,const::com::sun::star::uno::Any & r2)403cdf0e10cSrcweir sal_Bool CompareProperties( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 )
404cdf0e10cSrcweir {
405cdf0e10cSrcweir 	return ::comphelper::compare( r1, r2 );
406cdf0e10cSrcweir }
407cdf0e10cSrcweir 
408cdf0e10cSrcweir 
409cdf0e10cSrcweir 
410