1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #include "precompiled_reportdesign.hxx"
28*cdf0e10cSrcweir #include "metadata.hxx"
29*cdf0e10cSrcweir #include <svtools/localresaccess.hxx>
30*cdf0e10cSrcweir #include "com/sun/star/inspection/XPropertyHandler.hpp"
31*cdf0e10cSrcweir #include <tools/debug.hxx>
32*cdf0e10cSrcweir #include <comphelper/extract.hxx>
33*cdf0e10cSrcweir #ifndef RTPUI_REPORTDESIGN_HELPID_HRC
34*cdf0e10cSrcweir #include "helpids.hrc"
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir #ifndef _RPTUI_DLGRESID_HRC
37*cdf0e10cSrcweir #include "RptResId.hrc"
38*cdf0e10cSrcweir #endif
39*cdf0e10cSrcweir #ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
40*cdf0e10cSrcweir #include "uistrings.hrc"
41*cdf0e10cSrcweir #endif
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir #include <functional>
44*cdf0e10cSrcweir #include <algorithm>
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir //............................................................................
47*cdf0e10cSrcweir namespace rptui
48*cdf0e10cSrcweir {
49*cdf0e10cSrcweir //............................................................................
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir 	using namespace ::com::sun::star::uno;
52*cdf0e10cSrcweir     using namespace ::com::sun::star;
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir 	//========================================================================
55*cdf0e10cSrcweir 	//= OPropertyInfoImpl
56*cdf0e10cSrcweir 	//========================================================================
57*cdf0e10cSrcweir 	struct OPropertyInfoImpl
58*cdf0e10cSrcweir 	{
59*cdf0e10cSrcweir 		String			sName;
60*cdf0e10cSrcweir 		String			sTranslation;
61*cdf0e10cSrcweir 		rtl::OString    sHelpId;
62*cdf0e10cSrcweir 		sal_Int32       nId;
63*cdf0e10cSrcweir 		sal_uInt16      nPos;
64*cdf0e10cSrcweir         sal_uInt32      nUIFlags;
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir 		OPropertyInfoImpl(
67*cdf0e10cSrcweir 						const ::rtl::OUString&		rName,
68*cdf0e10cSrcweir 						sal_Int32					_nId,
69*cdf0e10cSrcweir 						const String&				aTranslation,
70*cdf0e10cSrcweir 						sal_uInt16					nPosId,
71*cdf0e10cSrcweir 						const rtl::OString&			_sHelpId,
72*cdf0e10cSrcweir                         sal_uInt32                  _nUIFlags);
73*cdf0e10cSrcweir 	};
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir 	//------------------------------------------------------------------------
76*cdf0e10cSrcweir 	OPropertyInfoImpl::OPropertyInfoImpl(const ::rtl::OUString& _rName, sal_Int32 _nId,
77*cdf0e10cSrcweir 								   const String& aString, sal_uInt16 nP, const rtl::OString& sHid, sal_uInt32 _nUIFlags)
78*cdf0e10cSrcweir 	   :sName(_rName)
79*cdf0e10cSrcweir 	   ,sTranslation(aString)
80*cdf0e10cSrcweir 	   ,sHelpId(sHid)
81*cdf0e10cSrcweir 	   ,nId(_nId)
82*cdf0e10cSrcweir 	   ,nPos(nP)
83*cdf0e10cSrcweir        ,nUIFlags(_nUIFlags)
84*cdf0e10cSrcweir 	{
85*cdf0e10cSrcweir 	}
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir 	//------------------------------------------------------------------------
88*cdf0e10cSrcweir 	// Vergleichen von PropertyInfo
89*cdf0e10cSrcweir     struct PropertyInfoLessByName : public ::std::binary_function< OPropertyInfoImpl, OPropertyInfoImpl, bool >
90*cdf0e10cSrcweir     {
91*cdf0e10cSrcweir         bool operator()( const OPropertyInfoImpl& _lhs, const OPropertyInfoImpl& _rhs )
92*cdf0e10cSrcweir         {
93*cdf0e10cSrcweir             return _lhs.sName < _rhs.sName;
94*cdf0e10cSrcweir         }
95*cdf0e10cSrcweir     };
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir 	//========================================================================
98*cdf0e10cSrcweir 	//= OPropertyInfoService
99*cdf0e10cSrcweir 	//========================================================================
100*cdf0e10cSrcweir #define DEF_INFO( ident, uinameres, helpid, flags )   \
101*cdf0e10cSrcweir     OPropertyInfoImpl( PROPERTY_##ident, PROPERTY_ID_##ident, \
102*cdf0e10cSrcweir             String( ModuleRes( RID_STR_##uinameres ) ), nPos++, HID_RPT_PROP_##helpid, flags )
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir #define DEF_INFO_1( ident, uinameres, helpid, flag1 ) \
105*cdf0e10cSrcweir     DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 )
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir #define DEF_INFO_2( ident, uinameres, helpid, flag1, flag2 ) \
108*cdf0e10cSrcweir     DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 )
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir #define DEF_INFO_3( ident, uinameres, helpid, flag1, flag2, flag3 ) \
111*cdf0e10cSrcweir     DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 )
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir #define DEF_INFO_4( ident, uinameres, helpid, flag1, flag2, flag3, flag4 ) \
114*cdf0e10cSrcweir     DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 )
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir #define DEF_INFO_5( ident, uinameres, helpid, flag1, flag2, flag3, flag4, flag5 ) \
117*cdf0e10cSrcweir     DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 | PROP_FLAG_##flag5 )
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir     sal_uInt16				OPropertyInfoService::s_nCount = 0;
120*cdf0e10cSrcweir 	OPropertyInfoImpl*		OPropertyInfoService::s_pPropertyInfos = NULL;
121*cdf0e10cSrcweir 	//------------------------------------------------------------------------
122*cdf0e10cSrcweir 	const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo()
123*cdf0e10cSrcweir 	{
124*cdf0e10cSrcweir 		if ( s_pPropertyInfos )
125*cdf0e10cSrcweir             return s_pPropertyInfos;
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir 		OModuleClient aResourceAccess;
128*cdf0e10cSrcweir 		// this ensures that we have our resource file loaded
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 		sal_uInt16 nPos = 1;
131*cdf0e10cSrcweir         static OPropertyInfoImpl aPropertyInfos[] =
132*cdf0e10cSrcweir 		{
133*cdf0e10cSrcweir         /*
134*cdf0e10cSrcweir         DEF_INFO_?( propname and id,   resoure id,         help id,           flags ),
135*cdf0e10cSrcweir         */
136*cdf0e10cSrcweir              DEF_INFO_1( FORCENEWPAGE,                  FORCENEWPAGE,               FORCENEWPAGE,               COMPOSEABLE )
137*cdf0e10cSrcweir             ,DEF_INFO_1( NEWROWORCOL,                   NEWROWORCOL,                NEWROWORCOL,                COMPOSEABLE )
138*cdf0e10cSrcweir             ,DEF_INFO_1( KEEPTOGETHER,                  KEEPTOGETHER,               KEEPTOGETHER,               COMPOSEABLE )
139*cdf0e10cSrcweir             ,DEF_INFO_1( CANGROW,                       CANGROW,                    CANGROW,                    COMPOSEABLE )
140*cdf0e10cSrcweir             ,DEF_INFO_1( CANSHRINK,                     CANSHRINK,                  CANSHRINK,                  COMPOSEABLE )
141*cdf0e10cSrcweir             ,DEF_INFO_1( REPEATSECTION,                 REPEATSECTION,              REPEATSECTION,              COMPOSEABLE )
142*cdf0e10cSrcweir             ,DEF_INFO_1( PRINTREPEATEDVALUES,           PRINTREPEATEDVALUES,        PRINTREPEATEDVALUES,        COMPOSEABLE )
143*cdf0e10cSrcweir             ,DEF_INFO_1( CONDITIONALPRINTEXPRESSION,    CONDITIONALPRINTEXPRESSION, CONDITIONALPRINTEXPRESSION, COMPOSEABLE )
144*cdf0e10cSrcweir             ,DEF_INFO_1( STARTNEWCOLUMN,                STARTNEWCOLUMN,             STARTNEWCOLUMN,             COMPOSEABLE )
145*cdf0e10cSrcweir             ,DEF_INFO_1( RESETPAGENUMBER,               RESETPAGENUMBER,            RESETPAGENUMBER,            COMPOSEABLE )
146*cdf0e10cSrcweir             ,DEF_INFO_1( PRINTWHENGROUPCHANGE,          PRINTWHENGROUPCHANGE,       PRINTWHENGROUPCHANGE,       COMPOSEABLE )
147*cdf0e10cSrcweir             ,DEF_INFO_1( VISIBLE,                       VISIBLE,                    VISIBLE,                    COMPOSEABLE )
148*cdf0e10cSrcweir             ,DEF_INFO_1( GROUPKEEPTOGETHER,             GROUPKEEPTOGETHER,          GROUPKEEPTOGETHER,          COMPOSEABLE )
149*cdf0e10cSrcweir             ,DEF_INFO_1( PAGEHEADEROPTION,              PAGEHEADEROPTION,           PAGEHEADEROPTION,           COMPOSEABLE )
150*cdf0e10cSrcweir             ,DEF_INFO_1( PAGEFOOTEROPTION,              PAGEFOOTEROPTION,           PAGEFOOTEROPTION,           COMPOSEABLE )
151*cdf0e10cSrcweir             ,DEF_INFO_1( POSITIONX,                     POSITIONX,                  RPT_POSITIONX,              COMPOSEABLE )
152*cdf0e10cSrcweir             ,DEF_INFO_1( POSITIONY,                     POSITIONY,                  RPT_POSITIONY,              COMPOSEABLE )
153*cdf0e10cSrcweir             ,DEF_INFO_1( WIDTH,                         WIDTH,                      RPT_WIDTH,                  COMPOSEABLE )
154*cdf0e10cSrcweir             ,DEF_INFO_1( HEIGHT,                        HEIGHT,                     RPT_HEIGHT,                 COMPOSEABLE )
155*cdf0e10cSrcweir             ,DEF_INFO_1( FONT,                          FONT,                       RPT_FONT,                   COMPOSEABLE )
156*cdf0e10cSrcweir             ,DEF_INFO_1( PREEVALUATED,                  PREEVALUATED,               PREEVALUATED,               COMPOSEABLE )
157*cdf0e10cSrcweir             ,DEF_INFO_1( DEEPTRAVERSING,                DEEPTRAVERSING,             DEEPTRAVERSING,             COMPOSEABLE )
158*cdf0e10cSrcweir             ,DEF_INFO_1( FORMULA,                       FORMULA,                    FORMULA,                    COMPOSEABLE )
159*cdf0e10cSrcweir             ,DEF_INFO_1( INITIALFORMULA,                INITIALFORMULA,             INITIALFORMULA,             COMPOSEABLE )
160*cdf0e10cSrcweir             ,DEF_INFO_2( TYPE,                          TYPE,                       TYPE,                       COMPOSEABLE,DATA_PROPERTY )
161*cdf0e10cSrcweir             ,DEF_INFO_2( DATAFIELD,                     DATAFIELD,                  DATAFIELD,                  COMPOSEABLE,DATA_PROPERTY )
162*cdf0e10cSrcweir             ,DEF_INFO_2( FORMULALIST,                   FORMULALIST,                FORMULALIST,                COMPOSEABLE,DATA_PROPERTY )
163*cdf0e10cSrcweir             ,DEF_INFO_2( SCOPE,                         SCOPE,                      SCOPE,                      COMPOSEABLE,DATA_PROPERTY )
164*cdf0e10cSrcweir             ,DEF_INFO_1( PRESERVEIRI,                   PRESERVEIRI,                PRESERVEIRI,                COMPOSEABLE )
165*cdf0e10cSrcweir             ,DEF_INFO_1( BACKCOLOR,                     BACKCOLOR,                  BACKCOLOR,                  COMPOSEABLE )
166*cdf0e10cSrcweir             ,DEF_INFO_1( CONTROLBACKGROUND,             BACKCOLOR,                  BACKCOLOR,                  COMPOSEABLE )
167*cdf0e10cSrcweir             ,DEF_INFO_1( BACKTRANSPARENT,               BACKTRANSPARENT,            BACKTRANSPARENT,            COMPOSEABLE )
168*cdf0e10cSrcweir             ,DEF_INFO_1( CONTROLBACKGROUNDTRANSPARENT,  CONTROLBACKGROUNDTRANSPARENT
169*cdf0e10cSrcweir                                                                     ,CONTROLBACKGROUNDTRANSPARENT, COMPOSEABLE )
170*cdf0e10cSrcweir             ,DEF_INFO_1( CHARTTYPE,                     CHARTTYPE,                  CHARTTYPE,                  COMPOSEABLE )
171*cdf0e10cSrcweir             ,DEF_INFO_1( PREVIEW_COUNT,                 PREVIEW_COUNT,              PREVIEW_COUNT,              COMPOSEABLE )
172*cdf0e10cSrcweir             ,DEF_INFO_2( MASTERFIELDS,                  MASTERFIELDS,               MASTERFIELDS,               COMPOSEABLE,DATA_PROPERTY )
173*cdf0e10cSrcweir             ,DEF_INFO_2( DETAILFIELDS,                  DETAILFIELDS,               DETAILFIELDS,               COMPOSEABLE,DATA_PROPERTY)
174*cdf0e10cSrcweir             ,DEF_INFO_1( AREA,                          AREA,                       AREA,                       COMPOSEABLE )
175*cdf0e10cSrcweir             ,DEF_INFO_2( MIMETYPE,                      MIMETYPE,                   MIMETYPE,                   COMPOSEABLE,DATA_PROPERTY )
176*cdf0e10cSrcweir             ,DEF_INFO_1( PARAADJUST,                    PARAADJUST,                 PARAADJUST,                 COMPOSEABLE )
177*cdf0e10cSrcweir             ,DEF_INFO_1( VERTICALALIGN,                 VERTICALALIGN,              VERTICALALIGN,              COMPOSEABLE )
178*cdf0e10cSrcweir 		};
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 		s_pPropertyInfos = aPropertyInfos;
181*cdf0e10cSrcweir 		s_nCount = sizeof(aPropertyInfos) / sizeof(OPropertyInfoImpl);
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir         ::std::sort( aPropertyInfos, aPropertyInfos + s_nCount, PropertyInfoLessByName() );
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir         return s_pPropertyInfos;
186*cdf0e10cSrcweir 	}
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 	//------------------------------------------------------------------------
189*cdf0e10cSrcweir 	sal_Int32 OPropertyInfoService::getPropertyId(const String& _rName) const
190*cdf0e10cSrcweir 	{
191*cdf0e10cSrcweir 		const OPropertyInfoImpl* pInfo = getPropertyInfo(_rName);
192*cdf0e10cSrcweir 		return pInfo ? pInfo->nId : -1;
193*cdf0e10cSrcweir 	}
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 	//------------------------------------------------------------------------
196*cdf0e10cSrcweir 	String OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
197*cdf0e10cSrcweir 	{
198*cdf0e10cSrcweir 		const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
199*cdf0e10cSrcweir 		return (pInfo) ? pInfo->sTranslation : String();
200*cdf0e10cSrcweir 	}
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	//------------------------------------------------------------------------
203*cdf0e10cSrcweir 	rtl::OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const
204*cdf0e10cSrcweir 	{
205*cdf0e10cSrcweir 		const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
206*cdf0e10cSrcweir 		return (pInfo) ? pInfo->sHelpId : rtl::OString();
207*cdf0e10cSrcweir 	}
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir 	//------------------------------------------------------------------------
210*cdf0e10cSrcweir 	sal_uInt32 OPropertyInfoService::getPropertyUIFlags(sal_Int32 _nId) const
211*cdf0e10cSrcweir 	{
212*cdf0e10cSrcweir 		const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
213*cdf0e10cSrcweir 		return (pInfo) ? pInfo->nUIFlags : 0;
214*cdf0e10cSrcweir 	}
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir 	//------------------------------------------------------------------------
217*cdf0e10cSrcweir 	const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const String& _rName)
218*cdf0e10cSrcweir 	{
219*cdf0e10cSrcweir 		// intialisierung
220*cdf0e10cSrcweir 		if(!s_pPropertyInfos)
221*cdf0e10cSrcweir 			getPropertyInfo();
222*cdf0e10cSrcweir 		OPropertyInfoImpl  aSearch(_rName, 0L, String(), 0, "", 0);
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir 		const OPropertyInfoImpl* pPropInfo = ::std::lower_bound(
225*cdf0e10cSrcweir             s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() );
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir         if ( ( pPropInfo < s_pPropertyInfos + s_nCount ) && pPropInfo->sName == _rName )
228*cdf0e10cSrcweir             return pPropInfo;
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir 		return NULL;
231*cdf0e10cSrcweir 	}
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir 	//------------------------------------------------------------------------
235*cdf0e10cSrcweir 	const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(sal_Int32 _nId)
236*cdf0e10cSrcweir 	{
237*cdf0e10cSrcweir 		// intialisierung
238*cdf0e10cSrcweir 		if(!s_pPropertyInfos)
239*cdf0e10cSrcweir 			getPropertyInfo();
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 		// TODO: a real structure which allows quick access by name as well as by id
242*cdf0e10cSrcweir 		for (sal_uInt16 i = 0; i < s_nCount; i++)
243*cdf0e10cSrcweir 			if (s_pPropertyInfos[i].nId == _nId)
244*cdf0e10cSrcweir 				return &s_pPropertyInfos[i];
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir 		return NULL;
247*cdf0e10cSrcweir 	}
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir     //------------------------------------------------------------------------
250*cdf0e10cSrcweir     bool OPropertyInfoService::isComposable( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _rxFormComponentHandler )
251*cdf0e10cSrcweir     {
252*cdf0e10cSrcweir         sal_Int32 nId = getPropertyId( _rPropertyName );
253*cdf0e10cSrcweir         if ( nId != -1 )
254*cdf0e10cSrcweir         {
255*cdf0e10cSrcweir             sal_uInt32 nFlags = getPropertyUIFlags( nId );
256*cdf0e10cSrcweir             return ( nFlags & PROP_FLAG_COMPOSEABLE ) != 0;
257*cdf0e10cSrcweir         }
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir         return _rxFormComponentHandler->isComposable( _rPropertyName );
260*cdf0e10cSrcweir     }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir     //------------------------------------------------------------------------
263*cdf0e10cSrcweir     void OPropertyInfoService::getExcludeProperties(::std::vector< beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler)
264*cdf0e10cSrcweir     {
265*cdf0e10cSrcweir         uno::Sequence< beans::Property > aProps = _xFormComponentHandler->getSupportedProperties();
266*cdf0e10cSrcweir         static const ::rtl::OUString pExcludeProperties[] =
267*cdf0e10cSrcweir         {
268*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
269*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printable")),
270*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordBreak")),
271*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
272*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tag")),
273*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")),
274*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpURL")),
275*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")),
276*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")),
277*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")),
278*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")),
279*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMin")),
280*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ValueMax")),
281*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Spin")),
282*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValue")),
283*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMin")),
284*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinValueMax")),
285*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSpinValue")),
286*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinIncrement")),
287*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Repeat")),
288*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepeatDelay")),
289*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlLabel")), /// TODO: has to be checked
290*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LabelControl")),
291*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), // comment this out if you want to have title feature for charts
292*cdf0e10cSrcweir                 PROPERTY_MAXTEXTLEN,
293*cdf0e10cSrcweir                 PROPERTY_EFFECTIVEDEFAULT,
294*cdf0e10cSrcweir                 PROPERTY_EFFECTIVEMAX,
295*cdf0e10cSrcweir                 PROPERTY_EFFECTIVEMIN,
296*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HideInactiveSelection")),
297*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitAction")),
298*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputRequired")),
299*cdf0e10cSrcweir                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VerticalAlign")),
300*cdf0e10cSrcweir                 PROPERTY_ALIGN,
301*cdf0e10cSrcweir                 PROPERTY_EMPTY_IS_NULL,
302*cdf0e10cSrcweir                 PROPERTY_FILTERPROPOSAL
303*cdf0e10cSrcweir                 ,PROPERTY_POSITIONX
304*cdf0e10cSrcweir                 ,PROPERTY_POSITIONY
305*cdf0e10cSrcweir                 ,PROPERTY_WIDTH
306*cdf0e10cSrcweir                 ,PROPERTY_HEIGHT
307*cdf0e10cSrcweir                 ,PROPERTY_FONT
308*cdf0e10cSrcweir                 ,PROPERTY_LABEL
309*cdf0e10cSrcweir                 ,PROPERTY_LINECOLOR
310*cdf0e10cSrcweir                 ,PROPERTY_BORDER
311*cdf0e10cSrcweir                 ,PROPERTY_BORDERCOLOR
312*cdf0e10cSrcweir                 ,PROPERTY_BACKTRANSPARENT
313*cdf0e10cSrcweir                 ,PROPERTY_CONTROLBACKGROUND
314*cdf0e10cSrcweir                 ,PROPERTY_BACKGROUNDCOLOR
315*cdf0e10cSrcweir                 ,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
316*cdf0e10cSrcweir                 ,PROPERTY_FORMULALIST
317*cdf0e10cSrcweir                 ,PROPERTY_SCOPE
318*cdf0e10cSrcweir                 ,PROPERTY_TYPE
319*cdf0e10cSrcweir                 ,PROPERTY_DATASOURCENAME
320*cdf0e10cSrcweir                 ,PROPERTY_VERTICALALIGN
321*cdf0e10cSrcweir         };
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir         beans::Property* pPropsIter = aProps.getArray();
324*cdf0e10cSrcweir         beans::Property* pPropsEnd = pPropsIter + aProps.getLength();
325*cdf0e10cSrcweir         for (; pPropsIter != pPropsEnd; ++pPropsIter)
326*cdf0e10cSrcweir         {
327*cdf0e10cSrcweir             size_t nPos = 0;
328*cdf0e10cSrcweir             for (; nPos < sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) && pExcludeProperties[nPos] != pPropsIter->Name;++nPos )
329*cdf0e10cSrcweir                 ;
330*cdf0e10cSrcweir             if ( nPos == sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) )
331*cdf0e10cSrcweir                 _rExcludeProperties.push_back(*pPropsIter);
332*cdf0e10cSrcweir         }
333*cdf0e10cSrcweir     }
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir //............................................................................
337*cdf0e10cSrcweir } // namespace pcr
338*cdf0e10cSrcweir //............................................................................
339*cdf0e10cSrcweir 
340